feat 生日券功能,自动上传消费数据,提醒访客到期
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kurisu.AspNetCore.CustomClass;
|
||||
using Kurisu.AspNetCore.DataAccess.Dto;
|
||||
|
||||
namespace Dlhis.Canteen.Voucher.Requests;
|
||||
|
||||
public class EMealVoucherPageRequest : PageDto, IValidatableObject
|
||||
{
|
||||
public DateTimePeriod SearchDateTimePeriod { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (SearchDateTimePeriod.HasValue())
|
||||
{
|
||||
SearchDateTimePeriod.End = SearchDateTimePeriod.Start!.Value.AddDays(1).AddSeconds(-1);
|
||||
}
|
||||
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user