summaryrefslogtreecommitdiff
path: root/backend/Elements.Data/Migrations/20231022092319_Initial.Designer.cs
diff options
context:
space:
mode:
authorPaweł Bernaciak <pawelbernaciak@zohomail.eu>2023-10-22 11:25:59 +0200
committerPaweł Bernaciak <pawelbernaciak@zohomail.eu>2023-10-22 11:25:59 +0200
commitcc4d58a1bf2fff24f9979c92118fbf23afe443f4 (patch)
tree0ddf0903f49ba912cf75f7b9640b748ad476f221 /backend/Elements.Data/Migrations/20231022092319_Initial.Designer.cs
parent1e2d02bf49f6ab9f5f239176b14089a03d84e280 (diff)
Fix models
Diffstat (limited to 'backend/Elements.Data/Migrations/20231022092319_Initial.Designer.cs')
-rw-r--r--backend/Elements.Data/Migrations/20231022092319_Initial.Designer.cs249
1 files changed, 249 insertions, 0 deletions
diff --git a/backend/Elements.Data/Migrations/20231022092319_Initial.Designer.cs b/backend/Elements.Data/Migrations/20231022092319_Initial.Designer.cs
new file mode 100644
index 0000000..41c4295
--- /dev/null
+++ b/backend/Elements.Data/Migrations/20231022092319_Initial.Designer.cs
@@ -0,0 +1,249 @@
+// <auto-generated />
+using System;
+using Elements.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace Elements.Data.Migrations
+{
+ [DbContext(typeof(ApplicationDbContext))]
+ [Migration("20231022092319_Initial")]
+ partial class Initial
+ {
+ /// <inheritdoc />
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder.HasAnnotation("ProductVersion", "7.0.12");
+
+ modelBuilder.Entity("Elements.Data.Models.Element", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<byte[]>("IconPng")
+ .IsRequired()
+ .HasColumnType("BLOB");
+
+ b.Property<string>("Name")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<int>("State")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("UserId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("Elements");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ IconPng = new byte[] { 137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 16, 0, 0, 0, 16, 8, 6, 0, 0, 0, 31, 243, 255, 97, 0, 0, 0, 9, 112, 72, 89, 115, 0, 0, 14, 196, 0, 0, 14, 196, 1, 149, 43, 14, 27, 0, 0, 0, 29, 73, 68, 65, 84, 120, 156, 99, 249, 95, 224, 252, 159, 129, 2, 192, 194, 64, 33, 24, 53, 96, 212, 128, 81, 3, 6, 139, 1, 0, 119, 65, 2, 242, 233, 108, 215, 141, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130 },
+ Name = "Fire",
+ State = 1,
+ UserId = 1
+ },
+ new
+ {
+ Id = 2,
+ IconPng = new byte[] { 137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 16, 0, 0, 0, 16, 8, 6, 0, 0, 0, 31, 243, 255, 97, 0, 0, 0, 9, 112, 72, 89, 115, 0, 0, 14, 196, 0, 0, 14, 196, 1, 149, 43, 14, 27, 0, 0, 0, 29, 73, 68, 65, 84, 120, 156, 99, 81, 156, 246, 249, 63, 3, 5, 128, 133, 129, 66, 48, 106, 192, 168, 1, 163, 6, 12, 22, 3, 0, 85, 67, 2, 234, 36, 203, 134, 16, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130 },
+ Name = "Water",
+ State = 1,
+ UserId = 1
+ },
+ new
+ {
+ Id = 3,
+ IconPng = new byte[] { 137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 16, 0, 0, 0, 16, 8, 6, 0, 0, 0, 31, 243, 255, 97, 0, 0, 0, 9, 112, 72, 89, 115, 0, 0, 14, 196, 0, 0, 14, 196, 1, 149, 43, 14, 27, 0, 0, 0, 30, 73, 68, 65, 84, 120, 156, 99, 217, 125, 239, 247, 127, 6, 10, 0, 11, 3, 133, 96, 212, 128, 81, 3, 70, 13, 24, 44, 6, 0, 0, 10, 221, 3, 212, 197, 89, 182, 174, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130 },
+ Name = "Air",
+ State = 1,
+ UserId = 1
+ },
+ new
+ {
+ Id = 4,
+ IconPng = new byte[] { 137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 16, 0, 0, 0, 16, 8, 6, 0, 0, 0, 31, 243, 255, 97, 0, 0, 0, 9, 112, 72, 89, 115, 0, 0, 14, 196, 0, 0, 14, 196, 1, 149, 43, 14, 27, 0, 0, 0, 29, 73, 68, 65, 84, 120, 156, 99, 137, 117, 48, 255, 207, 64, 1, 96, 97, 160, 16, 140, 26, 48, 106, 192, 168, 1, 131, 197, 0, 0, 242, 75, 2, 20, 1, 55, 196, 168, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130 },
+ Name = "Ground",
+ State = 1,
+ UserId = 1
+ });
+ });
+
+ modelBuilder.Entity("Elements.Data.Models.Recipe", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("FirstIngredientId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("ResultId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("SecondIngredientId")
+ .HasColumnType("INTEGER");
+
+ b.HasKey("Id");
+
+ b.HasIndex("FirstIngredientId");
+
+ b.HasIndex("ResultId");
+
+ b.HasIndex("SecondIngredientId");
+
+ b.ToTable("Recipes");
+ });
+
+ modelBuilder.Entity("Elements.Data.Models.Suggestion", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("FirstIngredientId")
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("Icon")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Name")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<int>("SecondIngredientId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("UserId")
+ .HasColumnType("INTEGER");
+
+ b.Property<int>("Votes")
+ .HasColumnType("INTEGER");
+
+ b.Property<DateTime>("VotingEnd")
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.HasIndex("FirstIngredientId");
+
+ b.HasIndex("SecondIngredientId");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("Suggestions");
+ });
+
+ modelBuilder.Entity("Elements.Data.Models.User", b =>
+ {
+ b.Property<int>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("INTEGER");
+
+ b.Property<string>("GoogleId")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.Property<string>("Name")
+ .IsRequired()
+ .HasColumnType("TEXT");
+
+ b.HasKey("Id");
+
+ b.ToTable("Users");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ GoogleId = "",
+ Name = "Elements"
+ });
+ });
+
+ modelBuilder.Entity("Elements.Data.Models.Element", b =>
+ {
+ b.HasOne("Elements.Data.Models.User", "User")
+ .WithMany("Elements")
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("Elements.Data.Models.Recipe", b =>
+ {
+ b.HasOne("Elements.Data.Models.Element", "FirstIngredient")
+ .WithMany()
+ .HasForeignKey("FirstIngredientId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Elements.Data.Models.Element", "Result")
+ .WithMany()
+ .HasForeignKey("ResultId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Elements.Data.Models.Element", "SecondIngredient")
+ .WithMany()
+ .HasForeignKey("SecondIngredientId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("FirstIngredient");
+
+ b.Navigation("Result");
+
+ b.Navigation("SecondIngredient");
+ });
+
+ modelBuilder.Entity("Elements.Data.Models.Suggestion", b =>
+ {
+ b.HasOne("Elements.Data.Models.Element", "FirstIngredient")
+ .WithMany()
+ .HasForeignKey("FirstIngredientId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Elements.Data.Models.Element", "SecondIngredient")
+ .WithMany()
+ .HasForeignKey("SecondIngredientId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Elements.Data.Models.User", null)
+ .WithMany("Suggestions")
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("FirstIngredient");
+
+ b.Navigation("SecondIngredient");
+ });
+
+ modelBuilder.Entity("Elements.Data.Models.User", b =>
+ {
+ b.Navigation("Elements");
+
+ b.Navigation("Suggestions");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}