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.
134 lines
3.1 KiB
C#
134 lines
3.1 KiB
C#
2 years ago
|
namespace DS.WMS.Core.System.Dtos;
|
||
|
|
||
|
using FluentValidation;
|
||
|
|
||
|
/// <summary>
|
||
|
/// 公司编辑实体
|
||
|
/// </summary>
|
||
|
public class CompanyInput
|
||
|
{
|
||
|
public Guid GID { get; set; }
|
||
|
/// <summary>
|
||
|
/// Desc:
|
||
|
/// Default:
|
||
|
/// Nullable:True
|
||
|
/// </summary>
|
||
|
public string SHORTNAME { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Desc:
|
||
|
/// Default:
|
||
|
/// Nullable:True
|
||
|
/// </summary>
|
||
|
public string DESCRIPTION { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Desc:
|
||
|
/// Default:
|
||
|
/// Nullable:True
|
||
|
/// </summary>
|
||
|
public string ADDR { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Desc:
|
||
|
/// Default:
|
||
|
/// Nullable:True
|
||
|
/// </summary>
|
||
|
public string EMAIL { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Desc:
|
||
|
/// Default:
|
||
|
/// Nullable:True
|
||
|
/// </summary>
|
||
|
public string TEL { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Desc:
|
||
|
/// Default:
|
||
|
/// Nullable:True
|
||
|
/// </summary>
|
||
|
public string CHIEF { get; set; }
|
||
|
|
||
|
|
||
|
/// <summary>
|
||
|
/// Desc:
|
||
|
/// Default:0
|
||
|
/// Nullable:True
|
||
|
/// </summary>
|
||
|
public bool? ISTRUCK { get; set; } = false;
|
||
|
|
||
|
/// <summary>
|
||
|
/// Desc:
|
||
|
/// Default:0
|
||
|
/// Nullable:True
|
||
|
/// </summary>
|
||
|
public bool? ISSHIPPER { get; set; } = false;
|
||
|
|
||
|
/// <summary>
|
||
|
/// Desc:
|
||
|
/// Default:0
|
||
|
/// Nullable:True
|
||
|
/// </summary>
|
||
|
public bool? ISAGENTCN { get; set; } = false;
|
||
|
|
||
|
/// <summary>
|
||
|
/// Desc:
|
||
|
/// Default:
|
||
|
/// Nullable:True
|
||
|
/// </summary>
|
||
|
public string LOGINNAME { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Desc:
|
||
|
/// Default:
|
||
|
/// Nullable:True
|
||
|
/// </summary>
|
||
|
public string TAXNO { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 业务归属单位
|
||
|
/// </summary>
|
||
|
public string[]? orgids { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 法人身份证 上传文件列表
|
||
|
/// </summary>
|
||
|
public fileinfo[]? cardfiles { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 营业执照 上传文件列表
|
||
|
/// </summary>
|
||
|
public fileinfo[]? licensefiles { get; set; }
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 验证
|
||
|
/// </summary>
|
||
|
public class CompanyEditValidator : AbstractValidator<CompanyInput>
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 构造函数
|
||
|
/// </summary>
|
||
|
public CompanyEditValidator()
|
||
|
{
|
||
|
this.RuleFor(o => o.DESCRIPTION)
|
||
|
.NotEmpty().WithName("公司名称");
|
||
|
this.RuleFor(o => o.SHORTNAME)
|
||
|
.NotEmpty().WithName("公司简称");
|
||
|
this.RuleFor(o => o.ADDR)
|
||
|
.NotEmpty().WithName("公司地址");
|
||
|
this.RuleFor(o => o.TAXNO)
|
||
|
.NotEmpty().WithName("统一社会代码");
|
||
|
this.RuleFor(o => o.EMAIL)
|
||
|
.NotEmpty().WithName("公司邮箱");
|
||
|
this.RuleFor(o => o.TEL)
|
||
|
.NotEmpty().WithName("公司电话");
|
||
|
this.RuleFor(o => o.CHIEF)
|
||
|
.NotEmpty().WithName("公司法人");
|
||
|
this.RuleFor(o => o.cardfiles)
|
||
|
.NotEmpty().WithName("法人身份证");
|
||
|
this.RuleFor(o => o.licensefiles)
|
||
|
.NotEmpty().WithName("营业执照");
|
||
|
}
|
||
|
}
|