using FluentValidation; using System.Collections.Generic; namespace Kean.Domain.Task.Commands { /// /// 创建禁用命令 /// public class EmergencyCommand : CommandValidator, ICommand { /// /// 站台 /// public string StationCode { get; set; } /// /// 模式 /// public string StationModel { get; set; } /// /// 1-WMS更改时标记为1; 2-WCS读取后标记为2 /// public string stationStatus { get; set; } /// /// 验证项 /// protected override void Validation() { RuleFor(r => r.StationCode).NotEmpty().WithMessage("应急站台不允许空"); RuleFor(r => r.StationModel).NotEmpty().WithMessage("模式不允许空"); } } }