NceePlan.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. using Furion.JsonSerialization;
  2. using Microsoft.EntityFrameworkCore;
  3. using System;
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. using System.ComponentModel.DataAnnotations;
  7. using System.ComponentModel.DataAnnotations.Schema;
  8. namespace YBEE.EQM.Core;
  9. /// <summary>
  10. /// 高中分析计划
  11. /// </summary>
  12. public class NceePlan : DEntityBase
  13. {
  14. /// <summary>
  15. /// 序,同一学期同年级从1开始计数
  16. /// </summary>
  17. [Comment("序,同一学期同年级从1开始计数")]
  18. [Required]
  19. public short Sequence { get; set; } = 1;
  20. /// <summary>
  21. /// 学期ID
  22. /// </summary>
  23. [Comment("学期ID")]
  24. [Required]
  25. public short SemesterId { get; set; }
  26. /// <summary>
  27. /// 年级ID
  28. /// </summary>
  29. [Comment("年级ID")]
  30. [Required]
  31. public short GradeId { get; set; }
  32. /// <summary>
  33. /// 名称
  34. /// </summary>
  35. [Comment("名称")]
  36. [Required, StringLength(100)]
  37. public string Name { get; set; }
  38. /// <summary>
  39. /// 全称
  40. /// </summary>
  41. [Comment("全称")]
  42. [Required, StringLength(200)]
  43. public string FullName { get; set; }
  44. /// <summary>
  45. /// 简称
  46. /// </summary>
  47. [Comment("简称")]
  48. [Required, StringLength(50)]
  49. public string ShortName { get; set; }
  50. /// <summary>
  51. /// 备注
  52. /// </summary>
  53. [Comment("备注")]
  54. [StringLength(200)]
  55. public string Remark { get; set; } = "";
  56. /// <summary>
  57. /// 配置
  58. /// </summary>
  59. [Comment("配置")]
  60. [Required, Column(TypeName = "json")]
  61. public string Config { get; set; } = JSON.Serialize(new NceePlanConfig());
  62. /// <summary>
  63. /// 状态
  64. /// </summary>
  65. [Comment("状态")]
  66. [Required]
  67. public ExamStatus Status { get; set; } = ExamStatus.READY;
  68. /// <summary>
  69. /// 开始时间
  70. /// </summary>
  71. [Comment("开始时间")]
  72. public DateTime? BeginTime { get; set; }
  73. /// <summary>
  74. /// 结束时间
  75. /// </summary>
  76. [Comment("结束时间")]
  77. public DateTime? EndTime { get; set; }
  78. /// <summary>
  79. /// 一对一引用(学期)
  80. /// </summary>
  81. public virtual Semester Semester { get; set; }
  82. /// <summary>
  83. /// 一对一引用(年级)
  84. /// </summary>
  85. public virtual Grade Grade { get; set; }
  86. /// <summary>
  87. /// 一对多引用(划线参考)
  88. /// </summary>
  89. public ICollection<NceeBaseLine> NceePlans { get; } = new List<NceeBaseLine>();
  90. }