using System.ComponentModel.DataAnnotations; using Kurisu.AspNetCore.CustomClass; namespace Dlhis.ScheduledTask.DeviceUploadLog.Request; public class DeviceUploadLogMyRecordRequest : IValidatableObject { public DateTimePeriod DateTimePeriod { get; set; } /// public IEnumerable Validate(ValidationContext validationContext) { DateTimePeriod ??= new DateTimePeriod(); if (DateTimePeriod.Start != null) { DateTimePeriod.End = DateTimePeriod.Start.Value.AddDays(1); } yield break; } }