You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.6 KiB
C#

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