2021-09-10 11:28:57 +05:00
|
|
|
|
using System.Collections.Generic;
|
2023-02-20 12:18:45 +05:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using System.Linq;
|
2021-09-10 11:28:57 +05:00
|
|
|
|
|
2023-06-21 12:33:18 +05:00
|
|
|
|
namespace AsbCloudApp.Data.User
|
2021-09-10 11:28:57 +05:00
|
|
|
|
{
|
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>
|
2023-02-20 12:18:45 +05:00
|
|
|
|
[Required]
|
2023-06-21 12:33:18 +05:00
|
|
|
|
[StringLength(50, MinimumLength = 1, ErrorMessage = "Допустимая длина названия роли от 1 до 50 символов")]
|
2023-02-20 12:18:45 +05:00
|
|
|
|
public string Caption { get; set; } = null!;
|
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>
|
2023-02-20 12:18:45 +05:00
|
|
|
|
public IEnumerable<PermissionDto> Permissions { get; set; } = Enumerable.Empty<PermissionDto>();
|
2022-06-02 12:35:51 +05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Включенные роли
|
|
|
|
|
/// </summary>
|
2023-02-20 12:18:45 +05:00
|
|
|
|
public virtual IEnumerable<UserRoleDto> Roles { get; set; } = Enumerable.Empty<UserRoleDto>();
|
2021-09-10 11:28:57 +05:00
|
|
|
|
}
|
|
|
|
|
}
|