User.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace VidFilesUpgradeTool
  7. {
  8. class User : AccountBase
  9. {
  10. public virtual AdminInfo CreateAdmin { get; set; }
  11. /// <summary>
  12. /// Terminals assigned to user
  13. /// </summary>
  14. public ICollection<TerminalInfo> Terminals { get; set; }
  15. /// <summary>
  16. /// Applications assigned to user
  17. /// </summary>
  18. public ICollection<FeatureInfo> Features { get; set; }
  19. public ICollection<OrganizationInfo> Organizations { get; set; }
  20. public ICollection<PushFailedMessage> PushFailedMessages { get; private set; }
  21. public ICollection<PushFailedSystemMessage> PushFailedSystemMessages { get; private set; }
  22. public virtual ICollection<AdminInfo> Owners { get; private set; }
  23. public byte[] SmallHeadImage { get; set; }
  24. public string HeadImage { get; set; }
  25. public bool IsActive { get; set; }
  26. public string NickName { get; set; }
  27. public GenderType GenderType { get; set; }
  28. public string Region { get; set; }
  29. public string Hospital { get; set; }
  30. public string Department { get; set; }
  31. public string CertificateId { get; set; }
  32. public UserTypes UserType { get; set; }
  33. public UserPermissions UserPermission { get; set; }
  34. public int Rank { get; set; }
  35. }
  36. class AccountBase : TrackableEntity
  37. {
  38. /// <summary>
  39. /// user Name
  40. /// </summary>
  41. public string Name { get; set; }
  42. public string Password { get; set; }
  43. public string LastName { get; set; }
  44. public string FirstName { get; set; }
  45. public string Phone { get; set; }
  46. public string Email { get; set; }
  47. }
  48. class FeatureInfo: EntityInfo
  49. {
  50. }
  51. class PushFailedMessage : Entity
  52. {
  53. public virtual ChatMessage Message { get; set; }
  54. public int SessionSource { get; set; }
  55. }
  56. class PushFailedSystemMessage : Entity
  57. {
  58. public string Content { get; set; }
  59. public SystemMessageCode Type { get; set; }
  60. }
  61. class ChatMessage : MessageBase
  62. {
  63. }
  64. class MessageBase : TrackableEntity
  65. {
  66. public virtual ConversationInfo Conversation { get; set; }
  67. public virtual UserInfo CreateUser { get; set; }
  68. public string Content { get; set; }
  69. }
  70. class ConversationInfo : EntityInfo
  71. {
  72. }
  73. enum UserPermissions
  74. {
  75. //Can see the full patient name like '张三', and full indentity card id.
  76. High,
  77. //Can see partial patient name like '张*', and '3305****'.
  78. Low
  79. }
  80. enum SystemMessageCode
  81. {
  82. ApplyFriend,
  83. ApplyJoinGroup,
  84. NotifyBeFriends,
  85. CreateGroup,
  86. DismissGroup,
  87. }
  88. }