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.
52 lines
1.1 KiB
C#
52 lines
1.1 KiB
C#
9 months ago
|
using DS.Module.Core;
|
||
|
using FluentValidation;
|
||
|
|
||
|
namespace DS.WMS.Core.Code.Dtos;
|
||
|
|
||
|
/// <summary>
|
||
|
/// 业务来源请求实体
|
||
|
/// </summary>
|
||
|
public class CodeSourceDetailReq
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 主键Id
|
||
|
/// </summary>
|
||
|
public long Id { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 业务来源Id
|
||
|
/// </summary>
|
||
|
public long SourceId { get; set; }
|
||
|
/// <summary>
|
||
|
/// 来源明细名称
|
||
|
/// </summary>
|
||
|
public string DetailName { get; set; }= "";
|
||
|
|
||
|
/// <summary>
|
||
|
/// 英文名称
|
||
|
/// </summary>
|
||
|
public string EnName { get; set; } = "";
|
||
|
/// <summary>
|
||
|
/// 状态 0 启用 1 禁用
|
||
|
/// </summary>
|
||
|
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||
|
/// <summary>
|
||
|
/// 备注
|
||
|
/// </summary>
|
||
|
public string Note { get; set; } = "";
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 验证
|
||
|
/// </summary>
|
||
|
public class CodeSourceDetailReqValidator : AbstractValidator<CodeSourceDetailReq>
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 构造函数
|
||
|
/// </summary>
|
||
|
public CodeSourceDetailReqValidator()
|
||
|
{
|
||
|
this.RuleFor(o => o.DetailName)
|
||
|
.NotEmpty().WithName("来源明细名称");
|
||
|
}
|
||
|
}
|