2021-09-10 11:28:57 +05:00
|
|
|
|
using System.Collections.Generic;
|
2021-11-30 09:34:23 +05:00
|
|
|
|
using System.Text.Json.Serialization;
|
2021-09-10 11:28:57 +05:00
|
|
|
|
|
|
|
|
|
namespace AsbCloudApp.Data
|
|
|
|
|
{
|
2022-06-02 12:35:51 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Роль пользователя платформы
|
|
|
|
|
/// </summary>
|
2021-09-10 11:28:57 +05:00
|
|
|
|
public class UserRoleDto : IId
|
|
|
|
|
{
|
2022-06-02 12:35:51 +05:00
|
|
|
|
/// <inheritdoc/>
|
2021-09-10 11:28:57 +05:00
|
|
|
|
public int Id { get; set; }
|
2022-06-02 12:35:51 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// название
|
|
|
|
|
/// </summary>
|
2021-09-10 11:28:57 +05:00
|
|
|
|
public string Caption { get; set; }
|
2022-06-02 12:35:51 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// id типа роли
|
|
|
|
|
/// </summary>
|
2021-11-29 17:34:53 +05:00
|
|
|
|
public int IdType { get; set; }
|
2022-06-02 12:35:51 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// список разрешений
|
|
|
|
|
/// </summary>
|
2021-12-20 15:17:09 +05:00
|
|
|
|
public IEnumerable<PermissionDto> Permissions { get; set; }
|
2022-06-02 12:35:51 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Включенные роли
|
|
|
|
|
/// </summary>
|
2022-12-01 15:56:11 +05:00
|
|
|
|
public virtual IEnumerable<UserRoleDto> Roles { get; set; }
|
2022-04-11 18:00:34 +05:00
|
|
|
|
|
2022-06-02 12:35:51 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Пользователи в роли
|
|
|
|
|
/// </summary>
|
2021-11-30 09:34:23 +05:00
|
|
|
|
[JsonIgnore]
|
|
|
|
|
public virtual ICollection<UserDto> Users { get; set; }
|
2022-01-12 16:33:53 +05:00
|
|
|
|
|
2021-09-10 11:28:57 +05:00
|
|
|
|
}
|
|
|
|
|
}
|