using DS.Module.Core; using DS.WMS.Core.Code.Dtos; using FluentValidation; using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DS.WMS.Core.Map.Dtos { /// /// 港口映射信息请求 /// public class MappingPortReq { /// /// 主键Id /// public long Id { get; set; } /// /// 关联业务id /// public long LinkId { get; set; } /// /// 代码 /// public string Code { get; set; } /// /// 模块 /// public string Module { get; set; } /// /// 映射代码 /// public string MapCode { get; set; } /// /// 映射名称 /// public string MapName { get; set; } /// /// 船司Id /// public long CarrierId { get; set; } /// /// 状态 0 启用 1 禁用 /// public StatusEnum? Status { get; set; } = StatusEnum.Enable; /// /// 备注 /// public string Note { get; set; } = ""; } /// /// 验证 /// public class MappingPortReqValidator : AbstractValidator { /// /// 构造函数 /// public MappingPortReqValidator() { this.RuleFor(o => o.LinkId) .NotEmpty().WithName("港口Id"); this.RuleFor(o => o.Module) .NotEmpty().WithName("模块"); this.RuleFor(o => o.MapCode) .NotEmpty().WithName("映射代码"); this.RuleFor(o => o.MapName) .NotEmpty().WithName("映射名称"); } } }