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.

144 lines
3.2 KiB
C#

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