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.
70 lines
1.5 KiB
C#
70 lines
1.5 KiB
C#
using DS.Module.Core;
|
|
using FluentValidation;
|
|
using SqlSugar;
|
|
|
|
namespace DS.WMS.Core.Code.Dtos;
|
|
|
|
/// <summary>
|
|
/// 第三方账号请求实体
|
|
/// </summary>
|
|
public class CodeThirdPartyReq
|
|
{
|
|
/// <summary>
|
|
/// 主键Id
|
|
/// </summary>
|
|
public long Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// 账号类型
|
|
/// </summary>
|
|
public string AccountType { get; set; }
|
|
/// <summary>
|
|
/// 客户名称
|
|
/// </summary>
|
|
public string CustomerName { get; set; }
|
|
/// <summary>
|
|
/// 客户类型
|
|
/// </summary>
|
|
public string CustomerType { get; set; }
|
|
|
|
/// <summary>
|
|
/// 客户Id
|
|
/// </summary>
|
|
public long CustomerId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 账户key
|
|
/// </summary>
|
|
public string AppKey { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
/// 账户密钥
|
|
/// </summary>
|
|
public string AppSecret { get; set; }
|
|
/// <summary>
|
|
/// 状态 0 启用 1 禁用
|
|
/// </summary>
|
|
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
|
/// <summary>
|
|
/// 备注
|
|
/// </summary>
|
|
public string Note { get; set; } = "";
|
|
}
|
|
|
|
/// <summary>
|
|
/// 验证
|
|
/// </summary>
|
|
public class CodeThirdPartyReqValidator : AbstractValidator<CodeThirdPartyReq>
|
|
{
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
public CodeThirdPartyReqValidator()
|
|
{
|
|
this.RuleFor(o => o.AccountType)
|
|
.NotEmpty().WithName("账号类型");
|
|
this.RuleFor(o => o.CustomerId)
|
|
.NotEmpty().WithName("客户名称");
|
|
}
|
|
} |