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.
77 lines
1.9 KiB
C#
77 lines
1.9 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 MappingCarrierReq
|
|
{
|
|
/// <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>
|
|
/// 状态 0 启用 1 禁用
|
|
/// </summary>
|
|
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
|
/// <summary>
|
|
/// 备注
|
|
/// </summary>
|
|
public string Note { get; set; } = "";
|
|
}
|
|
/// <summary>
|
|
/// 验证
|
|
/// </summary>
|
|
public class MappingCarrierReqValidator : AbstractValidator<MappingCarrierReq>
|
|
{
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
public MappingCarrierReqValidator()
|
|
{
|
|
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("映射名称");
|
|
}
|
|
}
|
|
}
|