平安校园
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

39 行
1.4 KiB

  1. namespace SafeCampus.System;
  2. [SugarTable("DormitoryInfo", TableDescription = "学生寝室表")]
  3. [Tenant(SqlSugarConst.DB_DEFAULT)]
  4. [BatchEdit]
  5. [CodeGen]
  6. [IgnoreInitTable]
  7. public class DormitoryInfo : PrimaryKeyEntity
  8. {
  9. /// <summary>
  10. /// 寝室名称
  11. /// </summary>
  12. [SugarColumn(ColumnName = "Name", ColumnDescription = "寝室名称", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = false)]
  13. public string Name { get; set; }
  14. /// <summary>
  15. /// 男寝还是女寝
  16. /// </summary>
  17. [SugarColumn(ColumnName = "Gender", ColumnDescription = "寝室类型", IsNullable = false)]
  18. public bool Gender { get; set; }
  19. /// <summary>
  20. /// 所属宿舍楼id
  21. /// </summary>
  22. [SugarColumn(ColumnName = "BuildId", ColumnDescription = "所属宿舍楼id", IsNullable = false)]
  23. public long BuildId { get; set; }
  24. /// <summary>
  25. /// 人员列表
  26. /// </summary>
  27. [Navigate(NavigateType.OneToMany, nameof(PersonInfo.DormitoryId))]
  28. public List<PersonInfo> PersonInfos { get; set; }
  29. /// <summary>
  30. /// 创建时间
  31. /// </summary>
  32. [SugarColumn(ColumnName = "CreateTime", ColumnDescription = "创建时间", IsOnlyIgnoreUpdate = true, IsNullable = true)]
  33. public DateTime CreateTime { get; set; }
  34. /// <summary>
  35. /// 宿舍楼信息
  36. /// </summary>
  37. [Navigate(NavigateType.OneToOne, nameof(BuildId))]
  38. public BuildingInfo BuildingInfoItem { get; set; }
  39. }