21 lines
608 B
C#
21 lines
608 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Kurisu.AspNetCore.CustomClass;
|
|
using Kurisu.AspNetCore.DataAccess.Dto;
|
|
|
|
namespace Dlhis.Basic.Appointment.Request;
|
|
|
|
public class AppointmentPageRequest : PageDto, IValidatableObject
|
|
{
|
|
public DateTimePeriod SearchDateTimePeriod { get; set; }
|
|
|
|
/// <inheritdoc />
|
|
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
|
{
|
|
if (SearchDateTimePeriod.HasValue())
|
|
{
|
|
SearchDateTimePeriod.End = SearchDateTimePeriod.End!.Value.AddDays(1).AddSeconds(-1);
|
|
}
|
|
|
|
yield break;
|
|
}
|
|
} |