77 lines
2.3 KiB
C#
77 lines
2.3 KiB
C#
// <auto-generated />
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using MyDarling.Models;
|
|
|
|
#nullable disable
|
|
|
|
namespace MyDarling.Migrations
|
|
{
|
|
[DbContext(typeof(DataContext))]
|
|
partial class DataContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
|
|
|
|
modelBuilder.Entity("MyDarling.Models.Figure", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("ProductId")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
b.ToTable("Figures");
|
|
});
|
|
|
|
modelBuilder.Entity("MyDarling.Models.Product", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<decimal>("Price")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Products");
|
|
});
|
|
|
|
modelBuilder.Entity("MyDarling.Models.Figure", b =>
|
|
{
|
|
b.HasOne("MyDarling.Models.Product", null)
|
|
.WithMany("Figures")
|
|
.HasForeignKey("ProductId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("MyDarling.Models.Product", b =>
|
|
{
|
|
b.Navigation("Figures");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|