Grade.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using Furion.DatabaseAccessor;
  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. [Table("base_grade")]
  11. public class Grade : IEntity
  12. {
  13. /// <summary>
  14. /// 主键:1位学段+1位序号
  15. /// </summary>
  16. [Comment("主键")]
  17. [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
  18. public short Id { get; set; }
  19. /// <summary>
  20. /// 学段
  21. /// </summary>
  22. [Comment("学段")]
  23. [Required]
  24. public EducationStage EducationStage { get; set; }
  25. /// <summary>
  26. /// 年级号
  27. /// </summary>
  28. [Comment("年级号")]
  29. [Required]
  30. public short GradeNumber { get; set; }
  31. /// <summary>
  32. /// 年级号2
  33. /// </summary>
  34. [Comment("年级号2")]
  35. [Required]
  36. public short GradeNumber2 { get; set; }
  37. /// <summary>
  38. /// 名称
  39. /// </summary>
  40. [Comment("名称")]
  41. [Required, StringLength(50)]
  42. public string Name { get; set; }
  43. /// <summary>
  44. /// 名称2
  45. /// </summary>
  46. [Comment("名称2")]
  47. [Required, StringLength(50)]
  48. public string Name2 { get; set; }
  49. /// <summary>
  50. /// 全称
  51. /// </summary>
  52. [Comment("全称")]
  53. [Required, StringLength(100)]
  54. public string FullName { get; set; }
  55. /// <summary>
  56. /// 简称
  57. /// </summary>
  58. [Required, StringLength(50)]
  59. public string ShortName { get; set; }
  60. /// <summary>
  61. /// 备注
  62. /// </summary>
  63. [Comment("备注")]
  64. [StringLength(200)]
  65. public string Remark { get; set; } = "";
  66. /// <summary>
  67. /// 状态
  68. /// </summary>
  69. [Comment("状态")]
  70. [Required, Column(TypeName = "smallint")]
  71. public CommonStatus Status { get; set; }
  72. }