feat(dept): 添加部门树形结构功能和相关API接口

This commit is contained in:
wcg
2026-01-04 10:23:42 +08:00
parent fe7c1763ba
commit b69c6d86c1
3 changed files with 187 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
using System.Collections.Generic;
using static Yi.Framework.Core.Helper.TreeHelper;
namespace Yi.Framework.Rbac.Domain.Shared.Dtos
{
/// <summary>
/// 部门树形DTO
/// </summary>
public class DeptTreeDto : ITreeModel<DeptTreeDto>
{
/// <summary>
/// 部门ID
/// </summary>
public Guid Id { get; set; }
/// <summary>
/// 父部门ID
/// </summary>
public Guid ParentId { get; set; }
/// <summary>
/// 排序号
/// </summary>
public int OrderNum { get; set; }
/// <summary>
/// 部门名称
/// </summary>
public string DeptName { get; set; } = string.Empty;
/// <summary>
/// 状态
/// </summary>
public bool State { get; set; }
/// <summary>
/// 子部门列表
/// </summary>
public List<DeptTreeDto>? Children { get; set; }
}
}