+
+
+
+
@section Scripts {
-
-}
+
+}
\ No newline at end of file
diff --git a/TRPZ_PrintService/Data/Order.cs b/TRPZ_PrintService/Data/Order.cs
index bc73cc3..7abde05 100644
--- a/TRPZ_PrintService/Data/Order.cs
+++ b/TRPZ_PrintService/Data/Order.cs
@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
using TRPZ_PrintService.Areas.Identity.Data;
namespace TRPZ_PrintService.Data
@@ -9,15 +11,30 @@ public class Order
public int OrderId { get; set; }
public DateTime Timestamp { get; set; }
public TimeSpan TotalPrintTime { get; set; }
- public bool IsSent { get; set; }
- public bool IsConfirmed { get; set; }
- public bool IsFinished { get; set; }
+ public OrderStatus Status { get; set; }
public TRPZ_PrintServiceUser Client { get; set; }
public PromoCode PromoCode { get; set; }
public List
Models { get; set; }
+
+ [NotMapped]
+ public int PriceTotal
+ {
+ get { return Models.Sum(x => x.PriceTotal) + Models.Sum(x => x.PostProcessing.Price); }
+ }
+
+
+ public enum OrderStatus
+ {
+ NotSent,
+ Sent,
+ Confirmed,
+ Finished,
+ Cancelled,
+
+ }
public Order()
{
Models = new List();
diff --git a/TRPZ_PrintService/Data/TRPZ_PrintServiceContext.cs b/TRPZ_PrintService/Data/TRPZ_PrintServiceContext.cs
index 61dcb97..3051613 100644
--- a/TRPZ_PrintService/Data/TRPZ_PrintServiceContext.cs
+++ b/TRPZ_PrintService/Data/TRPZ_PrintServiceContext.cs
@@ -40,6 +40,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasOne(o => o.ModelSettings)
.WithOne(settings => settings.ModelInOrder)
.OnDelete(DeleteBehavior.Cascade);
+ modelBuilder.Entity()
+ .HasOne(o => o.Client)
+ .WithMany(settings => settings.Orders)
+ .OnDelete(DeleteBehavior.Cascade);
}
}
}
\ No newline at end of file
diff --git a/TRPZ_PrintService/Data/TRPZ_PrintServiceUser.cs b/TRPZ_PrintService/Data/TRPZ_PrintServiceUser.cs
index 00eeca6..a2c0f91 100644
--- a/TRPZ_PrintService/Data/TRPZ_PrintServiceUser.cs
+++ b/TRPZ_PrintService/Data/TRPZ_PrintServiceUser.cs
@@ -3,6 +3,7 @@
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
+using TRPZ_PrintService.Data;
namespace TRPZ_PrintService.Areas.Identity.Data
{
@@ -11,5 +12,6 @@ public class TRPZ_PrintServiceUser : IdentityUser
{
[PersonalData] public string FirstName { get; set; }
[PersonalData] public string LastName { get; set; }
+ public IList Orders {get; set; }
}
}
\ No newline at end of file
diff --git a/TRPZ_PrintService/Migrations/20201222193109_status_enum.Designer.cs b/TRPZ_PrintService/Migrations/20201222193109_status_enum.Designer.cs
new file mode 100644
index 0000000..d5d8a25
--- /dev/null
+++ b/TRPZ_PrintService/Migrations/20201222193109_status_enum.Designer.cs
@@ -0,0 +1,590 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using TRPZ_PrintService.Data;
+
+namespace TRPZ_PrintService.Migrations
+{
+ [DbContext(typeof(TRPZ_PrintServiceContext))]
+ [Migration("20201222193109_status_enum")]
+ partial class status_enum
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .UseIdentityByDefaultColumns()
+ .HasAnnotation("Relational:MaxIdentifierLength", 63)
+ .HasAnnotation("ProductVersion", "5.0.1");
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("NormalizedName")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedName")
+ .IsUnique()
+ .HasDatabaseName("RoleNameIndex");
+
+ b.ToTable("AspNetRoles");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("ClaimType")
+ .HasColumnType("text");
+
+ b.Property("ClaimValue")
+ .HasColumnType("text");
+
+ b.Property("RoleId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AspNetRoleClaims");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("ClaimType")
+ .HasColumnType("text");
+
+ b.Property("ClaimValue")
+ .HasColumnType("text");
+
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AspNetUserClaims");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
+ {
+ b.Property("LoginProvider")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)");
+
+ b.Property("ProviderKey")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)");
+
+ b.Property("ProviderDisplayName")
+ .HasColumnType("text");
+
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("LoginProvider", "ProviderKey");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AspNetUserLogins");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("text");
+
+ b.Property("RoleId")
+ .HasColumnType("text");
+
+ b.HasKey("UserId", "RoleId");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AspNetUserRoles");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("text");
+
+ b.Property("LoginProvider")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)");
+
+ b.Property("Name")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)");
+
+ b.Property("Value")
+ .HasColumnType("text");
+
+ b.HasKey("UserId", "LoginProvider", "Name");
+
+ b.ToTable("AspNetUserTokens");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Areas.Identity.Data.TRPZ_PrintServiceUser", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text");
+
+ b.Property("AccessFailedCount")
+ .HasColumnType("integer");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("text");
+
+ b.Property("Email")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("EmailConfirmed")
+ .HasColumnType("boolean");
+
+ b.Property("FirstName")
+ .HasColumnType("text");
+
+ b.Property("LastName")
+ .HasColumnType("text");
+
+ b.Property("LockoutEnabled")
+ .HasColumnType("boolean");
+
+ b.Property("LockoutEnd")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("NormalizedEmail")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("NormalizedUserName")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("PasswordHash")
+ .HasColumnType("text");
+
+ b.Property("PhoneNumber")
+ .HasColumnType("text");
+
+ b.Property("PhoneNumberConfirmed")
+ .HasColumnType("boolean");
+
+ b.Property("SecurityStamp")
+ .HasColumnType("text");
+
+ b.Property("TwoFactorEnabled")
+ .HasColumnType("boolean");
+
+ b.Property("UserName")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedEmail")
+ .HasDatabaseName("EmailIndex");
+
+ b.HasIndex("NormalizedUserName")
+ .IsUnique()
+ .HasDatabaseName("UserNameIndex");
+
+ b.ToTable("AspNetUsers");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.Material", b =>
+ {
+ b.Property("MaterialId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Price")
+ .HasColumnType("integer");
+
+ b.HasKey("MaterialId");
+
+ b.ToTable("Materials");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.Model3D", b =>
+ {
+ b.Property("Model3DId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("FilePath")
+ .HasColumnType("text");
+
+ b.HasKey("Model3DId");
+
+ b.ToTable("Models3D");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.ModelInOrder", b =>
+ {
+ b.Property("ModelInOrderId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("HasSolubleSupports")
+ .HasColumnType("boolean");
+
+ b.Property("ManagerId")
+ .HasColumnType("text");
+
+ b.Property("MaterialId")
+ .HasColumnType("integer");
+
+ b.Property("Model3DId")
+ .HasColumnType("integer");
+
+ b.Property("OrderId")
+ .HasColumnType("integer");
+
+ b.Property("PostProcessingId")
+ .HasColumnType("integer");
+
+ b.Property("PriceTotal")
+ .HasColumnType("integer");
+
+ b.Property("PrinterId")
+ .HasColumnType("integer");
+
+ b.Property("Scale")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("double precision")
+ .HasDefaultValue(1.0);
+
+ b.HasKey("ModelInOrderId");
+
+ b.HasIndex("ManagerId");
+
+ b.HasIndex("MaterialId");
+
+ b.HasIndex("Model3DId");
+
+ b.HasIndex("OrderId");
+
+ b.HasIndex("PostProcessingId");
+
+ b.HasIndex("PrinterId");
+
+ b.ToTable("ModelsInOrders");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.ModelSettings", b =>
+ {
+ b.Property("ModelSettingsId")
+ .HasColumnType("integer");
+
+ b.Property("InfillPercentage")
+ .HasColumnType("integer");
+
+ b.Property("LayerHeight")
+ .HasColumnType("integer");
+
+ b.Property("NozzleDiameter")
+ .HasColumnType("integer");
+
+ b.HasKey("ModelSettingsId");
+
+ b.ToTable("ModelsSettings");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.Order", b =>
+ {
+ b.Property("OrderId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("ClientId")
+ .HasColumnType("text");
+
+ b.Property("PromoCodeId")
+ .HasColumnType("integer");
+
+ b.Property("Status")
+ .HasColumnType("integer");
+
+ b.Property("Timestamp")
+ .HasColumnType("timestamp without time zone");
+
+ b.Property("TotalPrintTime")
+ .HasColumnType("interval");
+
+ b.HasKey("OrderId");
+
+ b.HasIndex("ClientId");
+
+ b.HasIndex("PromoCodeId");
+
+ b.ToTable("Orders");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.PostProcessing", b =>
+ {
+ b.Property("PostProcessingId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .HasColumnType("text");
+
+ b.Property("Price")
+ .HasColumnType("integer");
+
+ b.HasKey("PostProcessingId");
+
+ b.ToTable("PostProcessings");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.Printer", b =>
+ {
+ b.Property("PrinterId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("BuildPlateLength")
+ .HasColumnType("integer");
+
+ b.Property("BuildPlateWidth")
+ .HasColumnType("integer");
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("ExtruderCount")
+ .HasColumnType("integer");
+
+ b.Property("MaxTemp")
+ .HasColumnType("integer");
+
+ b.Property("Name")
+ .HasColumnType("text");
+
+ b.HasKey("PrinterId");
+
+ b.ToTable("Printers");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.PromoCode", b =>
+ {
+ b.Property("PromoCodeId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("ActiveTo")
+ .HasColumnType("timestamp without time zone");
+
+ b.Property("Count")
+ .HasColumnType("integer");
+
+ b.Property("Discount")
+ .HasColumnType("integer");
+
+ b.Property("Issue")
+ .HasColumnType("timestamp without time zone");
+
+ b.HasKey("PromoCodeId");
+
+ b.ToTable("PromoCodes");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
+ {
+ b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
+ .WithMany()
+ .HasForeignKey("RoleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
+ {
+ b.HasOne("TRPZ_PrintService.Areas.Identity.Data.TRPZ_PrintServiceUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
+ {
+ b.HasOne("TRPZ_PrintService.Areas.Identity.Data.TRPZ_PrintServiceUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
+ {
+ b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
+ .WithMany()
+ .HasForeignKey("RoleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("TRPZ_PrintService.Areas.Identity.Data.TRPZ_PrintServiceUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
+ {
+ b.HasOne("TRPZ_PrintService.Areas.Identity.Data.TRPZ_PrintServiceUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.ModelInOrder", b =>
+ {
+ b.HasOne("TRPZ_PrintService.Areas.Identity.Data.TRPZ_PrintServiceUser", "Manager")
+ .WithMany()
+ .HasForeignKey("ManagerId");
+
+ b.HasOne("TRPZ_PrintService.Data.Material", "Material")
+ .WithMany("ModelsInOrders")
+ .HasForeignKey("MaterialId");
+
+ b.HasOne("TRPZ_PrintService.Data.Model3D", "Model")
+ .WithMany()
+ .HasForeignKey("Model3DId");
+
+ b.HasOne("TRPZ_PrintService.Data.Order", "Order")
+ .WithMany("Models")
+ .HasForeignKey("OrderId")
+ .OnDelete(DeleteBehavior.Cascade);
+
+ b.HasOne("TRPZ_PrintService.Data.PostProcessing", "PostProcessing")
+ .WithMany("ModelsInOrders")
+ .HasForeignKey("PostProcessingId");
+
+ b.HasOne("TRPZ_PrintService.Data.Printer", "Printer")
+ .WithMany()
+ .HasForeignKey("PrinterId");
+
+ b.Navigation("Manager");
+
+ b.Navigation("Material");
+
+ b.Navigation("Model");
+
+ b.Navigation("Order");
+
+ b.Navigation("PostProcessing");
+
+ b.Navigation("Printer");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.ModelSettings", b =>
+ {
+ b.HasOne("TRPZ_PrintService.Data.ModelInOrder", "ModelInOrder")
+ .WithOne("ModelSettings")
+ .HasForeignKey("TRPZ_PrintService.Data.ModelSettings", "ModelSettingsId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("ModelInOrder");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.Order", b =>
+ {
+ b.HasOne("TRPZ_PrintService.Areas.Identity.Data.TRPZ_PrintServiceUser", "Client")
+ .WithMany()
+ .HasForeignKey("ClientId");
+
+ b.HasOne("TRPZ_PrintService.Data.PromoCode", "PromoCode")
+ .WithMany("Orders")
+ .HasForeignKey("PromoCodeId");
+
+ b.Navigation("Client");
+
+ b.Navigation("PromoCode");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.Material", b =>
+ {
+ b.Navigation("ModelsInOrders");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.ModelInOrder", b =>
+ {
+ b.Navigation("ModelSettings");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.Order", b =>
+ {
+ b.Navigation("Models");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.PostProcessing", b =>
+ {
+ b.Navigation("ModelsInOrders");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.PromoCode", b =>
+ {
+ b.Navigation("Orders");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/TRPZ_PrintService/Migrations/20201222193109_status_enum.cs b/TRPZ_PrintService/Migrations/20201222193109_status_enum.cs
new file mode 100644
index 0000000..11355c3
--- /dev/null
+++ b/TRPZ_PrintService/Migrations/20201222193109_status_enum.cs
@@ -0,0 +1,57 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace TRPZ_PrintService.Migrations
+{
+ public partial class status_enum : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropColumn(
+ name: "IsConfirmed",
+ table: "Orders");
+
+ migrationBuilder.DropColumn(
+ name: "IsFinished",
+ table: "Orders");
+
+ migrationBuilder.DropColumn(
+ name: "IsSent",
+ table: "Orders");
+
+ migrationBuilder.AddColumn(
+ name: "Status",
+ table: "Orders",
+ type: "integer",
+ nullable: false,
+ defaultValue: 0);
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropColumn(
+ name: "Status",
+ table: "Orders");
+
+ migrationBuilder.AddColumn(
+ name: "IsConfirmed",
+ table: "Orders",
+ type: "boolean",
+ nullable: false,
+ defaultValue: false);
+
+ migrationBuilder.AddColumn(
+ name: "IsFinished",
+ table: "Orders",
+ type: "boolean",
+ nullable: false,
+ defaultValue: false);
+
+ migrationBuilder.AddColumn(
+ name: "IsSent",
+ table: "Orders",
+ type: "boolean",
+ nullable: false,
+ defaultValue: false);
+ }
+ }
+}
diff --git a/TRPZ_PrintService/Migrations/20201223002305_calc_prop.Designer.cs b/TRPZ_PrintService/Migrations/20201223002305_calc_prop.Designer.cs
new file mode 100644
index 0000000..bd285a6
--- /dev/null
+++ b/TRPZ_PrintService/Migrations/20201223002305_calc_prop.Designer.cs
@@ -0,0 +1,590 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using TRPZ_PrintService.Data;
+
+namespace TRPZ_PrintService.Migrations
+{
+ [DbContext(typeof(TRPZ_PrintServiceContext))]
+ [Migration("20201223002305_calc_prop")]
+ partial class calc_prop
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .UseIdentityByDefaultColumns()
+ .HasAnnotation("Relational:MaxIdentifierLength", 63)
+ .HasAnnotation("ProductVersion", "5.0.1");
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("NormalizedName")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedName")
+ .IsUnique()
+ .HasDatabaseName("RoleNameIndex");
+
+ b.ToTable("AspNetRoles");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("ClaimType")
+ .HasColumnType("text");
+
+ b.Property("ClaimValue")
+ .HasColumnType("text");
+
+ b.Property("RoleId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AspNetRoleClaims");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("ClaimType")
+ .HasColumnType("text");
+
+ b.Property("ClaimValue")
+ .HasColumnType("text");
+
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AspNetUserClaims");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
+ {
+ b.Property("LoginProvider")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)");
+
+ b.Property("ProviderKey")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)");
+
+ b.Property("ProviderDisplayName")
+ .HasColumnType("text");
+
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("LoginProvider", "ProviderKey");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AspNetUserLogins");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("text");
+
+ b.Property("RoleId")
+ .HasColumnType("text");
+
+ b.HasKey("UserId", "RoleId");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AspNetUserRoles");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("text");
+
+ b.Property("LoginProvider")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)");
+
+ b.Property("Name")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)");
+
+ b.Property("Value")
+ .HasColumnType("text");
+
+ b.HasKey("UserId", "LoginProvider", "Name");
+
+ b.ToTable("AspNetUserTokens");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Areas.Identity.Data.TRPZ_PrintServiceUser", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text");
+
+ b.Property("AccessFailedCount")
+ .HasColumnType("integer");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("text");
+
+ b.Property("Email")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("EmailConfirmed")
+ .HasColumnType("boolean");
+
+ b.Property("FirstName")
+ .HasColumnType("text");
+
+ b.Property("LastName")
+ .HasColumnType("text");
+
+ b.Property("LockoutEnabled")
+ .HasColumnType("boolean");
+
+ b.Property("LockoutEnd")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("NormalizedEmail")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("NormalizedUserName")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("PasswordHash")
+ .HasColumnType("text");
+
+ b.Property("PhoneNumber")
+ .HasColumnType("text");
+
+ b.Property("PhoneNumberConfirmed")
+ .HasColumnType("boolean");
+
+ b.Property("SecurityStamp")
+ .HasColumnType("text");
+
+ b.Property("TwoFactorEnabled")
+ .HasColumnType("boolean");
+
+ b.Property("UserName")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedEmail")
+ .HasDatabaseName("EmailIndex");
+
+ b.HasIndex("NormalizedUserName")
+ .IsUnique()
+ .HasDatabaseName("UserNameIndex");
+
+ b.ToTable("AspNetUsers");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.Material", b =>
+ {
+ b.Property("MaterialId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Price")
+ .HasColumnType("integer");
+
+ b.HasKey("MaterialId");
+
+ b.ToTable("Materials");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.Model3D", b =>
+ {
+ b.Property("Model3DId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("FilePath")
+ .HasColumnType("text");
+
+ b.HasKey("Model3DId");
+
+ b.ToTable("Models3D");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.ModelInOrder", b =>
+ {
+ b.Property("ModelInOrderId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("HasSolubleSupports")
+ .HasColumnType("boolean");
+
+ b.Property("ManagerId")
+ .HasColumnType("text");
+
+ b.Property("MaterialId")
+ .HasColumnType("integer");
+
+ b.Property("Model3DId")
+ .HasColumnType("integer");
+
+ b.Property("OrderId")
+ .HasColumnType("integer");
+
+ b.Property("PostProcessingId")
+ .HasColumnType("integer");
+
+ b.Property("PriceTotal")
+ .HasColumnType("integer");
+
+ b.Property("PrinterId")
+ .HasColumnType("integer");
+
+ b.Property("Scale")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("double precision")
+ .HasDefaultValue(1.0);
+
+ b.HasKey("ModelInOrderId");
+
+ b.HasIndex("ManagerId");
+
+ b.HasIndex("MaterialId");
+
+ b.HasIndex("Model3DId");
+
+ b.HasIndex("OrderId");
+
+ b.HasIndex("PostProcessingId");
+
+ b.HasIndex("PrinterId");
+
+ b.ToTable("ModelsInOrders");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.ModelSettings", b =>
+ {
+ b.Property("ModelSettingsId")
+ .HasColumnType("integer");
+
+ b.Property("InfillPercentage")
+ .HasColumnType("integer");
+
+ b.Property("LayerHeight")
+ .HasColumnType("integer");
+
+ b.Property("NozzleDiameter")
+ .HasColumnType("integer");
+
+ b.HasKey("ModelSettingsId");
+
+ b.ToTable("ModelsSettings");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.Order", b =>
+ {
+ b.Property("OrderId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("ClientId")
+ .HasColumnType("text");
+
+ b.Property("PromoCodeId")
+ .HasColumnType("integer");
+
+ b.Property("Status")
+ .HasColumnType("integer");
+
+ b.Property("Timestamp")
+ .HasColumnType("timestamp without time zone");
+
+ b.Property("TotalPrintTime")
+ .HasColumnType("interval");
+
+ b.HasKey("OrderId");
+
+ b.HasIndex("ClientId");
+
+ b.HasIndex("PromoCodeId");
+
+ b.ToTable("Orders");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.PostProcessing", b =>
+ {
+ b.Property("PostProcessingId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .HasColumnType("text");
+
+ b.Property("Price")
+ .HasColumnType("integer");
+
+ b.HasKey("PostProcessingId");
+
+ b.ToTable("PostProcessings");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.Printer", b =>
+ {
+ b.Property("PrinterId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("BuildPlateLength")
+ .HasColumnType("integer");
+
+ b.Property("BuildPlateWidth")
+ .HasColumnType("integer");
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("ExtruderCount")
+ .HasColumnType("integer");
+
+ b.Property("MaxTemp")
+ .HasColumnType("integer");
+
+ b.Property("Name")
+ .HasColumnType("text");
+
+ b.HasKey("PrinterId");
+
+ b.ToTable("Printers");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.PromoCode", b =>
+ {
+ b.Property("PromoCodeId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("ActiveTo")
+ .HasColumnType("timestamp without time zone");
+
+ b.Property("Count")
+ .HasColumnType("integer");
+
+ b.Property("Discount")
+ .HasColumnType("integer");
+
+ b.Property("Issue")
+ .HasColumnType("timestamp without time zone");
+
+ b.HasKey("PromoCodeId");
+
+ b.ToTable("PromoCodes");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
+ {
+ b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
+ .WithMany()
+ .HasForeignKey("RoleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
+ {
+ b.HasOne("TRPZ_PrintService.Areas.Identity.Data.TRPZ_PrintServiceUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
+ {
+ b.HasOne("TRPZ_PrintService.Areas.Identity.Data.TRPZ_PrintServiceUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
+ {
+ b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
+ .WithMany()
+ .HasForeignKey("RoleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("TRPZ_PrintService.Areas.Identity.Data.TRPZ_PrintServiceUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
+ {
+ b.HasOne("TRPZ_PrintService.Areas.Identity.Data.TRPZ_PrintServiceUser", null)
+ .WithMany()
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.ModelInOrder", b =>
+ {
+ b.HasOne("TRPZ_PrintService.Areas.Identity.Data.TRPZ_PrintServiceUser", "Manager")
+ .WithMany()
+ .HasForeignKey("ManagerId");
+
+ b.HasOne("TRPZ_PrintService.Data.Material", "Material")
+ .WithMany("ModelsInOrders")
+ .HasForeignKey("MaterialId");
+
+ b.HasOne("TRPZ_PrintService.Data.Model3D", "Model")
+ .WithMany()
+ .HasForeignKey("Model3DId");
+
+ b.HasOne("TRPZ_PrintService.Data.Order", "Order")
+ .WithMany("Models")
+ .HasForeignKey("OrderId")
+ .OnDelete(DeleteBehavior.Cascade);
+
+ b.HasOne("TRPZ_PrintService.Data.PostProcessing", "PostProcessing")
+ .WithMany("ModelsInOrders")
+ .HasForeignKey("PostProcessingId");
+
+ b.HasOne("TRPZ_PrintService.Data.Printer", "Printer")
+ .WithMany()
+ .HasForeignKey("PrinterId");
+
+ b.Navigation("Manager");
+
+ b.Navigation("Material");
+
+ b.Navigation("Model");
+
+ b.Navigation("Order");
+
+ b.Navigation("PostProcessing");
+
+ b.Navigation("Printer");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.ModelSettings", b =>
+ {
+ b.HasOne("TRPZ_PrintService.Data.ModelInOrder", "ModelInOrder")
+ .WithOne("ModelSettings")
+ .HasForeignKey("TRPZ_PrintService.Data.ModelSettings", "ModelSettingsId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("ModelInOrder");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.Order", b =>
+ {
+ b.HasOne("TRPZ_PrintService.Areas.Identity.Data.TRPZ_PrintServiceUser", "Client")
+ .WithMany()
+ .HasForeignKey("ClientId");
+
+ b.HasOne("TRPZ_PrintService.Data.PromoCode", "PromoCode")
+ .WithMany("Orders")
+ .HasForeignKey("PromoCodeId");
+
+ b.Navigation("Client");
+
+ b.Navigation("PromoCode");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.Material", b =>
+ {
+ b.Navigation("ModelsInOrders");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.ModelInOrder", b =>
+ {
+ b.Navigation("ModelSettings");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.Order", b =>
+ {
+ b.Navigation("Models");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.PostProcessing", b =>
+ {
+ b.Navigation("ModelsInOrders");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.PromoCode", b =>
+ {
+ b.Navigation("Orders");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/TRPZ_PrintService/Migrations/20201223002305_calc_prop.cs b/TRPZ_PrintService/Migrations/20201223002305_calc_prop.cs
new file mode 100644
index 0000000..1c494ce
--- /dev/null
+++ b/TRPZ_PrintService/Migrations/20201223002305_calc_prop.cs
@@ -0,0 +1,17 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace TRPZ_PrintService.Migrations
+{
+ public partial class calc_prop : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+
+ }
+ }
+}
diff --git a/TRPZ_PrintService/Migrations/20201223010653_client_orders.Designer.cs b/TRPZ_PrintService/Migrations/20201223010653_client_orders.Designer.cs
new file mode 100644
index 0000000..5c4ea94
--- /dev/null
+++ b/TRPZ_PrintService/Migrations/20201223010653_client_orders.Designer.cs
@@ -0,0 +1,596 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using TRPZ_PrintService.Data;
+
+namespace TRPZ_PrintService.Migrations
+{
+ [DbContext(typeof(TRPZ_PrintServiceContext))]
+ [Migration("20201223010653_client_orders")]
+ partial class client_orders
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .UseIdentityByDefaultColumns()
+ .HasAnnotation("Relational:MaxIdentifierLength", 63)
+ .HasAnnotation("ProductVersion", "5.0.1");
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("NormalizedName")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedName")
+ .IsUnique()
+ .HasDatabaseName("RoleNameIndex");
+
+ b.ToTable("AspNetRoles");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("ClaimType")
+ .HasColumnType("text");
+
+ b.Property("ClaimValue")
+ .HasColumnType("text");
+
+ b.Property("RoleId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AspNetRoleClaims");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("ClaimType")
+ .HasColumnType("text");
+
+ b.Property("ClaimValue")
+ .HasColumnType("text");
+
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AspNetUserClaims");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
+ {
+ b.Property("LoginProvider")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)");
+
+ b.Property("ProviderKey")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)");
+
+ b.Property("ProviderDisplayName")
+ .HasColumnType("text");
+
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("LoginProvider", "ProviderKey");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AspNetUserLogins");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("text");
+
+ b.Property("RoleId")
+ .HasColumnType("text");
+
+ b.HasKey("UserId", "RoleId");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AspNetUserRoles");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("text");
+
+ b.Property("LoginProvider")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)");
+
+ b.Property("Name")
+ .HasMaxLength(128)
+ .HasColumnType("character varying(128)");
+
+ b.Property("Value")
+ .HasColumnType("text");
+
+ b.HasKey("UserId", "LoginProvider", "Name");
+
+ b.ToTable("AspNetUserTokens");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Areas.Identity.Data.TRPZ_PrintServiceUser", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text");
+
+ b.Property("AccessFailedCount")
+ .HasColumnType("integer");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("text");
+
+ b.Property("Email")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("EmailConfirmed")
+ .HasColumnType("boolean");
+
+ b.Property("FirstName")
+ .HasColumnType("text");
+
+ b.Property("LastName")
+ .HasColumnType("text");
+
+ b.Property("LockoutEnabled")
+ .HasColumnType("boolean");
+
+ b.Property("LockoutEnd")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("NormalizedEmail")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("NormalizedUserName")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("PasswordHash")
+ .HasColumnType("text");
+
+ b.Property("PhoneNumber")
+ .HasColumnType("text");
+
+ b.Property("PhoneNumberConfirmed")
+ .HasColumnType("boolean");
+
+ b.Property("SecurityStamp")
+ .HasColumnType("text");
+
+ b.Property("TwoFactorEnabled")
+ .HasColumnType("boolean");
+
+ b.Property("UserName")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedEmail")
+ .HasDatabaseName("EmailIndex");
+
+ b.HasIndex("NormalizedUserName")
+ .IsUnique()
+ .HasDatabaseName("UserNameIndex");
+
+ b.ToTable("AspNetUsers");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.Material", b =>
+ {
+ b.Property("MaterialId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Price")
+ .HasColumnType("integer");
+
+ b.HasKey("MaterialId");
+
+ b.ToTable("Materials");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.Model3D", b =>
+ {
+ b.Property("Model3DId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("FilePath")
+ .HasColumnType("text");
+
+ b.HasKey("Model3DId");
+
+ b.ToTable("Models3D");
+ });
+
+ modelBuilder.Entity("TRPZ_PrintService.Data.ModelInOrder", b =>
+ {
+ b.Property("ModelInOrderId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .UseIdentityByDefaultColumn();
+
+ b.Property("HasSolubleSupports")
+ .HasColumnType("boolean");
+
+ b.Property