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.
61 lines
1.3 KiB
C#
61 lines
1.3 KiB
C#
using DS.Module.Core;
|
|
using FluentValidation;
|
|
|
|
namespace DS.WMS.Core.Code.Dtos;
|
|
|
|
/// <summary>
|
|
/// 船名请求实体
|
|
/// </summary>
|
|
public class CodeVesselReq
|
|
{
|
|
/// <summary>
|
|
/// 主键Id
|
|
/// </summary>
|
|
public long Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// 船名
|
|
/// </summary>
|
|
public string VesselName { get; set; } = "";
|
|
/// <summary>
|
|
/// 中文说明
|
|
/// </summary>
|
|
public string CnName { get; set; }= "";
|
|
/// <summary>
|
|
/// 船公司Id
|
|
/// </summary>
|
|
public long CarrierId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 船运代理
|
|
/// </summary>
|
|
public string ShipAgency { get; set; }= "";
|
|
|
|
/// <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 CodeVesselReqValidator : AbstractValidator<CodeVesselReq>
|
|
{
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
public CodeVesselReqValidator()
|
|
{
|
|
this.RuleFor(o => o.VesselName)
|
|
.NotEmpty().WithName("船名");
|
|
}
|
|
} |