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

32 lines
823 B
C#

using Core.Blueprint.Mongo;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace Core.Thalos.BuildingBlocks.Adapters
{
[CollectionAttributeName("Catalogs")]
public class CatalogAdapter : Document
{
[BsonElement("name")]
public string Name { get; set; } = null!;
[BsonElement("key")]
public string? Key { get; set; } = null!;
[BsonElement("description")]
public string? Description { get; set; }
public IEnumerable<CatalogValue>? Values { get; set; }
}
public class CatalogValue
{
[BsonId]
[BsonElement("_id")]
[BsonRepresentation(BsonType.ObjectId)]
public string _Id { get; set; } = null!;
[BsonElement("value")]
public string Value { get; set; } = null!;
}
}