251 lines
8.7 KiB
C#
251 lines
8.7 KiB
C#
|
// <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 PrecastConcretePlantDataBaseImplement;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace PrecastConcretePlantDataBaseImplement.Migrations
|
|||
|
{
|
|||
|
[DbContext(typeof(PrecastConcretePlantDataBase))]
|
|||
|
[Migration("20240516193152_initial")]
|
|||
|
partial class initial
|
|||
|
{
|
|||
|
/// <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("PrecastConcretePlantDataBaseImplement.Models.Component", 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>("Cost")
|
|||
|
.HasColumnType("float");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Components");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("PrecastConcretePlantDataBaseImplement.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")
|
|||
|
.HasColumnType("datetime2");
|
|||
|
|
|||
|
b.Property<int>("ReinforcedId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("Status")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<double>("Sum")
|
|||
|
.HasColumnType("float");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.HasIndex("ReinforcedId");
|
|||
|
|
|||
|
b.ToTable("Orders");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("PrecastConcretePlantDataBaseImplement.Models.Reinforced", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<double>("Price")
|
|||
|
.HasColumnType("float");
|
|||
|
|
|||
|
b.Property<string>("ReinforcedName")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Reinforceds");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("PrecastConcretePlantDataBaseImplement.Models.ReinforcedComponent", 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>("ReinforcedId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.HasIndex("ComponentId");
|
|||
|
|
|||
|
b.HasIndex("ReinforcedId");
|
|||
|
|
|||
|
b.ToTable("ReinforcedComponents");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("PrecastConcretePlantDataBaseImplement.Models.Shop", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<string>("Address")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<DateTime>("DateOpening")
|
|||
|
.HasColumnType("datetime2");
|
|||
|
|
|||
|
b.Property<int>("ReinforcedsMax")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<string>("ShopName")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Shops");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("PrecastConcretePlantDataBaseImplement.Models.ShopReinforced", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<int>("Count")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("ReinforcedId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("ShopId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.HasIndex("ReinforcedId");
|
|||
|
|
|||
|
b.HasIndex("ShopId");
|
|||
|
|
|||
|
b.ToTable("ShopReinforceds");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("PrecastConcretePlantDataBaseImplement.Models.Order", b =>
|
|||
|
{
|
|||
|
b.HasOne("PrecastConcretePlantDataBaseImplement.Models.Reinforced", "Reinforced")
|
|||
|
.WithMany("Orders")
|
|||
|
.HasForeignKey("ReinforcedId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.Navigation("Reinforced");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("PrecastConcretePlantDataBaseImplement.Models.ReinforcedComponent", b =>
|
|||
|
{
|
|||
|
b.HasOne("PrecastConcretePlantDataBaseImplement.Models.Component", "Component")
|
|||
|
.WithMany("ReinforcedComponents")
|
|||
|
.HasForeignKey("ComponentId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.HasOne("PrecastConcretePlantDataBaseImplement.Models.Reinforced", "Reinforced")
|
|||
|
.WithMany("Components")
|
|||
|
.HasForeignKey("ReinforcedId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.Navigation("Component");
|
|||
|
|
|||
|
b.Navigation("Reinforced");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("PrecastConcretePlantDataBaseImplement.Models.ShopReinforced", b =>
|
|||
|
{
|
|||
|
b.HasOne("PrecastConcretePlantDataBaseImplement.Models.Reinforced", "Reinforced")
|
|||
|
.WithMany("ShopReinforceds")
|
|||
|
.HasForeignKey("ReinforcedId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.HasOne("PrecastConcretePlantDataBaseImplement.Models.Shop", "Shop")
|
|||
|
.WithMany("Reinforceds")
|
|||
|
.HasForeignKey("ShopId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.Navigation("Reinforced");
|
|||
|
|
|||
|
b.Navigation("Shop");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("PrecastConcretePlantDataBaseImplement.Models.Component", b =>
|
|||
|
{
|
|||
|
b.Navigation("ReinforcedComponents");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("PrecastConcretePlantDataBaseImplement.Models.Reinforced", b =>
|
|||
|
{
|
|||
|
b.Navigation("Components");
|
|||
|
|
|||
|
b.Navigation("Orders");
|
|||
|
|
|||
|
b.Navigation("ShopReinforceds");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("PrecastConcretePlantDataBaseImplement.Models.Shop", b =>
|
|||
|
{
|
|||
|
b.Navigation("Reinforceds");
|
|||
|
});
|
|||
|
#pragma warning restore 612, 618
|
|||
|
}
|
|||
|
}
|
|||
|
}
|