Knocks/BackEnd/Knoks.Core/Entities/User.cs

88 lines
3.0 KiB
C#

using Knoks.Core.Entities.Interfaces;
using Knoks.Framework.DataAccess;
using Newtonsoft.Json;
using System;
namespace Knoks.Core.Entities
{
public enum UserType : byte
{
Real = 0,
Demo = 1,
Platform = 2
}
public class User : IApiResult
{
public long UserId { get; set; }
[JsonIgnore]
public byte UserRoleId { get; set; }
[ProcParamIgnore, JsonProperty(PropertyName = "userRoleId")]
public int _userRoleId { get { return UserRoleId; } set { UserRoleId = (byte)value; } }//fix for Swashbuckle error
[JsonIgnore]
public byte UserTypeId { get; set; }
[ProcParamIgnore, JsonProperty(PropertyName = "userTypeId")]
public int _userTypeId { get { return UserTypeId; } set { UserTypeId = (byte)value; } }//fix for Swashbuckle error
public DateTime RegistrationDate { get; set; }
public DateTime? CreateDate { get; set; }
public string CreateOrigin { get; set; }
public string CreateIPAddress { get; set; }
public string Source { get; set; }
public DateTime? LastModifyDate { get; set; }
public string LastModifyOrigin { get; set; }
public int? LastModifyOperatorId { get; set; }
// Personal Details
public string UserName { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public DateTime? BirthDate { get; set; }
public string Address { get; set; }
public string City { get; set; }
public string Gender { get; set; }
public string ZipCode { get; set; }
public string Email { get; set; }
public string PhonePrefix { get; set; }
public string Phone { get; set; }
public bool? IsUSTaxEntity { get; set; }
public bool KYC_Approved { get; set; }
public int? CountryId { get; set; }
[JsonIgnore]
public byte? LanguageId { get; set; }
[ProcParamIgnore, JsonProperty(PropertyName = "languageId")]
public int? _languageId { get { return LanguageId; } set { LanguageId = (byte)value; } }//fix for Swashbuckle error
public bool? TermsOfServiceChecked { get; set; }
public bool? MailVerfied { get; set; }
public bool? PhoneVerified { get; set; }
public bool? HasAvatar { get; set; }
//public string Content { get; set; }
//public string ContentBase64 { get; set; }
public string AvatarUrl { get; set; }
public UserRank Rank { get; set; }
public int? CountFollowers { get; set; }
public bool UserIsKnokser { get; set; }
}
public class UserCredential
{
public User User { get; set; }
public string Password { get; set; }
}
public enum UserRankValues
{
Padawan = 1,
Ranger = 3,
Knight = 5,
Master = 7,
Jedi = 10
}
public class UserPasswordReset : IApiResult {
public string Email { get; set; }
public string Link { get; set; }
}
}