|
- namespace SafeCampus.System;
- [SugarTable("DormitoryInfo", TableDescription = "学生寝室表")]
- [Tenant(SqlSugarConst.DB_DEFAULT)]
- [BatchEdit]
- [CodeGen]
- [IgnoreInitTable]
- public class DormitoryInfo : PrimaryKeyEntity
- {
- /// <summary>
- /// 寝室名称
- /// </summary>
- [SugarColumn(ColumnName = "Name", ColumnDescription = "寝室名称", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = false)]
- public string Name { get; set; }
- /// <summary>
- /// 男寝还是女寝
- /// </summary>
- [SugarColumn(ColumnName = "Gender", ColumnDescription = "寝室类型", IsNullable = false)]
- public bool Gender { get; set; }
- /// <summary>
- /// 所属宿舍楼id
- /// </summary>
- [SugarColumn(ColumnName = "BuildId", ColumnDescription = "所属宿舍楼id", IsNullable = false)]
- public long BuildId { get; set; }
- /// <summary>
- /// 人员列表
- /// </summary>
- [Navigate(NavigateType.OneToMany, nameof(PersonInfo.DormitoryId))]
- public List<PersonInfo> PersonInfos { get; set; }
- /// <summary>
- /// 创建时间
- /// </summary>
- [SugarColumn(ColumnName = "CreateTime", ColumnDescription = "创建时间", IsOnlyIgnoreUpdate = true, IsNullable = true)]
- public DateTime CreateTime { get; set; }
- /// <summary>
- /// 宿舍楼信息
- /// </summary>
- [Navigate(NavigateType.OneToOne, nameof(BuildId))]
- public BuildingInfo BuildingInfoItem { get; set; }
- }
|