//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using ShoppingCartStarter.Server.Data;
#nullable disable
namespace ShoppingCartStarter.Server.Migrations
{
[DbContext(typeof(StoreContext))]
[Migration("20211109100532_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "6.0.0");
modelBuilder.Entity("ShoppingCartStarter.Server.DomainModels.LineItem", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Image")
.HasColumnType("TEXT");
b.Property("Name")
.HasColumnType("TEXT");
b.Property("Price")
.HasColumnType("TEXT");
b.Property("Quantity")
.HasColumnType("INTEGER");
b.Property("ShoppingCartId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ShoppingCartId");
b.ToTable("LineItem");
});
modelBuilder.Entity("ShoppingCartStarter.Server.DomainModels.ShoppingCart", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("SessionId")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.ToTable("Carts");
});
modelBuilder.Entity("ShoppingCartStarter.Server.DomainModels.LineItem", b =>
{
b.HasOne("ShoppingCartStarter.Server.DomainModels.ShoppingCart", null)
.WithMany("LineItems")
.HasForeignKey("ShoppingCartId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("ShoppingCartStarter.Server.DomainModels.ShoppingCart", b =>
{
b.Navigation("LineItems");
});
#pragma warning restore 612, 618
}
}
}