19 lines
555 B
C#
19 lines
555 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Kurisu.AspNetCore.CustomClass;
|
|
|
|
namespace Dlhis.Canteen.MealSupplementRecord.Request;
|
|
|
|
public class MealSupplementRecordMyRequest : IValidatableObject
|
|
{
|
|
public DateTimePeriod SearchDateTimePeriod { get; set; }
|
|
|
|
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
|
{
|
|
if (SearchDateTimePeriod.End.HasValue)
|
|
{
|
|
SearchDateTimePeriod.End = SearchDateTimePeriod.End.Value.AddDays(1).AddSeconds(-1);
|
|
}
|
|
|
|
yield break;
|
|
}
|
|
} |