ExamPaper.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 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 short GradeId { get; set; }
  24. /// <summary>
  25. /// 年级年份
  26. /// </summary>
  27. [Comment("年级年份")]
  28. [Required]
  29. public short GradeYear { 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 string Name { get; set; }
  42. /// <summary>
  43. /// 总分
  44. /// </summary>
  45. [Comment("总分")]
  46. [Required, Column(TypeName = "decimal(10, 2)")]
  47. public decimal Score { get; set; } = 0;
  48. /// <summary>
  49. /// 备注
  50. /// </summary>
  51. [Comment("备注")]
  52. [StringLength(200)]
  53. public string Remark { get; set; } = "";
  54. /// <summary>
  55. /// 状态
  56. /// </summary>
  57. [Comment("状态")]
  58. [Required, Column(TypeName = "smallint")]
  59. public PublishStatus Status { get; set; }
  60. /// <summary>
  61. /// 发布时间
  62. /// </summary>
  63. [Comment("发布时间")]
  64. public DateTime? PublishTime { get; set; }
  65. /// <summary>
  66. /// 一对一引用(监测信息)
  67. /// </summary>
  68. public virtual ExamPlan ExamPlan { get; set; }
  69. /// <summary>
  70. /// 一对一引用(年级)
  71. /// </summary>
  72. public virtual Grade Grade { get; set; }
  73. /// <summary>
  74. /// 一对一引用(科目)
  75. /// </summary>
  76. public virtual Course Course { get; set; }
  77. }