using FluentValidation; using System.Collections.Generic; namespace Kean.Domain.Basic.Commands { /// /// 删除物料命令 /// public class DeleteItemCommand : CommandValidator, ICommand { /// /// 标识 /// public IEnumerable Id { get; set; } /// /// 标识 /// public IEnumerable Code { get; set; } /// /// 验证项 /// protected override void Validation() { RuleFor(r => r.Code).NotEmpty().WithMessage("物料类型不允许空"); } } }