31 lines
834 B
C#
31 lines
834 B
C#
using Dlhis.Entity.Canteen.Enums;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using Kurisu.AspNetCore.CustomClass;
|
|
using Kurisu.AspNetCore.DataAccess.Dto;
|
|
|
|
namespace Dlhis.Canteen.Order.Request;
|
|
|
|
public class BalanceRecordUserPageRequest : PageDto, IValidatableObject
|
|
{
|
|
/// <summary>
|
|
/// 消费应用类型
|
|
/// </summary>
|
|
public CanteenApplicationTypeEnumType? ApplicationType { get; set; }
|
|
|
|
/// <summary>
|
|
/// 日期范围查询
|
|
/// </summary>
|
|
public DateTimePeriod SearchDateTimePeriod { get; set; }
|
|
|
|
|
|
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
|
{
|
|
if (SearchDateTimePeriod is { End: not null })
|
|
{
|
|
SearchDateTimePeriod.End = SearchDateTimePeriod.End.Value.AddDays(1).AddSeconds(-1);
|
|
}
|
|
|
|
yield break;
|
|
}
|
|
}
|