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