feat 设备任务领取
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kurisu.AspNetCore.Utils.Extensions;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
|
||||
namespace Dlhis.ScheduledTask.TaskAssignment.Request;
|
||||
|
||||
public class DeviceTaskGetRequest : PageDto, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 品牌
|
||||
/// </summary>
|
||||
public string Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备号
|
||||
/// </summary>
|
||||
public string DeviceUniqueNo { get; set; }
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (Brand.IsEmpty() && DeviceUniqueNo.IsEmpty())
|
||||
{
|
||||
yield return new ValidationResult("设备品牌和设备唯一号不能都为空", new[] { nameof(Brand), nameof(DeviceUniqueNo) });
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user