Moved from EF and SQLite to LiteDB

This commit is contained in:
Robert committed 2019-11-20 19:19:13 +01:00
1 parent d4dd371a50
commit 66f7dc94c8
57 files changed
+379 -1279

No files matched your search

@@ -1,24 +0,0 @@
using System.ComponentModel.DataAnnotations;
namespace Artemis.Storage.Entities
{
public class DeviceEntity
{
public DeviceEntity()
{
Guid = System.Guid.NewGuid().ToString();
}
[Key]
public string Guid { get; set; }
public int DeviceHashCode { get; set; }
public double X { get; set; }
public double Y { get; set; }
public double Rotation { get; set; }
public int ZIndex { get; set; }
public string SurfaceId { get; set; }
public virtual SurfaceEntity Surface { get; set; }
}
}
@@ -1,19 +0,0 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Artemis.Storage.Entities
{
[Table("Folders")]
public class FolderEntity
{
[Key]
public string Guid { get; set; }
public int Order { get; set; }
public string Name { get; set; }
public virtual ICollection<FolderEntity> Folders { get; set; }
public virtual ICollection<LayerEntity> Layers { get; set; }
}
}
@@ -1,15 +0,0 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Artemis.Storage.Entities
{
[Table("Keypoints")]
public class KeypointEntity
{
[Key]
public string Guid { get; set; }
public int Time { get; set; }
public string Value { get; set; }
}
}
@@ -1,20 +0,0 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Artemis.Storage.Entities
{
[Table("Layers")]
public class LayerEntity
{
[Key]
public string Guid { get; set; }
public virtual ICollection<LedEntity> Leds { get; set; }
public virtual ICollection<LayerSettingEntity> Settings { get; set; }
public int Order { get; set; }
public string Name { get; set; }
public string LayerTypeGuid { get; set; }
}
}
@@ -1,18 +0,0 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Artemis.Storage.Entities
{
[Table("LayerSettings")]
public class LayerSettingEntity
{
[Key]
public string Guid { get; set; }
public string Name { get; set; }
public string Value { get; set; }
public ICollection<KeypointEntity> Keypoints { get; set; }
}
}
-18
View File
@@ -1,18 +0,0 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Artemis.Storage.Entities
{
[Table("Leds")]
public class LedEntity
{
[Key]
public string Guid { get; set; }
public string LedName { get; set; }
public string LimitedToDevice { get; set; }
public string LayerId { get; set; }
public virtual LayerEntity Layer { get; set; }
}
}
@@ -4,9 +4,10 @@ namespace Artemis.Storage.Entities
{
public class PluginSettingEntity
{
public Guid Id { get; set; }
public Guid PluginGuid { get; set; }
public string Name { get; set; }
public string Name { get; set; }
public string Value { get; set; }
}
}
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using LiteDB;
namespace Artemis.Storage.Entities.Profile
{
public class FolderEntity
{
public Guid Id { get; set; }
public Guid ParentId { get; set; }
public int Order { get; set; }
public string Name { get; set; }
public List<ProfileConditionEntity> Conditions { get; set; }
[BsonRef("ProfileEntity")]
public ProfileEntity Profile { get; set; }
public Guid ProfileId { get; set; }
}
}
@@ -0,0 +1,9 @@
using System;
namespace Artemis.Storage.Entities.Profile
{
public class LayerElementEntity
{
public Guid Id { get; set; }
}
}
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using LiteDB;
namespace Artemis.Storage.Entities.Profile
{
public class LayerEntity
{
public Guid Id { get; set; }
public Guid ParentId { get; set; }
public Guid LayerTypeGuid { get; set; }
public int Order { get; set; }
public string Name { get; set; }
public List<LedEntity> Leds { get; set; }
public List<ProfileConditionEntity> Condition { get; set; }
public List<LayerElementEntity> Elements { get; set; }
[BsonRef("ProfileEntity")]
public ProfileEntity Profile { get; set; }
public Guid ProfileId { get; set; }
}
}
@@ -0,0 +1,12 @@
using System;
namespace Artemis.Storage.Entities.Profile
{
public class LedEntity
{
public Guid Id { get; set; }
public string LedName { get; set; }
public string LimitedToDevice { get; set; }
}
}
@@ -0,0 +1,9 @@
using System;
namespace Artemis.Storage.Entities.Profile
{
public class ProfileConditionEntity
{
public Guid Id { get; set; }
}
}
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
namespace Artemis.Storage.Entities.Profile
{
public class ProfileEntity
{
public Guid Id { get; set; }
public Guid PluginGuid { get; set; }
public string Name { get; set; }
public bool IsActive { get; set; }
public List<FolderEntity> Folders { get; set; }
public List<LayerEntity> Layers { get; set; }
}
}
@@ -1,19 +0,0 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace Artemis.Storage.Entities
{
public class ProfileEntity
{
[Key]
public string Guid { get; set; }
public Guid PluginGuid { get; set; }
public string Name { get; set; }
public bool IsActive { get; set; }
public int RootFolderId { get; set; }
public virtual FolderEntity RootFolder { get; set; }
}
}
@@ -1,8 +0,0 @@
namespace Artemis.Storage.Entities
{
public class SettingEntity
{
public string Name { get; set; }
public string Value { get; set; }
}
}
@@ -0,0 +1,15 @@
using System;
namespace Artemis.Storage.Entities.Surface
{
public class DeviceEntity
{
public Guid Id { get; set; }
public int DeviceHashCode { get; set; }
public double X { get; set; }
public double Y { get; set; }
public double Rotation { get; set; }
public int ZIndex { get; set; }
}
}
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
namespace Artemis.Storage.Entities.Surface
{
public class SurfaceEntity
{
public Guid Id { get; set; }
public string Name { get; set; }
public bool IsActive { get; set; }
public List<DeviceEntity> DeviceEntities { get; set; }
}
}
@@ -1,21 +0,0 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Artemis.Storage.Entities
{
public class SurfaceEntity
{
public SurfaceEntity()
{
Guid = System.Guid.NewGuid().ToString();
}
[Key]
public string Guid { get; set; }
public string Name { get; set; }
public bool IsActive { get; set; }
public virtual ICollection<DeviceEntity> DeviceEntities { get; set; }
}
}