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.

81 lines
1.8 KiB
C#

using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Code.Dtos;
/// <summary>
/// 集装箱信息请求实体
/// </summary>
public class CodeCtnReq
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 集装箱尺寸
/// </summary>
public string CtnSize { get; set; } = "";
/// <summary>
/// 集装箱类型
/// </summary>
public string CtnType { get; set; }= "";
/// <summary>
/// 表现形式
/// </summary>
public string CtnName { get; set; }= "";
/// <summary>
/// EDI代码
/// </summary>
public string EdiCode { get; set; }= "";
/// <summary>
/// 箱皮重
/// </summary>
public decimal CtnWeight { get; set; }= 0;
/// <summary>
/// 中文说明
/// </summary>
public string CnExplain { get; set; }= "";
/// <summary>
/// 英文说明
/// </summary>
public string EnExplain { get; set; }= "";
/// <summary>
/// AFR代码
/// </summary>
public string AfrCode { get; set; }= "";
/// <summary>
/// 默认限重
/// </summary>
public decimal LimitWeight { get; set; } = 0;
/// <summary>
/// TEU
/// </summary>
public decimal TEU { get; set; }= 0;
/// <summary>
/// 状态 0 启用 1 禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
}
/// <summary>
/// 验证
/// </summary>
public class CodeCtnReqValidator : AbstractValidator<CodeCtnReq>
{
/// <summary>
/// 构造函数
/// </summary>
public CodeCtnReqValidator()
{
this.RuleFor(o => o.CtnName)
.NotEmpty().WithName("表现形式");
}
}