Potatismoose_Parkeringshuset/Parkeringshuset/Migrations/ParkeringGarageContextModelSnapshot.cs
// <auto-generated />
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Parkeringshuset.Data;
using System;

namespace Parkeringshuset.Migrations
{
    [DbContext(typeof(ParkeringGarageContext))]
    partial class ParkeringGarageContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "5.0.12");

            modelBuilder.Entity("Parkeringshuset.Models.Admin", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

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

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

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

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

                    b.HasKey("Id");

                    b.HasIndex("Username", "Email")
                        .IsUnique();

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

            modelBuilder.Entity("Parkeringshuset.Models.PTicket", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

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

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

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

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

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

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

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

                    b.HasKey("Id");

                    b.HasIndex("TypeId");

                    b.HasIndex("VehicleId");

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

            modelBuilder.Entity("Parkeringshuset.Models.PType", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

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

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

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

                    b.HasKey("Id");

                    b.HasIndex("Name")
                        .IsUnique();

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

            modelBuilder.Entity("Parkeringshuset.Models.Vehicle", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("INTEGER");

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

                    b.HasKey("Id");

                    b.HasIndex("RegistrationNumber")
                        .IsUnique();

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

            modelBuilder.Entity("Parkeringshuset.Models.PTicket", b =>
                {
                    b.HasOne("Parkeringshuset.Models.PType", "Type")
                        .WithMany()
                        .HasForeignKey("TypeId");

                    b.HasOne("Parkeringshuset.Models.Vehicle", "Vehicle")
                        .WithMany()
                        .HasForeignKey("VehicleId");

                    b.Navigation("Type");

                    b.Navigation("Vehicle");
                });
#pragma warning restore 612, 618
        }
    }
}