namespace SafeCampus.System;
///
/// 学生宿舍楼表
///
[SugarTable("BuildingInfo", TableDescription = "学生宿舍楼表")]
[Tenant(SqlSugarConst.DB_DEFAULT)]
[BatchEdit]
[CodeGen]
//[IgnoreInitTable]
public class BuildingInfo : PrimaryKeyEntity
{
///
/// 宿舍楼名称
///
[SugarColumn(ColumnName = "Name", ColumnDescription = "宿舍楼名称", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = false)]
public string Name { get; set; }
///
/// 男寝还是女寝
///
[SugarColumn(ColumnName = "Gender", ColumnDescription = "宿舍楼类型", IsNullable = false)]
public bool Gender { get; set; }
///
/// 创建时间
///
[SugarColumn(ColumnName = "CreateTime", ColumnDescription = "创建时间", IsOnlyIgnoreUpdate = true, IsNullable = true)]
public DateTime CreateTime { get; set; }
///
/// 进入摄像头id
///
[SugarColumn(ColumnName = "InsCameraId", ColumnDescription = "进入摄像头id", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)]
public string InsCameraId { get; set; }
///
/// 出去摄像头id
///
[SugarColumn(ColumnName = "OutCameraId", ColumnDescription = "出去摄像头id", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)]
public string OutCameraId { get; set; }
///
/// 进入摄像头
///
[Navigate(NavigateType.OneToOne, nameof(InsCameraId), nameof(CameraInfo.SensorId))]
public CameraInfo InsCameraInfoItem { get; set; }
///
/// 出去摄像头
///
[Navigate(NavigateType.OneToOne, nameof(OutCameraId), nameof(CameraInfo.SensorId))]
public CameraInfo OutCameraInfoItem { get; set; }
}