User.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. using MongoDB.Bson.Serialization.Attributes;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Collections.ObjectModel;
  5. using Mpeg4ConverterTool.Document;
  6. namespace Mpeg4ConverterTool
  7. {
  8. [BsonIgnoreExtraElementsAttribute]//忽略无法匹配的字段 2020-01-14 R00343 删除了firstName
  9. internal class User : AccountBase
  10. {
  11. public virtual AdminInfo CreateAdmin { get; set; }
  12. /// <summary>
  13. /// Terminals assigned to user
  14. /// </summary>
  15. public ICollection<UserTerminalInfo> Terminals { get; set; }
  16. /// <summary>
  17. /// Applications assigned to user
  18. /// </summary>
  19. public ICollection<FeatureInfo> Features { get; set; }
  20. public ICollection<OrganizationInfo> Organizations { get; set; }
  21. public ICollection<PushFailedMessage> PushFailedMessages { 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 string Region { get; set; }
  28. public string HospitalId { get; set; }
  29. public string Hospital { get; set; }
  30. public string Department { get; set; }
  31. public string CertificateId { get; set; }
  32. public int Rank { get; set; }
  33. public string Introduction { get; set; }
  34. public string Unionid { get; set; }
  35. /// <summary>
  36. /// Gets or sets the Openid of this user.
  37. /// </summary>
  38. public string Openid { get; set; }
  39. public ChargeGroupInfo ChargeGroupInfo { get; set; }
  40. /// <summary>
  41. /// direct server name
  42. /// </summary>
  43. public string DirectServer { get; set; }
  44. private User() : base()
  45. {
  46. Terminals = new Collection<UserTerminalInfo>();
  47. Features = new Collection<FeatureInfo>();
  48. Organizations = new Collection<OrganizationInfo>();
  49. PushFailedMessages = new Collection<PushFailedMessage>();
  50. Owners = new Collection<AdminInfo>();
  51. }
  52. public User(string id, DateTime createTime) : base(id, createTime)
  53. {
  54. Terminals = new Collection<UserTerminalInfo>();
  55. Features = new Collection<FeatureInfo>();
  56. Organizations = new Collection<OrganizationInfo>();
  57. PushFailedMessages = new Collection<PushFailedMessage>();
  58. Owners = new Collection<AdminInfo>();
  59. }
  60. }
  61. /// <summary>
  62. /// 备注
  63. /// </summary>
  64. internal class TerminalRemark
  65. {
  66. /// <summary>
  67. /// 国家
  68. /// </summary>
  69. public string Country { get; set; }
  70. /// <summary>
  71. /// 省份
  72. /// </summary>
  73. public string Province { get; set; }
  74. /// <summary>
  75. /// 代理商名称
  76. /// </summary>
  77. public string AgentName { get; set; }
  78. /// <summary>
  79. /// 医院名称
  80. /// </summary>
  81. public string HospitalName { get; set; }
  82. /// <summary>
  83. /// 其他备注
  84. /// </summary>
  85. public string OtherRemark { get; set; }
  86. }
  87. /// <summary>
  88. /// 用户超声机
  89. /// </summary>
  90. internal class UserTerminalInfo : TerminalInfo
  91. {
  92. /// <summary>
  93. /// 备注
  94. /// </summary>
  95. public TerminalRemark Remark { get; set; }
  96. public UserTerminalInfo()
  97. {
  98. Remark = new TerminalRemark();
  99. }
  100. public UserTerminalInfo(Terminal terminal, bool isShared = false) : base(terminal, isShared)
  101. {
  102. Remark = new TerminalRemark();
  103. }
  104. }
  105. }