27 lines
722 B
C#
27 lines
722 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Kurisu.AspNetCore.CustomClass;
|
|
using Kurisu.AspNetCore.DataAccess.Dto;
|
|
|
|
namespace Dlhis.External.OpenApi.Request;
|
|
|
|
public class DeviceUploadLogMyRecordRequest : PageDto, IValidatableObject
|
|
{
|
|
public DateTimePeriod DateTimePeriod { get; set; }
|
|
|
|
[Required(ErrorMessage = "工号不能为空")]
|
|
public string UserCode { get; set; }
|
|
|
|
/// <inheritdoc />
|
|
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
|
{
|
|
DateTimePeriod ??= new DateTimePeriod();
|
|
|
|
if (DateTimePeriod.Start != null)
|
|
{
|
|
DateTimePeriod.End = DateTimePeriod.Start.Value.AddDays(1);
|
|
}
|
|
|
|
|
|
yield break;
|
|
}
|
|
} |