Aggiunta struttura dati + migrations x tabelle anagrafiche generiche

This commit is contained in:
Samuele Locatelli
2025-09-18 12:10:33 +02:00
parent 0b515dd052
commit c2a5312494
13 changed files with 2629 additions and 42 deletions
+4
View File
@@ -63,6 +63,10 @@ namespace EgwCoreLib.Lux.Data
public virtual DbSet<StockStatusModel> DbSetStockStatus { get; set; }
public virtual DbSet<MovTypeModel> DbSetMovType { get; set; }
public virtual DbSet<StockMovModel> DbSetStockMov { get; set; }
public virtual DbSet<GenClassModel> DbSetGenClass { get; set; }
public virtual DbSet<GenValueModel> DbSetGenVal { get; set; }
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
@@ -0,0 +1,26 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
namespace EgwCoreLib.Lux.Data.DbModel
{
[Table("GenClass")]
public class GenClassModel
{
/// <summary>
/// Cod della classe
/// </summary>
[Key]
public string ClassCod { get; set; } = "";
/// <summary>
/// Descrizione
/// </summary>
public string Description { get; set; } = "";
}
}
@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
namespace EgwCoreLib.Lux.Data.DbModel
{
[Table("GenValue")]
public class GenValueModel
{
/// <summary>
/// ID del record
/// </summary>
[Key]
public int GenValID { get; set; }
/// <summary>
/// Riferimento Classe di appartenenza
/// </summary>
public string ClassCod { get; set; } = "";
/// <summary>
/// Valore ordinale (entro classe)
/// </summary>
public int Ordinal { get; set; } = 0;
/// <summary>
/// Valore String
/// </summary>
public string ValString { get; set; } = "";
/// <summary>
/// Navigazione GenClass
/// </summary>
[ForeignKey("ClassCod")]
public virtual GenClassModel GenClassNav { get; set; } = null!;
}
}
+1 -1
View File
@@ -48,7 +48,7 @@ namespace EgwCoreLib.Lux.Data.DbModel
[NotMapped]
public string OfferRowDtx
{
get => $"OFF{Inserted.Year:yy}{OfferRowID:000000000}";
get => $"OFF{Inserted:yy}{OfferRowID:000000000}";
}
/// <summary>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,290 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace EgwCoreLib.Lux.Data.Migrations
{
/// <inheritdoc />
public partial class AggiuntaGenClassVal : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "GenClass",
columns: table => new
{
ClassCod = table.Column<string>(type: "varchar(255)", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_GenClass", x => x.ClassCod);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "GenValue",
columns: table => new
{
GenValID = table.Column<int>(type: "int", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
ClassCod = table.Column<string>(type: "varchar(255)", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Ordinal = table.Column<int>(type: "int", nullable: false),
ValString = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4")
},
constraints: table =>
{
table.PrimaryKey("PK_GenValue", x => x.GenValID);
table.ForeignKey(
name: "FK_GenValue_GenClass_ClassCod",
column: x => x.ClassCod,
principalTable: "GenClass",
principalColumn: "ClassCod",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.InsertData(
table: "GenClass",
columns: new[] { "ClassCod", "Description" },
values: new object[,]
{
{ "WoodCol", "Elenco Colori Legno" },
{ "WoodMat", "Elenco Materiali Legno" }
});
migrationBuilder.UpdateData(
table: "Offer",
keyColumn: "OfferID",
keyValue: 1,
columns: new[] { "Inserted", "Modified", "ValidUntil" },
values: new object[] { new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9083), new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9084), new DateTime(2025, 10, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9080) });
migrationBuilder.UpdateData(
table: "OfferRowList",
keyColumn: "OfferRowID",
keyValue: 1,
columns: new[] { "Inserted", "Modified", "OfferRowUID" },
values: new object[] { new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9186), new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9188), "OFF250000000001" });
migrationBuilder.UpdateData(
table: "OfferRowList",
keyColumn: "OfferRowID",
keyValue: 2,
columns: new[] { "Inserted", "Modified", "OfferRowUID" },
values: new object[] { new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9200), new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9202), "OFF250000000002" });
migrationBuilder.UpdateData(
table: "OfferRowList",
keyColumn: "OfferRowID",
keyValue: 3,
columns: new[] { "Inserted", "Modified", "OfferRowUID" },
values: new object[] { new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9211), new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9213), "OFF250000000003" });
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 1,
column: "DtCreate",
value: new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8832));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 2,
column: "DtCreate",
value: new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8883));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 3,
column: "DtCreate",
value: new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8886));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 4,
column: "DtCreate",
value: new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8890));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 5,
column: "DtCreate",
value: new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8893));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 6,
column: "DtCreate",
value: new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8897));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 7,
column: "DtCreate",
value: new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8900));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 8,
column: "DtCreate",
value: new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8903));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 9,
column: "DtCreate",
value: new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8907));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 10,
column: "DtCreate",
value: new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8910));
migrationBuilder.InsertData(
table: "GenValue",
columns: new[] { "GenValID", "ClassCod", "Ordinal", "ValString" },
values: new object[,]
{
{ 1, "WoodMat", 1, "Pine" },
{ 2, "WoodMat", 2, "Maple" },
{ 3, "WoodCol", 1, "Lergno" },
{ 4, "WoodCol", 2, "Bianco" },
{ 5, "WoodCol", 3, "Rosso" },
{ 6, "WoodCol", 4, "Nero" }
});
migrationBuilder.CreateIndex(
name: "IX_GenValue_ClassCod",
table: "GenValue",
column: "ClassCod");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "GenValue");
migrationBuilder.DropTable(
name: "GenClass");
migrationBuilder.UpdateData(
table: "Offer",
keyColumn: "OfferID",
keyValue: 1,
columns: new[] { "Inserted", "Modified", "ValidUntil" },
values: new object[] { new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9069), new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9071), new DateTime(2025, 10, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9064) });
migrationBuilder.UpdateData(
table: "OfferRowList",
keyColumn: "OfferRowID",
keyValue: 1,
columns: new[] { "Inserted", "Modified", "OfferRowUID" },
values: new object[] { new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9104), new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9106), "OFF0000000001" });
migrationBuilder.UpdateData(
table: "OfferRowList",
keyColumn: "OfferRowID",
keyValue: 2,
columns: new[] { "Inserted", "Modified", "OfferRowUID" },
values: new object[] { new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9114), new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9116), "OFF0000000002" });
migrationBuilder.UpdateData(
table: "OfferRowList",
keyColumn: "OfferRowID",
keyValue: 3,
columns: new[] { "Inserted", "Modified", "OfferRowUID" },
values: new object[] { new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9123), new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9125), "OFF0000000003" });
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 1,
column: "DtCreate",
value: new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8693));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 2,
column: "DtCreate",
value: new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8785));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 3,
column: "DtCreate",
value: new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8790));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 4,
column: "DtCreate",
value: new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8794));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 5,
column: "DtCreate",
value: new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8799));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 6,
column: "DtCreate",
value: new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8803));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 7,
column: "DtCreate",
value: new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8808));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 8,
column: "DtCreate",
value: new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8812));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 9,
column: "DtCreate",
value: new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8817));
migrationBuilder.UpdateData(
table: "StockMov",
keyColumn: "StockMovID",
keyValue: 10,
column: "DtCreate",
value: new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8821));
}
}
}
@@ -148,6 +148,102 @@ namespace EgwCoreLib.Lux.Data.Migrations
});
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.GenClassModel", b =>
{
b.Property<string>("ClassCod")
.HasColumnType("varchar(255)");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("ClassCod");
b.ToTable("GenClass");
b.HasData(
new
{
ClassCod = "WoodMat",
Description = "Elenco Materiali Legno"
},
new
{
ClassCod = "WoodCol",
Description = "Elenco Colori Legno"
});
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.GenValueModel", b =>
{
b.Property<int>("GenValID")
.ValueGeneratedOnAdd()
.HasColumnType("int");
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("GenValID"));
b.Property<string>("ClassCod")
.IsRequired()
.HasColumnType("varchar(255)");
b.Property<int>("Ordinal")
.HasColumnType("int");
b.Property<string>("ValString")
.IsRequired()
.HasColumnType("longtext");
b.HasKey("GenValID");
b.HasIndex("ClassCod");
b.ToTable("GenValue");
b.HasData(
new
{
GenValID = 1,
ClassCod = "WoodMat",
Ordinal = 1,
ValString = "Pine"
},
new
{
GenValID = 2,
ClassCod = "WoodMat",
Ordinal = 2,
ValString = "Maple"
},
new
{
GenValID = 3,
ClassCod = "WoodCol",
Ordinal = 1,
ValString = "Lergno"
},
new
{
GenValID = 4,
ClassCod = "WoodCol",
Ordinal = 2,
ValString = "Bianco"
},
new
{
GenValID = 5,
ClassCod = "WoodCol",
Ordinal = 3,
ValString = "Rosso"
},
new
{
GenValID = 6,
ClassCod = "WoodCol",
Ordinal = 4,
ValString = "Nero"
});
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ItemGroupModel", b =>
{
b.Property<string>("CodGroup")
@@ -730,13 +826,13 @@ namespace EgwCoreLib.Lux.Data.Migrations
CustomerID = 2,
DealerID = 2,
Description = "Offerta per tre serramenti",
Inserted = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9069),
Modified = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9071),
Inserted = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9083),
Modified = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9084),
OffertState = 0,
RefNum = 1,
RefRev = 1,
RefYear = 2024,
ValidUntil = new DateTime(2025, 10, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9064)
ValidUntil = new DateTime(2025, 10, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9080)
});
});
@@ -814,14 +910,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
BomOk = true,
Cost = 950.0,
Environment = "WINDOW",
Inserted = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9104),
Inserted = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9186),
ItemBOM = "",
ItemOk = true,
ItemSPP = "{}",
Modified = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9106),
Modified = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9188),
Note = "Finestra anta singola 2025",
OfferID = 1,
OfferRowUID = "OFF0000000001",
OfferRowUID = "OFF250000000001",
Qty = 3.0,
RowNum = 1,
SellingItemID = 1,
@@ -833,14 +929,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
BomOk = true,
Cost = 160.0,
Environment = "WINDOW",
Inserted = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9114),
Inserted = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9200),
ItemBOM = "",
ItemOk = true,
ItemSPP = "{}",
Modified = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9116),
Modified = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9202),
Note = "Persiana per Finestra anta singola 2025",
OfferID = 1,
OfferRowUID = "OFF0000000002",
OfferRowUID = "OFF250000000002",
Qty = 3.0,
RowNum = 2,
SellingItemID = 2,
@@ -852,14 +948,14 @@ namespace EgwCoreLib.Lux.Data.Migrations
BomOk = true,
Cost = 200.0,
Environment = "WINDOW",
Inserted = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9123),
Inserted = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9211),
ItemBOM = "",
ItemOk = true,
ItemSPP = "{}",
Modified = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9125),
Modified = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9213),
Note = "Installazione serramento",
OfferID = 1,
OfferRowUID = "OFF0000000003",
OfferRowUID = "OFF250000000003",
Qty = 3.0,
RowNum = 3,
SellingItemID = 3,
@@ -1397,8 +1493,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 1,
CodDoc = "",
DtCreate = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8693),
DtMod = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8782),
DtCreate = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8832),
DtMod = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8880),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 5.0,
@@ -1410,8 +1506,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 2,
CodDoc = "",
DtCreate = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8785),
DtMod = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8787),
DtCreate = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8883),
DtMod = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8884),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 8.0,
@@ -1423,8 +1519,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 3,
CodDoc = "",
DtCreate = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8790),
DtMod = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8792),
DtCreate = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8886),
DtMod = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8888),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 5.0,
@@ -1436,8 +1532,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 4,
CodDoc = "",
DtCreate = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8794),
DtMod = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8796),
DtCreate = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8890),
DtMod = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8891),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -1449,8 +1545,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 5,
CodDoc = "",
DtCreate = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8799),
DtMod = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8801),
DtCreate = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8893),
DtMod = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8894),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 10.0,
@@ -1462,8 +1558,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 6,
CodDoc = "",
DtCreate = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8803),
DtMod = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8805),
DtCreate = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8897),
DtMod = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8898),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -1475,8 +1571,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 7,
CodDoc = "",
DtCreate = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8808),
DtMod = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8809),
DtCreate = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8900),
DtMod = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8901),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 50.0,
@@ -1488,8 +1584,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 8,
CodDoc = "",
DtCreate = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8812),
DtMod = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8814),
DtCreate = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8903),
DtMod = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8905),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -1501,8 +1597,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 9,
CodDoc = "",
DtCreate = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8817),
DtMod = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8818),
DtCreate = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8907),
DtMod = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8908),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -1514,8 +1610,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 10,
CodDoc = "",
DtCreate = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8821),
DtMod = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(8823),
DtCreate = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8910),
DtMod = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8912),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -1747,6 +1843,17 @@ namespace EgwCoreLib.Lux.Data.Migrations
});
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.GenValueModel", b =>
{
b.HasOne("EgwCoreLib.Lux.Data.DbModel.GenClassModel", "GenClassNav")
.WithMany()
.HasForeignKey("ClassCod")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("GenClassNav");
});
modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ItemModel", b =>
{
b.HasOne("EgwCoreLib.Lux.Data.DbModel.ItemGroupModel", "ItemGroupNav")
+24 -4
View File
@@ -18,7 +18,7 @@ namespace EgwCoreLib.Lux.Data
/// <param name="modelBuilder"></param>
public static void Seed(this ModelBuilder modelBuilder)
{
// inizializzazione dei valori di default x Ruoli
// inizializzazione dei valori di default x Ruoli/Tags
modelBuilder.Entity<TagsModel>().HasData(
new TagsModel { TagID = 1, Description = "Tag 01" },
new TagsModel { TagID = 2, Description = "Tag 02" },
@@ -27,6 +27,24 @@ namespace EgwCoreLib.Lux.Data
new TagsModel { TagID = 5, Description = "Tag 05" }
);
// init classi generiche x gestione liste
modelBuilder.Entity<GenClassModel>().HasData(
new GenClassModel { ClassCod = "WoodMat", Description = "Elenco Materiali Legno" },
new GenClassModel { ClassCod = "WoodCol", Description = "Elenco Colori Legno" }
);
modelBuilder.Entity<GenValueModel>().HasData(
new GenValueModel { GenValID=1, Ordinal=1, ClassCod = "WoodMat", ValString = "Pine" },
new GenValueModel { GenValID = 2, Ordinal = 2, ClassCod = "WoodMat", ValString = "Maple" },
new GenValueModel { GenValID = 3, Ordinal = 1, ClassCod = "WoodCol", ValString = "Lergno" },
new GenValueModel { GenValID = 4, Ordinal = 2, ClassCod = "WoodCol", ValString = "Bianco" },
new GenValueModel { GenValID = 5, Ordinal = 3, ClassCod = "WoodCol", ValString = "Rosso" },
new GenValueModel { GenValID = 6, Ordinal = 4, ClassCod = "WoodCol", ValString = "Nero" }
);
// valori base classi generiche
// inizializzazione dei valori di default x Customer
modelBuilder.Entity<CustomerModel>().HasData(
new CustomerModel { CustomerID = 1, FirstName = "Customer A", LastName = "Egalware", VAT = "1234567890123456" },
@@ -203,10 +221,12 @@ namespace EgwCoreLib.Lux.Data
// inizializzazione dei valori di default x OfferRow
modelBuilder.Entity<OfferRowModel>().HasData(
new OfferRowModel { OfferRowID = 1, OfferID = 1, OfferRowUID = "OFF0000000001", Inserted = DateTime.Now, Modified = DateTime.Now, Cost = 950, SellingItemID = 1, Qty = 3, RowNum = 1, SerStruct = "{}", Note = "Finestra anta singola 2025", ItemSPP = "{}", BomOk = true, ItemOk = true },
new OfferRowModel { OfferRowID = 2, OfferID = 1, OfferRowUID = "OFF0000000002", Inserted = DateTime.Now, Modified = DateTime.Now, Cost = 160, SellingItemID = 2, Qty = 3, RowNum = 2, SerStruct = "{}", Note = "Persiana per Finestra anta singola 2025", ItemSPP = "{}", BomOk = true, ItemOk = true },
new OfferRowModel { OfferRowID = 3, OfferID = 1, OfferRowUID = "OFF0000000003", Inserted = DateTime.Now, Modified = DateTime.Now, Cost = 200, SellingItemID = 3, Qty = 3, RowNum = 3, SerStruct = "{}", Note = "Installazione serramento", ItemSPP = "{}", BomOk = true, ItemOk = true }
new OfferRowModel { OfferRowID = 1, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}0000000001", Inserted = DateTime.Now, Modified = DateTime.Now, Cost = 950, SellingItemID = 1, Qty = 3, RowNum = 1, SerStruct = "{}", Note = "Finestra anta singola 2025", ItemSPP = "{}", BomOk = true, ItemOk = true },
new OfferRowModel { OfferRowID = 2, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}0000000002", Inserted = DateTime.Now, Modified = DateTime.Now, Cost = 160, SellingItemID = 2, Qty = 3, RowNum = 2, SerStruct = "{}", Note = "Persiana per Finestra anta singola 2025", ItemSPP = "{}", BomOk = true, ItemOk = true },
new OfferRowModel { OfferRowID = 3, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}0000000003", Inserted = DateTime.Now, Modified = DateTime.Now, Cost = 200, SellingItemID = 3, Qty = 3, RowNum = 3, SerStruct = "{}", Note = "Installazione serramento", ItemSPP = "{}", BomOk = true, ItemOk = true }
);
}
#endregion Public Methods
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>0.9.2509.1807</Version>
<Version>0.9.2509.1812</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50</UserSecretsId>
<Version>0.9.2509.1810</Version>
<Version>0.9.2509.1812</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>LUX - Web Windows MES</i>
<h4>Versione: 0.9.2509.1810</h4>
<h4>Versione: 0.9.2509.1812</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
0.9.2509.1810
0.9.2509.1812
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>0.9.2509.1810</version>
<version>0.9.2509.1812</version>
<url>http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html</changelog>
<mandatory>false</mandatory>