mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-31 09:43:46 +00:00
45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
namespace Artemis.Storage.Legacy.Entities.Plugins;
|
|
|
|
/// <summary>
|
|
/// Represents the configuration of a plugin, each plugin has one configuration
|
|
/// </summary>
|
|
internal class PluginEntity
|
|
{
|
|
public PluginEntity()
|
|
{
|
|
Features = new List<PluginFeatureEntity>();
|
|
}
|
|
|
|
public Guid Id { get; set; }
|
|
public bool IsEnabled { get; set; }
|
|
|
|
public List<PluginFeatureEntity> Features { get; set; }
|
|
|
|
public Artemis.Storage.Entities.Plugins.PluginEntity Migrate()
|
|
{
|
|
return new Artemis.Storage.Entities.Plugins.PluginEntity()
|
|
{
|
|
PluginGuid = Id,
|
|
IsEnabled = IsEnabled,
|
|
Features = Features.Select(f => f.Migrate()).ToList()
|
|
};
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Represents the configuration of a plugin feature, each feature has one configuration
|
|
/// </summary>
|
|
internal class PluginFeatureEntity
|
|
{
|
|
public string Type { get; set; } = string.Empty;
|
|
public bool IsEnabled { get; set; }
|
|
|
|
public Artemis.Storage.Entities.Plugins.PluginFeatureEntity Migrate()
|
|
{
|
|
return new Artemis.Storage.Entities.Plugins.PluginFeatureEntity()
|
|
{
|
|
Type = Type,
|
|
IsEnabled = IsEnabled
|
|
};
|
|
}
|
|
} |