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.

115 lines
2.3 KiB
C#

using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Info.Dtos;
/// <summary>
/// 客户银行信息请求实体
/// </summary>
public class ClientBankReq
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 客户Id
/// </summary>
public long ClientId { get; set; }
/// <summary>
/// Desc:代码
/// </summary>
public string CodeName { get; set; }
/// <summary>
/// Desc:币别
/// </summary>
public string Currency { get; set; }
/// <summary>
/// Desc:银行名称
/// </summary>
public string BankName { get; set; }
/// <summary>
/// Desc:银行账户
/// </summary>
public string Account { get; set; }
/// <summary>
/// Desc:银行地址
/// </summary>
public string BankAddress { get; set; }
/// <summary>
/// Desc:财务软件代码
/// </summary>
public string FinanceSoftCode { get; set; }
/// <summary>
/// Desc:科目代码
/// </summary>
public string SubjectCode { get; set; }
/// <summary>
/// Desc:户头名称
/// </summary>
public string AccountName { get; set; }
/// <summary>
/// Desc:代理银行名称
/// </summary>
public string BankAgentName { get; set; }
/// <summary>
/// Desc:银行账号
/// </summary>
public string BankAccountNo { get; set; }
/// <summary>
/// Desc: 银行SWIFT
/// </summary>
public string SWIFT { get; set; }
/// <summary>
/// Desc: 国家Id
/// </summary>
public long? CountryId { get; set; }
/// <summary>
/// Desc:是否开票默认账户
/// </summary>
public bool? IsInvoiceDefault { 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 ClientBankReqValidator : AbstractValidator<ClientBankReq>
{
/// <summary>
/// 构造函数
/// </summary>
public ClientBankReqValidator()
{
this.RuleFor(o => o.CodeName)
.NotEmpty().WithName("银行代码");
this.RuleFor(o => o.BankName)
.NotEmpty().WithName("银行名称");
}
}