DigitalFactory/Admin.NET/Admin.NET.Application/Service/SysUnit/Dto/SysUnitInput.cs

245 lines
5.0 KiB
C#

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;
namespace Admin.NET.Application;
/// <summary>
/// 单位基础输入参数
/// </summary>
public class SysUnitBaseInput
{
/// <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>
/// 创建者部门Id
/// </summary>
public virtual long? CreateOrgId { get; set; }
/// <summary>
/// 创建者部门名称
/// </summary>
public virtual string? CreateOrgName { get; set; }
/// <summary>
/// 软删除
/// </summary>
public virtual bool IsDelete { get; set; }
/// <summary>
/// 名称
/// </summary>
public virtual string Name { get; set; }
/// <summary>
/// 编码
/// </summary>
public virtual string CodeNum { get; set; }
/// <summary>
/// 是否启用
/// </summary>
public virtual bool IsEnable { get; set; }
/// <summary>
/// 代码
/// </summary>
public virtual string? Code { get; set; }
/// <summary>
/// 换算率
/// </summary>
public virtual int? Rate { get; set; }
/// <summary>
/// 作为基本单位
/// </summary>
public virtual bool? IsBaseUnit { get; set; }
/// <summary>
/// 精度
/// </summary>
public virtual int? Accuracy { get; set; }
/// <summary>
/// 外部编码
/// </summary>
public virtual string? ExternalNumber { get; set; }
/// <summary>
/// 备注
/// </summary>
public virtual string? Remarks { get; set; }
/// <summary>
/// 单位组ID
/// </summary>
public virtual long? GroupUnitId { get; set; }
/// <summary>
/// 子单位数量
/// </summary>
public virtual int ChildUnitCount { get; set; }
}
/// <summary>
/// 单位分页查询输入参数
/// </summary>
public class SysUnitInput : BasePageInput
{
/// <summary>
/// 关键字查询
/// </summary>
public string? SearchKey { get; set; }
/// <summary>
/// 创建者部门名称
/// </summary>
public string? CreateOrgName { get; set; }
/// <summary>
/// 名称
/// </summary>
public string? Name { get; set; }
/// <summary>
/// 编码
/// </summary>
public string? CodeNum { get; set; }
/// <summary>
/// 是否启用
/// </summary>
public bool? IsEnable { get; set; }
/// <summary>
/// 代码
/// </summary>
public string? Code { get; set; }
/// <summary>
/// 外部编码
/// </summary>
public string? ExternalNumber { get; set; }
/// <summary>
/// 单位组ID
/// </summary>
public long? GroupUnitId { get; set; }
/// <summary>
/// 子单位数量
/// </summary>
public int ChildUnitCount { get; set; }
}
/// <summary>
/// 单位增加输入参数
/// </summary>
public class AddSysUnitInput : SysUnitBaseInput
{
/// <summary>
/// 软删除
/// </summary>
[Required(ErrorMessage = "软删除不能为空")]
public override bool IsDelete { get; set; }
/// <summary>
/// 名称
/// </summary>
[Required(ErrorMessage = "名称不能为空")]
public override string Name { get; set; }
/// <summary>
/// 编码
/// </summary>
[Required(ErrorMessage = "编码不能为空")]
public override string CodeNum { get; set; }
/// <summary>
/// 是否启用
/// </summary>
[Required(ErrorMessage = "是否启用不能为空")]
public override bool IsEnable { get; set; }
}
/// <summary>
/// 单位删除输入参数
/// </summary>
public class DeleteSysUnitInput : BaseIdInput
{
}
/// <summary>
/// 单位更新输入参数
/// </summary>
public class UpdateSysUnitInput : SysUnitBaseInput
{
/// <summary>
/// 主键Id
/// </summary>
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
}
/// <summary>
/// 单位主键查询输入参数
/// </summary>
public class QueryByIdSysUnitInput : DeleteSysUnitInput
{
}
/// <summary>
/// 更新单位状态
/// </summary>
public class UpdateSysUnitEnableInput
{
/// <summary>
/// 主键Id
/// </summary>
[Required(ErrorMessage = "主键Id不能为空")]
public string Ids { get; set; }
/// <summary>
/// 是否启用
/// </summary>
public bool IsEnable { get; set; }
}