You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

208 lines
6.6 KiB

3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
7 months ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
7 months ago
3 years ago
7 months ago
3 years ago
7 months ago
3 years ago
7 months ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
5 months ago
3 years ago
3 years ago
3 years ago
  1. using Microsoft.EntityFrameworkCore;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.ComponentModel.DataAnnotations.Schema;
  6. using Volo.Abp.Domain.Entities;
  7. using Volo.Abp.Domain.Entities.Auditing;
  8. using Volo.Abp.Identity;
  9. namespace Shentun.Peis.Models
  10. {
  11. /// <summary>
  12. /// 团检单位设置
  13. /// </summary>
  14. [Table("customer_org")]
  15. [Index(nameof(MedicalCenterId), Name = "fki_fk_customer_org_organization_units")]
  16. [Index(nameof(ParentId), nameof(DisplayName), Name = "ix_org", IsUnique = true)]
  17. public class CustomerOrg : AuditedEntity<Guid>, IDisplayName, IDisplayOrder, IHasConcurrencyStamp
  18. {
  19. public CustomerOrg()
  20. {
  21. ContactPeople = new HashSet<ContactPerson>();
  22. CustomerOrgRegisters = new HashSet<CustomerOrgRegister>();
  23. OrganizationUnitsCustomerOrgs = new HashSet<OrganizationUnitsCustomerOrg>();
  24. }
  25. public CustomerOrg(Guid id):base(id)
  26. {
  27. ContactPeople = new HashSet<ContactPerson>();
  28. CustomerOrgRegisters = new HashSet<CustomerOrgRegister>();
  29. OrganizationUnitsCustomerOrgs = new HashSet<OrganizationUnitsCustomerOrg>();
  30. }
  31. /// <summary>
  32. /// 单位名称
  33. /// </summary>
  34. [Column("display_name")]
  35. [StringLength(50)]
  36. public string DisplayName { get; set; } = null!;
  37. /// <summary>
  38. /// 简称
  39. /// </summary>
  40. [Column("short_name")]
  41. [StringLength(50)]
  42. public string? ShortName { get; set; }
  43. /// <summary>
  44. /// 开票名称
  45. /// </summary>
  46. [Column("invoice_name")]
  47. [StringLength(50)]
  48. public string? InvoiceName { get; set; }
  49. /// <summary>
  50. /// 父编号
  51. /// </summary>
  52. [Column("parent_id")]
  53. //[StringLength(8)]
  54. public Guid? ParentId { get; set; }
  55. /// <summary>
  56. /// 路径编码
  57. /// </summary>
  58. [Column("path_code")]
  59. [StringLength(60)]
  60. public string PathCode { get; set; } = null!;
  61. /// <summary>
  62. /// 联系电话
  63. /// </summary>
  64. [Column("telephone")]
  65. [StringLength(50)]
  66. public string? Telephone { get; set; }
  67. /// <summary>
  68. /// 传真
  69. /// </summary>
  70. [Column("fax")]
  71. [StringLength(30)]
  72. public string? Fax { get; set; }
  73. /// <summary>
  74. /// 邮政编码
  75. /// </summary>
  76. [Column("postal_code")]
  77. [StringLength(30)]
  78. public string? PostalCode { get; set; }
  79. /// <summary>
  80. /// 联系地址
  81. /// </summary>
  82. [Column("address")]
  83. [StringLength(100)]
  84. public string? Address { get; set; }
  85. /// <summary>
  86. /// 业务银行
  87. /// </summary>
  88. [Column("bank")]
  89. [StringLength(100)]
  90. public string? Bank { get; set; }
  91. /// <summary>
  92. /// 银行帐号
  93. /// </summary>
  94. [Column("accounts")]
  95. [StringLength(100)]
  96. public string? Accounts { get; set; }
  97. /// <summary>
  98. /// 单位性质
  99. /// </summary>
  100. [Column("org_type_id")]
  101. public Guid OrgTypeId { get; set; }
  102. /// <summary>
  103. /// 拼音简码
  104. /// </summary>
  105. [Column("simple_code")]
  106. [StringLength(50)]
  107. public string SimpleCode { get; set; } = null!;
  108. /// <summary>
  109. /// 备注
  110. /// </summary>
  111. [Column("remark")]
  112. [StringLength(100)]
  113. public string? Remark { get; set; }
  114. /// <summary>
  115. /// 锁住
  116. /// </summary>
  117. [Column("is_lock")]
  118. [MaxLength(1)]
  119. public char IsLock { get; set; }
  120. /// <summary>
  121. /// 状态
  122. /// </summary>
  123. [Column("is_active")]
  124. [MaxLength(1)]
  125. public char IsActive { get; set; }
  126. /// <summary>
  127. /// 显示顺序
  128. /// </summary>
  129. [Column("display_order")]
  130. public int DisplayOrder { get; set; }
  131. [Column("concurrency_stamp")]
  132. public string ConcurrencyStamp { get; set; }
  133. /// <summary>
  134. /// 国家组织机构代码
  135. /// </summary>
  136. [Column("country_org_code")]
  137. [StringLength(20)]
  138. public string CountryOrgCode { get; set; }
  139. /// <summary>
  140. /// 销售员
  141. /// </summary>
  142. [Column("sales_person")]
  143. [StringLength(50)]
  144. public string SalesPerson { get; set; }
  145. /// <summary>
  146. /// 销售员电话
  147. /// </summary>
  148. [Column("sales_person_phone")]
  149. [StringLength(20)]
  150. public string SalesPersonPhone { get; set; }
  151. /// <summary>
  152. /// 单位编码 兼容老系统
  153. /// </summary>
  154. [Column("customer_org_code")]
  155. [StringLength(50)]
  156. public string CustomerOrgCode { get; set; }
  157. //[Column("creator_id")]
  158. //public Guid CreatorId { get; set; }
  159. //[Column("creation_time", TypeName = "timestamp without time zone")]
  160. //public DateTime CreationTime { get; set; }
  161. ///// <summary>
  162. ///// 最后修改者
  163. ///// </summary>
  164. //[Column("last_modifier_id")]
  165. //public Guid LastModifierId { get; set; }
  166. ///// <summary>
  167. ///// 最后修改日期
  168. ///// </summary>
  169. //[Column("last_modification_time", TypeName = "timestamp without time zone")]
  170. //public DateTime LastModificationTime { get; set; }
  171. [Column("medical_center_id")]
  172. public Guid MedicalCenterId { get; set; }
  173. /// <summary>
  174. /// 体检类别id
  175. /// </summary>
  176. [Column("medical_type_id")]
  177. public Guid? MedicalTypeId { get; set; }
  178. //[Column("concurrency_stamp")]
  179. //[StringLength(40)]
  180. //public string ConcurrencyStamp { get; set; } = null!;
  181. //[ForeignKey(nameof(OrganizationUnitId))]
  182. //[InverseProperty(nameof(OrganizationUnit.CustomerOrgs))]
  183. //public virtual OrganizationUnit OrganizationUnit { get; set; } = null!;
  184. [InverseProperty(nameof(ContactPerson.CustomerOrg))]
  185. public virtual ICollection<ContactPerson> ContactPeople { get; set; }
  186. [InverseProperty(nameof(CustomerOrgRegister.CustomerOrg))]
  187. public virtual ICollection<CustomerOrgRegister> CustomerOrgRegisters { get; set; }
  188. [InverseProperty(nameof(OrganizationUnitsCustomerOrg.CustomerOrg))]
  189. public virtual ICollection<OrganizationUnitsCustomerOrg> OrganizationUnitsCustomerOrgs { get; set; }
  190. //public override object[] GetKeys()
  191. //{
  192. // return new object[] { CustomerOrgId };
  193. //}
  194. }
  195. }