using SqlSugar; namespace Model.Entity.System { /// /// 组织架构表(树形:公司/实验室/部门/班组,ParentId 自关联;班组带白/夜班) /// [SugarTable("sys_org")] public class OrgEntity : BaseEntity { [SugarColumn(ColumnName = "ParentId", ColumnDescription = "父级组织Id(0=根节点)", DefaultValue = "0")] public long ParentId { get; set; } [SugarColumn(ColumnName = "Name", ColumnDescription = "组织名称", Length = 100, IsNullable = false)] public string Name { get; set; } [SugarColumn(ColumnName = "Code", ColumnDescription = "组织编码(唯一)", Length = 64, IsNullable = false)] public string Code { get; set; } /// 组织类型:1=公司, 2=实验室, 3=部门, 4=班组 [SugarColumn(ColumnName = "OrgType", ColumnDescription = "组织类型(1公司/2实验室/3部门/4班组)", ColumnDataType = "smallint", DefaultValue = "3")] public byte OrgType { get; set; } /// 班组班次:0=非班组, 1=白班, 2=夜班 [SugarColumn(ColumnName = "ShiftType", ColumnDescription = "班次(0非班组/1白班/2夜班)", ColumnDataType = "smallint", DefaultValue = "0")] public byte ShiftType { get; set; } [SugarColumn(ColumnName = "Leader", ColumnDescription = "负责人", Length = 50, IsNullable = true)] public string? Leader { get; set; } [SugarColumn(ColumnName = "Phone", ColumnDescription = "联系电话", Length = 20, IsNullable = true)] public string? Phone { get; set; } [SugarColumn(ColumnName = "Sort", ColumnDescription = "排序号", DefaultValue = "0")] public int Sort { get; set; } [SugarColumn(ColumnName = "Remark", ColumnDescription = "备注", Length = 500, IsNullable = true)] public string? Remark { get; set; } } }