ExamCourse.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using Furion.JsonSerialization;
  2. using Microsoft.EntityFrameworkCore;
  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 ExamCourse : 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 short CourseId { get; set; }
  36. /// <summary>
  37. /// 总分
  38. /// </summary>
  39. [Comment("总分")]
  40. [Required]
  41. public decimal TotalScore { get; set; } = 100;
  42. /// <summary>
  43. /// 分数分段类型
  44. /// </summary>
  45. public ExamScoreRangeType ExamScoreRangeType { get; set; } = ExamScoreRangeType.EXAM_100;
  46. /// <summary>
  47. /// 成绩上报模板配置信息
  48. /// </summary>
  49. [Comment("模板配置信息")]
  50. [Required, Column(TypeName = "json")]
  51. public string ScoreReportConfig { get; set; } = JSON.Serialize(new ExamCourseScoreReportConfig());
  52. /// <summary>
  53. /// 一对一引用(监测年级)
  54. /// </summary>
  55. public virtual ExamGrade ExamGrade { get; set; }
  56. /// <summary>
  57. /// 一对一引用(科目)
  58. /// </summary>
  59. public virtual Course Course { get; set; }
  60. }