20 lines
609 B
C#
20 lines
609 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Kurisu.AspNetCore.DataAccess.Dto;
|
|
|
|
namespace Dlhis.ScheduledTask.DeviceUploadLog.Request;
|
|
|
|
public class UserAttendanceDataAnalysisPageRequest : PageDto, IValidatableObject
|
|
{
|
|
/// <summary>
|
|
/// 查询日期
|
|
/// </summary>
|
|
public DateTime SearchDate { get; set; }
|
|
|
|
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
|
{
|
|
if (SearchDate.Date > DateTime.Now.Date)
|
|
{
|
|
yield return new ValidationResult("查询日期不能大于今天", new[] { nameof(SearchDate) });
|
|
}
|
|
}
|
|
} |