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.

95 lines
2.1 KiB
C#

using System.ComponentModel.DataAnnotations;
using DS.Module.Core;
using FluentValidation;
using SqlSugar;
namespace DS.WMS.Core.Sys.Dtos;
/// <summary>
/// 银行信息请求实体
/// </summary>
public class BankReq
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 关联Id
/// </summary>
public long LinkId { get; set; }
/// <summary>
/// 代码
/// </summary>
public string CodeName { get; set; }
/// <summary>
/// 币别
/// </summary>
public string Currency { get; set; }
/// <summary>
/// 银行名称
/// </summary>
public string BankName { get; set; }
/// <summary>
/// Desc:银行账户
/// </summary>
public string BankAccountNo { get; set; }
/// <summary>
/// Desc:户头名称
/// </summary>
public string AccountName { get; set; }
/// <summary>
/// 科目代码
/// </summary>
public string SubjectCode { get; set; }
/// <summary>
/// 财务软件代码
/// </summary>
public string FinanceSoftCode { get; set; }
/// <summary>
/// 是否默认 0否 1是
/// </summary>
public bool IsDefault { get; set; } = false;
/// <summary>
/// 排序
/// </summary>
public int? OrderNo { get; set; } = 100;
/// <summary>
/// 状态 0 启用 1 禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
/// <summary>
/// 银行地址
/// </summary>
public string BankAddress { get; set; }
/// <summary>
/// ABA代码
/// </summary>
public string ABA { get; set; }
}
/// <summary>
/// 验证
/// </summary>
public class BankReqValidator : AbstractValidator<BankReq>
{
/// <summary>
/// 构造函数
/// </summary>
public BankReqValidator()
{
this.RuleFor(o => o.CodeName)
.NotEmpty().WithName("银行代码");
// this.RuleFor(o => o.ColumnView)
// .NotEmpty().WithName("中文视图名");
}
}