нос мигры

This commit is contained in:
Леонид Малафеев 2024-05-29 18:12:07 +04:00
parent 2c8d686737
commit 04201a8033

View File

@ -1,509 +0,0 @@
// <auto-generated />
using System;
using CarCenterDatabaseImplement;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace CarCenterDatabaseImplement.Migrations
{
[DbContext(typeof(CarCenterDatabase))]
partial class CarCenterDatabaseModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.29")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Bundling", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime>("DateCreate")
.HasColumnType("timestamp without time zone");
b.Property<int>("EquipmentPackage")
.HasColumnType("integer");
b.Property<double>("Price")
.HasColumnType("double precision");
b.Property<int>("StorekeeperId")
.HasColumnType("integer");
b.Property<int>("TirePackage")
.HasColumnType("integer");
b.Property<int>("ToolKit")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("Bundlings");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Car", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("CarBrand")
.HasColumnType("integer");
b.Property<int>("CarClass")
.HasColumnType("integer");
b.Property<DateTime>("DateCreate")
.HasColumnType("timestamp without time zone");
b.Property<int>("FeatureID")
.HasColumnType("integer");
b.Property<int?>("FeatureId")
.HasColumnType("integer");
b.Property<string>("Model")
.IsRequired()
.HasColumnType("text");
b.Property<int?>("OrderId")
.HasColumnType("integer");
b.Property<double>("Price")
.HasColumnType("double precision");
b.Property<int>("StorekeeperId")
.HasColumnType("integer");
b.Property<long>("VINnumber")
.HasColumnType("bigint");
b.Property<int>("Year")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("FeatureId");
b.HasIndex("OrderId");
b.HasIndex("StorekeeperId");
b.ToTable("Cars");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.CarBundling", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("BundlingId")
.HasColumnType("integer");
b.Property<int>("CarId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("BundlingId");
b.HasIndex("CarId");
b.ToTable("CarBundlings");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Feature", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("CabinColor")
.IsRequired()
.HasColumnType("text");
b.Property<int>("DriveType")
.HasColumnType("integer");
b.Property<int>("HelpDevice")
.HasColumnType("integer");
b.Property<double>("Price")
.HasColumnType("double precision");
b.Property<int>("StorekeeperId")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("Features");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Order", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("BuyerFCS")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("PaymentDate")
.HasColumnType("timestamp without time zone");
b.Property<int>("PaymentStatus")
.HasColumnType("integer");
b.Property<int>("PaymentType")
.HasColumnType("integer");
b.Property<double>("Sum")
.HasColumnType("double precision");
b.Property<int>("WorkerId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("WorkerId");
b.ToTable("Orders");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.OrderPresale", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("OrderId")
.HasColumnType("integer");
b.Property<int>("PresaleId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("OrderId");
b.HasIndex("PresaleId");
b.ToTable("OrderPresales");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Presale", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Description")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("DueTill")
.HasColumnType("timestamp without time zone");
b.Property<int>("PresaleStatus")
.HasColumnType("integer");
b.Property<double>("Price")
.HasColumnType("double precision");
b.HasKey("Id");
b.ToTable("Presales");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.PresaleBundling", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("BundlingId")
.HasColumnType("integer");
b.Property<int>("PresaleId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("BundlingId");
b.HasIndex("PresaleId");
b.ToTable("PresaleBundlings");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Request", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Description")
.IsRequired()
.HasColumnType("text");
b.Property<int>("PresaleId")
.HasColumnType("integer");
b.Property<int>("RequestType")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("PresaleId");
b.ToTable("Requests");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Storekeeper", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Email")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Patronymic")
.HasColumnType("text");
b.Property<long>("PhoneNumber")
.HasColumnType("bigint");
b.Property<string>("Surname")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Storekeepers");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Worker", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Email")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Patronymic")
.HasColumnType("text");
b.Property<long>("PhoneNumber")
.HasColumnType("bigint");
b.Property<string>("Surname")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Workers");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Car", b =>
{
b.HasOne("CarCenterDatabaseImplement.Models.Feature", "Feature")
.WithMany("Cars")
.HasForeignKey("FeatureId");
b.HasOne("CarCenterDatabaseImplement.Models.Order", "Order")
.WithMany("Cars")
.HasForeignKey("OrderId");
b.HasOne("CarCenterDatabaseImplement.Models.Storekeeper", "Storekeeper")
.WithMany("Cars")
.HasForeignKey("StorekeeperId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Feature");
b.Navigation("Order");
b.Navigation("Storekeeper");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.CarBundling", b =>
{
b.HasOne("CarCenterDatabaseImplement.Models.Bundling", "Bundling")
.WithMany("CarBundling")
.HasForeignKey("BundlingId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("CarCenterDatabaseImplement.Models.Car", "Car")
.WithMany("Bundlings")
.HasForeignKey("CarId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Bundling");
b.Navigation("Car");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Order", b =>
{
b.HasOne("CarCenterDatabaseImplement.Models.Worker", "Worker")
.WithMany("Orders")
.HasForeignKey("WorkerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Worker");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.OrderPresale", b =>
{
b.HasOne("CarCenterDatabaseImplement.Models.Order", "Order")
.WithMany("Presales")
.HasForeignKey("OrderId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("CarCenterDatabaseImplement.Models.Presale", "Presale")
.WithMany("OrderPresales")
.HasForeignKey("PresaleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Order");
b.Navigation("Presale");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.PresaleBundling", b =>
{
b.HasOne("CarCenterDatabaseImplement.Models.Bundling", "Bundling")
.WithMany("PresaleBundling")
.HasForeignKey("BundlingId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("CarCenterDatabaseImplement.Models.Presale", "Presale")
.WithMany("Bundlings")
.HasForeignKey("PresaleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Bundling");
b.Navigation("Presale");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Request", b =>
{
b.HasOne("CarCenterDatabaseImplement.Models.Presale", "Presale")
.WithMany("Requests")
.HasForeignKey("PresaleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Presale");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Bundling", b =>
{
b.Navigation("CarBundling");
b.Navigation("PresaleBundling");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Car", b =>
{
b.Navigation("Bundlings");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Feature", b =>
{
b.Navigation("Cars");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Order", b =>
{
b.Navigation("Cars");
b.Navigation("Presales");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Presale", b =>
{
b.Navigation("Bundlings");
b.Navigation("OrderPresales");
b.Navigation("Requests");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Storekeeper", b =>
{
b.Navigation("Cars");
});
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Worker", b =>
{
b.Navigation("Orders");
});
#pragma warning restore 612, 618
}
}
}