From 6fc7d468b5c5ccba1cdcbda78e4e648c63ffbf1d Mon Sep 17 00:00:00 2001 From: gg12 darfren Date: Wed, 8 May 2024 10:37:18 +0400 Subject: [PATCH] , --- .../20240414075932_InitialCreate.Designer.cs | 340 ------------------ .../20240414075932_InitialCreate.cs | 245 ------------- .../IceCreamShopDataBaseModelSnapshot.cs | 333 ----------------- 3 files changed, 918 deletions(-) delete mode 100644 IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240414075932_InitialCreate.Designer.cs delete mode 100644 IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240414075932_InitialCreate.cs delete mode 100644 IceCreamShop/IceCreamShopDatabaseImplement/Migrations/IceCreamShopDataBaseModelSnapshot.cs diff --git a/IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240414075932_InitialCreate.Designer.cs b/IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240414075932_InitialCreate.Designer.cs deleted file mode 100644 index 86bfa63..0000000 --- a/IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240414075932_InitialCreate.Designer.cs +++ /dev/null @@ -1,340 +0,0 @@ -// -using System; -using IceCreamShopDatabaseImplement; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace IceCreamShopDatabaseImplement.Migrations -{ - [DbContext(typeof(IceCreamShopDataBase))] -<<<<<<<< HEAD:IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240415130513_InitialCreate.Designer.cs - [Migration("20240415130513_InitialCreate")] -======== - [Migration("20240414075932_InitialCreate")] ->>>>>>>> Lab5_Hard:IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240414075932_InitialCreate.Designer.cs - partial class InitialCreate - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.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("IceCreamShopDatabaseImplement.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("IceCreamShopDatabaseImplement.Models.IceCream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("IceCreamName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Price") - .HasColumnType("float"); - - b.HasKey("Id"); - - b.ToTable("IceCreams"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.IceCreamComponent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ComponentId") - .HasColumnType("int"); - - b.Property("Count") - .HasColumnType("int"); - - b.Property("IceCreamId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("ComponentId"); - - b.HasIndex("IceCreamId"); - - b.ToTable("IceCreamComponents"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.Implementer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ImplementerFIO") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Password") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Qualification") - .HasColumnType("int"); - - b.Property("WorkExperience") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("Implementers"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.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("IceCreamId") - .HasColumnType("int"); - - b.Property("ImplementerId") - .HasColumnType("int"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("Sum") - .HasColumnType("float"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.HasIndex("IceCreamId"); - - b.HasIndex("ImplementerId"); - - b.ToTable("Orders"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.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("IceCreamShopDatabaseImplement.Models.ShopIceCream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("int"); - - b.Property("IceCreamId") - .HasColumnType("int"); - - b.Property("ShopId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("IceCreamId"); - - b.HasIndex("ShopId"); - - b.ToTable("ShopIceCreams"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.IceCreamComponent", b => - { - b.HasOne("IceCreamShopDatabaseImplement.Models.Component", "Component") - .WithMany("IceCreamComponents") - .HasForeignKey("ComponentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("IceCreamShopDatabaseImplement.Models.IceCream", "IceCream") - .WithMany("Components") - .HasForeignKey("IceCreamId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Component"); - - b.Navigation("IceCream"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.Order", b => - { - b.HasOne("IceCreamShopDatabaseImplement.Models.Client", "Client") - .WithMany("Orders") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("IceCreamShopDatabaseImplement.Models.IceCream", "IceCream") - .WithMany("Orders") - .HasForeignKey("IceCreamId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("IceCreamShopDatabaseImplement.Models.Implementer", "Implementer") - .WithMany("Orders") - .HasForeignKey("ImplementerId"); - - b.Navigation("Client"); - - b.Navigation("IceCream"); - - b.Navigation("Implementer"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.ShopIceCream", b => - { - b.HasOne("IceCreamShopDatabaseImplement.Models.IceCream", "IceCream") - .WithMany("ShopIceCreams") - .HasForeignKey("IceCreamId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("IceCreamShopDatabaseImplement.Models.Shop", "Shop") - .WithMany("IceCreams") - .HasForeignKey("ShopId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("IceCream"); - - b.Navigation("Shop"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.Client", b => - { - b.Navigation("Orders"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.Component", b => - { - b.Navigation("IceCreamComponents"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.IceCream", b => - { - b.Navigation("Components"); - - b.Navigation("Orders"); - - b.Navigation("ShopIceCreams"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.Shop", b => - { - b.Navigation("IceCreams"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.Implementer", b => - { - b.Navigation("Orders"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240414075932_InitialCreate.cs b/IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240414075932_InitialCreate.cs deleted file mode 100644 index b6f21fd..0000000 --- a/IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240414075932_InitialCreate.cs +++ /dev/null @@ -1,245 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace IceCreamShopDatabaseImplement.Migrations -{ - /// - public partial class InitialCreate : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Clients", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - ClientFIO = table.Column(type: "nvarchar(max)", nullable: false), - Email = table.Column(type: "nvarchar(max)", nullable: false), - Password = table.Column(type: "nvarchar(max)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Clients", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Components", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - ComponentName = table.Column(type: "nvarchar(max)", nullable: false), - Cost = table.Column(type: "float", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Components", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "IceCreams", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - IceCreamName = table.Column(type: "nvarchar(max)", nullable: false), - Price = table.Column(type: "float", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IceCreams", x => x.Id); - }); - - migrationBuilder.CreateTable( -<<<<<<<< HEAD:IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240415130513_InitialCreate.cs - name: "Implementers", -======== - name: "Shops", ->>>>>>>> Lab5_Hard:IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240414075932_InitialCreate.cs - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), -<<<<<<<< HEAD:IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240415130513_InitialCreate.cs - ImplementerFIO = table.Column(type: "nvarchar(max)", nullable: false), - Password = table.Column(type: "nvarchar(max)", nullable: false), - Qualification = table.Column(type: "int", nullable: false), - WorkExperience = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Implementers", x => x.Id); -======== - ShopName = table.Column(type: "nvarchar(max)", nullable: false), - Address = table.Column(type: "nvarchar(max)", nullable: false), - DateOpen = table.Column(type: "datetime2", nullable: false), - MaxCapacity = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Shops", x => x.Id); ->>>>>>>> Lab5_Hard:IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240414075932_InitialCreate.cs - }); - - migrationBuilder.CreateTable( - name: "IceCreamComponents", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - IceCreamId = table.Column(type: "int", nullable: false), - ComponentId = table.Column(type: "int", nullable: false), - Count = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_IceCreamComponents", x => x.Id); - table.ForeignKey( - name: "FK_IceCreamComponents_Components_ComponentId", - column: x => x.ComponentId, - principalTable: "Components", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_IceCreamComponents_IceCreams_IceCreamId", - column: x => x.IceCreamId, - principalTable: "IceCreams", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "Orders", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - Count = table.Column(type: "int", nullable: false), - Sum = table.Column(type: "float", nullable: false), - Status = table.Column(type: "int", nullable: false), - DateCreate = table.Column(type: "datetime2", nullable: false), - DateImplement = table.Column(type: "datetime2", nullable: true), - IceCreamId = table.Column(type: "int", nullable: false), - ClientId = table.Column(type: "int", nullable: false), - ImplementerId = table.Column(type: "int", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Orders", x => x.Id); - table.ForeignKey( - name: "FK_Orders_Clients_ClientId", - column: x => x.ClientId, - principalTable: "Clients", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_Orders_IceCreams_IceCreamId", - column: x => x.IceCreamId, - principalTable: "IceCreams", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_Orders_Implementers_ImplementerId", - column: x => x.ImplementerId, - principalTable: "Implementers", - principalColumn: "Id"); - }); - - migrationBuilder.CreateTable( - name: "ShopIceCreams", - columns: table => new - { - Id = table.Column(type: "int", nullable: false) - .Annotation("SqlServer:Identity", "1, 1"), - IceCreamId = table.Column(type: "int", nullable: false), - ShopId = table.Column(type: "int", nullable: false), - Count = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_ShopIceCreams", x => x.Id); - table.ForeignKey( - name: "FK_ShopIceCreams_IceCreams_IceCreamId", - column: x => x.IceCreamId, - principalTable: "IceCreams", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_ShopIceCreams_Shops_ShopId", - column: x => x.ShopId, - principalTable: "Shops", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_IceCreamComponents_ComponentId", - table: "IceCreamComponents", - column: "ComponentId"); - - migrationBuilder.CreateIndex( - name: "IX_IceCreamComponents_IceCreamId", - table: "IceCreamComponents", - column: "IceCreamId"); - - migrationBuilder.CreateIndex( - name: "IX_Orders_ClientId", - table: "Orders", - column: "ClientId"); - - migrationBuilder.CreateIndex( - name: "IX_Orders_IceCreamId", - table: "Orders", - column: "IceCreamId"); - - migrationBuilder.CreateIndex( -<<<<<<<< HEAD:IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240415130513_InitialCreate.cs - name: "IX_Orders_ImplementerId", - table: "Orders", - column: "ImplementerId"); -======== - name: "IX_ShopIceCreams_IceCreamId", - table: "ShopIceCreams", - column: "IceCreamId"); - - migrationBuilder.CreateIndex( - name: "IX_ShopIceCreams_ShopId", - table: "ShopIceCreams", - column: "ShopId"); ->>>>>>>> Lab5_Hard:IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240414075932_InitialCreate.cs - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "IceCreamComponents"); - - migrationBuilder.DropTable( - name: "Orders"); - - migrationBuilder.DropTable( - name: "ShopIceCreams"); - - migrationBuilder.DropTable( - name: "Components"); - - migrationBuilder.DropTable( - name: "Clients"); - - migrationBuilder.DropTable( - name: "IceCreams"); - - migrationBuilder.DropTable( -<<<<<<<< HEAD:IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240415130513_InitialCreate.cs - name: "Implementers"); -======== - name: "Shops"); ->>>>>>>> Lab5_Hard:IceCreamShop/IceCreamShopDatabaseImplement/Migrations/20240414075932_InitialCreate.cs - } - } -} diff --git a/IceCreamShop/IceCreamShopDatabaseImplement/Migrations/IceCreamShopDataBaseModelSnapshot.cs b/IceCreamShop/IceCreamShopDatabaseImplement/Migrations/IceCreamShopDataBaseModelSnapshot.cs deleted file mode 100644 index 4f03a02..0000000 --- a/IceCreamShop/IceCreamShopDatabaseImplement/Migrations/IceCreamShopDataBaseModelSnapshot.cs +++ /dev/null @@ -1,333 +0,0 @@ -// -using System; -using IceCreamShopDatabaseImplement; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace IceCreamShopDatabaseImplement.Migrations -{ - [DbContext(typeof(IceCreamShopDataBase))] - partial class IceCreamShopDataBaseModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.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("IceCreamShopDatabaseImplement.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("IceCreamShopDatabaseImplement.Models.IceCream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("IceCreamName") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Price") - .HasColumnType("float"); - - b.HasKey("Id"); - - b.ToTable("IceCreams"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.IceCreamComponent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ComponentId") - .HasColumnType("int"); - - b.Property("Count") - .HasColumnType("int"); - - b.Property("IceCreamId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("ComponentId"); - - b.HasIndex("IceCreamId"); - - b.ToTable("IceCreamComponents"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.Implementer", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ImplementerFIO") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Password") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Qualification") - .HasColumnType("int"); - - b.Property("WorkExperience") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("Implementers"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.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("IceCreamId") - .HasColumnType("int"); - - b.Property("ImplementerId") - .HasColumnType("int"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("Sum") - .HasColumnType("float"); - - b.HasKey("Id"); - - b.HasIndex("ClientId"); - - b.HasIndex("IceCreamId"); - - b.HasIndex("ImplementerId"); - - b.ToTable("Orders"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.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("IceCreamShopDatabaseImplement.Models.ShopIceCream", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("Count") - .HasColumnType("int"); - - b.Property("IceCreamId") - .HasColumnType("int"); - - b.Property("ShopId") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("IceCreamId"); - - b.HasIndex("ShopId"); - - b.ToTable("ShopIceCreams"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.IceCreamComponent", b => - { - b.HasOne("IceCreamShopDatabaseImplement.Models.Component", "Component") - .WithMany("IceCreamComponents") - .HasForeignKey("ComponentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("IceCreamShopDatabaseImplement.Models.IceCream", "IceCream") - .WithMany("Components") - .HasForeignKey("IceCreamId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Component"); - - b.Navigation("IceCream"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.Order", b => - { - b.HasOne("IceCreamShopDatabaseImplement.Models.Client", "Client") - .WithMany("Orders") - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("IceCreamShopDatabaseImplement.Models.IceCream", "IceCream") - .WithMany("Orders") - .HasForeignKey("IceCreamId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("IceCreamShopDatabaseImplement.Models.Implementer", "Implementer") - .WithMany("Orders") - .HasForeignKey("ImplementerId"); - - b.Navigation("Client"); - - b.Navigation("IceCream"); - - b.Navigation("Implementer"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.ShopIceCream", b => - { - b.HasOne("IceCreamShopDatabaseImplement.Models.IceCream", "IceCream") - .WithMany("ShopIceCreams") - .HasForeignKey("IceCreamId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("IceCreamShopDatabaseImplement.Models.Shop", "Shop") - .WithMany("IceCreams") - .HasForeignKey("ShopId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("IceCream"); - - b.Navigation("Shop"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.Client", b => - { - b.Navigation("Orders"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.Component", b => - { - b.Navigation("IceCreamComponents"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.IceCream", b => - { - b.Navigation("Components"); - - b.Navigation("Orders"); - - b.Navigation("ShopIceCreams"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.Shop", b => - { - b.Navigation("IceCreams"); - }); - - modelBuilder.Entity("IceCreamShopDatabaseImplement.Models.Implementer", b => - { - b.Navigation("Orders"); - }); -#pragma warning restore 612, 618 - } - } -}