ExamPlan.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. ///// 监测期间类型
  33. ///// </summary>
  34. //[Comment("监测期间类型")]
  35. //[Required, Column(TypeName = "smallint")]
  36. //public ExamPeriodType ExamPeriodType { get; set; } = ExamPeriodType.NONE;
  37. ///// <summary>
  38. ///// 监测类型
  39. ///// </summary>
  40. //[Comment("监测类型")]
  41. //[Required, Column(TypeName = "smallint")]
  42. //public ExamType ExamType { get; set; } = ExamType.NONE;
  43. /// <summary>
  44. /// 序,同一学段、学期、监测类型、监测期间从1开始计数
  45. /// </summary>
  46. [Comment("序,同一学段、学期、监测类型、监测期间从1开始计数")]
  47. [Required]
  48. public short Sequence { get; set; } = 1;
  49. /// <summary>
  50. /// 名称
  51. /// </summary>
  52. [Comment("名称")]
  53. [Required, StringLength(100)]
  54. public string Name { get; set; }
  55. /// <summary>
  56. /// 全称
  57. /// </summary>
  58. [Comment("全称")]
  59. [Required, StringLength(200)]
  60. public string FullName { get; set; }
  61. /// <summary>
  62. /// 简称
  63. /// </summary>
  64. [Comment("简称")]
  65. [Required, StringLength(50)]
  66. public string ShortName { get; set; }
  67. /// <summary>
  68. /// 备注
  69. /// </summary>
  70. [Comment("备注")]
  71. [StringLength(200)]
  72. public string Remark { get; set; } = "";
  73. /// <summary>
  74. /// 监测配置
  75. /// </summary>
  76. [Comment("监测配置")]
  77. [Required, Column(TypeName = "json")]
  78. public string Config { get; set; } = new { }.ToJson();
  79. /// <summary>
  80. /// 状态
  81. /// </summary>
  82. [Comment("状态")]
  83. [Required]
  84. public ExamStatus Status { get; set; } = ExamStatus.READY;
  85. /// <summary>
  86. /// 开始时间
  87. /// </summary>
  88. [Comment("开始时间")]
  89. public DateTime? BeginTime { get; set; }
  90. /// <summary>
  91. /// 结束时间
  92. /// </summary>
  93. [Comment("结束时间")]
  94. public DateTime? EndTime { get; set; }
  95. /// <summary>
  96. /// 一对一引用(学期)
  97. /// </summary>
  98. public virtual Semester Semester { get; set; }
  99. /// <summary>
  100. /// 一对多引用(监测机构)
  101. /// </summary>
  102. public ICollection<ExamOrg> ExamOrgs { get; } = new List<ExamOrg>();
  103. /// <summary>
  104. /// 一对多引用(监测年级)
  105. /// </summary>
  106. public ICollection<ExamGrade> ExamGrades { get; } = new List<ExamGrade>();
  107. /// <summary>
  108. /// 一对多引用(监测上报类型)
  109. /// </summary>
  110. public ICollection<ExamDataReport> ExamDataReports { get; } = new List<ExamDataReport>();
  111. }