ExamPaper.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. using Microsoft.EntityFrameworkCore;
  2. using System.Collections.Generic;
  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 class ExamPaper : DEntityBase
  11. {
  12. /// <summary>
  13. /// 监测计划ID
  14. /// </summary>
  15. [Comment("监测计划ID")]
  16. [Required]
  17. public int ExamPlanId { get; set; }
  18. /// <summary>
  19. /// 监测年级ID
  20. /// </summary>
  21. [Comment("监测年级ID")]
  22. [Required]
  23. public int ExamGradeId { get; set; }
  24. /// <summary>
  25. /// 年级ID
  26. /// </summary>
  27. [Comment("年级ID")]
  28. [Required]
  29. public short GradeId { get; set; }
  30. /// <summary>
  31. /// 监测科目ID
  32. /// </summary>
  33. [Comment("监测科目ID")]
  34. [Required]
  35. public int ExamCourseId { get; set; }
  36. /// <summary>
  37. /// 科目ID
  38. /// </summary>
  39. [Comment("科目ID")]
  40. [Required]
  41. public short CourseId { get; set; }
  42. /// <summary>
  43. /// 名称
  44. /// </summary>
  45. [Comment("名称")]
  46. [Required]
  47. public string Name { get; set; }
  48. /// <summary>
  49. /// 总分
  50. /// </summary>
  51. [Comment("总分")]
  52. [Required, Column(TypeName = "decimal(10, 2)")]
  53. public decimal Score { get; set; } = 0;
  54. /// <summary>
  55. /// 备注
  56. /// </summary>
  57. [Comment("备注")]
  58. [StringLength(200)]
  59. public string Remark { get; set; } = "";
  60. /// <summary>
  61. /// 问题
  62. /// </summary>
  63. [Comment("问题")]
  64. [StringLength(4000)]
  65. public string Questions { get; set; } = "";
  66. /// <summary>
  67. /// 建议
  68. /// </summary>
  69. [Comment("建议")]
  70. [StringLength(4000)]
  71. public string Suggestions { get; set; } = "";
  72. /// <summary>
  73. /// 双向细目表编制状态
  74. /// </summary>
  75. [Comment("状态")]
  76. [Required, Column(TypeName = "smallint")]
  77. public AuditStatus TwclStatus { get; set; } = AuditStatus.UNSUBMIT;
  78. /// <summary>
  79. /// 双向细目表编制审核记录
  80. /// </summary>
  81. [Comment("双向细目表编制审核记录")]
  82. [Required, Column(TypeName = "json")]
  83. public string TwclAudits { get; set; } = "[]";
  84. /// <summary>
  85. /// 双向细目表编制人用户ID
  86. /// </summary>
  87. [Comment("双向细目表编制人用户ID")]
  88. public int? TwclSysUserId { get; set; }
  89. /// <summary>
  90. /// 问题建议撰写状态
  91. /// </summary>
  92. [Comment("问题建议撰写状态")]
  93. [Required, Column(TypeName = "smallint")]
  94. public AuditStatus SuggestionStatus { get; set; } = AuditStatus.UNSUBMIT;
  95. /// <summary>
  96. /// 问题建议撰写审核记录
  97. /// </summary>
  98. [Comment("问题建议撰写审核记录")]
  99. [Required, Column(TypeName = "json")]
  100. public string SuggestionAudits { get; set; } = "[]";
  101. /// <summary>
  102. /// 问题建议撰写人用户ID
  103. /// </summary>
  104. [Comment("问题建议撰写人用户ID")]
  105. public int? SuggestionSysUserId { get; set; }
  106. /// <summary>
  107. /// 一对一引用(监测信息)
  108. /// </summary>
  109. public virtual ExamPlan ExamPlan { get; set; }
  110. /// <summary>
  111. /// 一对一引用(年级)
  112. /// </summary>
  113. public virtual Grade Grade { get; set; }
  114. /// <summary>
  115. /// 一对一引用(科目)
  116. /// </summary>
  117. public virtual Course Course { get; set; }
  118. /// <summary>
  119. /// 一对一引用(双向细目表编制人)
  120. /// </summary>
  121. public virtual SysUser TwclSysUser { get; set; }
  122. /// <summary>
  123. /// 一对一引用(问题建议撰写人)
  124. /// </summary>
  125. public virtual SysUser SuggestionSysUser { get; set; }
  126. /// <summary>
  127. /// 一对多引用(试卷小题)
  128. /// </summary>
  129. public ICollection<ExamPaperQuestionMinor> ExamPaperQuestionMinors { get; } = new List<ExamPaperQuestionMinor>();
  130. }