using FluentValidation;
using Kean.Domain.Stock.Models;
using System;
using System.Collections.Generic;
namespace Kean.Domain.Stock.Commands
{
///
/// 合并命令
///
public class CombineCommand : CommandValidator, ICommand
{
///
/// 特征码
///
internal const string Feature = "@Combine";
///
/// 托盘条码
///
public string Barcode { get; set; }
///
/// 目标位置
///
public int? Destination { get; set; }
///
/// 库存行
///
public IEnumerable Lines { get; set; }
///
/// 满载
///
public bool? Full { get; set; }
///
/// 操作者
///
public int Operator { get; set; }
///
/// 标签
///
public string Tag { get; set; }
///
/// 时间戳
///
internal DateTime? Timestamp { get; set; }
///
/// 验证项
///
protected override void Validation()
{
RuleFor(r => r.Lines).NotEmpty().WithMessage("库存行不允许空");
}
}
}