mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-06-20 10:48:15 +08:00
wip: 🧠 初步的框架
This commit is contained in:
60
src/backend/NetAdmin.Domain/DbMaps/Sys/Sys_Dept.cs
Normal file
60
src/backend/NetAdmin.Domain/DbMaps/Sys/Sys_Dept.cs
Normal file
@ -0,0 +1,60 @@
|
||||
using NetAdmin.Domain.DbMaps.Dependency;
|
||||
using NetAdmin.Domain.DbMaps.Dependency.Fields;
|
||||
|
||||
namespace NetAdmin.Domain.DbMaps.Sys;
|
||||
|
||||
/// <summary>
|
||||
/// 部门表
|
||||
/// </summary>
|
||||
[Table(Name = Chars.FLG_TABLE_NAME_PREFIX + nameof(Sys_Dept))]
|
||||
public record Sys_Dept : VersionEntity, IFieldEnabled, IFieldSummary, IFieldSort
|
||||
{
|
||||
/// <summary>
|
||||
/// 子节点
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Navigate(nameof(ParentId))]
|
||||
public IEnumerable<Sys_Dept> Children { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
public virtual bool Enabled { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门名称
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_31)]
|
||||
public virtual string Name { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 父编号
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
public virtual long ParentId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 角色集合
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Navigate(ManyToMany = typeof(Sys_RoleDept))]
|
||||
public ICollection<Sys_Role> Roles { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序值,越大越前
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column]
|
||||
public virtual long Sort { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 部门描述
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[Column(DbType = Chars.FLG_DB_FIELD_TYPE_VARCHAR_255)]
|
||||
public virtual string Summary { get; init; }
|
||||
}
|
Reference in New Issue
Block a user