using DS.Module.Core; using FluentValidation; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DS.WMS.Core.Map.Dtos { /// /// 航线与港口关联信息请求 /// public class RelationLaneAndPortReq { /// /// 主键Id /// public long Id { get; set; } /// /// 模块(公用时为空字符串) /// public string? Module { get; set; } /// /// 航线Id /// public long LaneId { get; set; } /// /// 航线代码 /// public string LaneCode { get; set; } /// /// 船司Id /// public long? CarrierId { get; set; } /// /// 船司代码 /// public string CarrierCode { get; set; } /// /// 港口Id /// public long? PortId { get; set; } /// /// 港口代码 /// public string PortCode { get; set; } /// /// 状态 0 启用 1 禁用 /// public StatusEnum? Status { get; set; } = StatusEnum.Enable; /// /// 备注 /// public string Note { get; set; } = ""; } /// /// 验证 /// public class RelationLaneAndPortReqValidator : AbstractValidator { /// /// 构造函数 /// public RelationLaneAndPortReqValidator() { this.RuleFor(o => o.LaneCode) .NotEmpty().WithName("航线代码"); this.RuleFor(o => o.PortCode) .NotEmpty().WithName("港口代码"); } } }