480 lines
16 KiB
C#
480 lines
16 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using CarCenterDatabaseImplement;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#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", "7.0.5")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Boss", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Login")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Password")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Patronymic")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Surname")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Bosses");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Car", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("EmployeeId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("EmployeeId");
|
|
|
|
b.ToTable("Cars");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Configuration", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("BossId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("BossId");
|
|
|
|
b.ToTable("Configurations");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.ConfigurationCar", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("CarId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("ConfigurationId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CarId");
|
|
|
|
b.HasIndex("ConfigurationId");
|
|
|
|
b.ToTable("ConfigurationCars");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Employee", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Login")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Password")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Patronymic")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Surname")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Employees");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Presale", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("CarId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("EmployeeId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime>("PresaleDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int?>("TypeOfJobId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("EmployeeId");
|
|
|
|
b.HasIndex("TypeOfJobId");
|
|
|
|
b.ToTable("Presales");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.PresaleCar", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("CarId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("PresaleId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CarId");
|
|
|
|
b.HasIndex("PresaleId");
|
|
|
|
b.ToTable("PresaleCars");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Receipt", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("BossId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("ConfigurationId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime>("ReceiptDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<float>("Sum")
|
|
.HasColumnType("real");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("BossId");
|
|
|
|
b.HasIndex("ConfigurationId");
|
|
|
|
b.ToTable("Receipts");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Sale", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("CarId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("EmployeeId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime>("SaleDateTime")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<float>("Sum")
|
|
.HasColumnType("real");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CarId");
|
|
|
|
b.HasIndex("EmployeeId");
|
|
|
|
b.ToTable("Sales");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.TypeOfJob", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("BossId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("BossId");
|
|
|
|
b.ToTable("TypeOfJobs");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.TypeOfJobConfiguration", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("ConfigurationId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("TypeOfJobId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ConfigurationId");
|
|
|
|
b.HasIndex("TypeOfJobId");
|
|
|
|
b.ToTable("TypeOfJobConfigurations");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Car", b =>
|
|
{
|
|
b.HasOne("CarCenterDatabaseImplement.Models.Employee", "Employee")
|
|
.WithMany()
|
|
.HasForeignKey("EmployeeId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Employee");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Configuration", b =>
|
|
{
|
|
b.HasOne("CarCenterDatabaseImplement.Models.Boss", "Boss")
|
|
.WithMany()
|
|
.HasForeignKey("BossId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Boss");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.ConfigurationCar", b =>
|
|
{
|
|
b.HasOne("CarCenterDatabaseImplement.Models.Car", "Car")
|
|
.WithMany("Configurations")
|
|
.HasForeignKey("CarId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("CarCenterDatabaseImplement.Models.Configuration", "Configuration")
|
|
.WithMany()
|
|
.HasForeignKey("ConfigurationId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Car");
|
|
|
|
b.Navigation("Configuration");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Presale", b =>
|
|
{
|
|
b.HasOne("CarCenterDatabaseImplement.Models.Employee", "Employee")
|
|
.WithMany()
|
|
.HasForeignKey("EmployeeId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("CarCenterDatabaseImplement.Models.TypeOfJob", "TypeOfJob")
|
|
.WithMany()
|
|
.HasForeignKey("TypeOfJobId");
|
|
|
|
b.Navigation("Employee");
|
|
|
|
b.Navigation("TypeOfJob");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.PresaleCar", b =>
|
|
{
|
|
b.HasOne("CarCenterDatabaseImplement.Models.Car", "Car")
|
|
.WithMany("Presales")
|
|
.HasForeignKey("CarId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("CarCenterDatabaseImplement.Models.Presale", "Presale")
|
|
.WithMany("PresaleCars")
|
|
.HasForeignKey("PresaleId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Car");
|
|
|
|
b.Navigation("Presale");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Receipt", b =>
|
|
{
|
|
b.HasOne("CarCenterDatabaseImplement.Models.Boss", "Boss")
|
|
.WithMany()
|
|
.HasForeignKey("BossId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("CarCenterDatabaseImplement.Models.Configuration", "Configuration")
|
|
.WithMany()
|
|
.HasForeignKey("ConfigurationId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Boss");
|
|
|
|
b.Navigation("Configuration");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Sale", b =>
|
|
{
|
|
b.HasOne("CarCenterDatabaseImplement.Models.Car", "Car")
|
|
.WithMany()
|
|
.HasForeignKey("CarId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("CarCenterDatabaseImplement.Models.Employee", "Employee")
|
|
.WithMany()
|
|
.HasForeignKey("EmployeeId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Car");
|
|
|
|
b.Navigation("Employee");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.TypeOfJob", b =>
|
|
{
|
|
b.HasOne("CarCenterDatabaseImplement.Models.Boss", "Boss")
|
|
.WithMany()
|
|
.HasForeignKey("BossId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Boss");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.TypeOfJobConfiguration", b =>
|
|
{
|
|
b.HasOne("CarCenterDatabaseImplement.Models.Configuration", "Configuration")
|
|
.WithMany()
|
|
.HasForeignKey("ConfigurationId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("CarCenterDatabaseImplement.Models.TypeOfJob", "TypeOfJob")
|
|
.WithMany("Configurations")
|
|
.HasForeignKey("TypeOfJobId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Configuration");
|
|
|
|
b.Navigation("TypeOfJob");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Car", b =>
|
|
{
|
|
b.Navigation("Configurations");
|
|
|
|
b.Navigation("Presales");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.Presale", b =>
|
|
{
|
|
b.Navigation("PresaleCars");
|
|
});
|
|
|
|
modelBuilder.Entity("CarCenterDatabaseImplement.Models.TypeOfJob", b =>
|
|
{
|
|
b.Navigation("Configurations");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|