26 lines
650 B
C#
26 lines
650 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Kurisu.AspNetCore.CustomClass;
|
|
|
|
namespace Dlhis.ScheduledTask.DeviceUploadLog.Request;
|
|
|
|
public class DeviceUploadLogMyRecordRequest : IValidatableObject
|
|
{
|
|
public DateTimePeriod DateTimePeriod { get; set; }
|
|
|
|
/// <inheritdoc />
|
|
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
|
{
|
|
if (DateTimePeriod == null)
|
|
{
|
|
DateTimePeriod = new DateTimePeriod();
|
|
}
|
|
|
|
if (DateTimePeriod.Start != null)
|
|
{
|
|
DateTimePeriod.End = DateTimePeriod.Start.Value.AddDays(1);
|
|
}
|
|
|
|
|
|
yield break;
|
|
}
|
|
} |