namespace DS.WMS.Core.System.Dtos;
using FluentValidation;
///
/// 公司编辑实体
///
public class CompanyInput
{
public Guid GID { get; set; }
///
/// Desc:
/// Default:
/// Nullable:True
///
public string SHORTNAME { get; set; }
///
/// Desc:
/// Default:
/// Nullable:True
///
public string DESCRIPTION { get; set; }
///
/// Desc:
/// Default:
/// Nullable:True
///
public string ADDR { get; set; }
///
/// Desc:
/// Default:
/// Nullable:True
///
public string EMAIL { get; set; }
///
/// Desc:
/// Default:
/// Nullable:True
///
public string TEL { get; set; }
///
/// Desc:
/// Default:
/// Nullable:True
///
public string CHIEF { get; set; }
///
/// Desc:
/// Default:0
/// Nullable:True
///
public bool? ISTRUCK { get; set; } = false;
///
/// Desc:
/// Default:0
/// Nullable:True
///
public bool? ISSHIPPER { get; set; } = false;
///
/// Desc:
/// Default:0
/// Nullable:True
///
public bool? ISAGENTCN { get; set; } = false;
///
/// Desc:
/// Default:
/// Nullable:True
///
public string LOGINNAME { get; set; }
///
/// Desc:
/// Default:
/// Nullable:True
///
public string TAXNO { get; set; }
///
/// 业务归属单位
///
public string[]? orgids { get; set; }
///
/// 法人身份证 上传文件列表
///
public fileinfo[]? cardfiles { get; set; }
///
/// 营业执照 上传文件列表
///
public fileinfo[]? licensefiles { get; set; }
}
///
/// 验证
///
public class CompanyEditValidator : AbstractValidator
{
///
/// 构造函数
///
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("营业执照");
}
}