using System.ComponentModel.DataAnnotations; using Dlhis.Entity.Device.Enums; using Kurisu.AspNetCore.CustomClass; using Kurisu.AspNetCore.DataAccess.Dto; namespace Dlhis.ScheduledTask.DeviceUploadLog.Request; public class DeviceUploadLogPageRequest : PageDto, IValidatableObject { /// /// 设备类型 DeviceTypeEnumType /// [EnumDataType(typeof(DeviceTypeEnumType))] public DeviceTypeEnumType? Type { get; set; } /// /// 同步状态 /// public bool? Sync { get; set; } /// /// 是否为外包 /// public bool? IsOutsource { get; set; } /// /// 日期范围查询 /// public DateTimePeriod SearchDateTimePeriod { get; set; } public IEnumerable Validate(ValidationContext validationContext) { if (SearchDateTimePeriod is { End: not null }) { SearchDateTimePeriod.End = SearchDateTimePeriod.End.Value.AddDays(1).AddSeconds(-1); } yield break; } }