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