2024-04-27 22:15:31 +04:00
|
|
|
|
// <auto-generated />
|
|
|
|
|
using System;
|
|
|
|
|
using DatabaseImplement;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
2024-04-28 11:41:09 +04:00
|
|
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
2024-04-27 22:15:31 +04:00
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
namespace DatabaseImplement.Migrations
|
|
|
|
|
{
|
|
|
|
|
[DbContext(typeof(FactoryGoWorkDatabase))]
|
|
|
|
|
partial class FactoryGoWorkDatabaseModelSnapshot : ModelSnapshot
|
|
|
|
|
{
|
|
|
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
#pragma warning disable 612, 618
|
|
|
|
|
modelBuilder
|
|
|
|
|
.HasAnnotation("ProductVersion", "6.0.29")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
2024-04-28 11:41:09 +04:00
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Detail", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
2024-04-28 11:41:09 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<double>("Cost")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("float");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
2024-04-30 22:27:52 +04:00
|
|
|
|
b.Property<DateTime>("DateCreate")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
2024-04-27 22:15:31 +04:00
|
|
|
|
b.Property<string>("Name")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("UserId")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Details");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.DetailProduct", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
2024-04-28 11:41:09 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("DetailId")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("ProductId")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("DetailId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("DetailProducts");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.DetailProduction", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
2024-04-28 11:41:09 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("DetailId")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("ProductionId")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("DetailId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("ProductionId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("DetailProductions");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Guarantor", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
2024-04-28 11:41:09 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Email")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Login")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Name")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Password")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Guarantors");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Implementer", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
2024-04-28 11:41:09 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Email")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Login")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Name")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Password")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Implementers");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Machine", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
2024-04-28 11:41:09 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Country")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Title")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("UserId")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Machines");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Product", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
2024-04-28 11:41:09 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<double>("Cost")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("float");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int?>("MachineId")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Name")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("UserId")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("MachineId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Products");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Production", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
2024-04-28 11:41:09 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<double>("Cost")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("float");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Name")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("UserId")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Productions");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Worker", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
2024-04-28 11:41:09 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("Birthday")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("datetime2");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Name")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<double>("Salary")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("float");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Specialization")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("UserId")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Workers");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.WorkerMachine", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
2024-04-28 11:41:09 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("MachineId")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("WorkerId")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("WorkerId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("WorkerMachines");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.WorkerWorkshop", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
2024-04-28 11:41:09 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("WorkerId")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("WorkshopId")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("WorkerId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("WorkshopId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("WorkerWorkshops");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Workshop", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
2024-04-28 11:41:09 +04:00
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Address")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Director")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int?>("ProductionId")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<string>("Title")
|
|
|
|
|
.IsRequired()
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("nvarchar(max)");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.Property<int>("UserId")
|
2024-04-28 11:41:09 +04:00
|
|
|
|
.HasColumnType("int");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("ProductionId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Workshops");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Detail", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Implementer", "User")
|
|
|
|
|
.WithMany("Details")
|
|
|
|
|
.HasForeignKey("UserId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("User");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.DetailProduct", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Detail", "Detail")
|
|
|
|
|
.WithMany("DetailProducts")
|
|
|
|
|
.HasForeignKey("DetailId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Product", "Product")
|
|
|
|
|
.WithMany("Details")
|
|
|
|
|
.HasForeignKey("ProductId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Detail");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Product");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.DetailProduction", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Detail", "Detail")
|
|
|
|
|
.WithMany("DetailProductions")
|
|
|
|
|
.HasForeignKey("DetailId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Production", "Production")
|
|
|
|
|
.WithMany("Details")
|
|
|
|
|
.HasForeignKey("ProductionId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Detail");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Production");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Machine", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Guarantor", "Guarantor")
|
|
|
|
|
.WithMany("Machines")
|
|
|
|
|
.HasForeignKey("UserId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Guarantor");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Product", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Machine", "Machine")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("MachineId");
|
|
|
|
|
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Implementer", "User")
|
|
|
|
|
.WithMany("Products")
|
|
|
|
|
.HasForeignKey("UserId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Machine");
|
|
|
|
|
|
|
|
|
|
b.Navigation("User");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Production", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Implementer", "User")
|
|
|
|
|
.WithMany("Productions")
|
|
|
|
|
.HasForeignKey("UserId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("User");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Worker", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Guarantor", "Guarantor")
|
|
|
|
|
.WithMany("Workers")
|
|
|
|
|
.HasForeignKey("UserId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Guarantor");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.WorkerMachine", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Machine", "Machine")
|
|
|
|
|
.WithMany("Workers")
|
|
|
|
|
.HasForeignKey("WorkerId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Worker", "Worker")
|
|
|
|
|
.WithMany("WorkerMachines")
|
|
|
|
|
.HasForeignKey("WorkerId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Machine");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Worker");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.WorkerWorkshop", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Worker", "Worker")
|
|
|
|
|
.WithMany("WorkerWorkshops")
|
|
|
|
|
.HasForeignKey("WorkerId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Workshop", "Workshop")
|
|
|
|
|
.WithMany("Workers")
|
|
|
|
|
.HasForeignKey("WorkshopId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Worker");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Workshop");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Workshop", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("DatabaseImplement.Models.Production", "Production")
|
2024-04-30 17:03:49 +04:00
|
|
|
|
.WithMany("Workshops")
|
|
|
|
|
.HasForeignKey("ProductionId");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
|
2024-04-30 22:27:52 +04:00
|
|
|
|
b.HasOne("DatabaseImplement.Models.Guarantor", "User")
|
2024-04-27 22:15:31 +04:00
|
|
|
|
.WithMany("Workshops")
|
|
|
|
|
.HasForeignKey("UserId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Production");
|
2024-04-30 22:27:52 +04:00
|
|
|
|
|
|
|
|
|
b.Navigation("User");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Detail", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("DetailProductions");
|
|
|
|
|
|
|
|
|
|
b.Navigation("DetailProducts");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Guarantor", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Machines");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Workers");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Workshops");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Implementer", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Details");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Productions");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Products");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Machine", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Workers");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Product", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Details");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Production", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Details");
|
2024-04-30 17:03:49 +04:00
|
|
|
|
|
|
|
|
|
b.Navigation("Workshops");
|
2024-04-27 22:15:31 +04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Worker", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("WorkerMachines");
|
|
|
|
|
|
|
|
|
|
b.Navigation("WorkerWorkshops");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("DatabaseImplement.Models.Workshop", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Workers");
|
|
|
|
|
});
|
|
|
|
|
#pragma warning restore 612, 618
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|