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

namespace EfCoreMigration.Migrations
{
    [DbContext(typeof(SportContext))]
    partial class SportContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "3.1.2");

            modelBuilder.Entity("EfCoreMigration.Models.Atleet", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("ID")
                        .HasColumnType("INTEGER");

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

                    b.Property<string>("Naam")
                        .HasColumnType("TEXT");

                    b.Property<string>("Nationaliteit")
                        .HasColumnType("TEXT");

                    b.HasKey("Id");

                    b.ToTable("Atleten");
                });

            modelBuilder.Entity("EfCoreMigration.Models.Deelname", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("ID")
                        .HasColumnType("INTEGER");

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

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

                    b.Property<TimeSpan>("Tijd")
                        .HasColumnType("TEXT");

                    b.HasKey("Id");

                    b.HasIndex("AtleetId");

                    b.HasIndex("EvenementId");

                    b.ToTable("Deelname");
                });

            modelBuilder.Entity("EfCoreMigration.Models.Evenement", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnName("ID")
                        .HasColumnType("INTEGER");

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

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

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

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

                    b.HasKey("Id");

                    b.ToTable("Evenementen");
                });

            modelBuilder.Entity("EfCoreMigration.Models.Deelname", b =>
                {
                    b.HasOne("EfCoreMigration.Models.Atleet", "Atleet")
                        .WithMany("Wedstrijden")
                        .HasForeignKey("AtleetId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.HasOne("EfCoreMigration.Models.Evenement", "Evenement")
                        .WithMany("Deelnemers")
                        .HasForeignKey("EvenementId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();
                });
#pragma warning restore 612, 618
        }
    }
}
