using NetAdmin.Domain.DbMaps.Dependency; using NetAdmin.Domain.DbMaps.Dependency.Fields; namespace NetAdmin.Domain.DbMaps.Sys; /// /// 部门表 /// [Table(Name = Chars.FLG_DB_TABLE_NAME_PREFIX + nameof(Sys_Dept))] public record Sys_Dept : VersionEntity, IFieldEnabled, IFieldSummary, IFieldSort { /// /// 子节点 /// [JsonIgnore] [Navigate(nameof(ParentId))] public IEnumerable Children { get; init; } /// /// 是否启用 /// [Column] [JsonIgnore] public virtual bool Enabled { get; init; } /// /// 部门名称 /// [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)] [JsonIgnore] public virtual string Name { get; init; } /// /// 父编号 /// [Column] [JsonIgnore] public virtual long ParentId { get; init; } /// /// 角色集合 /// [JsonIgnore] [Navigate(ManyToMany = typeof(Sys_RoleDept))] public ICollection Roles { get; init; } /// /// 发送给此部门的站内信集合 /// [JsonIgnore] [Navigate(ManyToMany = typeof(Sys_SiteMsgDept))] public ICollection SiteMsgs { get; init; } /// /// 排序值,越大越前 /// [Column] [JsonIgnore] public virtual long Sort { get; init; } /// /// 部门描述 /// [Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)] [JsonIgnore] public virtual string Summary { get; init; } }