1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2026-03-25 02:38:48 +00:00
RobertBeekman 551921db9f
Storage - Replace LiteDB with SQLite + EF Core (#843)
Storage - Added LiteDB to SQLite migration
UI - Try to die a bit more gracefully
Core - Delay start watching plugins for hot reload after initializing
UI - Simplify category management logic
UI - Avoid crash during profile icon load
Storage - Fix entry metadata retrieval
2024-03-13 20:19:21 +01:00

32 lines
898 B
C#

using Artemis.Storage.Legacy.Entities.General;
namespace Artemis.Storage.Legacy.Entities.Profile;
internal class ProfileEntity
{
public ProfileEntity()
{
Folders = new List<FolderEntity>();
Layers = new List<LayerEntity>();
ScriptConfigurations = new List<ScriptConfigurationEntity>();
}
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
public bool IsFreshImport { get; set; }
public List<FolderEntity> Folders { get; set; }
public List<LayerEntity> Layers { get; set; }
public List<ScriptConfigurationEntity> ScriptConfigurations { get; set; }
public void UpdateGuid(Guid guid)
{
Guid oldGuid = Id;
Id = guid;
FolderEntity? rootFolder = Folders.FirstOrDefault(f => f.ParentId == oldGuid);
if (rootFolder != null)
rootFolder.ParentId = Id;
}
}