// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Weifer.Database.EF; #nullable disable namespace Weifer.Database.EF.Migrations { [DbContext(typeof(DatabaseContext))] [Migration("20240304193908_added_sessiontoken")] partial class added_sessiontoken { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "8.0.2") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("Weifer.Database.EF.Entitys.Customer", b => { b.Property("CustomerId") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("CreatedOn") .HasColumnType("datetime2"); b.Property("Email") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("FirstName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("LastName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("PasswordHash") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("SessionToken") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("CustomerId"); b.ToTable("Customers"); }); modelBuilder.Entity("Weifer.Database.EF.Entitys.ShoppingItem", b => { b.Property("ShoppingItemId") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Description") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Number") .HasColumnType("int"); b.Property("Purchased") .HasColumnType("bit"); b.Property("ShoppingListId") .HasColumnType("uniqueidentifier"); b.HasKey("ShoppingItemId"); b.HasIndex("ShoppingListId"); b.ToTable("ShoppingItems"); }); modelBuilder.Entity("Weifer.Database.EF.Entitys.ShoppingList", b => { b.Property("ShoppingListId") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("CustomerId") .HasColumnType("uniqueidentifier"); b.Property("ShoppingListName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("ShoppingListId"); b.HasIndex("CustomerId"); b.ToTable("ShoppingLists"); }); modelBuilder.Entity("Weifer.Database.EF.Entitys.ShoppingItem", b => { b.HasOne("Weifer.Database.EF.Entitys.ShoppingList", null) .WithMany("ShoppingItems") .HasForeignKey("ShoppingListId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Weifer.Database.EF.Entitys.ShoppingList", b => { b.HasOne("Weifer.Database.EF.Entitys.Customer", null) .WithMany("ShoppingLists") .HasForeignKey("CustomerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Weifer.Database.EF.Entitys.Customer", b => { b.Navigation("ShoppingLists"); }); modelBuilder.Entity("Weifer.Database.EF.Entitys.ShoppingList", b => { b.Navigation("ShoppingItems"); }); #pragma warning restore 612, 618 } } }