using System.ComponentModel.DataAnnotations;
namespace Magic.Core.Service;
///
/// 职位参数
///
public class PosInput
{
///
/// 名称
///
public virtual string Name { get; set; }
///
/// 编码
///
public virtual string Code { get; set; }
///
/// 排序
///
public int Sort { get; set; }
///
/// 备注
///
public string Remark { get; set; }
///
/// 状态(字典 0正常 1停用 2删除)
///
public int Status { get; set; }
///
/// 当前页码
///
public int PageNo { get; set; } = 1;
///
/// 页码容量
///
public int PageSize { get; set; } = 20;
}
public class AddPosInput : PosInput
{
///
/// 名称
///
[Required(ErrorMessage ="职位名称不能为空")]
public override string Name { get; set; }
///
/// 编码
///
[Required(ErrorMessage = "职位编码不能为空")]
public override string Code { get; set; }
}
public class DeletePosInput
{
///
/// 职位Id
///
[Required(ErrorMessage = "职位Id不能为空")]
public long Id { get; set; }
}
public class UpdatePosInput : AddPosInput
{
///
/// 职位Id
///
[Required(ErrorMessage = "职位Id不能为空")]
public long Id { get; set; }
}
public class QueryPosInput : DeletePosInput
{
}