DepartmentProject/DepartmentPortal/Security/SecurityContract/ViewModels/UserRoleViewModels.cs

33 lines
1.4 KiB
C#
Raw Permalink Normal View History

using CoreModels.ModelsSecurity;
using System;
2022-03-20 10:10:44 +04:00
using ToolsModule.ManagmentEntity;
using ToolsModule.ManagmentMapping;
namespace SecurityContract.ViewModels
{
2022-03-20 10:10:44 +04:00
/// <summary>
/// Список пользователей
/// </summary>
public class UserRoleListViewModel : ListViewModel<UserRoleViewModel> { }
/// <summary>
/// Элемент пользователей
/// </summary>
[ViewModelControlElementClass()]
public class UserRoleViewModel : ElementViewModel, IUserRoleModel
{
[ViewModelControlElementProperty("Пользователь", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlUserList, SecurityWindowsDesktop")]
public Guid UserId { get; set; }
[ViewModelControlListProperty("Пользователь")]
2022-03-20 19:27:50 +04:00
[MapConfiguration("User.ToString", AllowCopyWithoutRigth = false)]
public string UserName { get; set; }
[ViewModelControlElementProperty("Роль", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlRoleList, SecurityWindowsDesktop")]
public Guid RoleId { get; set; }
[ViewModelControlListProperty("Роль")]
2022-03-20 19:27:50 +04:00
[MapConfiguration("Role.ToString", AllowCopyWithoutRigth = false)]
public string RoleName { get; set; }
}
}