// <auto-generated />
using System;
using FoodsharingSiegen.Server.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

#nullable disable

namespace FoodsharingSiegen.Server.Migrations
{
    [DbContext(typeof(FsContext))]
    [Migration("20220124091416_Init")]
    partial class Init
    {
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder.HasAnnotation("ProductVersion", "6.0.1");

            modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.InteractionDate", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("TEXT")
                        .HasColumnName("Id");

                    b.Property<DateTime>("Date")
                        .HasColumnType("TEXT")
                        .HasColumnName("Date");

                    b.Property<Guid>("UserId")
                        .HasColumnType("TEXT")
                        .HasColumnName("UserId");

                    b.HasKey("Id");

                    b.HasIndex("UserId");

                    b.ToTable("InteractionDates", (string)null);
                });

            modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.InteractionProcess", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("TEXT")
                        .HasColumnName("Id");

                    b.Property<Guid>("EinAb1Id")
                        .HasColumnType("TEXT")
                        .HasColumnName("EinAb1Id");

                    b.Property<Guid>("EinAb2Id")
                        .HasColumnType("TEXT")
                        .HasColumnName("EinAb2Id");

                    b.Property<Guid>("EinAb3Id")
                        .HasColumnType("TEXT")
                        .HasColumnName("EinAb3Id");

                    b.Property<Guid>("PassId")
                        .HasColumnType("TEXT")
                        .HasColumnName("PassId");

                    b.Property<Guid>("VerifyId")
                        .HasColumnType("TEXT")
                        .HasColumnName("VerifyId");

                    b.Property<Guid>("WelcomeId")
                        .HasColumnType("TEXT")
                        .HasColumnName("WelcomeId");

                    b.HasKey("Id");

                    b.ToTable("InteractionProcesses", (string)null);
                });

            modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("TEXT")
                        .HasColumnName("Id");

                    b.Property<int>("FsId")
                        .HasColumnType("INTEGER")
                        .HasColumnName("FsId");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("TEXT")
                        .HasColumnName("Name");

                    b.Property<Guid>("ProgressId")
                        .HasColumnType("TEXT")
                        .HasColumnName("ProgressId");

                    b.HasKey("Id");

                    b.ToTable("Prospects", (string)null);
                });

            modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("TEXT")
                        .HasColumnName("Id");

                    b.Property<DateTime>("Created")
                        .HasColumnType("TEXT")
                        .HasColumnName("Created");

                    b.Property<string>("Mail")
                        .IsRequired()
                        .HasColumnType("TEXT")
                        .HasColumnName("Mail");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("TEXT")
                        .HasColumnName("Name");

                    b.Property<int>("Type")
                        .HasColumnType("INTEGER")
                        .HasColumnName("Type");

                    b.Property<bool>("Verified")
                        .HasColumnType("INTEGER")
                        .HasColumnName("Verified");

                    b.HasKey("Id");

                    b.ToTable("Users", (string)null);
                });

            modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.InteractionDate", b =>
                {
                    b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
                        .WithOne("EinAb1")
                        .HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
                        .HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "EinAb1Id")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
                        .WithOne("EinAb2")
                        .HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
                        .HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "EinAb2Id")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("FK_InteractionDates_InteractionProcesses_Id1");

                    b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
                        .WithOne("EinAb3")
                        .HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
                        .HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "EinAb3Id")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("FK_InteractionDates_InteractionProcesses_Id2");

                    b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
                        .WithOne("Pass")
                        .HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
                        .HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "PassId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("FK_InteractionDates_InteractionProcesses_Id3");

                    b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
                        .WithOne("Verify")
                        .HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
                        .HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "VerifyId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("FK_InteractionDates_InteractionProcesses_Id4");

                    b.HasOne("FoodsharingSiegen.Contracts.Entity.InteractionProcess", null)
                        .WithOne("Welcome")
                        .HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionDate", "Id")
                        .HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "WelcomeId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("FK_InteractionDates_InteractionProcesses_Id5");

                    b.HasOne("FoodsharingSiegen.Contracts.Entity.User", "User")
                        .WithMany("InteractionDates")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("User");
                });

            modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.InteractionProcess", b =>
                {
                    b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", null)
                        .WithOne("Progress")
                        .HasForeignKey("FoodsharingSiegen.Contracts.Entity.InteractionProcess", "Id")
                        .HasPrincipalKey("FoodsharingSiegen.Contracts.Entity.Prospect", "ProgressId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });

            modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.InteractionProcess", b =>
                {
                    b.Navigation("EinAb1");

                    b.Navigation("EinAb2");

                    b.Navigation("EinAb3");

                    b.Navigation("Pass");

                    b.Navigation("Verify");

                    b.Navigation("Welcome");
                });

            modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
                {
                    b.Navigation("Progress");
                });

            modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
                {
                    b.Navigation("InteractionDates");
                });
#pragma warning restore 612, 618
        }
    }
}
