using System.ComponentModel.DataAnnotations;
namespace Magic.Core.Service;
///
/// 角色参数
///
public class RoleInput : InputBase
{
///
/// 名称
///
public virtual string Name { get; set; }
///
/// 编码
///
public virtual string Code { get; set; }
///
/// 排序
///
public int Sort { get; set; }
///
/// 数据范围类型(字典 1全部数据 2本部门及以下数据 3本部门数据 4仅本人数据 5自定义数据)
///
public DataScopeType DataScopeType { get; set; }
///
/// 备注
///
public string Remark { get; set; }
}
public class AddRoleInput : RoleInput
{
///
/// 名称
///
[Required(ErrorMessage = "角色名称不能为空")]
public override string Name { get; set; }
///
/// 编码
///
[Required(ErrorMessage = "角色编码不能为空")]
public override string Code { get; set; }
}
public class DeleteRoleInput
{
///
/// 角色Id
///
[Required(ErrorMessage = "角色Id不能为空")]
public long Id { get; set; }
}
public class UpdateRoleInput : AddRoleInput
{
///
/// 角色Id
///
[Required(ErrorMessage = "角色Id不能为空")]
public long Id { get; set; }
}
public class QueryRoleInput : DeleteRoleInput
{
}
public class GrantRoleMenuInput : RoleInput
{
///
/// 角色Id
///
[Required(ErrorMessage = "角色Id不能为空")]
public long Id { get; set; }
}
public class GrantRoleDataInput : GrantRoleMenuInput
{
}