Aggiunta migration x Template

This commit is contained in:
Samuele Locatelli
2026-03-05 14:39:20 +01:00
parent 17944f1bc4
commit df3ae5dc1d
4 changed files with 4563 additions and 36 deletions
+3
View File
@@ -87,6 +87,9 @@ namespace EgwCoreLib.Lux.Data
public virtual DbSet<ProductionODLModel> DbSetProdODL { get; set; }
public virtual DbSet<ProductionItem2ODLModel> DbSetProdItem2ODL { get; set; }
public virtual DbSet<TemplateModel> DbSetTemplate { get; set; }
public virtual DbSet<TemplateRowModel> DbSetTemplateRow { get; set; }
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,240 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace EgwCoreLib.Lux.Data.Migrations
{
/// <inheritdoc />
public partial class TemplateObj : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "SellingItemID",
table: "sales_order_row",
type: "int",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "int",
oldNullable: true);
migrationBuilder.AlterColumn<int>(
name: "SellingItemID",
table: "sales_offer_row",
type: "int",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "int",
oldNullable: true);
migrationBuilder.AddColumn<int>(
name: "SourceType",
table: "item_selling_item",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.CreateTable(
name: "sales_template",
columns: table => new
{
TemplateID = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Envir = table.Column<int>(type: "int", nullable: false),
SourceType = table.Column<int>(type: "int", nullable: false),
Name = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CustomerID = table.Column<int>(type: "int", nullable: false),
DealerID = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_sales_template", x => x.TemplateID);
table.ForeignKey(
name: "FK_sales_template_sales_customer_CustomerID",
column: x => x.CustomerID,
principalTable: "sales_customer",
principalColumn: "CustomerID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_sales_template_sales_dealer_DealerID",
column: x => x.DealerID,
principalTable: "sales_dealer",
principalColumn: "DealerID",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "sales_template_row",
columns: table => new
{
TemplateRowID = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
TemplateID = table.Column<int>(type: "int", nullable: false),
RowNum = table.Column<int>(type: "int", nullable: false),
Envir = table.Column<int>(type: "int", nullable: false),
Name = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
TemplateRowUID = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
SellingItemID = table.Column<int>(type: "int", nullable: false),
Qty = table.Column<double>(type: "double", nullable: false),
BomCost = table.Column<double>(type: "double", nullable: false),
BomPrice = table.Column<double>(type: "double", nullable: false),
StepCost = table.Column<double>(type: "double", nullable: false),
StepPrice = table.Column<double>(type: "double", nullable: false),
StepLeadTime = table.Column<double>(type: "double", nullable: false),
StepFlowTime = table.Column<double>(type: "double", nullable: false),
SerStruct = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
FileResource = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
FileName = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
FileSize = table.Column<long>(type: "bigint", nullable: false),
ItemBOM = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ItemJCD = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ItemTags = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ProdItemQty = table.Column<int>(type: "int", nullable: false),
JobID = table.Column<int>(type: "int", nullable: false),
ItemSteps = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
BomOk = table.Column<bool>(type: "tinyint(1)", nullable: false),
ItemOk = table.Column<bool>(type: "tinyint(1)", nullable: false),
Note = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
AwaitBom = table.Column<bool>(type: "tinyint(1)", nullable: false),
AwaitPrice = table.Column<bool>(type: "tinyint(1)", nullable: false),
Inserted = table.Column<DateTime>(type: "datetime(6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_sales_template_row", x => x.TemplateRowID);
table.ForeignKey(
name: "FK_sales_template_row_item_selling_item_SellingItemID",
column: x => x.SellingItemID,
principalTable: "item_selling_item",
principalColumn: "SellingItemID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_sales_template_row_sales_template_TemplateID",
column: x => x.TemplateID,
principalTable: "sales_template",
principalColumn: "TemplateID",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.UpdateData(
table: "item_selling_item",
keyColumn: "SellingItemID",
keyValue: 1,
column: "SourceType",
value: 0);
migrationBuilder.UpdateData(
table: "item_selling_item",
keyColumn: "SellingItemID",
keyValue: 2,
column: "SourceType",
value: 0);
migrationBuilder.UpdateData(
table: "item_selling_item",
keyColumn: "SellingItemID",
keyValue: 3,
column: "SourceType",
value: 0);
migrationBuilder.UpdateData(
table: "item_selling_item",
keyColumn: "SellingItemID",
keyValue: 4,
column: "SourceType",
value: 0);
migrationBuilder.UpdateData(
table: "item_selling_item",
keyColumn: "SellingItemID",
keyValue: 5,
column: "SourceType",
value: 0);
migrationBuilder.UpdateData(
table: "item_selling_item",
keyColumn: "SellingItemID",
keyValue: 6,
column: "SourceType",
value: 0);
migrationBuilder.UpdateData(
table: "item_selling_item",
keyColumn: "SellingItemID",
keyValue: 7,
column: "SourceType",
value: 0);
migrationBuilder.CreateIndex(
name: "IX_sales_template_CustomerID",
table: "sales_template",
column: "CustomerID");
migrationBuilder.CreateIndex(
name: "IX_sales_template_DealerID",
table: "sales_template",
column: "DealerID");
migrationBuilder.CreateIndex(
name: "IX_sales_template_row_SellingItemID",
table: "sales_template_row",
column: "SellingItemID");
migrationBuilder.CreateIndex(
name: "IX_sales_template_row_TemplateID",
table: "sales_template_row",
column: "TemplateID");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "sales_template_row");
migrationBuilder.DropTable(
name: "sales_template");
migrationBuilder.DropColumn(
name: "SourceType",
table: "item_selling_item");
migrationBuilder.AlterColumn<int>(
name: "SellingItemID",
table: "sales_order_row",
type: "int",
nullable: true,
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.AlterColumn<int>(
name: "SellingItemID",
table: "sales_offer_row",
type: "int",
nullable: true,
oldClrType: typeof(int),
oldType: "int");
}
}
}
@@ -867,6 +867,9 @@ namespace EgwCoreLib.Lux.Data.Migrations
.IsRequired()
.HasColumnType("longtext");
b.Property<int>("SourceType")
.HasColumnType("int");
b.Property<string>("SupplCode")
.IsRequired()
.HasColumnType("longtext");
@@ -895,6 +898,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
JobID = 2,
Margin = 0.20000000000000001,
SerStruct = "{\"ProfilePath\": \"Profilo78\",\"Material\": \"Pino\",\"ColorMaterial\": \"Black\",\"Glass\": \"Vetro BE 2S 4T/16/4T\",\"AreaList\": [{\"Shape\": \"RECTANGLE\",\"DimensionList\": [{\"Index\": 1,\"Name\": \"Width\",\"Value\": 800.0},{\"Index\": 2,\"Name\": \"Height\",\"Value\": 1200.0}],\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"BottomRail\": false,\"BottomRailQty\": 0,\"GroupId\": 1,\"AreaList\": [{\"IsSashVertical\": true,\"SashList\": [{\"SashId\": 1,\"OpeningType\": \"TILTTURN_LEFT\",\"HasHandle\": true,\"Dimension\": 100.0}],\"SashType\": \"NULL\",\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"Hardware\": \"000635\",\"HwOptionList\": [{\"Name\": \"Entrata\",\"Value\": \"15\"},{\"Name\": \"LavManigliaPassante\",\"Value\": \"false\"},{\"Name\": \"PosizioneForoCilindro\",\"Value\": \"sotto\"},{\"Name\": \"Deviatore\",\"Value\": \"false\"},{\"Name\": \"ModelloCilindro\",\"Value\": \"c999\"},{\"Name\": \"LavCilindroPassante\",\"Value\": \"false\"},{\"Name\": \"HMan\",\"Value\": \"400\"}],\"GroupId\": 2,\"AreaList\": [{\"FillType\": \"GLASS\",\"GroupId\": 3,\"AreaList\": [],\"AreaType\": \"FILL\"}],\"AreaType\": \"SASH\"}],\"AreaType\": \"FRAME\"}]}",
SourceType = 0,
SupplCode = "",
UM = "#"
},
@@ -911,6 +915,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
JobID = 2,
Margin = 0.20000000000000001,
SerStruct = "{\"ProfilePath\": \"Profilo78\",\"Material\": \"Pino\",\"ColorMaterial\": \"Black\",\"Glass\": \"Vetro BE 2S 4T/16/4T\",\"AreaList\": [{\"Shape\": \"RECTANGLE\",\"DimensionList\": [{\"Index\": 1,\"Name\": \"Width\",\"Value\": 800.0},{\"Index\": 2,\"Name\": \"Height\",\"Value\": 1200.0}],\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"BottomRail\": false,\"BottomRailQty\": 0,\"GroupId\": 1,\"AreaList\": [{\"IsSashVertical\": true,\"SashList\": [{\"SashId\": 1,\"OpeningType\": \"TILTTURN_LEFT\",\"HasHandle\": true,\"Dimension\": 100.0}],\"SashType\": \"NULL\",\"JointList\": [{\"Index\": 1,\"JointType\": \"FULL_H\"},{\"Index\": 2,\"JointType\": \"FULL_H\"},{\"Index\": 3,\"JointType\": \"FULL_H\"},{\"Index\": 4,\"JointType\": \"FULL_H\"}],\"Hardware\": \"000635\",\"HwOptionList\": [{\"Name\": \"Entrata\",\"Value\": \"15\"},{\"Name\": \"LavManigliaPassante\",\"Value\": \"false\"},{\"Name\": \"PosizioneForoCilindro\",\"Value\": \"sotto\"},{\"Name\": \"Deviatore\",\"Value\": \"false\"},{\"Name\": \"ModelloCilindro\",\"Value\": \"c999\"},{\"Name\": \"LavCilindroPassante\",\"Value\": \"false\"},{\"Name\": \"HMan\",\"Value\": \"400\"}],\"GroupId\": 2,\"AreaList\": [{\"FillType\": \"GLASS\",\"GroupId\": 3,\"AreaList\": [],\"AreaType\": \"FILL\"}],\"AreaType\": \"SASH\"}],\"AreaType\": \"FRAME\"}]}",
SourceType = 0,
SupplCode = "",
UM = "#"
},
@@ -927,6 +932,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
JobID = 1,
Margin = 0.10000000000000001,
SerStruct = "",
SourceType = 0,
SupplCode = "",
UM = "#"
},
@@ -943,6 +949,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
JobID = 1,
Margin = 0.29999999999999999,
SerStruct = "",
SourceType = 0,
SupplCode = "",
UM = "#"
},
@@ -959,6 +966,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
JobID = 3,
Margin = 0.29999999999999999,
SerStruct = "",
SourceType = 0,
SupplCode = "",
UM = "#"
},
@@ -975,6 +983,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
JobID = 4,
Margin = 0.29999999999999999,
SerStruct = "",
SourceType = 0,
SupplCode = "",
UM = "#"
},
@@ -991,6 +1000,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
JobID = 5,
Margin = 0.29999999999999999,
SerStruct = "",
SourceType = 0,
SupplCode = "",
UM = "#"
});
@@ -1465,8 +1475,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
Description = "Offerta per tre serramenti",
DictPresel = "",
Discount = 0.0,
DueDateProm = new DateTime(2026, 3, 27, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2026, 2, 25, 0, 0, 0, 0, DateTimeKind.Local),
DueDateProm = new DateTime(2026, 5, 4, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2026, 4, 4, 0, 0, 0, 0, DateTimeKind.Local),
Envir = 1,
Inserted = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Modified = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
@@ -1474,7 +1484,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
RefNum = 1,
RefRev = 1,
RefYear = 2025,
ValidUntil = new DateTime(2026, 2, 26, 16, 26, 31, 274, DateTimeKind.Local).AddTicks(325)
ValidUntil = new DateTime(2026, 4, 5, 10, 28, 8, 982, DateTimeKind.Local).AddTicks(2126)
},
new
{
@@ -1485,8 +1495,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
Description = "Offerta BEAM",
DictPresel = "",
Discount = 0.0,
DueDateProm = new DateTime(2026, 3, 27, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2026, 2, 25, 0, 0, 0, 0, DateTimeKind.Local),
DueDateProm = new DateTime(2026, 5, 4, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2026, 4, 4, 0, 0, 0, 0, DateTimeKind.Local),
Envir = 2,
Inserted = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Modified = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
@@ -1494,7 +1504,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
RefNum = 2,
RefRev = 1,
RefYear = 2025,
ValidUntil = new DateTime(2026, 2, 26, 16, 26, 31, 274, DateTimeKind.Local).AddTicks(346)
ValidUntil = new DateTime(2026, 4, 5, 10, 28, 8, 982, DateTimeKind.Local).AddTicks(2142)
},
new
{
@@ -1505,8 +1515,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
Description = "Offerta Cabinet",
DictPresel = "",
Discount = 0.0,
DueDateProm = new DateTime(2026, 3, 27, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2026, 2, 25, 0, 0, 0, 0, DateTimeKind.Local),
DueDateProm = new DateTime(2026, 5, 4, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2026, 4, 4, 0, 0, 0, 0, DateTimeKind.Local),
Envir = 4,
Inserted = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Modified = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
@@ -1514,7 +1524,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
RefNum = 3,
RefRev = 1,
RefYear = 2025,
ValidUntil = new DateTime(2026, 2, 26, 16, 26, 31, 274, DateTimeKind.Local).AddTicks(352)
ValidUntil = new DateTime(2026, 4, 5, 10, 28, 8, 982, DateTimeKind.Local).AddTicks(2162)
},
new
{
@@ -1525,8 +1535,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
Description = "Offerta Wall",
DictPresel = "",
Discount = 0.0,
DueDateProm = new DateTime(2026, 3, 27, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2026, 2, 25, 0, 0, 0, 0, DateTimeKind.Local),
DueDateProm = new DateTime(2026, 5, 4, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2026, 4, 4, 0, 0, 0, 0, DateTimeKind.Local),
Envir = 3,
Inserted = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
Modified = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
@@ -1534,7 +1544,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
RefNum = 4,
RefRev = 1,
RefYear = 2025,
ValidUntil = new DateTime(2026, 2, 26, 16, 26, 31, 274, DateTimeKind.Local).AddTicks(359)
ValidUntil = new DateTime(2026, 4, 5, 10, 28, 8, 982, DateTimeKind.Local).AddTicks(2176)
});
});
@@ -1623,7 +1633,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.Property<int>("RowNum")
.HasColumnType("int");
b.Property<int?>("SellingItemID")
b.Property<int>("SellingItemID")
.HasColumnType("int");
b.Property<string>("SerStruct")
@@ -1663,14 +1673,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Inserted = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Modified = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
Note = "Finestra Anta Singola 2025",
OfferID = 1,
OfferRowUID = "SOR.26.00000002",
@@ -1696,14 +1706,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Inserted = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Modified = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
Note = "Finestra Vetro Fisso 2025",
OfferID = 1,
OfferRowUID = "SOR.26.00000001",
@@ -1729,14 +1739,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Inserted = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Modified = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
Note = "Persiana per Finestra anta singola 2025",
OfferID = 1,
OfferRowUID = "SOR.26.00000003",
@@ -1762,14 +1772,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Inserted = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Modified = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
Note = "Installazione serramento",
OfferID = 1,
OfferRowUID = "SOR.26.00000004",
@@ -1795,14 +1805,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Inserted = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Modified = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
Note = "Demo file 01",
OfferID = 2,
OfferRowUID = "SOR.26.00000005",
@@ -1828,14 +1838,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Inserted = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Modified = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
Note = "Demo file 02",
OfferID = 2,
OfferRowUID = "SOR.26.00000006",
@@ -1861,14 +1871,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Inserted = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Modified = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
Note = "Demo file 01",
OfferID = 3,
OfferRowUID = "SOR.26.00000007",
@@ -1894,14 +1904,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Inserted = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Modified = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
Note = "Demo file 02",
OfferID = 3,
OfferRowUID = "SOR.26.00000008",
@@ -1927,14 +1937,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Inserted = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Modified = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
Note = "Demo file 01",
OfferID = 4,
OfferRowUID = "SOR.26.00000009",
@@ -1960,14 +1970,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Inserted = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
ItemBOM = "",
ItemJCD = "",
ItemOk = true,
ItemSteps = "{}",
ItemTags = "",
JobID = 0,
Modified = new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local),
Modified = new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local),
Note = "Demo file 02",
OfferID = 4,
OfferRowUID = "SOR.26.0000000A",
@@ -2155,7 +2165,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.Property<int>("RowNum")
.HasColumnType("int");
b.Property<int?>("SellingItemID")
b.Property<int>("SellingItemID")
.HasColumnType("int");
b.Property<string>("SerStruct")
@@ -2183,6 +2193,157 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.ToTable("sales_order_row");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.TemplateModel", b =>
{
b.Property<int>("TemplateID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("TemplateID"));
b.Property<int>("CustomerID")
.HasColumnType("int");
b.Property<int>("DealerID")
.HasColumnType("int");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("longtext");
b.Property<int>("Envir")
.HasColumnType("int");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext");
b.Property<int>("SourceType")
.HasColumnType("int");
b.HasKey("TemplateID");
b.HasIndex("CustomerID");
b.HasIndex("DealerID");
b.ToTable("sales_template");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.TemplateRowModel", b =>
{
b.Property<int>("TemplateRowID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("TemplateRowID"));
b.Property<bool>("AwaitBom")
.HasColumnType("tinyint(1)");
b.Property<bool>("AwaitPrice")
.HasColumnType("tinyint(1)");
b.Property<double>("BomCost")
.HasColumnType("double");
b.Property<bool>("BomOk")
.HasColumnType("tinyint(1)");
b.Property<double>("BomPrice")
.HasColumnType("double");
b.Property<int>("Envir")
.HasColumnType("int");
b.Property<string>("FileName")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("FileResource")
.IsRequired()
.HasColumnType("longtext");
b.Property<long>("FileSize")
.HasColumnType("bigint");
b.Property<DateTime>("Inserted")
.HasColumnType("datetime(6)");
b.Property<string>("ItemBOM")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("ItemJCD")
.IsRequired()
.HasColumnType("longtext");
b.Property<bool>("ItemOk")
.HasColumnType("tinyint(1)");
b.Property<string>("ItemSteps")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("ItemTags")
.IsRequired()
.HasColumnType("longtext");
b.Property<int>("JobID")
.HasColumnType("int");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("longtext");
b.Property<int>("ProdItemQty")
.HasColumnType("int");
b.Property<double>("Qty")
.HasColumnType("double");
b.Property<int>("RowNum")
.HasColumnType("int");
b.Property<int>("SellingItemID")
.HasColumnType("int");
b.Property<string>("SerStruct")
.IsRequired()
.HasColumnType("longtext");
b.Property<double>("StepCost")
.HasColumnType("double");
b.Property<double>("StepFlowTime")
.HasColumnType("double");
b.Property<double>("StepLeadTime")
.HasColumnType("double");
b.Property<double>("StepPrice")
.HasColumnType("double");
b.Property<int>("TemplateID")
.HasColumnType("int");
b.Property<string>("TemplateRowUID")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("TemplateRowID");
b.HasIndex("SellingItemID");
b.HasIndex("TemplateID");
b.ToTable("sales_template_row");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stats.StatsAggregatedModel", b =>
{
b.Property<int>("Id")
@@ -3588,7 +3749,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav")
.WithMany()
.HasForeignKey("SellingItemID")
.OnDelete(DeleteBehavior.Restrict);
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("OfferNav");
@@ -3633,13 +3795,52 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav")
.WithMany()
.HasForeignKey("SellingItemID")
.OnDelete(DeleteBehavior.Restrict);
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("OrderNav");
b.Navigation("SellingItemNav");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.TemplateModel", b =>
{
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", "CustomerNav")
.WithMany()
.HasForeignKey("CustomerID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", "DealerNav")
.WithMany()
.HasForeignKey("DealerID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("CustomerNav");
b.Navigation("DealerNav");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.TemplateRowModel", b =>
{
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav")
.WithMany()
.HasForeignKey("SellingItemID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.TemplateModel", "TemplateNav")
.WithMany("TemplateRowNav")
.HasForeignKey("TemplateID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("SellingItemNav");
b.Navigation("TemplateNav");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b =>
{
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", "MovTypeNav")
@@ -3840,6 +4041,11 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.Navigation("ProdItemNav");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.TemplateModel", b =>
{
b.Navigation("TemplateRowNav");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b =>
{
b.Navigation("TagNav");