API
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

User.cs 982B

12345678910111213141516171819202122232425262728293031323334353637
  1. using UnivateProperties_API.Helpers;
  2. namespace UnivateProperties_API.Model.Users
  3. {
  4. public class User : BaseEntity
  5. {
  6. #region Constructor
  7. public User(string username, string password)
  8. {
  9. Username = username;
  10. byte[] passwordHash, passwordSalt;
  11. MyCommon.CreatePasswordHash(password, out passwordHash, out passwordSalt);
  12. PasswordHash = passwordHash;
  13. PasswordSalt = passwordSalt;
  14. }
  15. /// <summary>
  16. /// Do not use when creating new user
  17. /// </summary>
  18. public User()
  19. {
  20. }
  21. #endregion Constructor
  22. #region Properties
  23. public string Username { get; set; }
  24. public string Role { get; set; }
  25. public byte[] PasswordHash { get; set; }
  26. public byte[] PasswordSalt { get; set; }
  27. public bool Verified { get; set; }
  28. public string Token { get; set; }
  29. #endregion Properties
  30. }
  31. }