using SqlSugar; using System.ComponentModel.DataAnnotations; using WoodWood.Util.Validations; namespace Wood.Entity.SystemManage { /// /// 部门组织信息 /// [SugarTable("SysOrg", "部门组织信息")] public class OrgEntity : EntityTenantBaseExtra { /// /// 父级id /// [SugarColumn(ColumnDescription = "父级id", DefaultValue = "0")] public long ParentId { get; set; } = 0; /// /// 部门名称 /// [SugarColumn(ColumnDescription = "部门名称", Length = 16)] [Required] public string OrgName { get; set; } = ""; /// /// 部门编码 /// [SugarColumn(ColumnDescription = "部门编码", Length = 16)] [Required] [UniqueValue(ErrorMessage = "机构编码不能重复!")] public string FormCode { get; set; } = ""; /// /// 部门简写 /// [SugarColumn(ColumnDescription = "部门简写", Length = 16, IsNullable = true)] public string? ShortName { get; set; } /// /// 部门电话 /// [SugarColumn(ColumnDescription = "部门电话", Length = 16, IsNullable = true)] public string? Telephone { get; set; } /// /// 邮箱 /// [SugarColumn(ColumnDescription = "邮箱", Length = 64, IsNullable = true)] public string? Email { get; set; } /// /// 负责人 /// [SugarColumn(ColumnDescription = "负责人", DefaultValue = "0")] public long PrincipalUserId { get; set; } = 0; /// /// 排序 /// [SugarColumn(ColumnDescription = "排序", DefaultValue = "0")] public int Sort { get; set; } = 0; } }