32 lines
847 B
C#
32 lines
847 B
C#
using CoreModels.ModelsSecurity;
|
||
using ModuleTools.Attributes;
|
||
using ModuleTools.BindingModels;
|
||
using System;
|
||
using System.ComponentModel.DataAnnotations;
|
||
|
||
namespace SecurityBusinessLogic.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")]
|
||
[MapConfiguration("UserId")]
|
||
public Guid UserId { get; set; }
|
||
|
||
[Required(ErrorMessage = "required")]
|
||
[MapConfiguration("RoleId")]
|
||
public Guid RoleId { get; set; }
|
||
}
|
||
} |