0
0
MyDarling/Migrations/20230603040054_Initial.Designer.cs

80 lines
2.4 KiB
C#
Raw Normal View History

2023-01-31 15:55:44 +03:00
// <auto-generated />
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using MyDarling.Models;
#nullable disable
namespace MyDarling.Migrations
{
[DbContext(typeof(DataContext))]
2023-06-03 07:41:46 +03:00
[Migration("20230603040054_Initial")]
partial class Initial
2023-01-31 15:55:44 +03:00
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
modelBuilder.Entity("MyDarling.Models.Figure", b =>
{
2023-06-03 07:41:46 +03:00
b.Property<string>("Id")
.HasColumnType("TEXT");
2023-01-31 15:55:44 +03:00
2023-02-21 07:52:11 +03:00
b.Property<string>("Description")
.IsRequired()
.HasColumnType("TEXT");
2023-06-03 07:41:46 +03:00
b.Property<string>("ProductId")
2023-01-31 15:55:44 +03:00
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
2023-06-03 07:41:46 +03:00
b.HasIndex("ProductId");
2023-01-31 15:55:44 +03:00
b.ToTable("Figures");
});
2023-06-03 07:41:46 +03:00
modelBuilder.Entity("MyDarling.Models.Product", b =>
2023-01-31 15:55:44 +03:00
{
2023-06-03 07:41:46 +03:00
b.Property<string>("Id")
.HasColumnType("TEXT");
2023-01-31 15:55:44 +03:00
b.Property<string>("Description")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property<decimal>("Price")
.HasColumnType("TEXT");
b.HasKey("Id");
2023-06-03 07:41:46 +03:00
b.ToTable("Products");
2023-01-31 15:55:44 +03:00
});
modelBuilder.Entity("MyDarling.Models.Figure", b =>
{
2023-06-03 07:41:46 +03:00
b.HasOne("MyDarling.Models.Product", null)
2023-01-31 15:55:44 +03:00
.WithMany("Figures")
2023-06-03 07:41:46 +03:00
.HasForeignKey("ProductId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
2023-01-31 15:55:44 +03:00
});
2023-06-03 07:41:46 +03:00
modelBuilder.Entity("MyDarling.Models.Product", b =>
2023-01-31 15:55:44 +03:00
{
b.Navigation("Figures");
});
#pragma warning restore 612, 618
}
}
}