Grade.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. /// 全称
  45. /// </summary>
  46. [Comment("全称")]
  47. [Required, StringLength(100)]
  48. public string FullName { get; set; }
  49. /// <summary>
  50. /// 简称
  51. /// </summary>
  52. [Required, StringLength(50)]
  53. public string ShortName { get; set; }
  54. /// <summary>
  55. /// 备注
  56. /// </summary>
  57. [Comment("备注")]
  58. [StringLength(200)]
  59. public string Remark { get; set; } = "";
  60. /// <summary>
  61. /// 状态
  62. /// </summary>
  63. [Comment("状态")]
  64. [Required, Column(TypeName = "smallint")]
  65. public CommonStatus Status { get; set; }
  66. }