ExamSample.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. using Microsoft.EntityFrameworkCore;
  2. using System;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. namespace YBEE.EQM.Core;
  6. /// <summary>
  7. /// 抽样方案
  8. /// </summary>
  9. [Comment("抽样方案")]
  10. public partial class ExamSample : DEntityBase
  11. {
  12. /// <summary>
  13. /// 监测计划ID
  14. /// </summary>
  15. [Comment("监测计划ID")]
  16. [Required]
  17. public int ExamPlanId { get; set; }
  18. /// <summary>
  19. /// 序,同一监测从1开始计数
  20. /// </summary>
  21. [Comment("序,同一监测从1开始计数")]
  22. [Required]
  23. public short Sequence { get; set; } = 1;
  24. /// <summary>
  25. /// 名称
  26. /// </summary>
  27. [Comment("名称")]
  28. [Required, StringLength(100)]
  29. public string Name { get; set; }
  30. /// <summary>
  31. /// 全称
  32. /// </summary>
  33. [Comment("全称")]
  34. [Required, StringLength(200)]
  35. public string FullName { get; set; }
  36. /// <summary>
  37. /// 简称
  38. /// </summary>
  39. [Comment("简称")]
  40. [Required, StringLength(50)]
  41. public string ShortName { get; set; }
  42. /// <summary>
  43. /// 备注
  44. /// </summary>
  45. [Comment("备注")]
  46. [StringLength(200)]
  47. public string Remark { get; set; } = "";
  48. /// <summary>
  49. /// 状态
  50. /// </summary>
  51. [Comment("状态")]
  52. [Required, Column(TypeName = "smallint")]
  53. public ExamSampleStatus Status { get; set; } = ExamSampleStatus.INITIAL;
  54. /// <summary>
  55. /// 抽样配置
  56. /// {
  57. /// percent: 40,
  58. /// onlyOneClassStudentMin: 40,
  59. /// gradeNoSampleStudentMin: 20,
  60. /// classStudentMin: 25,
  61. /// startPosition: 1,
  62. /// interval: 2,
  63. /// isExcludeSpecialStudent: true,
  64. /// isGradeSeatNumberRandom: true,
  65. /// }
  66. /// </summary>
  67. [Comment("抽样配置")]
  68. [Required, Column(TypeName = "json")]
  69. public string Config { get; set; } = "{}";
  70. /// <summary>
  71. /// 成绩引用监测计划ID
  72. /// </summary>
  73. [Comment("成绩引用监测计划ID")]
  74. public int? ExamScoreRefExamPlanId { get; set; }
  75. /// <summary>
  76. /// 是否选中使用的方案
  77. /// </summary>
  78. [Comment("是否选中使用的方案")]
  79. public bool IsSelected { get; set; } = false;
  80. /// <summary>
  81. /// 选中使用时间
  82. /// </summary>
  83. [Comment("选中使用时间")]
  84. public DateTime? SelectedTime { get; set; }
  85. /// <summary>
  86. /// 选中使用操作用户ID
  87. /// </summary>
  88. [Comment("选中使用操作用户ID")]
  89. public int? SelectedSysUserId { get; set; }
  90. /// <summary>
  91. /// 一对一引用(监测信息)
  92. /// </summary>
  93. public virtual ExamPlan ExamPlan { get; set; }
  94. /// <summary>
  95. /// 一对一引用(选中使用操作用户)
  96. /// </summary>
  97. public virtual SysUser SelectedSysUser { get; set; }
  98. /// <summary>
  99. /// 一对一引用(成绩引用监测计划)
  100. /// </summary>
  101. public virtual ExamPlan ExamScoreRefExamPlan { get; set; }
  102. }