Files
jinko.yikatong/Src/Dlhis.Basic/Organization/Response/DepartmentTreeResponse.cs
2024-03-17 20:58:11 +08:00

48 lines
936 B
C#

using Kurisu.AspNetCore.Utils.Extensions;
using Newtonsoft.Json;
namespace Dlhis.Basic.Organization.Response;
public class DepartmentTreeResponse
{
/// <summary>
/// 上级
/// </summary>
public string PNo { get; set; }
/// <summary>
/// 部门号
/// </summary>
public string No { get; set; }
/// <summary>
/// 部门名称
/// </summary>
public string Name { get; set; }
public string Tenant { get; set; }
/// <summary>
/// 下级部门
/// </summary>
[JsonIgnore]
public List<DepartmentTreeResponse> CurrentNext { get; set; }
/// <summary>
/// 下级部门
/// </summary>
public List<DepartmentTreeResponse> Next
{
get
{
if (CurrentNext.IsPresent())
{
CurrentNext.ForEach(x => x.Tenant = Tenant);
}
return CurrentNext;
}
}
}