using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Code.Dtos;
///
/// 包装类型请求实体
///
public class CodePackageReq
{
///
/// 主键Id
///
public long Id { get; set; }
///
/// 包装类型
///
public string PackageName { get; set; }
///
/// 中文说明
///
public string CnExplain { get; set; }
///
/// AFR代码
///
public string AfrCode { get; set; }
///
/// EDI代码
///
public string EdiCode { get; set; }
///
/// 状态 0 启用 1 禁用
///
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
///
/// 备注
///
public string Note { get; set; } = "";
}
///
/// 验证
///
public class CodePackageReqValidator : AbstractValidator
{
///
/// 构造函数
///
public CodePackageReqValidator()
{
this.RuleFor(o => o.PackageName)
.NotEmpty().WithName("包装类型");
this.RuleFor(o => o.CnExplain)
.NotEmpty().WithName("中文名称");
//this.RuleFor(o => o.EdiCode)
// .NotEmpty().WithName("EDI代码");
}
}