2022-03-18 12:47:34 +04:00
|
|
|
|
using CoreModels.ModelsSecurity;
|
2022-03-18 22:38:52 +04:00
|
|
|
|
using ToolsModule.BindingModels;
|
2021-04-01 21:30:29 +04:00
|
|
|
|
using System;
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
2022-03-19 19:58:10 +04:00
|
|
|
|
namespace SecurityContract.BindingModels
|
2021-04-01 21:30:29 +04:00
|
|
|
|
{
|
2022-03-18 12:57:40 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Получение связи пользователя с ролью
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class UserRoleGetBindingModel : GetBindingModel
|
2021-04-01 21:30:29 +04:00
|
|
|
|
{
|
|
|
|
|
public Guid? UserId { get; set; }
|
|
|
|
|
|
|
|
|
|
public Guid? RoleId { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Сохранение связи пользователя с ролью
|
|
|
|
|
/// </summary>
|
2022-03-18 12:47:34 +04:00
|
|
|
|
public class UserRoleSetBindingModel : SetBindingModel, IUserRoleModel
|
2021-04-01 21:30:29 +04:00
|
|
|
|
{
|
|
|
|
|
[Required(ErrorMessage = "required")]
|
|
|
|
|
public Guid UserId { get; set; }
|
|
|
|
|
|
|
|
|
|
[Required(ErrorMessage = "required")]
|
|
|
|
|
public Guid RoleId { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|