You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

125 lines
2.8 KiB
C#

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