//
using System;
using Artemis.Storage;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Artemis.Storage.Migrations
{
[DbContext(typeof(ArtemisDbContext))]
partial class ArtemisDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.2");
modelBuilder.Entity("Artemis.Storage.Entities.General.ReleaseEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("InstalledAt")
.HasColumnType("TEXT");
b.Property("Version")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("InstalledAt");
b.HasIndex("Version")
.IsUnique();
b.ToTable("Releases");
});
modelBuilder.Entity("Artemis.Storage.Entities.Plugins.PluginEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("IsEnabled")
.HasColumnType("INTEGER");
b.Property("PluginGuid")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("PluginGuid")
.IsUnique();
b.ToTable("Plugins");
});
modelBuilder.Entity("Artemis.Storage.Entities.Plugins.PluginFeatureEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("IsEnabled")
.HasColumnType("INTEGER");
b.Property("PluginEntityId")
.HasColumnType("TEXT");
b.Property("Type")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("PluginEntityId");
b.ToTable("PluginFeatures");
});
modelBuilder.Entity("Artemis.Storage.Entities.Plugins.PluginSettingEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("TEXT");
b.Property("PluginGuid")
.HasColumnType("TEXT");
b.Property("Value")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("PluginGuid");
b.HasIndex("Name", "PluginGuid")
.IsUnique();
b.ToTable("PluginSettings");
});
modelBuilder.Entity("Artemis.Storage.Entities.Profile.ProfileCategoryEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("IsCollapsed")
.HasColumnType("INTEGER");
b.Property("IsSuspended")
.HasColumnType("INTEGER");
b.Property("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("Order")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("ProfileCategories");
});
modelBuilder.Entity("Artemis.Storage.Entities.Profile.ProfileContainerEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("Icon")
.IsRequired()
.HasColumnType("BLOB");
b.Property("Profile")
.IsRequired()
.HasColumnType("TEXT");
b.Property("ProfileCategoryId")
.HasColumnType("TEXT");
b.Property("ProfileConfiguration")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ProfileCategoryId");
b.ToTable("ProfileContainers");
});
modelBuilder.Entity("Artemis.Storage.Entities.Surface.DeviceEntity", b =>
{
b.Property("Id")
.HasMaxLength(512)
.HasColumnType("TEXT");
b.Property("BlueScale")
.HasColumnType("REAL");
b.Property("Categories")
.IsRequired()
.HasColumnType("TEXT");
b.Property("DeviceProvider")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("TEXT");
b.Property("GreenScale")
.HasColumnType("REAL");
b.Property("IsEnabled")
.HasColumnType("INTEGER");
b.Property("LayoutParameter")
.HasMaxLength(512)
.HasColumnType("TEXT");
b.Property("LayoutType")
.HasMaxLength(64)
.HasColumnType("TEXT");
b.Property("LogicalLayout")
.HasMaxLength(32)
.HasColumnType("TEXT");
b.Property("PhysicalLayout")
.HasColumnType("INTEGER");
b.Property("RedScale")
.HasColumnType("REAL");
b.Property("Rotation")
.HasColumnType("REAL");
b.Property("Scale")
.HasColumnType("REAL");
b.Property("X")
.HasColumnType("REAL");
b.Property("Y")
.HasColumnType("REAL");
b.Property("ZIndex")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("Devices");
});
modelBuilder.Entity("Artemis.Storage.Entities.Workshop.EntryEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("Author")
.IsRequired()
.HasColumnType("TEXT");
b.Property("EntryId")
.HasColumnType("INTEGER");
b.Property("EntryType")
.HasColumnType("INTEGER");
b.Property("InstalledAt")
.HasColumnType("TEXT");
b.Property("Metadata")
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property("ReleaseId")
.HasColumnType("INTEGER");
b.Property("ReleaseVersion")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("EntryId")
.IsUnique();
b.ToTable("Entries");
});
modelBuilder.Entity("Artemis.Storage.Entities.Plugins.PluginFeatureEntity", b =>
{
b.HasOne("Artemis.Storage.Entities.Plugins.PluginEntity", null)
.WithMany("Features")
.HasForeignKey("PluginEntityId");
});
modelBuilder.Entity("Artemis.Storage.Entities.Profile.ProfileContainerEntity", b =>
{
b.HasOne("Artemis.Storage.Entities.Profile.ProfileCategoryEntity", "ProfileCategory")
.WithMany("ProfileConfigurations")
.HasForeignKey("ProfileCategoryId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ProfileCategory");
});
modelBuilder.Entity("Artemis.Storage.Entities.Surface.DeviceEntity", b =>
{
b.OwnsOne("System.Collections.Generic.List", "InputIdentifiers", b1 =>
{
b1.Property("DeviceEntityId")
.HasColumnType("TEXT");
b1.Property("Capacity")
.HasColumnType("INTEGER");
b1.HasKey("DeviceEntityId");
b1.ToTable("Devices");
b1.ToJson("InputIdentifiers");
b1.WithOwner()
.HasForeignKey("DeviceEntityId");
});
b.OwnsOne("System.Collections.Generic.List", "InputMappings", b1 =>
{
b1.Property("DeviceEntityId")
.HasColumnType("TEXT");
b1.Property("Capacity")
.HasColumnType("INTEGER");
b1.HasKey("DeviceEntityId");
b1.ToTable("Devices");
b1.ToJson("InputMappings");
b1.WithOwner()
.HasForeignKey("DeviceEntityId");
});
b.Navigation("InputIdentifiers")
.IsRequired();
b.Navigation("InputMappings")
.IsRequired();
});
modelBuilder.Entity("Artemis.Storage.Entities.Plugins.PluginEntity", b =>
{
b.Navigation("Features");
});
modelBuilder.Entity("Artemis.Storage.Entities.Profile.ProfileCategoryEntity", b =>
{
b.Navigation("ProfileConfigurations");
});
#pragma warning restore 612, 618
}
}
}