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.
85 lines
1.8 KiB
C#
85 lines
1.8 KiB
C#
using DS.Module.Core;
|
|
using FluentValidation;
|
|
|
|
namespace DS.WMS.Core.Code.Dtos;
|
|
|
|
/// <summary>
|
|
/// 国家请求实体
|
|
/// </summary>
|
|
public class CodeCountryReq
|
|
{
|
|
/// <summary>
|
|
/// 主键Id
|
|
/// </summary>
|
|
public long Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// 国家唯一代码
|
|
/// </summary>
|
|
public string CountryCode { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 国家名称
|
|
/// </summary>
|
|
public string CountryName { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 国家英文名称
|
|
/// </summary>
|
|
public string CountryEnName { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 所在大洲
|
|
/// </summary>
|
|
public string Chau { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 首都
|
|
/// </summary>
|
|
public string Capital { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 关税等级
|
|
/// </summary>
|
|
public int Tariff { get; set; }= 0;
|
|
|
|
/// <summary>
|
|
/// 吨位税
|
|
/// </summary>
|
|
public int TonnageTax { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// 国家3字代码
|
|
/// </summary>
|
|
public string CountryCode3 { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 国家描述
|
|
/// </summary>
|
|
public string Explain { get; set; } = "";
|
|
/// <summary>
|
|
/// 状态 0 启用 1 禁用
|
|
/// </summary>
|
|
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
|
/// <summary>
|
|
/// 备注
|
|
/// </summary>
|
|
public string Note { get; set; } = "";
|
|
}
|
|
|
|
/// <summary>
|
|
/// 验证
|
|
/// </summary>
|
|
public class CodeCountryReqValidator : AbstractValidator<CodeCountryReq>
|
|
{
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
public CodeCountryReqValidator()
|
|
{
|
|
this.RuleFor(o => o.CountryCode)
|
|
.NotEmpty().WithName("国家唯一代码");
|
|
this.RuleFor(o => o.CountryName)
|
|
.NotEmpty().WithName("国家名称");
|
|
}
|
|
} |