User.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using GreenTree.Nachtragsmanagement.Core.Domain.Misc;
  7. namespace GreenTree.Nachtragsmanagement.Core.Domain.User
  8. {
  9. public class User : BaseEntity
  10. {
  11. #region Fields
  12. /// <summary>
  13. /// Rolelist
  14. /// </summary>
  15. private ICollection<Role> _roles;
  16. /// <summary>
  17. /// Notificationlist
  18. /// </summary>
  19. private ICollection<MailNotification> _mailNotifications;
  20. #endregion
  21. /// <summary>
  22. /// CustomId for identification
  23. /// </summary>
  24. public int CustomId { get; set; }
  25. /// <summary>
  26. /// Forename
  27. /// </summary>
  28. public string Forename { get; set; }
  29. /// <summary>
  30. /// Lastname
  31. /// </summary>
  32. public string Lastname { get; set; }
  33. /// <summary>
  34. /// Mail-Address
  35. /// </summary>
  36. public string MailAddress { get; set; }
  37. /// <summary>
  38. /// Password
  39. /// </summary>
  40. public string Password { get; set; }
  41. /// <summary>
  42. /// Roles the user have
  43. /// </summary>
  44. public virtual ICollection<Role> Roles
  45. {
  46. get { return _roles ?? (_roles = new List<Role>()); }
  47. protected set { _roles = value; }
  48. }
  49. /// <summary>
  50. /// MailNotification related to the user
  51. /// </summary>
  52. public virtual ICollection<MailNotification> MailNotifications
  53. {
  54. get { return _mailNotifications ?? ( _mailNotifications = new List<MailNotification>()); }
  55. protected set { _mailNotifications = value; }
  56. }
  57. }
  58. }