using System.Collections.Generic;

namespace HoneyBox.Admin.Models.Department;

/// <summary>
/// 部门树形结构 DTO
/// </summary>
public class DepartmentTreeDto
{
    /// <summary>
    /// 部门ID
    /// </summary>
    public long Id { get; set; }

    /// <summary>
    /// 父部门ID
    /// </summary>
    public long ParentId { get; set; }

    /// <summary>
    /// 部门名称
    /// </summary>
    public string Name { get; set; } = null!;

    /// <summary>
    /// 部门编码
    /// </summary>
    public string? Code { get; set; }

    /// <summary>
    /// 排序号
    /// </summary>
    public int SortOrder { get; set; }

    /// <summary>
    /// 状态：0禁用 1启用
    /// </summary>
    public byte Status { get; set; }

    /// <summary>
    /// 部门下用户数量
    /// </summary>
    public int UserCount { get; set; }

    /// <summary>
    /// 子部门列表
    /// </summary>
    public List<DepartmentTreeDto> Children { get; set; } = new();
}
