Files
Core.Thalos.BuildingBlocks/Core.Thalos.BuildingBlocks/Adapters/PermissionAdapter.cs

46 lines
1.4 KiB
C#

// ***********************************************************************
// <copyright file="PermissionAdapter.cs">
// AgileWebs
// </copyright>
// ***********************************************************************
using Core.Blueprint.Mongo;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System.Text.Json.Serialization;
namespace Core.Thalos.BuildingBlocks
{
/// <summary>
/// Adapter for representing a permission.
/// </summary>
[CollectionAttributeName("Permissions")]
public class PermissionAdapter : Document
{
/// <summary>
/// Gets or sets the name of the entity.
/// </summary>
[BsonElement("name")]
[BsonRepresentation(BsonType.String)]
[JsonPropertyName("name")]
public string Name { get; set; } = null!;
/// <summary>
/// Gets or sets the description of the entity.
/// </summary>
[BsonElement("description")]
[BsonRepresentation(BsonType.String)]
[JsonPropertyName("description")]
public string? Description { get; set; }
/// <summary>
/// Gets or sets the status of the entity object.
/// </summary>
[BsonElement("accessLevel")]
[BsonRepresentation(BsonType.String)]
[JsonPropertyName("accessLevel")]
[JsonConverter(typeof(JsonStringEnumConverter))]
public AccessLevelEnum? AccessLevel { get; set; } = null!;
}
}