27 lines
734 B
C#
27 lines
734 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using Kurisu.AspNetCore.CustomClass;
|
|
using Kurisu.AspNetCore.DataAccess.Dto;
|
|
|
|
namespace Dlhis.Basic.Common.ApiLog.Request;
|
|
|
|
public class ApiLogRequest : PageDto, IValidatableObject
|
|
{
|
|
/// <summary>
|
|
/// 日志级别 LogLevel
|
|
/// </summary>
|
|
[EnumDataType(typeof(LogLevel))]
|
|
public LogLevel? Level { get; set; }
|
|
|
|
|
|
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;
|
|
}
|
|
} |