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