Course.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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_course")]
  10. public partial class Course : DEntityBase<short>
  11. {
  12. /// <summary>
  13. /// 主键
  14. /// </summary>
  15. [Comment("主键")]
  16. [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  17. public override short Id { get; set; }
  18. /// <summary>
  19. /// 名称
  20. /// </summary>
  21. [Comment("名称")]
  22. [Required, StringLength(50)]
  23. public string Name { get; set; }
  24. /// <summary>
  25. /// 简称
  26. /// </summary>
  27. [Comment("简称")]
  28. [Required, StringLength(50)]
  29. public string ShortName { get; set; }
  30. /// <summary>
  31. /// 别名
  32. /// </summary>
  33. [Comment("别名")]
  34. [StringLength(50)]
  35. public string NickName { get; set; }
  36. /// <summary>
  37. /// 备注
  38. /// </summary>
  39. [Comment("备注")]
  40. [StringLength(200)]
  41. public string Remark { get; set; }
  42. /// <summary>
  43. /// 状态
  44. /// </summary>
  45. [Comment("状态")]
  46. [Required, Column(TypeName = "smallint")]
  47. public CommonStatus Status { get; set; } = CommonStatus.ENABLE;
  48. }