using DS.Module.Core;
using FluentValidation;
using SqlSugar;
namespace DS.WMS.Core.Info.Dtos;
///
/// 客户收发货人请求实体
///
public class ClientShipperReq
{
///
/// 主键Id
///
public long Id { get; set; }
///
/// 客户Id
///
public long ClientId { get; set; }
///
/// Desc:收发货人代码
///
public string CodeName { get; set; }
///
/// Desc:收发货人简称
///
public string ShortName { get; set; }
///
/// 收发货人名称
///
public string Name { get; set; } = string.Empty;
///
/// 地址
///
public string? Address { get; set; }
///
/// Desc:类型 下拉选择(Shipper-1,Consinee-2,Notifypaty-3,Agent-4)
///
public string ShipperType { get; set; }
///
/// 是否公共标识
///
public bool IsPublic { get; set; } = false;
///
/// Desc:详细信息
///
public string ShortDetail { get; set; }
///
/// Desc:联系人
///
public string ATTN { get; set; }
///
/// Desc:邮箱
///
public string Email { get; set; }
///
/// Desc:电话
///
public string Tel { get; set; }
///
/// Desc:公司代码
///
public string CompanyNo { get; set; }
///
/// 状态 0 启用 1 禁用
///
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
///
/// 备注
///
public string Note { get; set; } = "";
}
///
/// 验证
///
public class ClientShipperReqValidator : AbstractValidator
{
///
/// 构造函数
///
public ClientShipperReqValidator()
{
this.RuleFor(o => o.CodeName)
.NotEmpty().WithName("代码");
this.RuleFor(o => o.ShortName)
.NotEmpty().WithName("简称");
}
}