ShoppingApp/Weifer.Database.EF/Migrations/20240304193908_added_sessiontoken.Designer.cs

139 lines
4.7 KiB
C#
Raw Permalink Normal View History

// <auto-generated />
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
{
/// <inheritdoc />
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<Guid>("CustomerId")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreatedOn")
.HasColumnType("datetime2");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("FirstName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("PasswordHash")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("SessionToken")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("CustomerId");
b.ToTable("Customers");
});
modelBuilder.Entity("Weifer.Database.EF.Entitys.ShoppingItem", b =>
{
b.Property<Guid>("ShoppingItemId")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<int>("Number")
.HasColumnType("int");
b.Property<bool>("Purchased")
.HasColumnType("bit");
b.Property<Guid>("ShoppingListId")
.HasColumnType("uniqueidentifier");
b.HasKey("ShoppingItemId");
b.HasIndex("ShoppingListId");
b.ToTable("ShoppingItems");
});
modelBuilder.Entity("Weifer.Database.EF.Entitys.ShoppingList", b =>
{
b.Property<Guid>("ShoppingListId")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid>("CustomerId")
.HasColumnType("uniqueidentifier");
b.Property<string>("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
}
}
}