SchoolTeacher.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. public class SchoolTeacher : DEntityBase
  10. {
  11. /// <summary>
  12. /// 机构ID
  13. /// </summary>
  14. [Comment("机构ID")]
  15. [Required]
  16. public short SysOrgId { get; set; }
  17. /// <summary>
  18. /// 人员ID
  19. /// </summary>
  20. [Comment("人员ID")]
  21. [Required]
  22. public int PersonId { get; set; }
  23. /// <summary>
  24. /// 学校职位ID
  25. /// </summary>
  26. [Comment("学校职位ID")]
  27. [Required, Column(TypeName = "smallint")]
  28. public SchoolJobTitle SchoolJobTitle { get; set; } = SchoolJobTitle.TEACHER;
  29. /// <summary>
  30. /// 是否外聘
  31. /// </summary>
  32. [Comment("是否外聘")]
  33. [Required]
  34. public bool IsExternal { get; set; } = false;
  35. /// <summary>
  36. /// 状态
  37. /// </summary>
  38. [Comment("状态")]
  39. [Required, Column(TypeName = "smallint")]
  40. public CommonStatus CommonStatus { get; set; } = CommonStatus.ENABLE;
  41. /// <summary>
  42. /// 一对一引用(机构)
  43. /// </summary>
  44. public virtual SysOrg SysOrg { get; set; }
  45. /// <summary>
  46. /// 一对一引用(人员)
  47. /// </summary>
  48. public virtual Person Person { get; set; }
  49. }