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.
94 lines
2.0 KiB
C#
94 lines
2.0 KiB
C#
using DS.Module.Core;
|
|
using FluentValidation;
|
|
|
|
namespace DS.WMS.Core.Code.Dtos;
|
|
|
|
/// <summary>
|
|
/// 商品请求实体
|
|
/// </summary>
|
|
public class CodeGoodsReq
|
|
{
|
|
/// <summary>
|
|
/// 主键Id
|
|
/// </summary>
|
|
public long Id { get; set; }
|
|
/// <summary>
|
|
/// 商品编码
|
|
/// </summary>
|
|
public string GoodsCode { get; set; }= "";
|
|
|
|
/// <summary>
|
|
/// 商品名称
|
|
/// </summary>
|
|
public string GoodName { get; set; }= "";
|
|
|
|
/// <summary>
|
|
/// 物料号
|
|
/// </summary>
|
|
public string GoodNo { get; set; }= "";
|
|
|
|
/// <summary>
|
|
/// 英文名称
|
|
/// </summary>
|
|
public string EnName { get; set; }= "";
|
|
/// <summary>
|
|
/// 商品描述
|
|
/// </summary>
|
|
public string Description { get; set; }= "";
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// 商品类型
|
|
/// </summary>
|
|
public long GoodsTypeId { get; set; }= 0;
|
|
/// <summary>
|
|
/// 计费大类
|
|
/// </summary>
|
|
public long GoodsFeeTypeId { get; set; }= 0;
|
|
|
|
/// <summary>
|
|
/// 海关代码
|
|
/// </summary>
|
|
public string HSCode { get; set; }= "";
|
|
|
|
/// <summary>
|
|
/// 申报计量单位
|
|
/// </summary>
|
|
public string RuleUnit { get; set; }= "";
|
|
|
|
/// <summary>
|
|
/// 法定第一计量单位
|
|
/// </summary>
|
|
public string RuleUnit1 { get; set; }= "";
|
|
|
|
/// <summary>
|
|
/// 法定第二计量单位
|
|
/// </summary>
|
|
public string RuleUnit2 { get; set; }= "";
|
|
/// <summary>
|
|
/// 状态 0 启用 1 禁用
|
|
/// </summary>
|
|
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
|
/// <summary>
|
|
/// 备注
|
|
/// </summary>
|
|
public string Note { get; set; } = "";
|
|
}
|
|
|
|
/// <summary>
|
|
/// 验证
|
|
/// </summary>
|
|
public class CodeGoodsReqValidator : AbstractValidator<CodeGoodsReq>
|
|
{
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
public CodeGoodsReqValidator()
|
|
{
|
|
this.RuleFor(o => o.GoodsCode)
|
|
.NotEmpty().WithName("商品编码");
|
|
this.RuleFor(o => o.GoodName)
|
|
.NotEmpty().WithName("商品名称");
|
|
}
|
|
} |