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.

111 lines
3.6 KiB

3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. using Microsoft.EntityFrameworkCore;
  6. using Volo.Abp.Domain.Entities;
  7. using Volo.Abp.Domain.Entities.Auditing;
  8. namespace Shentun.Peis.Models
  9. {
  10. /// <summary>
  11. /// 团检体检登记
  12. /// </summary>
  13. [Table("customer_org_register")]
  14. public class CustomerOrgRegister : AuditedEntity<Guid>, IHasConcurrencyStamp
  15. {
  16. public CustomerOrgRegister(Guid id):base(id) {
  17. }
  18. public CustomerOrgRegister()
  19. {
  20. CustomerOrgCharges = new HashSet<CustomerOrgCharge>();
  21. CustomerOrgGroups = new HashSet<CustomerOrgGroup>();
  22. //PatientRegisters = new HashSet<PatientRegister>();
  23. }
  24. //[Key]
  25. //[Column("customer_org_register_id")]
  26. //public Guid CustomerOrgRegisterId { get; set; }
  27. /// <summary>
  28. /// 单位编号
  29. /// </summary>
  30. [Column("customer_org_id")]
  31. public Guid CustomerOrgId { get; set; }
  32. /// <summary>
  33. /// 单位体检次数
  34. /// </summary>
  35. [Column("medical_times")]
  36. public short MedicalTimes { get; set; }
  37. /// <summary>
  38. /// 计划号
  39. /// </summary>
  40. [Column("register_no")]
  41. [StringLength(12)]
  42. public string? RegisterNo { get; set; }
  43. /// <summary>
  44. /// 计划名称
  45. /// </summary>
  46. [Column("register_name")]
  47. [StringLength(50)]
  48. public string RegisterName { get; set; } = null!;
  49. /// <summary>
  50. /// 开始日期
  51. /// </summary>
  52. [Column("begin_time")]
  53. public DateTime BeginTime { get; set; }
  54. /// <summary>
  55. /// 结束日期
  56. /// </summary>
  57. [Column("end_time")]
  58. public DateTime? EndTime { get; set; }
  59. /// <summary>
  60. /// 完成标志
  61. /// </summary>
  62. [Column("is_complete")]
  63. [MaxLength(1)]
  64. public char IsComplete { get; set; }
  65. [Column("concurrency_stamp")]
  66. public string ConcurrencyStamp { get; set; }
  67. ///// <summary>
  68. ///// 最后修改者
  69. ///// </summary>
  70. //[Column("last_modifier_id")]
  71. //public Guid LastModifierId { get; set; }
  72. ///// <summary>
  73. ///// 最后修改日期
  74. ///// </summary>
  75. //[Column("last_modification_time", TypeName = "timestamp without time zone")]
  76. //public DateTime LastModificationTime { get; set; }
  77. //[Column("creator_id")]
  78. //public Guid CreatorId { get; set; }
  79. //[Column("creation_time", TypeName = "timestamp without time zone")]
  80. //public DateTime CreationTime { get; set; }
  81. //[Column("concurrency_stamp")]
  82. //[StringLength(40)]
  83. //public string ConcurrencyStamp { get; set; } = null!;
  84. [ForeignKey(nameof(CustomerOrgId))]
  85. [InverseProperty("CustomerOrgRegisters")]
  86. public virtual CustomerOrg CustomerOrg { get; set; } = null!;
  87. [InverseProperty(nameof(CustomerOrgCharge.CustomerOrgRegister))]
  88. public virtual ICollection<CustomerOrgCharge> CustomerOrgCharges { get; set; }
  89. [InverseProperty(nameof(CustomerOrgGroup.CustomerOrgRegister))]
  90. public virtual ICollection<CustomerOrgGroup> CustomerOrgGroups { get; set; }
  91. //[InverseProperty(nameof(PatientRegister.CustomerOrgRegister))]
  92. //public virtual ICollection<PatientRegister> PatientRegisters { get; set; }
  93. //public override object[] GetKeys()
  94. //{
  95. // return new object[] { CustomerOrgRegisterId };
  96. //}
  97. }
  98. }