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.

84 lines
2.1 KiB
C#

using DS.Module.Core;
using DS.WMS.Core.Code.Dtos;
using FluentValidation;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Map.Dtos
{
/// <summary>
/// 付款方式映射信息请求
/// </summary>
public class MappingFrtReq
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 关联业务id
/// </summary>
public long LinkId { get; set; }
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary>
/// 映射名称
/// </summary>
public string MapName { get; set; }
/// <summary>
/// 船司Id
/// </summary>
public long CarrierId { get; set; }
/// <summary>
/// 船司名称
/// </summary>
public string Carrier { get; set; }
/// <summary>
/// 状态 0 启用 1 禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
}
/// <summary>
/// 验证
/// </summary>
public class MappingFrtReqValidator : AbstractValidator<MappingFrtReq>
{
/// <summary>
/// 构造函数
/// </summary>
public MappingFrtReqValidator()
{
this.RuleFor(o => o.LinkId)
.NotEmpty().WithName("付款方式Id");
this.RuleFor(o => o.Module)
.NotEmpty().WithName("模块");
this.RuleFor(o => o.MapCode)
.NotEmpty().WithName("映射代码");
this.RuleFor(o => o.MapName)
.NotEmpty().WithName("映射名称");
}
}
}