using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Info.Dtos;
///
/// 客户财务账期请求实体
///
public class ClientAccountDateReq
{
///
/// 主键Id
///
public long Id { get; set; }
///
/// 客户Id
///
public long ClientId { get; set; }
///
/// Desc:业务来源Id
///
public long SourceId { get; set; }
///
/// Desc:合同生效日期
///
public DateTime? BeginDate { get; set; }
///
/// Desc:合同结束日期
///
public DateTime? EndDate { get; set; }
///
/// Desc:业务类型
///
public string BusinessType { get; set; }
///
/// Desc:揽货人Id
///
public long SaleId { get; set; }
///
/// Desc:账期类型
///
public string AccountType { get; set; }
///
/// Desc:账期起算日
///
public string AccountStartDate { get; set; }
///
/// Desc:间隔月份
///
public byte? AccountMonth { get; set; }
///
/// Desc:账期日期
///
public byte? AccountDays { get; set; }
///
/// 上半月
///
public byte? AccountFirstHalf { get; set; }
///
/// 下半月
///
public byte? AccountSecondHalf { get; set; }
///
/// Desc:信用额度
///
public decimal? AllowAmount { get; set; }
///
/// Desc:合同Id
///
public long ContractId { get; set; }
///
/// Desc:运杂费比例
///
public decimal? CommissionRate { get; set; } = 0;
///
/// 状态 0 启用 1 禁用
///
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
///
/// 备注
///
public string? Note { get; set; }
///
/// 特批放单客户
///
public bool IsSpecial { get; set; }
}
///
/// 验证
///
public class ClientAccountDateReqValidator : AbstractValidator
{
///
/// 构造函数
///
public ClientAccountDateReqValidator()
{
this.RuleFor(o => o.AccountType)
.NotEmpty().WithName("账期类型");
this.RuleFor(o => o.BusinessType)
.NotEmpty().WithName("业务类型");
}
}