namespace SafeCampus.System;
[SugarTable("DormitoryInfo", TableDescription = "学生寝室表")]
[Tenant(SqlSugarConst.DB_DEFAULT)]
[BatchEdit]
[CodeGen]
[IgnoreInitTable]
public class DormitoryInfo : 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; }
///
/// 所属宿舍楼id
///
[SugarColumn(ColumnName = "BuildId", ColumnDescription = "所属宿舍楼id", IsNullable = false)]
public long BuildId { get; set; }
///
/// 人员列表
///
[Navigate(NavigateType.OneToMany, nameof(PersonInfo.DormitoryId))]
public List PersonInfos { get; set; }
///
/// 创建时间
///
[SugarColumn(ColumnName = "CreateTime", ColumnDescription = "创建时间", IsOnlyIgnoreUpdate = true, IsNullable = true)]
public DateTime CreateTime { get; set; }
///
/// 宿舍楼信息
///
[Navigate(NavigateType.OneToOne, nameof(BuildId))]
public BuildingInfo BuildingInfoItem { get; set; }
}