Odstranjenn projekt
dodan vnos pozicije fakture
This commit is contained in:
2347
EveryThing/Migrations/20220614112949_2.Designer.cs
generated
2347
EveryThing/Migrations/20220614112949_2.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -1,270 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _2 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InvoiceItems_Invoices_IdInvoiceFk",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_Invoices",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "IdProject",
|
||||
table: "Invoices",
|
||||
newName: "Type");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "Type",
|
||||
table: "Invoices",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int")
|
||||
.OldAnnotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "IdInvoice",
|
||||
table: "Invoices",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "Date",
|
||||
table: "Invoices",
|
||||
type: "datetime(6)",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "IdPartnerFk",
|
||||
table: "Invoices",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "Discount",
|
||||
table: "InvoiceItems",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "IdItemFk",
|
||||
table: "InvoiceItems",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "IdProjectPartItem",
|
||||
table: "InvoiceItems",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ItemDescription",
|
||||
table: "InvoiceItems",
|
||||
type: "longtext",
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Note",
|
||||
table: "InvoiceItems",
|
||||
type: "longtext",
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "Price",
|
||||
table: "InvoiceItems",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "Quantity",
|
||||
table: "InvoiceItems",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "Tax",
|
||||
table: "InvoiceItems",
|
||||
type: "double",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_Invoices",
|
||||
table: "Invoices",
|
||||
column: "IdInvoice");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Invoices_IdPartnerFk",
|
||||
table: "Invoices",
|
||||
column: "IdPartnerFk");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InvoiceItems_IdItemFk",
|
||||
table: "InvoiceItems",
|
||||
column: "IdItemFk");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InvoiceItems_IdProjectPartItem",
|
||||
table: "InvoiceItems",
|
||||
column: "IdProjectPartItem");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InvoiceItems_CodeTableItems_IdItemFk",
|
||||
table: "InvoiceItems",
|
||||
column: "IdItemFk",
|
||||
principalTable: "CodeTableItems",
|
||||
principalColumn: "IdItem");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InvoiceItems_Invoices_IdInvoiceFk",
|
||||
table: "InvoiceItems",
|
||||
column: "IdInvoiceFk",
|
||||
principalTable: "Invoices",
|
||||
principalColumn: "IdInvoice",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InvoiceItems_ProjectPartItems_IdProjectPartItem",
|
||||
table: "InvoiceItems",
|
||||
column: "IdProjectPartItem",
|
||||
principalTable: "ProjectPartItems",
|
||||
principalColumn: "IdProjectPartItem",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Invoices_CodeTablePartners_IdPartnerFk",
|
||||
table: "Invoices",
|
||||
column: "IdPartnerFk",
|
||||
principalTable: "CodeTablePartners",
|
||||
principalColumn: "IdPartner",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InvoiceItems_CodeTableItems_IdItemFk",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InvoiceItems_Invoices_IdInvoiceFk",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InvoiceItems_ProjectPartItems_IdProjectPartItem",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Invoices_CodeTablePartners_IdPartnerFk",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_Invoices",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Invoices_IdPartnerFk",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_InvoiceItems_IdItemFk",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_InvoiceItems_IdProjectPartItem",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IdInvoice",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Date",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IdPartnerFk",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Discount",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IdItemFk",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IdProjectPartItem",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ItemDescription",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Note",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Price",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Quantity",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Tax",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Type",
|
||||
table: "Invoices",
|
||||
newName: "IdProject");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "IdProject",
|
||||
table: "Invoices",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int")
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_Invoices",
|
||||
table: "Invoices",
|
||||
column: "IdProject");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InvoiceItems_Invoices_IdInvoiceFk",
|
||||
table: "InvoiceItems",
|
||||
column: "IdInvoiceFk",
|
||||
principalTable: "Invoices",
|
||||
principalColumn: "IdProject",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
2350
EveryThing/Migrations/20220614114647_3.Designer.cs
generated
2350
EveryThing/Migrations/20220614114647_3.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -1,26 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _3 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "State",
|
||||
table: "Invoices",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "State",
|
||||
table: "Invoices");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _4 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InvoiceItems_ProjectPartItems_IdProjectPartItem",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "IdProjectPartItem",
|
||||
table: "InvoiceItems",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InvoiceItems_ProjectPartItems_IdProjectPartItem",
|
||||
table: "InvoiceItems",
|
||||
column: "IdProjectPartItem",
|
||||
principalTable: "ProjectPartItems",
|
||||
principalColumn: "IdProjectPartItem");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InvoiceItems_ProjectPartItems_IdProjectPartItem",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "IdProjectPartItem",
|
||||
table: "InvoiceItems",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InvoiceItems_ProjectPartItems_IdProjectPartItem",
|
||||
table: "InvoiceItems",
|
||||
column: "IdProjectPartItem",
|
||||
principalTable: "ProjectPartItems",
|
||||
principalColumn: "IdProjectPartItem",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
2363
EveryThing/Migrations/20220617041022_5.Designer.cs
generated
2363
EveryThing/Migrations/20220617041022_5.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -1,70 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _5 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "InvoiceNumber",
|
||||
table: "Invoices",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "InvoiceYear",
|
||||
table: "Invoices",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Note",
|
||||
table: "Invoices",
|
||||
type: "longtext",
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PostText",
|
||||
table: "Invoices",
|
||||
type: "longtext",
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PreText",
|
||||
table: "Invoices",
|
||||
type: "longtext",
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "InvoiceNumber",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "InvoiceYear",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Note",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PostText",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PreText",
|
||||
table: "Invoices");
|
||||
}
|
||||
}
|
||||
}
|
||||
2381
EveryThing/Migrations/20220617071940_6.Designer.cs
generated
2381
EveryThing/Migrations/20220617071940_6.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -1,58 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _6 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "IdPartnerFk",
|
||||
table: "Projects",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "LogoFileName",
|
||||
table: "CodeTableCompanies",
|
||||
type: "longtext",
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Projects_IdPartnerFk",
|
||||
table: "Projects",
|
||||
column: "IdPartnerFk");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Projects_CodeTablePartners_IdPartnerFk",
|
||||
table: "Projects",
|
||||
column: "IdPartnerFk",
|
||||
principalTable: "CodeTablePartners",
|
||||
principalColumn: "IdPartner",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Projects_CodeTablePartners_IdPartnerFk",
|
||||
table: "Projects");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Projects_IdPartnerFk",
|
||||
table: "Projects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IdPartnerFk",
|
||||
table: "Projects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LogoFileName",
|
||||
table: "CodeTableCompanies");
|
||||
}
|
||||
}
|
||||
}
|
||||
2384
EveryThing/Migrations/20220728190422_7.Designer.cs
generated
2384
EveryThing/Migrations/20220728190422_7.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -1,26 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _7 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateOfDispatch",
|
||||
table: "Invoices",
|
||||
type: "datetime(6)",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DateOfDispatch",
|
||||
table: "Invoices");
|
||||
}
|
||||
}
|
||||
}
|
||||
2387
EveryThing/Migrations/20220729120715_8.Designer.cs
generated
2387
EveryThing/Migrations/20220729120715_8.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
2390
EveryThing/Migrations/20220905044842_9.Designer.cs
generated
2390
EveryThing/Migrations/20220905044842_9.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -1,26 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _9 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "State",
|
||||
table: "InvoiceItems",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "State",
|
||||
table: "InvoiceItems");
|
||||
}
|
||||
}
|
||||
}
|
||||
2399
EveryThing/Migrations/20220926142447_10.Designer.cs
generated
2399
EveryThing/Migrations/20220926142447_10.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -1,48 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _10 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "Buyer",
|
||||
table: "CodeTablePartners",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "Supplier",
|
||||
table: "CodeTablePartners",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CodeTableItemType",
|
||||
table: "CodeTableItems",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Buyer",
|
||||
table: "CodeTablePartners");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Supplier",
|
||||
table: "CodeTablePartners");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CodeTableItemType",
|
||||
table: "CodeTableItems");
|
||||
}
|
||||
}
|
||||
}
|
||||
2417
EveryThing/Migrations/20220930114206_11.Designer.cs
generated
2417
EveryThing/Migrations/20220930114206_11.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -1,81 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _11 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "BuyersOrderNumber",
|
||||
table: "Projects",
|
||||
type: "longtext",
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ProjectNumber",
|
||||
table: "Projects",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ProjectYear",
|
||||
table: "Projects",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ProjectPartNumber",
|
||||
table: "ProjectParts",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DeliveryDate",
|
||||
table: "ProjectPartItems",
|
||||
type: "datetime(6)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ProjectPartItemNumber",
|
||||
table: "ProjectPartItems",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BuyersOrderNumber",
|
||||
table: "Projects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ProjectNumber",
|
||||
table: "Projects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ProjectYear",
|
||||
table: "Projects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ProjectPartNumber",
|
||||
table: "ProjectParts");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DeliveryDate",
|
||||
table: "ProjectPartItems");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ProjectPartItemNumber",
|
||||
table: "ProjectPartItems");
|
||||
}
|
||||
}
|
||||
}
|
||||
2420
EveryThing/Migrations/20220930123821_12.Designer.cs
generated
2420
EveryThing/Migrations/20220930123821_12.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -1,26 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _12 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "BuyersOrderNumber",
|
||||
table: "Invoices",
|
||||
type: "longtext",
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BuyersOrderNumber",
|
||||
table: "Invoices");
|
||||
}
|
||||
}
|
||||
}
|
||||
2423
EveryThing/Migrations/20221011035800_13.Designer.cs
generated
2423
EveryThing/Migrations/20221011035800_13.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -1,26 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _13 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "SellingPrice",
|
||||
table: "ProjectPartItems",
|
||||
type: "float",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SellingPrice",
|
||||
table: "ProjectPartItems");
|
||||
}
|
||||
}
|
||||
}
|
||||
2426
EveryThing/Migrations/20221203123112_14.Designer.cs
generated
2426
EveryThing/Migrations/20221203123112_14.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -1,27 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _14 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateModified",
|
||||
table: "ProjectPartItems",
|
||||
type: "datetime(6)",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DateModified",
|
||||
table: "ProjectPartItems");
|
||||
}
|
||||
}
|
||||
}
|
||||
2437
EveryThing/Migrations/20230117050632_15.Designer.cs
generated
2437
EveryThing/Migrations/20230117050632_15.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -1,45 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _15 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "IdInvoiceItemJoinFk",
|
||||
table: "InvoiceItems",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InvoiceItems_IdInvoiceItemJoinFk",
|
||||
table: "InvoiceItems",
|
||||
column: "IdInvoiceItemJoinFk");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InvoiceItems_InvoiceItems_IdInvoiceItemJoinFk",
|
||||
table: "InvoiceItems",
|
||||
column: "IdInvoiceItemJoinFk",
|
||||
principalTable: "InvoiceItems",
|
||||
principalColumn: "IdInvoiceItem");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InvoiceItems_InvoiceItems_IdInvoiceItemJoinFk",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_InvoiceItems_IdInvoiceItemJoinFk",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IdInvoiceItemJoinFk",
|
||||
table: "InvoiceItems");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20220615133522_4")]
|
||||
partial class _4
|
||||
[Migration("20230513104253_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
@@ -56,6 +56,9 @@ namespace EveryThing.Migrations
|
||||
b.Property<int>("IdCountryFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("LogoFileName")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Phone")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
@@ -274,6 +277,9 @@ namespace EveryThing.Migrations
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("CodeTableItemType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
@@ -323,6 +329,9 @@ namespace EveryThing.Migrations
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<bool>("Buyer")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
@@ -354,6 +363,9 @@ namespace EveryThing.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool>("Supplier")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("TaxNumber")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
@@ -669,9 +681,15 @@ namespace EveryThing.Migrations
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("BuyersOrderNumber")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime?>("DateOfDispatch")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("IdCompanyFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
@@ -679,6 +697,21 @@ namespace EveryThing.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("InvoiceNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("InvoiceYear")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Note")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("PostText")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("PreText")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("State")
|
||||
.HasColumnType("int");
|
||||
|
||||
@@ -706,6 +739,9 @@ namespace EveryThing.Migrations
|
||||
b.Property<int>("IdInvoiceFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("IdInvoiceItemJoinFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("IdItemFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
@@ -724,6 +760,9 @@ namespace EveryThing.Migrations
|
||||
b.Property<double>("Quantity")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("State")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("Tax")
|
||||
.HasColumnType("double");
|
||||
|
||||
@@ -731,133 +770,13 @@ namespace EveryThing.Migrations
|
||||
|
||||
b.HasIndex("IdInvoiceFk");
|
||||
|
||||
b.HasIndex("IdItemFk");
|
||||
b.HasIndex("IdInvoiceItemJoinFk");
|
||||
|
||||
b.HasIndex("IdProjectPartItem");
|
||||
b.HasIndex("IdItemFk");
|
||||
|
||||
b.ToTable("InvoiceItems");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.Project", b =>
|
||||
{
|
||||
b.Property<int>("IdProject")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime?>("FinishedDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("IdCompanyFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("IdProject");
|
||||
|
||||
b.HasIndex("IdCompanyFk");
|
||||
|
||||
b.ToTable("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.ProjectPart", b =>
|
||||
{
|
||||
b.Property<int>("IdProjectPart")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime?>("FinishedDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("IdProjectFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("ShippedDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("IdProjectPart");
|
||||
|
||||
b.HasIndex("IdProjectFk");
|
||||
|
||||
b.ToTable("ProjectParts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.ProjectPartItem", b =>
|
||||
{
|
||||
b.Property<int>("IdProjectPartItem")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("FinishedDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int?>("IdItemFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("IdMaterialFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("IdMaterialSupplierFk")
|
||||
.IsRequired()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdProjectPartFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("MaterialDimensions")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<float>("MaterialPrice")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("NumberOfItems")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("NumberOfItemsFinished")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("NumberOfSets")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<DateTime?>("ShippingDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("WorkPrice")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("IdProjectPartItem");
|
||||
|
||||
b.HasIndex("IdItemFk");
|
||||
|
||||
b.HasIndex("IdMaterialFk");
|
||||
|
||||
b.HasIndex("IdMaterialSupplierFk");
|
||||
|
||||
b.HasIndex("IdProjectPartFk");
|
||||
|
||||
b.ToTable("ProjectPartItems");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Transport.TransportLoadingOrder", b =>
|
||||
{
|
||||
b.Property<int>("IdTransportLoadingOrder")
|
||||
@@ -1755,74 +1674,19 @@ namespace EveryThing.Migrations
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("EveryThing.Models.Invoice.InvoiceItem", "InvoiceItemJoin")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdInvoiceItemJoinFk");
|
||||
|
||||
b.HasOne("EveryThing.Models.CodeTable.CodeTableItem", "Item")
|
||||
.WithMany("InvoiceItem")
|
||||
.HasForeignKey("IdItemFk");
|
||||
|
||||
b.HasOne("EveryThing.Models.Project.ProjectPartItem", "ProjectPartItem")
|
||||
.WithMany("InvoiceItem")
|
||||
.HasForeignKey("IdProjectPartItem");
|
||||
|
||||
b.Navigation("Invoice");
|
||||
|
||||
b.Navigation("Item");
|
||||
|
||||
b.Navigation("ProjectPartItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.Project", b =>
|
||||
{
|
||||
b.HasOne("EveryThing.Models.CodeTable.CodeTableCompany", "Company")
|
||||
.WithMany("CompanyProject")
|
||||
.HasForeignKey("IdCompanyFk")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.ProjectPart", b =>
|
||||
{
|
||||
b.HasOne("EveryThing.Models.Project.Project", "Project")
|
||||
.WithMany("ProjectProjectPart")
|
||||
.HasForeignKey("IdProjectFk")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Project");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.ProjectPartItem", b =>
|
||||
{
|
||||
b.HasOne("EveryThing.Models.CodeTable.CodeTableItem", "Item")
|
||||
.WithMany("ItemProjectPartItem")
|
||||
.HasForeignKey("IdItemFk")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("EveryThing.Models.CodeTable.CodeTableItem", "Material")
|
||||
.WithMany("ItemProjectPartItemMaterial")
|
||||
.HasForeignKey("IdMaterialFk")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("EveryThing.Models.CodeTable.CodeTablePartner", "MaterialSupplier")
|
||||
.WithMany("PartnerProjectPartItem")
|
||||
.HasForeignKey("IdMaterialSupplierFk")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("EveryThing.Models.Project.ProjectPart", "ProjectPart")
|
||||
.WithMany("ProjectPartProjectPartItem")
|
||||
.HasForeignKey("IdProjectPartFk")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
b.Navigation("InvoiceItemJoin");
|
||||
|
||||
b.Navigation("Item");
|
||||
|
||||
b.Navigation("Material");
|
||||
|
||||
b.Navigation("MaterialSupplier");
|
||||
|
||||
b.Navigation("ProjectPart");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Transport.TransportLoadingOrder", b =>
|
||||
@@ -2182,8 +2046,6 @@ namespace EveryThing.Migrations
|
||||
|
||||
b.Navigation("CompanyPrePostText");
|
||||
|
||||
b.Navigation("CompanyProject");
|
||||
|
||||
b.Navigation("CompanyTransportLoadingOrder");
|
||||
|
||||
b.Navigation("CompanyVehicle");
|
||||
@@ -2243,10 +2105,6 @@ namespace EveryThing.Migrations
|
||||
modelBuilder.Entity("EveryThing.Models.CodeTable.CodeTableItem", b =>
|
||||
{
|
||||
b.Navigation("InvoiceItem");
|
||||
|
||||
b.Navigation("ItemProjectPartItem");
|
||||
|
||||
b.Navigation("ItemProjectPartItemMaterial");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.CodeTable.CodeTableJob", b =>
|
||||
@@ -2258,8 +2116,6 @@ namespace EveryThing.Migrations
|
||||
{
|
||||
b.Navigation("Invoice");
|
||||
|
||||
b.Navigation("PartnerProjectPartItem");
|
||||
|
||||
b.Navigation("PartnerTransportLoadingOrder");
|
||||
|
||||
b.Navigation("PartnerTransportLoadingOrderLoad");
|
||||
@@ -2277,21 +2133,6 @@ namespace EveryThing.Migrations
|
||||
b.Navigation("InvoiceInvoiceItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.Project", b =>
|
||||
{
|
||||
b.Navigation("ProjectProjectPart");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.ProjectPart", b =>
|
||||
{
|
||||
b.Navigation("ProjectPartProjectPartItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.ProjectPartItem", b =>
|
||||
{
|
||||
b.Navigation("InvoiceItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Transport.TransportLoadingOrder", b =>
|
||||
{
|
||||
b.Navigation("TransportLoadingOrderLoadUnload");
|
||||
@@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _1 : Migration
|
||||
public partial class Initial : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
@@ -60,6 +60,8 @@ namespace EveryThing.Migrations
|
||||
{
|
||||
IdCompany = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
LogoFileName = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Title = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ShortTitle = table.Column<string>(type: "longtext", nullable: true)
|
||||
@@ -162,7 +164,8 @@ namespace EveryThing.Migrations
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Description = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Active = table.Column<bool>(type: "tinyint(1)", nullable: false)
|
||||
Active = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
CodeTableItemType = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
@@ -224,7 +227,9 @@ namespace EveryThing.Migrations
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Email = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Active = table.Column<bool>(type: "tinyint(1)", nullable: false)
|
||||
Active = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
Buyer = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
||||
Supplier = table.Column<bool>(type: "tinyint(1)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
@@ -375,52 +380,6 @@ namespace EveryThing.Migrations
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Invoices",
|
||||
columns: table => new
|
||||
{
|
||||
IdProject = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
IdCompanyFk = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Invoices", x => x.IdProject);
|
||||
table.ForeignKey(
|
||||
name: "FK_Invoices_CodeTableCompanies_IdCompanyFk",
|
||||
column: x => x.IdCompanyFk,
|
||||
principalTable: "CodeTableCompanies",
|
||||
principalColumn: "IdCompany",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Projects",
|
||||
columns: table => new
|
||||
{
|
||||
IdProject = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
IdCompanyFk = table.Column<int>(type: "int", nullable: false),
|
||||
Title = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Description = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Status = table.Column<int>(type: "int", nullable: false),
|
||||
FinishedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Projects", x => x.IdProject);
|
||||
table.ForeignKey(
|
||||
name: "FK_Projects_CodeTableCompanies_IdCompanyFk",
|
||||
column: x => x.IdCompanyFk,
|
||||
principalTable: "CodeTableCompanies",
|
||||
principalColumn: "IdCompany",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "VehicleFuelingCards",
|
||||
columns: table => new
|
||||
@@ -638,6 +597,47 @@ namespace EveryThing.Migrations
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Invoices",
|
||||
columns: table => new
|
||||
{
|
||||
IdInvoice = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
IdCompanyFk = table.Column<int>(type: "int", nullable: false),
|
||||
Date = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
Type = table.Column<int>(type: "int", nullable: false),
|
||||
State = table.Column<int>(type: "int", nullable: false),
|
||||
IdPartnerFk = table.Column<int>(type: "int", nullable: false),
|
||||
InvoiceNumber = table.Column<int>(type: "int", nullable: false),
|
||||
InvoiceYear = table.Column<int>(type: "int", nullable: false),
|
||||
PreText = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
PostText = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Note = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
BuyersOrderNumber = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
DateOfDispatch = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Invoices", x => x.IdInvoice);
|
||||
table.ForeignKey(
|
||||
name: "FK_Invoices_CodeTableCompanies_IdCompanyFk",
|
||||
column: x => x.IdCompanyFk,
|
||||
principalTable: "CodeTableCompanies",
|
||||
principalColumn: "IdCompany",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_Invoices_CodeTablePartners_IdPartnerFk",
|
||||
column: x => x.IdPartnerFk,
|
||||
principalTable: "CodeTablePartners",
|
||||
principalColumn: "IdPartner",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Documents",
|
||||
columns: table => new
|
||||
@@ -764,53 +764,6 @@ namespace EveryThing.Migrations
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "InvoiceItems",
|
||||
columns: table => new
|
||||
{
|
||||
IdInvoiceItem = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
IdInvoiceFk = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_InvoiceItems", x => x.IdInvoiceItem);
|
||||
table.ForeignKey(
|
||||
name: "FK_InvoiceItems_Invoices_IdInvoiceFk",
|
||||
column: x => x.IdInvoiceFk,
|
||||
principalTable: "Invoices",
|
||||
principalColumn: "IdProject",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ProjectParts",
|
||||
columns: table => new
|
||||
{
|
||||
IdProjectPart = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
IdProjectFk = table.Column<int>(type: "int", nullable: false),
|
||||
Title = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Description = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Status = table.Column<int>(type: "int", nullable: false),
|
||||
FinishedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||
ShippedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ProjectParts", x => x.IdProjectPart);
|
||||
table.ForeignKey(
|
||||
name: "FK_ProjectParts_Projects_IdProjectFk",
|
||||
column: x => x.IdProjectFk,
|
||||
principalTable: "Projects",
|
||||
principalColumn: "IdProject",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Vehicles",
|
||||
columns: table => new
|
||||
@@ -913,52 +866,43 @@ namespace EveryThing.Migrations
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ProjectPartItems",
|
||||
name: "InvoiceItems",
|
||||
columns: table => new
|
||||
{
|
||||
IdProjectPartItem = table.Column<int>(type: "int", nullable: false)
|
||||
IdInvoiceItem = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
IdProjectPartFk = table.Column<int>(type: "int", nullable: false),
|
||||
IdInvoiceFk = table.Column<int>(type: "int", nullable: false),
|
||||
IdProjectPartItem = table.Column<int>(type: "int", nullable: true),
|
||||
IdItemFk = table.Column<int>(type: "int", nullable: true),
|
||||
NumberOfItems = table.Column<float>(type: "float", nullable: false),
|
||||
NumberOfSets = table.Column<float>(type: "float", nullable: false),
|
||||
IdMaterialFk = table.Column<int>(type: "int", nullable: true),
|
||||
MaterialDimensions = table.Column<string>(type: "longtext", nullable: true)
|
||||
IdInvoiceItemJoinFk = table.Column<int>(type: "int", nullable: true),
|
||||
ItemDescription = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
IdMaterialSupplierFk = table.Column<int>(type: "int", nullable: false),
|
||||
MaterialPrice = table.Column<float>(type: "float", nullable: false),
|
||||
WorkPrice = table.Column<float>(type: "float", nullable: false),
|
||||
NumberOfItemsFinished = table.Column<float>(type: "float", nullable: false),
|
||||
Status = table.Column<int>(type: "int", nullable: false),
|
||||
FinishedDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||
ShippingDate = table.Column<DateTime>(type: "datetime(6)", nullable: true)
|
||||
Note = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Quantity = table.Column<double>(type: "double", nullable: false),
|
||||
Price = table.Column<double>(type: "double", nullable: false),
|
||||
Discount = table.Column<double>(type: "double", nullable: false),
|
||||
Tax = table.Column<double>(type: "double", nullable: false),
|
||||
State = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ProjectPartItems", x => x.IdProjectPartItem);
|
||||
table.PrimaryKey("PK_InvoiceItems", x => x.IdInvoiceItem);
|
||||
table.ForeignKey(
|
||||
name: "FK_ProjectPartItems_CodeTableItems_IdItemFk",
|
||||
name: "FK_InvoiceItems_CodeTableItems_IdItemFk",
|
||||
column: x => x.IdItemFk,
|
||||
principalTable: "CodeTableItems",
|
||||
principalColumn: "IdItem",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
principalColumn: "IdItem");
|
||||
table.ForeignKey(
|
||||
name: "FK_ProjectPartItems_CodeTableItems_IdMaterialFk",
|
||||
column: x => x.IdMaterialFk,
|
||||
principalTable: "CodeTableItems",
|
||||
principalColumn: "IdItem",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
name: "FK_InvoiceItems_InvoiceItems_IdInvoiceItemJoinFk",
|
||||
column: x => x.IdInvoiceItemJoinFk,
|
||||
principalTable: "InvoiceItems",
|
||||
principalColumn: "IdInvoiceItem");
|
||||
table.ForeignKey(
|
||||
name: "FK_ProjectPartItems_CodeTablePartners_IdMaterialSupplierFk",
|
||||
column: x => x.IdMaterialSupplierFk,
|
||||
principalTable: "CodeTablePartners",
|
||||
principalColumn: "IdPartner",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_ProjectPartItems_ProjectParts_IdProjectPartFk",
|
||||
column: x => x.IdProjectPartFk,
|
||||
principalTable: "ProjectParts",
|
||||
principalColumn: "IdProjectPart",
|
||||
name: "FK_InvoiceItems_Invoices_IdInvoiceFk",
|
||||
column: x => x.IdInvoiceFk,
|
||||
principalTable: "Invoices",
|
||||
principalColumn: "IdInvoice",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
@@ -1460,40 +1404,25 @@ namespace EveryThing.Migrations
|
||||
table: "InvoiceItems",
|
||||
column: "IdInvoiceFk");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InvoiceItems_IdInvoiceItemJoinFk",
|
||||
table: "InvoiceItems",
|
||||
column: "IdInvoiceItemJoinFk");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InvoiceItems_IdItemFk",
|
||||
table: "InvoiceItems",
|
||||
column: "IdItemFk");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Invoices_IdCompanyFk",
|
||||
table: "Invoices",
|
||||
column: "IdCompanyFk");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProjectPartItems_IdItemFk",
|
||||
table: "ProjectPartItems",
|
||||
column: "IdItemFk");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProjectPartItems_IdMaterialFk",
|
||||
table: "ProjectPartItems",
|
||||
column: "IdMaterialFk");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProjectPartItems_IdMaterialSupplierFk",
|
||||
table: "ProjectPartItems",
|
||||
column: "IdMaterialSupplierFk");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProjectPartItems_IdProjectPartFk",
|
||||
table: "ProjectPartItems",
|
||||
column: "IdProjectPartFk");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ProjectParts_IdProjectFk",
|
||||
table: "ProjectParts",
|
||||
column: "IdProjectFk");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Projects_IdCompanyFk",
|
||||
table: "Projects",
|
||||
column: "IdCompanyFk");
|
||||
name: "IX_Invoices_IdPartnerFk",
|
||||
table: "Invoices",
|
||||
column: "IdPartnerFk");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TransportLoadingOrderLoadUnloads_IdLoadingFk",
|
||||
@@ -1693,9 +1622,6 @@ namespace EveryThing.Migrations
|
||||
migrationBuilder.DropTable(
|
||||
name: "InvoiceItems");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ProjectPartItems");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TransportLoadingOrderLoadUnloads");
|
||||
|
||||
@@ -1729,14 +1655,11 @@ namespace EveryThing.Migrations
|
||||
migrationBuilder.DropTable(
|
||||
name: "IdentityUser");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Invoices");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "CodeTableItems");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ProjectParts");
|
||||
name: "Invoices");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "TransportLoadingOrders");
|
||||
@@ -1747,9 +1670,6 @@ namespace EveryThing.Migrations
|
||||
migrationBuilder.DropTable(
|
||||
name: "CodeTableEmployees");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Projects");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "CodeTablePartners");
|
||||
|
||||
@@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20220312183512_1")]
|
||||
[Migration("20230513134758_1")]
|
||||
partial class _1
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
@@ -56,6 +56,9 @@ namespace EveryThing.Migrations
|
||||
b.Property<int>("IdCountryFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("LogoFileName")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Phone")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
@@ -274,6 +277,9 @@ namespace EveryThing.Migrations
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("CodeTableItemType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
@@ -323,6 +329,9 @@ namespace EveryThing.Migrations
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<bool>("Buyer")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
@@ -354,6 +363,9 @@ namespace EveryThing.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool>("Supplier")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("TaxNumber")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
@@ -665,17 +677,53 @@ namespace EveryThing.Migrations
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Invoice.Invoice", b =>
|
||||
{
|
||||
b.Property<int>("IdProject")
|
||||
b.Property<int>("IdInvoice")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("BuyersOrderNumber")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime?>("DateOfDispatch")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("IdCompanyFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdProject");
|
||||
b.Property<int?>("IdPartnerFk")
|
||||
.IsRequired()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("InvoiceNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("InvoiceYear")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Note")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("PostText")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("PreText")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("State")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdInvoice");
|
||||
|
||||
b.HasIndex("IdCompanyFk");
|
||||
|
||||
b.HasIndex("IdPartnerFk");
|
||||
|
||||
b.ToTable("Invoices");
|
||||
});
|
||||
|
||||
@@ -685,134 +733,51 @@ namespace EveryThing.Migrations
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("Discount")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("IdInvoiceFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("IdInvoiceItemJoinFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("IdItemFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("IdProjectPartItem")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ItemDescription")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Note")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<double>("Price")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("Quantity")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("State")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("Tax")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("UnlistedItem")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("IdInvoiceItem");
|
||||
|
||||
b.HasIndex("IdInvoiceFk");
|
||||
|
||||
b.ToTable("InvoiceItems");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.Project", b =>
|
||||
{
|
||||
b.Property<int>("IdProject")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime?>("FinishedDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("IdCompanyFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("IdProject");
|
||||
|
||||
b.HasIndex("IdCompanyFk");
|
||||
|
||||
b.ToTable("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.ProjectPart", b =>
|
||||
{
|
||||
b.Property<int>("IdProjectPart")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime?>("FinishedDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("IdProjectFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("ShippedDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("IdProjectPart");
|
||||
|
||||
b.HasIndex("IdProjectFk");
|
||||
|
||||
b.ToTable("ProjectParts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.ProjectPartItem", b =>
|
||||
{
|
||||
b.Property<int>("IdProjectPartItem")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("FinishedDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int?>("IdItemFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("IdMaterialFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("IdMaterialSupplierFk")
|
||||
.IsRequired()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdProjectPartFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("MaterialDimensions")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<float>("MaterialPrice")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("NumberOfItems")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("NumberOfItemsFinished")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("NumberOfSets")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<DateTime?>("ShippingDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("WorkPrice")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("IdProjectPartItem");
|
||||
b.HasIndex("IdInvoiceItemJoinFk");
|
||||
|
||||
b.HasIndex("IdItemFk");
|
||||
|
||||
b.HasIndex("IdMaterialFk");
|
||||
|
||||
b.HasIndex("IdMaterialSupplierFk");
|
||||
|
||||
b.HasIndex("IdProjectPartFk");
|
||||
|
||||
b.ToTable("ProjectPartItems");
|
||||
b.ToTable("InvoiceItems");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Transport.TransportLoadingOrder", b =>
|
||||
@@ -1693,7 +1658,15 @@ namespace EveryThing.Migrations
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("EveryThing.Models.CodeTable.CodeTablePartner", "Partner")
|
||||
.WithMany("Invoice")
|
||||
.HasForeignKey("IdPartnerFk")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Company");
|
||||
|
||||
b.Navigation("Partner");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Invoice.InvoiceItem", b =>
|
||||
@@ -1704,62 +1677,19 @@ namespace EveryThing.Migrations
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Invoice");
|
||||
});
|
||||
b.HasOne("EveryThing.Models.Invoice.InvoiceItem", "InvoiceItemJoin")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdInvoiceItemJoinFk");
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.Project", b =>
|
||||
{
|
||||
b.HasOne("EveryThing.Models.CodeTable.CodeTableCompany", "Company")
|
||||
.WithMany("CompanyProject")
|
||||
.HasForeignKey("IdCompanyFk")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.ProjectPart", b =>
|
||||
{
|
||||
b.HasOne("EveryThing.Models.Project.Project", "Project")
|
||||
.WithMany("ProjectProjectPart")
|
||||
.HasForeignKey("IdProjectFk")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Project");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.ProjectPartItem", b =>
|
||||
{
|
||||
b.HasOne("EveryThing.Models.CodeTable.CodeTableItem", "Item")
|
||||
.WithMany("ItemProjectPartItem")
|
||||
.HasForeignKey("IdItemFk")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
.WithMany("InvoiceItem")
|
||||
.HasForeignKey("IdItemFk");
|
||||
|
||||
b.HasOne("EveryThing.Models.CodeTable.CodeTableItem", "Material")
|
||||
.WithMany("ItemProjectPartItemMaterial")
|
||||
.HasForeignKey("IdMaterialFk")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
b.Navigation("Invoice");
|
||||
|
||||
b.HasOne("EveryThing.Models.CodeTable.CodeTablePartner", "MaterialSupplier")
|
||||
.WithMany("PartnerProjectPartItem")
|
||||
.HasForeignKey("IdMaterialSupplierFk")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("EveryThing.Models.Project.ProjectPart", "ProjectPart")
|
||||
.WithMany("ProjectPartProjectPartItem")
|
||||
.HasForeignKey("IdProjectPartFk")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
b.Navigation("InvoiceItemJoin");
|
||||
|
||||
b.Navigation("Item");
|
||||
|
||||
b.Navigation("Material");
|
||||
|
||||
b.Navigation("MaterialSupplier");
|
||||
|
||||
b.Navigation("ProjectPart");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Transport.TransportLoadingOrder", b =>
|
||||
@@ -2119,8 +2049,6 @@ namespace EveryThing.Migrations
|
||||
|
||||
b.Navigation("CompanyPrePostText");
|
||||
|
||||
b.Navigation("CompanyProject");
|
||||
|
||||
b.Navigation("CompanyTransportLoadingOrder");
|
||||
|
||||
b.Navigation("CompanyVehicle");
|
||||
@@ -2179,9 +2107,7 @@ namespace EveryThing.Migrations
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.CodeTable.CodeTableItem", b =>
|
||||
{
|
||||
b.Navigation("ItemProjectPartItem");
|
||||
|
||||
b.Navigation("ItemProjectPartItemMaterial");
|
||||
b.Navigation("InvoiceItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.CodeTable.CodeTableJob", b =>
|
||||
@@ -2191,7 +2117,7 @@ namespace EveryThing.Migrations
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.CodeTable.CodeTablePartner", b =>
|
||||
{
|
||||
b.Navigation("PartnerProjectPartItem");
|
||||
b.Navigation("Invoice");
|
||||
|
||||
b.Navigation("PartnerTransportLoadingOrder");
|
||||
|
||||
@@ -2210,16 +2136,6 @@ namespace EveryThing.Migrations
|
||||
b.Navigation("InvoiceInvoiceItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.Project", b =>
|
||||
{
|
||||
b.Navigation("ProjectProjectPart");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.ProjectPart", b =>
|
||||
{
|
||||
b.Navigation("ProjectPartProjectPartItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Transport.TransportLoadingOrder", b =>
|
||||
{
|
||||
b.Navigation("TransportLoadingOrderLoadUnload");
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _8 : Migration
|
||||
public partial class _1 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PathOfPlans",
|
||||
table: "ProjectParts",
|
||||
name: "UnlistedItem",
|
||||
table: "InvoiceItems",
|
||||
type: "longtext",
|
||||
nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
@@ -19,8 +19,8 @@ namespace EveryThing.Migrations
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PathOfPlans",
|
||||
table: "ProjectParts");
|
||||
name: "UnlistedItem",
|
||||
table: "InvoiceItems");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -764,6 +764,9 @@ namespace EveryThing.Migrations
|
||||
b.Property<double>("Tax")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<string>("UnlistedItem")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("IdInvoiceItem");
|
||||
|
||||
b.HasIndex("IdInvoiceFk");
|
||||
@@ -772,163 +775,9 @@ namespace EveryThing.Migrations
|
||||
|
||||
b.HasIndex("IdItemFk");
|
||||
|
||||
b.HasIndex("IdProjectPartItem");
|
||||
|
||||
b.ToTable("InvoiceItems");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.Project", b =>
|
||||
{
|
||||
b.Property<int>("IdProject")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("BuyersOrderNumber")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime?>("FinishedDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("IdCompanyFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdPartnerFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ProjectNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ProjectYear")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("IdProject");
|
||||
|
||||
b.HasIndex("IdCompanyFk");
|
||||
|
||||
b.HasIndex("IdPartnerFk");
|
||||
|
||||
b.ToTable("Projects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.ProjectPart", b =>
|
||||
{
|
||||
b.Property<int>("IdProjectPart")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime?>("FinishedDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("IdProjectFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("PathOfPlans")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("ProjectPartNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("ShippedDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("IdProjectPart");
|
||||
|
||||
b.HasIndex("IdProjectFk");
|
||||
|
||||
b.ToTable("ProjectParts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.ProjectPartItem", b =>
|
||||
{
|
||||
b.Property<int>("IdProjectPartItem")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateModified")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime?>("DeliveryDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime?>("FinishedDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int?>("IdItemFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("IdMaterialFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("IdMaterialSupplierFk")
|
||||
.IsRequired()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdProjectPartFk")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("MaterialDimensions")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<float>("MaterialPrice")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("NumberOfItems")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("NumberOfItemsFinished")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("NumberOfSets")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<int>("ProjectPartItemNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("SellingPrice")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<DateTime?>("ShippingDate")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("WorkPrice")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("IdProjectPartItem");
|
||||
|
||||
b.HasIndex("IdItemFk");
|
||||
|
||||
b.HasIndex("IdMaterialFk");
|
||||
|
||||
b.HasIndex("IdMaterialSupplierFk");
|
||||
|
||||
b.HasIndex("IdProjectPartFk");
|
||||
|
||||
b.ToTable("ProjectPartItems");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Transport.TransportLoadingOrder", b =>
|
||||
{
|
||||
b.Property<int>("IdTransportLoadingOrder")
|
||||
@@ -1834,80 +1683,11 @@ namespace EveryThing.Migrations
|
||||
.WithMany("InvoiceItem")
|
||||
.HasForeignKey("IdItemFk");
|
||||
|
||||
b.HasOne("EveryThing.Models.Project.ProjectPartItem", "ProjectPartItem")
|
||||
.WithMany("InvoiceItem")
|
||||
.HasForeignKey("IdProjectPartItem");
|
||||
|
||||
b.Navigation("Invoice");
|
||||
|
||||
b.Navigation("InvoiceItemJoin");
|
||||
|
||||
b.Navigation("Item");
|
||||
|
||||
b.Navigation("ProjectPartItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.Project", b =>
|
||||
{
|
||||
b.HasOne("EveryThing.Models.CodeTable.CodeTableCompany", "Company")
|
||||
.WithMany("CompanyProject")
|
||||
.HasForeignKey("IdCompanyFk")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("EveryThing.Models.CodeTable.CodeTablePartner", "Partner")
|
||||
.WithMany("PartnerProject")
|
||||
.HasForeignKey("IdPartnerFk")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Company");
|
||||
|
||||
b.Navigation("Partner");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.ProjectPart", b =>
|
||||
{
|
||||
b.HasOne("EveryThing.Models.Project.Project", "Project")
|
||||
.WithMany("ProjectProjectPart")
|
||||
.HasForeignKey("IdProjectFk")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Project");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.ProjectPartItem", b =>
|
||||
{
|
||||
b.HasOne("EveryThing.Models.CodeTable.CodeTableItem", "Item")
|
||||
.WithMany("ItemProjectPartItem")
|
||||
.HasForeignKey("IdItemFk")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("EveryThing.Models.CodeTable.CodeTableItem", "Material")
|
||||
.WithMany("ItemProjectPartItemMaterial")
|
||||
.HasForeignKey("IdMaterialFk")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("EveryThing.Models.CodeTable.CodeTablePartner", "MaterialSupplier")
|
||||
.WithMany("PartnerProjectPartItem")
|
||||
.HasForeignKey("IdMaterialSupplierFk")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("EveryThing.Models.Project.ProjectPart", "ProjectPart")
|
||||
.WithMany("ProjectPartProjectPartItem")
|
||||
.HasForeignKey("IdProjectPartFk")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Item");
|
||||
|
||||
b.Navigation("Material");
|
||||
|
||||
b.Navigation("MaterialSupplier");
|
||||
|
||||
b.Navigation("ProjectPart");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Transport.TransportLoadingOrder", b =>
|
||||
@@ -2267,8 +2047,6 @@ namespace EveryThing.Migrations
|
||||
|
||||
b.Navigation("CompanyPrePostText");
|
||||
|
||||
b.Navigation("CompanyProject");
|
||||
|
||||
b.Navigation("CompanyTransportLoadingOrder");
|
||||
|
||||
b.Navigation("CompanyVehicle");
|
||||
@@ -2328,10 +2106,6 @@ namespace EveryThing.Migrations
|
||||
modelBuilder.Entity("EveryThing.Models.CodeTable.CodeTableItem", b =>
|
||||
{
|
||||
b.Navigation("InvoiceItem");
|
||||
|
||||
b.Navigation("ItemProjectPartItem");
|
||||
|
||||
b.Navigation("ItemProjectPartItemMaterial");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.CodeTable.CodeTableJob", b =>
|
||||
@@ -2343,10 +2117,6 @@ namespace EveryThing.Migrations
|
||||
{
|
||||
b.Navigation("Invoice");
|
||||
|
||||
b.Navigation("PartnerProject");
|
||||
|
||||
b.Navigation("PartnerProjectPartItem");
|
||||
|
||||
b.Navigation("PartnerTransportLoadingOrder");
|
||||
|
||||
b.Navigation("PartnerTransportLoadingOrderLoad");
|
||||
@@ -2364,21 +2134,6 @@ namespace EveryThing.Migrations
|
||||
b.Navigation("InvoiceInvoiceItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.Project", b =>
|
||||
{
|
||||
b.Navigation("ProjectProjectPart");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.ProjectPart", b =>
|
||||
{
|
||||
b.Navigation("ProjectPartProjectPartItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Project.ProjectPartItem", b =>
|
||||
{
|
||||
b.Navigation("InvoiceItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EveryThing.Models.Transport.TransportLoadingOrder", b =>
|
||||
{
|
||||
b.Navigation("TransportLoadingOrderLoadUnload");
|
||||
|
||||
Reference in New Issue
Block a user