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.
|
|
|
using DS.Module.Core;
|
|
|
|
using FluentValidation;
|
|
|
|
using SqlSugar;
|
|
|
|
|
|
|
|
namespace DS.WMS.Core.Code.Dtos;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 港口请求实体
|
|
|
|
/// </summary>
|
|
|
|
public class CodePortReq
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// 主键Id
|
|
|
|
/// </summary>
|
|
|
|
public long Id { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 港口英文名称
|
|
|
|
/// </summary>
|
|
|
|
public string PortName { get; set; } = "";
|
|
|
|
/// <summary>
|
|
|
|
/// 港口中文名称
|
|
|
|
/// </summary>
|
|
|
|
public string CnName { get; set; }= "";
|
|
|
|
/// <summary>
|
|
|
|
/// 国家名称
|
|
|
|
/// </summary>
|
|
|
|
public string CountryName { get; set; }= "";
|
|
|
|
/// <summary>
|
|
|
|
/// 所在大洲
|
|
|
|
/// </summary>
|
|
|
|
public string Chau { get; set; }= "";
|
|
|
|
/// <summary>
|
|
|
|
/// 说明
|
|
|
|
/// </summary>
|
|
|
|
public string Explain { get; set; }= "";
|
|
|
|
/// <summary>
|
|
|
|
/// 港口类型
|
|
|
|
/// </summary>
|
|
|
|
public string PortType { get; set; }= "";
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 国家Id
|
|
|
|
/// </summary>
|
|
|
|
public long CountryId { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
|
|
/// 航线Id
|
|
|
|
/// </summary>
|
|
|
|
public long LaneId { get; set; }= 0;
|
|
|
|
/// <summary>
|
|
|
|
/// 航线代码
|
|
|
|
/// </summary>
|
|
|
|
public string LaneCode { get; set; }
|
|
|
|
/// <summary>
|
|
|
|
/// 航线
|
|
|
|
/// </summary>
|
|
|
|
public string Lane { 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 CodePortReqReqValidator : AbstractValidator<CodePortReq>
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// 构造函数
|
|
|
|
/// </summary>
|
|
|
|
public CodePortReqReqValidator()
|
|
|
|
{
|
|
|
|
this.RuleFor(o => o.PortName)
|
|
|
|
.NotEmpty().WithName("港口英文名称");
|
|
|
|
this.RuleFor(o => o.CnName)
|
|
|
|
.NotEmpty().WithName("港口中文名称");
|
|
|
|
}
|
|
|
|
}
|