using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Code.Dtos;
///
/// 运输条款请求实体
///
public class CodeServiceReq
{
///
/// 主键Id
///
public long Id { get; set; }
///
/// 运输条款-英文名称
///
public string ServiceName { get; set; }= "";
///
/// 中文名称
///
public string CnName { get; set; }= "";
///
/// EDI代码
///
public string EdiCode { get; set; }
///
/// 状态 0 启用 1 禁用
///
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
///
/// 备注
///
public string Note { get; set; } = "";
}
///
/// 验证
///
public class CodeServiceReqValidator : AbstractValidator
{
///
/// 构造函数
///
public CodeServiceReqValidator()
{
this.RuleFor(o => o.ServiceName)
.NotEmpty().WithName("运输条款-英文名称");
this.RuleFor(o => o.EdiCode)
.NotEmpty().WithName("EDI代码");
}
}