// 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("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Login") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Password") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Patronymic") .HasColumnType("nvarchar(max)"); b.Property("Surname") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Bosses"); }); modelBuilder.Entity("CarCenterDatabaseImplement.Models.Car", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("EmployeeId") .HasColumnType("int"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("EmployeeId"); b.ToTable("Cars"); }); modelBuilder.Entity("CarCenterDatabaseImplement.Models.Configuration", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("BossId") .HasColumnType("int"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("BossId"); b.ToTable("Configurations"); }); modelBuilder.Entity("CarCenterDatabaseImplement.Models.ConfigurationCar", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CarId") .HasColumnType("int"); b.Property("ConfigurationId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("CarId"); b.HasIndex("ConfigurationId"); b.ToTable("ConfigurationCars"); }); modelBuilder.Entity("CarCenterDatabaseImplement.Models.Employee", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Login") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Password") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Patronymic") .HasColumnType("nvarchar(max)"); b.Property("Surname") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Employees"); }); modelBuilder.Entity("CarCenterDatabaseImplement.Models.Presale", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CarId") .HasColumnType("int"); b.Property("EmployeeId") .HasColumnType("int"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("PresaleDate") .HasColumnType("datetime2"); b.Property("TypeOfJobId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("EmployeeId"); b.HasIndex("TypeOfJobId"); b.ToTable("Presales"); }); modelBuilder.Entity("CarCenterDatabaseImplement.Models.PresaleCar", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CarId") .HasColumnType("int"); b.Property("PresaleId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("CarId"); b.HasIndex("PresaleId"); b.ToTable("PresaleCars"); }); modelBuilder.Entity("CarCenterDatabaseImplement.Models.Receipt", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("BossId") .HasColumnType("int"); b.Property("ConfigurationId") .HasColumnType("int"); b.Property("ReceiptDate") .HasColumnType("datetime2"); b.Property("Sum") .HasColumnType("real"); b.HasKey("Id"); b.HasIndex("BossId"); b.HasIndex("ConfigurationId"); b.ToTable("Receipts"); }); modelBuilder.Entity("CarCenterDatabaseImplement.Models.Sale", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CarId") .HasColumnType("int"); b.Property("EmployeeId") .HasColumnType("int"); b.Property("SaleDateTime") .HasColumnType("datetime2"); b.Property("Sum") .HasColumnType("real"); b.HasKey("Id"); b.HasIndex("CarId"); b.HasIndex("EmployeeId"); b.ToTable("Sales"); }); modelBuilder.Entity("CarCenterDatabaseImplement.Models.TypeOfJob", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("BossId") .HasColumnType("int"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("BossId"); b.ToTable("TypeOfJobs"); }); modelBuilder.Entity("CarCenterDatabaseImplement.Models.TypeOfJobConfiguration", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ConfigurationId") .HasColumnType("int"); b.Property("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 } } }