// using System; using CarRepairShopDatabaseImplement; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace CarRepairShopDatabaseImplement.Migrations { [DbContext(typeof(RepairsShopDatabase))] partial class RepairsShopDatabaseModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.16") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.Client", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ClientFIO") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Email") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Password") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Clients"); }); modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.Component", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ComponentName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Cost") .HasColumnType("float"); b.HasKey("Id"); b.ToTable("Components"); }); modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.Order", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ClientId") .HasColumnType("int"); b.Property("Count") .HasColumnType("int"); b.Property("DateCreate") .HasColumnType("datetime2"); b.Property("DateImplement") .HasColumnType("datetime2"); b.Property("RepairId") .HasColumnType("int"); b.Property("Status") .HasColumnType("int"); b.Property("Sum") .HasColumnType("float"); b.HasKey("Id"); b.HasIndex("ClientId"); b.HasIndex("RepairId"); b.ToTable("Orders"); }); modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.Repair", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Price") .HasColumnType("float"); b.Property("RepairName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Repairs"); }); modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.RepairComponent", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ComponentId") .HasColumnType("int"); b.Property("Count") .HasColumnType("int"); b.Property("RepairId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("ComponentId"); b.HasIndex("RepairId"); b.ToTable("RepairComponents"); }); modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.Shop", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Address") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("DateOpen") .HasColumnType("datetime2"); b.Property("MaxCapacity") .HasColumnType("int"); b.Property("ShopName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Shops"); }); modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.ShopRepair", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Count") .HasColumnType("int"); b.Property("RepairId") .HasColumnType("int"); b.Property("ShopId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("RepairId"); b.HasIndex("ShopId"); b.ToTable("ShopRepairs"); }); modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.Order", b => { b.HasOne("CarRepairShopDatabaseImplement.Models.Client", "Client") .WithMany("Orders") .HasForeignKey("ClientId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("CarRepairShopDatabaseImplement.Models.Repair", "Repair") .WithMany("Orders") .HasForeignKey("RepairId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Client"); b.Navigation("Repair"); }); modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.RepairComponent", b => { b.HasOne("CarRepairShopDatabaseImplement.Models.Component", "Component") .WithMany("RepairComponents") .HasForeignKey("ComponentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("CarRepairShopDatabaseImplement.Models.Repair", "Repair") .WithMany("Components") .HasForeignKey("RepairId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Component"); b.Navigation("Repair"); }); modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.ShopRepair", b => { b.HasOne("CarRepairShopDatabaseImplement.Models.Repair", "Repair") .WithMany("ShopRepairs") .HasForeignKey("RepairId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("CarRepairShopDatabaseImplement.Models.Shop", "Shop") .WithMany("Repairs") .HasForeignKey("ShopId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Repair"); b.Navigation("Shop"); }); modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.Client", b => { b.Navigation("Orders"); }); modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.Component", b => { b.Navigation("RepairComponents"); }); modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.Repair", b => { b.Navigation("Components"); b.Navigation("Orders"); b.Navigation("ShopRepairs"); }); modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.Shop", b => { b.Navigation("Repairs"); }); #pragma warning restore 612, 618 } } }