using DS.Module.Core; using FluentValidation; namespace DS.WMS.Core.Code.Dtos; /// /// 船名请求实体 /// public class CodeVesselReq { /// /// 主键Id /// public long Id { get; set; } /// /// 船名 /// public string VesselName { get; set; } = ""; /// /// 中文说明 /// public string CnName { get; set; }= ""; /// /// 船公司Id /// public long CarrierId { get; set; } /// /// 船运代理 /// public string ShipAgency { get; set; }= ""; /// /// EDI代码-船舶呼号 /// public string EdiCode { get; set; } = ""; /// /// 状态 0 启用 1 禁用 /// public StatusEnum? Status { get; set; } = StatusEnum.Enable; /// /// 备注 /// public string Note { get; set; } = ""; } /// /// 验证 /// public class CodeVesselReqValidator : AbstractValidator { /// /// 构造函数 /// public CodeVesselReqValidator() { this.RuleFor(o => o.VesselName) .NotEmpty().WithName("船名"); } }