DepartmentProject/DepartmentPortal/Security/SecurityContract/BindingModels/UserRoleBindingModels.cs

29 lines
764 B
C#
Raw Normal View History

using CoreModels.ModelsSecurity;
using System;
using System.ComponentModel.DataAnnotations;
2022-03-20 10:10:44 +04:00
using ToolsModule.ManagmentEntity;
namespace SecurityContract.BindingModels
{
/// <summary>
/// Получение связи пользователя с ролью
/// </summary>
public class UserRoleGetBindingModel : GetBindingModel
{
public Guid? UserId { get; set; }
public Guid? RoleId { get; set; }
}
/// <summary>
/// Сохранение связи пользователя с ролью
/// </summary>
public class UserRoleSetBindingModel : SetBindingModel, IUserRoleModel
{
[Required(ErrorMessage = "required")]
public Guid UserId { get; set; }
[Required(ErrorMessage = "required")]
public Guid RoleId { get; set; }
}
}