DepartmentProject/DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/RoleViewModels.cs

29 lines
898 B
C#
Raw Normal View History

using ModuleTools.Attributes;
2021-03-30 22:34:31 +04:00
using ModuleTools.Enums;
using ModuleTools.ViewModels;
namespace SecurityBusinessLogic.ViewModels
{
/// <summary>
/// Список ролей
/// </summary>
public class RoleListViewModel : ListViewModel<RoleViewModel> { }
/// <summary>
/// Элемент ролей
/// </summary>
public class RoleViewModel : ElementViewModel
{
[ViewModelOnListProperty("Название роли")]
2021-03-30 22:34:31 +04:00
[ViewModelOnElementProperty("Название роли", ControlType.ControlString, MustHaveValue = true)]
[MapConfiguration("RoleName")]
public string RoleName { get; set; }
[ViewModelOnListProperty("Приоритет", 100)]
2021-03-30 22:34:31 +04:00
[ViewModelOnElementProperty("Приоритет", ControlType.ControlInt, MustHaveValue = true)]
[MapConfiguration("RolePriority")]
public int RolePriority { get; set; }
public override string ToString() => RoleName;
}
}