using DS.Module.Core; using FluentValidation; namespace DS.WMS.Core.Fee.Dtos; /// /// 往来单位固定费用请求实体 /// public class FeeCustTemplateDetailReq { /// /// 主键Id /// public long Id { get; set; } /// /// 费用Id /// public long FeeId { get; set; } /// /// 费用代码 录入费用是作为检索 /// public string FeeCode { get; set; } /// /// 费用名称 /// public string FeeName { get; set; } /// /// 结算对象 /// public string CustomerName { get; set; } /// /// 结算对象类型 /// public CustomerTypeEnum? CustomerType { get; set; } /// /// 收付类型(收、付) /// public int FeeType { get; set; } /// /// 客户Id /// public long CustomerId { get; set; } /// /// 费用标准 /// public string Unit { get; set; } /// /// 是否箱型 /// public bool? IsCtn { get; set; } = false; /// /// 币别 /// public string Currency { get; set; } /// /// 单价 /// public decimal? UnitPrice { get; set; } /// /// 排序 /// public int? OrderNo { get; set; } = 100; /// /// 汇率 /// public decimal? ExchangeRate { get; set; } /// /// 费用默认税率 /// public decimal? TaxRate { get; set; } /// /// 财务税率 /// public decimal? AccTaxRate { get; set; } /// /// 税额 /// public decimal? Tax { get; set; } /// /// 含税单价 /// public decimal? TaxUnitPrice { get; set; } /// /// 是否开票 /// public bool? IsInvoice { get; set; } = false; /// /// 是否垫付费用 /// public bool? IsAdvancedPay { get; set; } = false; /// /// 状态 0 启用 1 禁用 /// public StatusEnum? Status { get; set; } = StatusEnum.Enable; /// /// 备注 /// public string Note { get; set; } = ""; } /// /// 验证 /// public class FeeCustTemplateDetailReqValidator : AbstractValidator { /// /// 构造函数 /// public FeeCustTemplateDetailReqValidator() { this.RuleFor(o => o.CustomerName) .NotEmpty().WithName("结算对象"); this.RuleFor(o => o.FeeName) .NotEmpty().WithName("费用名称"); } }