using FluentValidation; namespace DS.WMS.Core.WmsModule.Dtos; public class WmsInPlanGoodsInput { public Guid? GID { get; set; } /// /// /// public Guid? WMSPLANID { get; set; } public string GoodsId { get; set; } = ""; /// /// /// public string GOODSCODE { get; set; } = ""; /// /// /// public string GOODSNAME { get; set; } = ""; /// /// /// public string GOODSMODEL { get; set; } = ""; /// /// 批次号 /// public string GOODSMODEL2 { get; set; } = ""; /// /// /// public decimal? KGS { get; set; } = 0; /// /// /// public decimal? CBM { get; set; } = 0; /// /// 件数 /// public decimal? PKGS { get; set; } = 0; /// /// 小件数 /// public decimal? MINPKGS { get; set; } = 0; /// /// 托盘数 /// public decimal Pallets { get; set; } /// /// 成交单位/仓储计费单位 库存的收费标准单位 /// public string STORAGEUNIT { get; set; } = ""; /// /// /// public decimal? STORAGEUNITCOUNT { get; set; } /// /// /// public string REMARK { get; set; } = ""; /// /// /// public decimal? NETWEIGHT { get; set; } = 0; /// /// /// public string TRUCKNO { get; set; } = ""; /// /// /// public string DRIVERNAME { get; set; } = ""; /// /// /// public string MBLNO { get; set; } = ""; } /// /// 验证 /// public class WmsInPlanGoodsInputValidator : AbstractValidator { /// /// 构造函数 /// public WmsInPlanGoodsInputValidator() { // this.RuleFor(o => o.GOODSCODE) // .NotEmpty().WithName("商品编码"); this.RuleFor(o => o.GOODSNAME) .NotEmpty().WithName("商品名称"); this.RuleFor(o => o.TRUCKNO) .NotEmpty().WithName("承运车辆"); this.RuleFor(o => o.PKGS) .GreaterThan(0).WithName("件数必须大于零"); this.RuleFor(o => o.STORAGEUNITCOUNT) .GreaterThan(0).WithName("计费数量必须大于零"); } }