Semester.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. using Microsoft.EntityFrameworkCore;
  2. using System.ComponentModel.DataAnnotations;
  3. using System.ComponentModel.DataAnnotations.Schema;
  4. namespace YBEE.EQM.Core;
  5. /// <summary>
  6. /// 学期
  7. /// </summary>
  8. [Comment("学期")]
  9. [Table("base_semester")]
  10. public class Semester : DEntityBase<short>
  11. {
  12. /// <summary>
  13. /// 主键:2023~2024学年上期:20232,2023~2024学年下期:20241
  14. /// </summary>
  15. [Comment("主键:2023~2024学年上期:20232,2023~2024学年下期:20241")]
  16. [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
  17. public override short Id { get; set; }
  18. /// <summary>
  19. /// 学期类型
  20. /// </summary>
  21. [Comment("学期类型")]
  22. [Required, Column(TypeName = "smallint")]
  23. public SemesterType SemesterType { get; set; }
  24. /// <summary>
  25. /// 名称,2023至2024学年上学期
  26. /// </summary>
  27. [Comment("名称,2023至2024学年上学期")]
  28. [Required, StringLength(100)]
  29. public string Name { get; set; }
  30. /// <summary>
  31. /// 简称,2023~2024上
  32. /// </summary>
  33. [Comment("简称,2023~2024上")]
  34. [Required, StringLength(100)]
  35. public string ShortName { get; set; }
  36. /// <summary>
  37. /// 别名,2023年秋季
  38. /// </summary>
  39. [Comment("别名,2023年秋季")]
  40. [Required, StringLength(100)]
  41. public string NickName { get; set; }
  42. /// <summary>
  43. /// 别名简称,2023秋
  44. /// </summary>
  45. [Comment("别名简称,2023秋")]
  46. [Required, StringLength(100)]
  47. public string NickShortName { get; set; }
  48. /// <summary>
  49. /// 开始年份
  50. /// </summary>
  51. [Comment("开始年份")]
  52. [Required]
  53. public short BeginYear { get; set; }
  54. /// <summary>
  55. /// 结束年份
  56. /// </summary>
  57. [Comment("结束年份")]
  58. [Required]
  59. public short EndYear { get; set; }
  60. /// <summary>
  61. /// 是否当前学年
  62. /// </summary>
  63. [Comment("是否当前学年")]
  64. [Required]
  65. public bool IsCurrent { get; set; } = false;
  66. /// <summary>
  67. /// 备注
  68. /// </summary>
  69. [Comment("备注")]
  70. [StringLength(200)]
  71. public string Remark { get; set; }
  72. }