22 lines
619 B
C#
22 lines
619 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Dlhis.ScheduledTask.DeviceUploadLog.Request;
|
|
|
|
public class DeviceUploadLogManuallySetTimeInfoRequest : IValidatableObject
|
|
{
|
|
[Required(ErrorMessage = "设备号不能为空")]
|
|
public string DeviceNo { get; set; }
|
|
|
|
public DateTime Start { get; set; }
|
|
|
|
public DateTime End { get; set; }
|
|
|
|
/// <inheritdoc />
|
|
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
|
{
|
|
if (Start >= End)
|
|
{
|
|
yield return new ValidationResult("开始时间不可大于等于结束时间");
|
|
}
|
|
}
|
|
} |