ExamSampleStudent.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. using Furion.DatabaseAccessor;
  2. using Microsoft.EntityFrameworkCore;
  3. using System.ComponentModel.DataAnnotations.Schema;
  4. using System.ComponentModel.DataAnnotations;
  5. namespace YBEE.EQM.Core;
  6. /// <summary>
  7. /// 抽样方案学生
  8. /// </summary>
  9. [Comment("抽样方案学生")]
  10. public class ExamSampleStudent : IEntity
  11. {
  12. /// <summary>
  13. /// 主键
  14. /// </summary>
  15. [Comment("主键")]
  16. [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  17. public long Id { get; set; }
  18. /// <summary>
  19. /// 抽样方案ID
  20. /// </summary>
  21. [Comment("抽样方案ID")]
  22. [Required]
  23. public int ExamSampleId { get; set; }
  24. /// <summary>
  25. /// 监测样本学生ID
  26. /// </summary>
  27. [Comment("监测样本学生ID")]
  28. [Required]
  29. public long ExamStudentId { get; set; }
  30. /// <summary>
  31. /// 监测号
  32. /// </summary>
  33. [Comment("监测号")]
  34. [Required, StringLength(20)]
  35. public string ExamNumber { get; set; } = "";
  36. /// <summary>
  37. /// 序号
  38. /// </summary>
  39. [Comment("序号")]
  40. [Required]
  41. public int Sequence { get; set; } = 0;
  42. /// <summary>
  43. /// 监测抽样类型
  44. /// </summary>
  45. [Comment("监测抽样类型")]
  46. [Required, Column(TypeName = "smallint")]
  47. public ExamSampleType ExamSampleType { get; set; } = ExamSampleType.SCHOOL_EXAM;
  48. /// <summary>
  49. /// 是否为特殊学生
  50. /// </summary>
  51. [Comment("是否为特殊学生")]
  52. [Required]
  53. public bool IsSpecialStudent { get; set; } = false;
  54. /// <summary>
  55. /// 前期总成绩
  56. /// </summary>
  57. [Comment("前期总成绩")]
  58. [Required, Column(TypeName = "decimal(10, 2)")]
  59. public decimal PreTotalScore { get; set; } = 0;
  60. /// <summary>
  61. /// 一对一引用(监测学生)
  62. /// </summary>
  63. public virtual ExamStudent ExamStudent { get; set; }
  64. /// <summary>
  65. /// 一对一引用(监测抽样)
  66. /// </summary>
  67. public virtual ExamSample ExamSample { get; set; }
  68. }