using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Code.Dtos;
///
/// 航线请求实体
///
public class CodeLanesReq
{
///
/// 主键Id
///
public long Id { get; set; }
///
/// 航线代码
///
public string LaneCode { get; set; } = "";
///
/// 航线中文名称
///
public string LaneName { get; set; }= "";
///
/// 航线英文名称
///
public string LaneEnName { get; set; }= "";
///
/// 默认操作员
///
public long Operator { get; set; }= 0;
///
/// 默认单证
///
public long VouchingClerk { get; set; }= 0;
///
/// 默认客服
///
public long CustomerService { get; set; } = 0;
///
/// EDI代码
///
public string EdiCode { get; set; }
///
/// 状态 0 启用 1 禁用
///
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
///
/// 备注
///
public string Note { get; set; } = "";
}
///
/// 验证
///
public class CodeLanesReqValidator : AbstractValidator
{
///
/// 构造函数
///
public CodeLanesReqValidator()
{
this.RuleFor(o => o.LaneCode)
.NotEmpty().WithName("航线代码");
this.RuleFor(o => o.LaneName)
.NotEmpty().WithName("航线中文名称");
}
}