using DS.Module.Core; using FluentValidation; namespace DS.WMS.Core.Fee.Dtos; /// /// 费用模板主表请求实体 /// public class FeeTemplateReq { /// /// 主键Id /// public long Id { get; set; } /// /// 模板名称 /// public string TemplateName { get; set; } /// /// 业务类型(海运出口、海运进口、空运出口、空运进口) /// public string OpType { get; set; } /// /// 收付类型(收、付) /// public int FeeType { get; set; } = 1; /// /// 是否公共标识 /// public bool IsPublic { get; set; } = false; /// /// 描述 /// public string Description { get; set; } /// /// 状态 0 启用 1 禁用 /// public StatusEnum? Status { get; set; } = StatusEnum.Enable; /// /// 备注 /// public string Note { get; set; } = ""; /// /// 明细 /// public List Detail { get; set; } } /// /// 验证 /// public class FeeTemplateReqValidator : AbstractValidator { /// /// 构造函数 /// public FeeTemplateReqValidator() { this.RuleFor(o => o.TemplateName) .NotEmpty().WithName("模板名称"); this.RuleFor(o => o.OpType) .NotEmpty().WithName("业务类型"); } }