Files
mixtape/zero.Core/Entities/Preset.cs
T

34 lines
652 B
C#
Raw Normal View History

2020-12-17 15:38:15 +01:00
using System;
using zero.Core.Attributes;
2020-12-16 15:50:44 +01:00
namespace zero.Core.Entities
{
2021-05-04 17:23:52 +02:00
public abstract class Preset
2020-12-16 15:50:44 +01:00
{
2020-12-17 15:38:15 +01:00
/// <summary>
/// Key is used to query a preset
/// </summary>
2021-05-04 17:23:52 +02:00
public string Key { get; set; }
2020-12-17 15:38:15 +01:00
/// <summary>
/// Name of the preset
/// </summary>
2021-05-04 17:23:52 +02:00
public string Name { get; set; }
2020-12-16 15:50:44 +01:00
}
[Collection("Presets")]
2021-05-04 17:23:52 +02:00
public class PresetOverride<T> : ZeroEntity where T : Preset
2020-12-16 15:50:44 +01:00
{
2020-12-17 15:38:15 +01:00
/// <summary>
/// Type of the target model (used to query)
/// </summary>
2021-05-04 17:23:52 +02:00
public Type TargetType { get; set; }
2020-12-17 15:38:15 +01:00
2020-12-16 15:50:44 +01:00
/// <summary>
/// Overridden data
/// </summary>
2021-05-04 17:23:52 +02:00
public T Model { get; set; }
2020-12-16 15:50:44 +01:00
}
}