using Dlhis.Entity.Basic.Enums;
using Kurisu.AspNetCore.Utils.Extensions;
using System.ComponentModel.DataAnnotations;
using Kurisu.AspNetCore.DataAccess.Dto;
namespace Dlhis.Basic.Organization.Request;
public class GainfoPageRequest : PageDto, IValidatableObject
{
///
/// 档案类型
///
[EnumDataType(typeof(GainfoStatusEnumType))]
public GainfoStatusEnumType? Status { get; set; } = GainfoStatusEnumType.Working;
///
/// 部门选择
///
public List DepartmentSelections { get; set; } = new();
///
/// 是否为外包
///
public bool? IsOutsource { get; set; }
public IEnumerable Validate(ValidationContext validationContext)
{
DepartmentSelections.ForEach(d =>
{
//存在
if (d.DepartmentNos.IsPresent())
{
d.DepartmentNos.Remove(d.Tenant);
}
});
yield break;
}
}