using FluentValidation; using Kean.Domain.Order.Models; using System.Collections.Generic; namespace Kean.Domain.Order.Commands { /// /// 修改订单命令 /// public class ModifyOrderCommand : CommandValidator, ICommand { /// /// 标识 /// public int Id { get; set; } /// /// 订单行 /// public IEnumerable Lines { get; set; } /// /// 验证项 /// protected override void Validation() { RuleFor(r => r.Id).NotEmpty().WithMessage("标识不允许空"); RuleFor(r => r.Lines).NotEmpty().WithMessage("订单行不允许空"); } } }