using CoreModels.ModelsSecurity;
using ModuleTools.Attributes;
using ModuleTools.Enums;
using ModuleTools.ViewModels;
using System;
namespace SecurityBusinessLogic.ViewModels
{
///
/// Список пользователей
///
public class UserRoleListViewModel : ListViewModel { }
///
/// Элемент пользователей
///
[ViewModelControlElementClass()]
public class UserRoleViewModel : ElementViewModel, IUserRoleModel
{
[ViewModelControlElementProperty("Пользователь", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlUserList, SecurityWindowsDesktop")]
[MapConfiguration("UserId", AllowCopyWithoutRigth = false)]
public Guid UserId { get; set; }
[ViewModelControlListProperty("Пользователь")]
[MapConfiguration("User.ToString", IsDifficle = true, AllowCopyWithoutRigth = false)]
public string UserName { get; set; }
[ViewModelControlElementProperty("Роль", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlRoleList, SecurityWindowsDesktop")]
[MapConfiguration("RoleId", AllowCopyWithoutRigth = false)]
public Guid RoleId { get; set; }
[ViewModelControlListProperty("Роль")]
[MapConfiguration("Role.ToString", IsDifficle = true, AllowCopyWithoutRigth = false)]
public string RoleName { get; set; }
}
}