平安校园
 
 
 
 
 
 

46 lines
1.8 KiB

  1. namespace SafeCampus.System;
  2. /// <summary>
  3. /// 学生宿舍楼表
  4. /// </summary>
  5. [SugarTable("BuildingInfo", TableDescription = "学生宿舍楼表")]
  6. [Tenant(SqlSugarConst.DB_DEFAULT)]
  7. [BatchEdit]
  8. [CodeGen]
  9. public class BuildingInfo : PrimaryKeyEntity
  10. {
  11. /// <summary>
  12. /// 宿舍楼名称
  13. /// </summary>
  14. [SugarColumn(ColumnName = "Name", ColumnDescription = "宿舍楼名称", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = false)]
  15. public string Name { get; set; }
  16. /// <summary>
  17. /// 男寝还是女寝
  18. /// </summary>
  19. [SugarColumn(ColumnName = "Gender", ColumnDescription = "宿舍楼类型", IsNullable = false)]
  20. public bool Gender { get; set; }
  21. /// <summary>
  22. /// 创建时间
  23. /// </summary>
  24. [SugarColumn(ColumnName = "CreateTime", ColumnDescription = "创建时间", IsOnlyIgnoreUpdate = true, IsNullable = true)]
  25. public DateTime CreateTime { get; set; }
  26. /// <summary>
  27. /// 进入摄像头id
  28. /// </summary>
  29. [SugarColumn(ColumnName = "InsCameraId", ColumnDescription = "进入摄像头id", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)]
  30. public string InsCameraId { get; set; }
  31. /// <summary>
  32. /// 出去摄像头id
  33. /// </summary>
  34. [SugarColumn(ColumnName = "OutCameraId", ColumnDescription = "出去摄像头id", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)]
  35. public string OutCameraId { get; set; }
  36. /// <summary>
  37. /// 进入摄像头
  38. /// </summary>
  39. [Navigate(NavigateType.OneToOne, nameof(InsCameraId), nameof(CameraInfo.SensorId))]
  40. public CameraInfo InsCameraInfoItem { get; set; }
  41. /// <summary>
  42. /// 出去摄像头
  43. /// </summary>
  44. [Navigate(NavigateType.OneToOne, nameof(OutCameraId), nameof(CameraInfo.SensorId))]
  45. public CameraInfo OutCameraInfoItem { get; set; }
  46. }