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.6 KiB
C#
70 lines
1.6 KiB
C#
using DS.Module.Core;
|
|
using FluentValidation;
|
|
|
|
namespace DS.WMS.Core.Fee.Dtos;
|
|
|
|
/// <summary>
|
|
/// 费用模板主表请求实体
|
|
/// </summary>
|
|
public class FeeTemplateReq
|
|
{
|
|
/// <summary>
|
|
/// 主键Id
|
|
/// </summary>
|
|
public long Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// 模板名称
|
|
/// </summary>
|
|
public string TemplateName { get; set; }
|
|
/// <summary>
|
|
/// 业务类型(海运出口、海运进口、空运出口、空运进口)
|
|
/// </summary>
|
|
public string OpType { get; set; }
|
|
/// <summary>
|
|
/// 收付类型(收、付)
|
|
/// </summary>
|
|
public int FeeType { get; set; } = 1;
|
|
/// <summary>
|
|
/// 是否公共标识
|
|
/// </summary>
|
|
public bool IsPublic { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// 描述
|
|
/// </summary>
|
|
public string Description { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
/// 状态 0 启用 1 禁用
|
|
/// </summary>
|
|
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
|
|
|
/// <summary>
|
|
/// 备注
|
|
/// </summary>
|
|
public string Note { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// 明细
|
|
/// </summary>
|
|
public List<FeeTemplateDetailReq> Detail { get; set; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// 验证
|
|
/// </summary>
|
|
public class FeeTemplateReqValidator : AbstractValidator<FeeTemplateReq>
|
|
{
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
public FeeTemplateReqValidator()
|
|
{
|
|
this.RuleFor(o => o.TemplateName)
|
|
.NotEmpty().WithName("模板名称");
|
|
this.RuleFor(o => o.OpType)
|
|
.NotEmpty().WithName("业务类型");
|
|
}
|
|
} |