ExamPlan.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. using Microsoft.EntityFrameworkCore;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.ComponentModel.DataAnnotations.Schema;
  6. namespace YBEE.EQM.Core;
  7. /// <summary>
  8. /// 监测计划
  9. /// </summary>
  10. [Comment("监测计划")]
  11. public partial class ExamPlan : DEntityBase
  12. {
  13. /// <summary>
  14. /// 学段
  15. /// </summary>
  16. [Comment("学段")]
  17. [Required, Column(TypeName = "smallint")]
  18. public EducationStage EducationStage { get; set; }
  19. /// <summary>
  20. /// 学制
  21. /// </summary>
  22. [Comment("学制")]
  23. [Required]
  24. public short EducationYears { get; set; }
  25. /// <summary>
  26. /// 学期ID
  27. /// </summary>
  28. [Comment("学期ID")]
  29. [Required]
  30. public short SemesterId { get; set; }
  31. /// <summary>
  32. /// 序,同一学段、学期、监测类型、监测期间从1开始计数
  33. /// </summary>
  34. [Comment("序,同一学段、学期、监测类型、监测期间从1开始计数")]
  35. [Required]
  36. public short Sequence { get; set; } = 1;
  37. /// <summary>
  38. /// 名称
  39. /// </summary>
  40. [Comment("名称")]
  41. [Required, StringLength(100)]
  42. public string Name { get; set; }
  43. /// <summary>
  44. /// 全称
  45. /// </summary>
  46. [Comment("全称")]
  47. [Required, StringLength(200)]
  48. public string FullName { get; set; }
  49. /// <summary>
  50. /// 简称
  51. /// </summary>
  52. [Comment("简称")]
  53. [Required, StringLength(50)]
  54. public string ShortName { get; set; }
  55. /// <summary>
  56. /// 备注
  57. /// </summary>
  58. [Comment("备注")]
  59. [StringLength(200)]
  60. public string Remark { get; set; } = "";
  61. /// <summary>
  62. /// 监测配置
  63. /// </summary>
  64. [Comment("监测配置")]
  65. [Required, Column(TypeName = "json")]
  66. public string Config { get; set; } = new { }.ToJson();
  67. /// <summary>
  68. /// 是否已固定监测抽样方案
  69. /// </summary>
  70. [Comment("是否已固定监测抽样方案")]
  71. [Required]
  72. public bool IsFixedExamSample { get; set; } = false;
  73. /// <summary>
  74. /// 状态
  75. /// </summary>
  76. [Comment("状态")]
  77. [Required]
  78. public ExamStatus Status { get; set; } = ExamStatus.READY;
  79. /// <summary>
  80. /// 开始时间
  81. /// </summary>
  82. [Comment("开始时间")]
  83. public DateTime? BeginTime { get; set; }
  84. /// <summary>
  85. /// 结束时间
  86. /// </summary>
  87. [Comment("结束时间")]
  88. public DateTime? EndTime { get; set; }
  89. /// <summary>
  90. /// 一对一引用(学期)
  91. /// </summary>
  92. public virtual Semester Semester { get; set; }
  93. /// <summary>
  94. /// 一对多引用(监测机构)
  95. /// </summary>
  96. public ICollection<ExamOrg> ExamOrgs { get; } = new List<ExamOrg>();
  97. /// <summary>
  98. /// 一对多引用(监测年级)
  99. /// </summary>
  100. public ICollection<ExamGrade> ExamGrades { get; } = new List<ExamGrade>();
  101. /// <summary>
  102. /// 一对多引用(监测上报类型)
  103. /// </summary>
  104. public ICollection<ExamDataReport> ExamDataReports { get; } = new List<ExamDataReport>();
  105. }