DigitalFactory/Admin.NET/Admin.NET.Application/Service/Custom/Dto/CustomInput.cs

219 lines
5.3 KiB
C#

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;
namespace Admin.NET.Application;
/// <summary>
/// 客户基础输入参数
/// </summary>
public class CustomBaseInput
{
/// <summary>
/// 名称
/// </summary>
public virtual string Name { get; set; }
/// <summary>
/// 编码
/// </summary>
public virtual string? CodeNum { get; set; }
/// <summary>
/// 分类
/// </summary>
public virtual long Classify { get; set; }
/// <summary>
/// 年龄
/// </summary>
public virtual int? Age { get; set; }
/// <summary>
/// 拓展字段整型
/// </summary>
public virtual int? ExpandField { get; set; }
/// <summary>
/// 联系人
/// </summary>
public virtual int Contacts { get; set; }
/// <summary>
/// 品牌
/// </summary>
public virtual string? Brand { get; set; }
/// <summary>
/// 外部编码
/// </summary>
public virtual string? ExternalNumber { get; set; }
/// <summary>
/// 可用状态
/// </summary>
public virtual bool IsEnable { get; set; }
/// <summary>
/// 租户Id
/// </summary>
public virtual long? TenantId { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public virtual DateTime? CreateTime { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public virtual DateTime? UpdateTime { get; set; }
/// <summary>
/// 创建者Id
/// </summary>
public virtual long? CreateUserId { get; set; }
/// <summary>
/// 创建者姓名
/// </summary>
public virtual string? CreateUserName { get; set; }
/// <summary>
/// 修改者Id
/// </summary>
public virtual long? UpdateUserId { get; set; }
/// <summary>
/// 修改者姓名
/// </summary>
public virtual string? UpdateUserName { get; set; }
/// <summary>
/// 软删除
/// </summary>
public virtual bool IsDelete { get; set; }
}
/// <summary>
/// 客户分页查询输入参数
/// </summary>
public class CustomInput : BasePageInput
{
/// <summary>
/// 关键字查询
/// </summary>
public string? SearchKey { get; set; }
/// <summary>
/// 名称
/// </summary>
public string? Name { get; set; }
/// <summary>
/// 编码
/// </summary>
public string? CodeNum { get; set; }
/// <summary>
/// 分类
/// </summary>
public long? Classify { get; set; }
/// <summary>
/// 年龄
/// </summary>
public int? Age { get; set; }
/// <summary>
/// 拓展字段整型
/// </summary>
public int? ExpandField { get; set; }
/// <summary>
/// 联系人
/// </summary>
public int? Contacts { get; set; }
/// <summary>
/// 品牌
/// </summary>
public string? Brand { get; set; }
/// <summary>
/// 外部编码
/// </summary>
public string? ExternalNumber { get; set; }
/// <summary>
/// 可用状态
/// </summary>
public bool? IsEnable { get; set; }
}
/// <summary>
/// 客户增加输入参数
/// </summary>
public class AddCustomInput : CustomBaseInput
{
/// <summary>
/// 名称
/// </summary>
[Required(ErrorMessage = "名称不能为空")]
public override string Name { get; set; }
/// <summary>
/// 分类
/// </summary>
[Required(ErrorMessage = "分类不能为空")]
public override long Classify { get; set; }
/// <summary>
/// 联系人
/// </summary>
[Required(ErrorMessage = "联系人不能为空")]
public override int Contacts { get; set; }
/// <summary>
/// 可用状态
/// </summary>
[Required(ErrorMessage = "可用状态不能为空")]
public override bool IsEnable { get; set; }
/// <summary>
/// 软删除
/// </summary>
[Required(ErrorMessage = "软删除不能为空")]
public override bool IsDelete { get; set; }
}
/// <summary>
/// 客户删除输入参数
/// </summary>
public class DeleteCustomInput : BaseIdInput
{
}
/// <summary>
/// 客户更新输入参数
/// </summary>
public class UpdateCustomInput : CustomBaseInput
{
/// <summary>
/// 主键Id
/// </summary>
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
}
/// <summary>
/// 客户主键查询输入参数
/// </summary>
public class QueryByIdCustomInput : DeleteCustomInput
{
}