ExamSampleInput.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. namespace YBEE.EQM.Application;
  2. /// <summary>
  3. /// 添加抽样方案输入参数
  4. /// </summary>
  5. public class AddExamSampleInput
  6. {
  7. /// <summary>
  8. /// 监测计划ID
  9. /// </summary>
  10. [Required]
  11. public int ExamPlanId { get; set; }
  12. /// <summary>
  13. /// 备注
  14. /// </summary>
  15. [StringLength(200)]
  16. public string Remark { get; set; } = "";
  17. /// <summary>
  18. /// 抽样配置
  19. /// {
  20. /// percent: 40,
  21. /// onlyOneClassStudentMin: 40,
  22. /// gradeNoSampleStudentMin: 20,
  23. /// classStudentMin: 25,
  24. /// startPosition: 1,
  25. /// interval: 2,
  26. /// isExcludeSpecialStudent: true,
  27. /// isGradeSeatNumberRandom: true,
  28. /// }
  29. /// </summary>
  30. [Required]
  31. public string Config { get; set; } = "{}";
  32. }
  33. /// <summary>
  34. /// 更新抽样方案输入参数
  35. /// </summary>
  36. public class UpdateExamSampleInput : AddExamSampleInput
  37. {
  38. /// <summary>
  39. /// 主键
  40. /// </summary>
  41. [Required]
  42. public int Id { get; set; }
  43. /// <summary>
  44. /// 名称
  45. /// </summary>
  46. [Required, StringLength(100)]
  47. public string Name { get; set; }
  48. /// <summary>
  49. /// 全称
  50. /// </summary>
  51. [Required, StringLength(200)]
  52. public string FullName { get; set; }
  53. /// <summary>
  54. /// 简称
  55. /// </summary>
  56. [Required, StringLength(50)]
  57. public string ShortName { get; set; }
  58. }
  59. /// <summary>
  60. /// 保存全抽班级ID输入参数
  61. /// </summary>
  62. public class SaveExamSampleAllClasses
  63. {
  64. /// <summary>
  65. /// 主键
  66. /// </summary>
  67. [Required]
  68. public int Id { get; set; }
  69. /// <summary>
  70. /// 班级ID列表
  71. /// </summary>
  72. [Required]
  73. public List<long> ClassIds { get; set; } = new();
  74. }
  75. /// <summary>
  76. /// 切换全抽班级输入参数
  77. /// </summary>
  78. public class SwitchExamSampleAllClassInput
  79. {
  80. /// <summary>
  81. /// 抽样方案主键
  82. /// </summary>
  83. [Required]
  84. public int Id { get; set; }
  85. /// <summary>
  86. /// 班级ID
  87. /// </summary>
  88. [Required]
  89. public long SchoolClassId { get; set; }
  90. /// <summary>
  91. /// true增加,false取消
  92. /// </summary>
  93. [Required]
  94. public bool IsAdd { get; set; }
  95. }