using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;
namespace Admin.NET.Application;
///
/// 单位基础输入参数
///
public class SysUnitBaseInput
{
///
/// 租户Id
///
public virtual long? TenantId { get; set; }
///
/// 创建时间
///
public virtual DateTime? CreateTime { get; set; }
///
/// 更新时间
///
public virtual DateTime? UpdateTime { get; set; }
///
/// 创建者Id
///
public virtual long? CreateUserId { get; set; }
///
/// 创建者姓名
///
public virtual string? CreateUserName { get; set; }
///
/// 修改者Id
///
public virtual long? UpdateUserId { get; set; }
///
/// 修改者姓名
///
public virtual string? UpdateUserName { get; set; }
///
/// 创建者部门Id
///
public virtual long? CreateOrgId { get; set; }
///
/// 创建者部门名称
///
public virtual string? CreateOrgName { get; set; }
///
/// 软删除
///
public virtual bool IsDelete { get; set; }
///
/// 名称
///
public virtual string Name { get; set; }
///
/// 编码
///
public virtual string CodeNum { get; set; }
///
/// 是否启用
///
public virtual bool IsEnable { get; set; }
///
/// 代码
///
public virtual string? Code { get; set; }
///
/// 换算率
///
public virtual int? Rate { get; set; }
///
/// 作为基本单位
///
public virtual bool? IsBaseUnit { get; set; }
///
/// 精度
///
public virtual int? Accuracy { get; set; }
///
/// 外部编码
///
public virtual string? ExternalNumber { get; set; }
///
/// 备注
///
public virtual string? Remarks { get; set; }
///
/// 单位组ID
///
public virtual long? GroupUnitId { get; set; }
}
///
/// 单位分页查询输入参数
///
public class SysUnitInput : BasePageInput
{
///
/// 关键字查询
///
public string? SearchKey { get; set; }
///
/// 创建者部门名称
///
public string? CreateOrgName { get; set; }
///
/// 名称
///
public string? Name { get; set; }
///
/// 编码
///
public string? CodeNum { get; set; }
///
/// 是否启用
///
public bool? IsEnable { get; set; }
///
/// 代码
///
public string? Code { get; set; }
///
/// 外部编码
///
public string? ExternalNumber { get; set; }
///
/// 单位组ID
///
public long? GroupUnitId { get; set; }
}
///
/// 单位增加输入参数
///
public class AddSysUnitInput : SysUnitBaseInput
{
///
/// 软删除
///
[Required(ErrorMessage = "软删除不能为空")]
public override bool IsDelete { get; set; }
///
/// 名称
///
[Required(ErrorMessage = "名称不能为空")]
public override string Name { get; set; }
///
/// 编码
///
[Required(ErrorMessage = "编码不能为空")]
public override string CodeNum { get; set; }
///
/// 是否启用
///
[Required(ErrorMessage = "是否启用不能为空")]
public override bool IsEnable { get; set; }
}
///
/// 单位删除输入参数
///
public class DeleteSysUnitInput : BaseIdInput
{
}
///
/// 单位更新输入参数
///
public class UpdateSysUnitInput : SysUnitBaseInput
{
///
/// 主键Id
///
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
}
///
/// 单位主键查询输入参数
///
public class QueryByIdSysUnitInput : DeleteSysUnitInput
{
}