forked from ddrilling/AsbCloudServer
38 lines
1011 B
C#
38 lines
1011 B
C#
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
|
|
namespace AsbCloudApp.Data
|
|
{
|
|
#nullable enable
|
|
/// <summary>
|
|
/// Роль пользователя платформы
|
|
/// </summary>
|
|
public class UserRoleDto : IId
|
|
{
|
|
/// <inheritdoc/>
|
|
public int Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// название
|
|
/// </summary>
|
|
[Required]
|
|
public string Caption { get; set; } = null!;
|
|
|
|
/// <summary>
|
|
/// id типа роли
|
|
/// </summary>
|
|
public int IdType { get; set; }
|
|
|
|
/// <summary>
|
|
/// список разрешений
|
|
/// </summary>
|
|
public IEnumerable<PermissionDto> Permissions { get; set; } = Enumerable.Empty<PermissionDto>();
|
|
|
|
/// <summary>
|
|
/// Включенные роли
|
|
/// </summary>
|
|
public virtual IEnumerable<UserRoleDto> Roles { get; set; } = Enumerable.Empty<UserRoleDto>();
|
|
}
|
|
}
|