158 lines
5.2 KiB
C#
158 lines
5.2 KiB
C#
|
// <auto-generated />
|
|||
|
using System;
|
|||
|
using DinerDataBaseImplement;
|
|||
|
using Microsoft.EntityFrameworkCore;
|
|||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace DinerDataBaseImplement.Migrations
|
|||
|
{
|
|||
|
[DbContext(typeof(DinerDataBase))]
|
|||
|
[Migration("20240321182759_InitMigration")]
|
|||
|
partial class InitMigration
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
{
|
|||
|
#pragma warning disable 612, 618
|
|||
|
modelBuilder
|
|||
|
.HasAnnotation("ProductVersion", "8.0.3")
|
|||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|||
|
|
|||
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|||
|
|
|||
|
modelBuilder.Entity("DinerDataBaseImplement.Models.Food", b =>
|
|||
|
{
|
|||
|
b.Property<int>("ID")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));
|
|||
|
|
|||
|
b.Property<string>("ComponentName")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<double>("Price")
|
|||
|
.HasColumnType("float");
|
|||
|
|
|||
|
b.HasKey("ID");
|
|||
|
|
|||
|
b.ToTable("Components");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("DinerDataBaseImplement.Models.Order", b =>
|
|||
|
{
|
|||
|
b.Property<int>("ID")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));
|
|||
|
|
|||
|
b.Property<int>("Count")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<DateTime>("DateCreate")
|
|||
|
.HasColumnType("datetime2");
|
|||
|
|
|||
|
b.Property<DateTime?>("DateImplement")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("datetime2");
|
|||
|
|
|||
|
b.Property<int>("ProductID")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("Status")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<double>("Sum")
|
|||
|
.HasColumnType("float");
|
|||
|
|
|||
|
b.HasKey("ID");
|
|||
|
|
|||
|
b.ToTable("Orders");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("DinerDataBaseImplement.Models.Snack", b =>
|
|||
|
{
|
|||
|
b.Property<int>("ID")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));
|
|||
|
|
|||
|
b.Property<double>("Price")
|
|||
|
.HasColumnType("float");
|
|||
|
|
|||
|
b.Property<string>("ProductName")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.HasKey("ID");
|
|||
|
|
|||
|
b.ToTable("Products");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("DinerDataBaseImplement.Models.SnackFood", b =>
|
|||
|
{
|
|||
|
b.Property<int>("ID")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));
|
|||
|
|
|||
|
b.Property<int>("ComponentID")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("Count")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("ProductID")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.HasKey("ID");
|
|||
|
|
|||
|
b.HasIndex("ComponentID");
|
|||
|
|
|||
|
b.HasIndex("ProductID");
|
|||
|
|
|||
|
b.ToTable("ProductComponents");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("DinerDataBaseImplement.Models.SnackFood", b =>
|
|||
|
{
|
|||
|
b.HasOne("DinerDataBaseImplement.Models.Food", "Component")
|
|||
|
.WithMany("SnackFood")
|
|||
|
.HasForeignKey("ComponentID")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.HasOne("DinerDataBaseImplement.Models.Snack", "Product")
|
|||
|
.WithMany("Components")
|
|||
|
.HasForeignKey("ProductID")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.Navigation("Component");
|
|||
|
|
|||
|
b.Navigation("Product");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("DinerDataBaseImplement.Models.Food", b =>
|
|||
|
{
|
|||
|
b.Navigation("SnackFood");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("DinerDataBaseImplement.Models.Snack", b =>
|
|||
|
{
|
|||
|
b.Navigation("Components");
|
|||
|
});
|
|||
|
#pragma warning restore 612, 618
|
|||
|
}
|
|||
|
}
|
|||
|
}
|