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

36 lines
1.6 KiB
C#
Raw Normal View History

using CoreModels.ModelsSecurity;
using ModuleTools.Attributes;
using ModuleTools.Enums;
using ModuleTools.ViewModels;
using System;
namespace SecurityBusinessLogic.ViewModels
{
/// <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")]
2021-04-03 16:21:16 +04:00
[MapConfiguration("UserId", AllowCopyWithoutRigth = false)]
public Guid UserId { get; set; }
[ViewModelControlListProperty("Пользователь")]
2021-04-13 12:52:45 +04:00
[MapConfiguration("User.ToString", IsDifficle = true, AllowCopyWithoutRigth = false)]
public string UserName { get; set; }
[ViewModelControlElementProperty("Роль", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlRoleList, SecurityWindowsDesktop")]
2021-04-03 16:21:16 +04:00
[MapConfiguration("RoleId", AllowCopyWithoutRigth = false)]
public Guid RoleId { get; set; }
[ViewModelControlListProperty("Роль")]
2021-04-13 12:52:45 +04:00
[MapConfiguration("Role.ToString", IsDifficle = true, AllowCopyWithoutRigth = false)]
public string RoleName { get; set; }
}
}