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