From c2a53124940e02ba4649fff566a4d7a71ee6ddee Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 18 Sep 2025 12:10:33 +0200 Subject: [PATCH 01/65] Aggiunta struttura dati + migrations x tabelle anagrafiche generiche --- EgwCoreLib.Lux.Data/DataLayerContext.cs | 4 + EgwCoreLib.Lux.Data/DbModel/GenClassModel.cs | 26 + EgwCoreLib.Lux.Data/DbModel/GenValueModel.cs | 45 + EgwCoreLib.Lux.Data/DbModel/OfferRowModel.cs | 2 +- ...0918100936_AggiuntaGenClassVal.Designer.cs | 2095 +++++++++++++++++ .../20250918100936_AggiuntaGenClassVal.cs | 290 +++ .../DataLayerContextModelSnapshot.cs | 171 +- EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs | 28 +- Lux.API/Lux.API.csproj | 2 +- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 13 files changed, 2629 insertions(+), 42 deletions(-) create mode 100644 EgwCoreLib.Lux.Data/DbModel/GenClassModel.cs create mode 100644 EgwCoreLib.Lux.Data/DbModel/GenValueModel.cs create mode 100644 EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.Designer.cs create mode 100644 EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.cs diff --git a/EgwCoreLib.Lux.Data/DataLayerContext.cs b/EgwCoreLib.Lux.Data/DataLayerContext.cs index 90cdcf13..2e3acfcc 100644 --- a/EgwCoreLib.Lux.Data/DataLayerContext.cs +++ b/EgwCoreLib.Lux.Data/DataLayerContext.cs @@ -63,6 +63,10 @@ namespace EgwCoreLib.Lux.Data public virtual DbSet DbSetStockStatus { get; set; } public virtual DbSet DbSetMovType { get; set; } public virtual DbSet DbSetStockMov { get; set; } + public virtual DbSet DbSetGenClass { get; set; } + public virtual DbSet DbSetGenVal { get; set; } + + partial void OnModelCreatingPartial(ModelBuilder modelBuilder); diff --git a/EgwCoreLib.Lux.Data/DbModel/GenClassModel.cs b/EgwCoreLib.Lux.Data/DbModel/GenClassModel.cs new file mode 100644 index 00000000..888c6791 --- /dev/null +++ b/EgwCoreLib.Lux.Data/DbModel/GenClassModel.cs @@ -0,0 +1,26 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace EgwCoreLib.Lux.Data.DbModel +{ + + [Table("GenClass")] + public class GenClassModel + { + /// + /// Cod della classe + /// + [Key] + public string ClassCod { get; set; } = ""; + + /// + /// Descrizione + /// + public string Description { get; set; } = ""; + + + } +} diff --git a/EgwCoreLib.Lux.Data/DbModel/GenValueModel.cs b/EgwCoreLib.Lux.Data/DbModel/GenValueModel.cs new file mode 100644 index 00000000..2a339c43 --- /dev/null +++ b/EgwCoreLib.Lux.Data/DbModel/GenValueModel.cs @@ -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; + +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace EgwCoreLib.Lux.Data.DbModel +{ + + [Table("GenValue")] + public class GenValueModel + { + /// + /// ID del record + /// + [Key] + public int GenValID { get; set; } + + /// + /// Riferimento Classe di appartenenza + /// + public string ClassCod { get; set; } = ""; + + /// + /// Valore ordinale (entro classe) + /// + public int Ordinal { get; set; } = 0; + + /// + /// Valore String + /// + public string ValString { get; set; } = ""; + + /// + /// Navigazione GenClass + /// + [ForeignKey("ClassCod")] + public virtual GenClassModel GenClassNav { get; set; } = null!; + } +} diff --git a/EgwCoreLib.Lux.Data/DbModel/OfferRowModel.cs b/EgwCoreLib.Lux.Data/DbModel/OfferRowModel.cs index 48295e22..9050931b 100644 --- a/EgwCoreLib.Lux.Data/DbModel/OfferRowModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/OfferRowModel.cs @@ -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}"; } /// diff --git a/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.Designer.cs new file mode 100644 index 00000000..32afbed2 --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.Designer.cs @@ -0,0 +1,2095 @@ +// +using System; +using EgwCoreLib.Lux.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace EgwCoreLib.Lux.Data.Migrations +{ + [DbContext(typeof(DataLayerContext))] + [Migration("20250918100936_AggiuntaGenClassVal")] + partial class AggiuntaGenClassVal + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.17") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.CounterModel", b => + { + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("CountName") + .HasColumnType("varchar(255)"); + + b.Property("Counter") + .HasColumnType("int"); + + b.HasKey("RefYear", "CountName"); + + b.ToTable("Counter"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.CustomerModel", b => + { + b.Property("CustomerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CustomerID"); + + b.ToTable("RegCustomer"); + + b.HasData( + new + { + CustomerID = 1, + CompanyName = "", + FirstName = "Customer A", + LastName = "Egalware", + VAT = "1234567890123456" + }, + new + { + CustomerID = 2, + CompanyName = "", + FirstName = "Customer B", + LastName = "User", + VAT = "1234567890123456" + }, + new + { + CustomerID = 3, + CompanyName = "", + FirstName = "Customer C", + LastName = "User Test", + VAT = "1234567890123456" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.DealerModel", b => + { + b.Property("DealerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("DealerID"); + + b.ToTable("RegDealer"); + + b.HasData( + new + { + DealerID = 1, + CompanyName = "Company First", + FirstName = "Dealer A", + LastName = "Egalware", + VAT = "9587362514671527" + }, + new + { + DealerID = 2, + CompanyName = "Company First", + FirstName = "Dealer B", + LastName = "User", + VAT = "9587362514671527" + }, + new + { + DealerID = 3, + CompanyName = "Company Second", + FirstName = "Dealer C", + LastName = "User Test", + VAT = "9587362514671527" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.GenClassModel", b => + { + b.Property("ClassCod") + .HasColumnType("varchar(255)"); + + b.Property("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("GenValID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); + + b.Property("ClassCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Ordinal") + .HasColumnType("int"); + + b.Property("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("CodGroup") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CodGroup"); + + b.ToTable("RegItemGroup"); + + b.HasData( + new + { + CodGroup = "WindowTrunk", + Description = "Barre legno per lavorazione" + }, + new + { + CodGroup = "WindowGlass", + Description = "Vetri serramento" + }, + new + { + CodGroup = "WindowVarnish", + Description = "Vernici per legno" + }, + new + { + CodGroup = "WindowHardware", + Description = "Ferramenta serramento" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ItemModel", b => + { + b.Property("ItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); + + b.Property("CodGroup") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemIDParent") + .HasColumnType("int"); + + b.Property("ItemType") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("QtyMax") + .HasColumnType("double"); + + b.Property("QtyMin") + .HasColumnType("double"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ItemID"); + + b.HasIndex("CodGroup"); + + b.ToTable("RegItem"); + + b.HasData( + new + { + ItemID = 1, + CodGroup = "WindowTrunk", + Cost = 20.0, + Description = "BARRA-60x80 generica", + ExtItemCode = "", + IsService = false, + ItemCode = 1001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.29999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "BARR.001", + UM = "#" + }, + new + { + ItemID = 2, + CodGroup = "WindowTrunk", + Cost = 16.5, + Description = "Barra 60x80, lunghezza 12m", + ExtItemCode = "BARRA-60x80x12000", + IsService = false, + ItemCode = 1002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.12000", + UM = "#" + }, + new + { + ItemID = 3, + CodGroup = "WindowTrunk", + Cost = 17.5, + Description = "Barra 60x80, lunghezza 8m", + ExtItemCode = "BARRA-60x80x8000", + IsService = false, + ItemCode = 1003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.22, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.8000", + UM = "#" + }, + new + { + ItemID = 4, + CodGroup = "WindowTrunk", + Cost = 15.5, + Description = "Barra 60x80, lunghezza 16m", + ExtItemCode = "BARRA-60x80x16000", + IsService = false, + ItemCode = 1004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.16000", + UM = "#" + }, + new + { + ItemID = 5, + CodGroup = "WindowGlass", + Cost = 300.0, + Description = "Vetro triplo, basso indice termico, 800x1000", + ExtItemCode = "VETRO-3L-THERMO-800x1000", + IsService = false, + ItemCode = 2001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3T.800.1000", + UM = "m2" + }, + new + { + ItemID = 6, + CodGroup = "WindowGlass", + Cost = 200.0, + Description = "Vetro doppio, 800x1000", + ExtItemCode = "VETRO-2L-800x1000", + IsService = false, + ItemCode = 2002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.14999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V2.800.1000", + UM = "m2" + }, + new + { + ItemID = 7, + CodGroup = "WindowGlass", + Cost = 250.0, + Description = "Vetro triplo, 800x1000", + ExtItemCode = "VETRO-3L-800x1000", + IsService = false, + ItemCode = 2003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.17999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3.800.1000", + UM = "m2" + }, + new + { + ItemID = 8, + CodGroup = "WindowVarnish", + Cost = 20.0, + Description = "Vernice trasparente", + ExtItemCode = "VERN-TRASP", + IsService = false, + ItemCode = 3001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "VT.STD", + UM = "l" + }, + new + { + ItemID = 9, + CodGroup = "WindowHardware", + Cost = 65.0, + Description = "Kit standard completo AGB tipo 001", + ExtItemCode = "KIT-001", + IsService = false, + ItemCode = 5001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-KIT-001", + UM = "#" + }, + new + { + ItemID = 10, + CodGroup = "WindowHardware", + Cost = 10.0, + Description = "Cerniera AGB tipo 001", + ExtItemCode = "CERN-001", + IsService = false, + ItemCode = 5002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-CERN-001", + UM = "#" + }, + new + { + ItemID = 11, + CodGroup = "WindowHardware", + Cost = 15.0, + Description = "Serratura AGB tipo 001", + ExtItemCode = "SERR-001", + IsService = false, + ItemCode = 5003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-SERR-001", + UM = "#" + }, + new + { + ItemID = 12, + CodGroup = "WindowHardware", + Cost = 25.0, + Description = "Maniglia AGB tipo 001", + ExtItemCode = "MAN-001", + IsService = false, + ItemCode = 5004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-MAN-001", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobModel", b => + { + b.Property("JobID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("JobID"); + + b.ToTable("JobList"); + + b.HasData( + new + { + JobID = 1, + Description = "Rivendita / servizi" + }, + new + { + JobID = 2, + Description = "Serramento Completo Legno su linea Saomad e installatore interno" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowItemModel", b => + { + b.Property("JobRowItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobRowItemID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("JobRowID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.HasKey("JobRowItemID"); + + b.HasIndex("ItemID"); + + b.HasIndex("JobRowID"); + + b.ToTable("JobRowItemList"); + + b.HasData( + new + { + JobRowItemID = 1, + Description = "Grezzo legno abete", + Index = 1, + ItemID = 1, + JobRowID = 1, + Qty = 1.0 + }, + new + { + JobRowItemID = 2, + Description = "Vernice trasparente standard 1L", + Index = 2, + ItemID = 8, + JobRowID = 3, + Qty = 0.10000000000000001 + }, + new + { + JobRowItemID = 3, + Description = "Ferramenta AGB - rif. AGFD.00000.00000", + Index = 3, + ItemID = 9, + JobRowID = 4, + Qty = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowModel", b => + { + b.Property("JobRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobRowID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.HasKey("JobRowID"); + + b.HasIndex("JobID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ResourceID"); + + b.ToTable("JobRowList"); + + b.HasData( + new + { + JobRowID = 1, + Description = "", + Index = 1, + JobID = 2, + PhaseID = 1, + Qty = 1.0, + ResourceID = 1 + }, + new + { + JobRowID = 2, + Description = "", + Index = 2, + JobID = 2, + PhaseID = 2, + Qty = 1.0, + ResourceID = 2 + }, + new + { + JobRowID = 3, + Description = "", + Index = 3, + JobID = 2, + PhaseID = 3, + Qty = 1.0, + ResourceID = 4 + }, + new + { + JobRowID = 4, + Description = "", + Index = 4, + JobID = 2, + PhaseID = 4, + Qty = 1.0, + ResourceID = 6 + }, + new + { + JobRowID = 5, + Description = "", + Index = 5, + JobID = 2, + PhaseID = 6, + Qty = 1.0, + ResourceID = 7 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.MovTypeModel", b => + { + b.Property("MovCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("MovCod"); + + b.ToTable("RegMovType"); + + b.HasData( + new + { + MovCod = "CAR", + Description = "Carico a magazzino" + }, + new + { + MovCod = "MOV", + Description = "Movimento interno (spostamento)" + }, + new + { + MovCod = "ND", + Description = "Non Definito" + }, + new + { + MovCod = "OFOR", + Description = "Ordine Fornitore" + }, + new + { + MovCod = "RETT", + Description = "Rettifica magazzino" + }, + new + { + MovCod = "SCAR", + Description = "Scarico da magazzino" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferModel", b => + { + b.Property("OfferID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OfferID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.ToTable("Offer"); + + b.HasData( + new + { + OfferID = 1, + CustomerID = 2, + DealerID = 2, + Description = "Offerta per tre serramenti", + 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, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9080) + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferRowModel", b => + { + b.Property("OfferRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); + + b.Property("BomOk") + .HasColumnType("tinyint(1)"); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Environment") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemBOM") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemOk") + .HasColumnType("tinyint(1)"); + + b.Property("ItemSPP") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OfferRowUID") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("OfferRowID"); + + b.HasIndex("OfferID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("OfferRowList"); + + b.HasData( + new + { + OfferRowID = 1, + BomOk = true, + Cost = 950.0, + Environment = "WINDOW", + Inserted = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9186), + ItemBOM = "", + ItemOk = true, + ItemSPP = "{}", + Modified = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9188), + Note = "Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000000001", + Qty = 3.0, + RowNum = 1, + SellingItemID = 1, + SerStruct = "{}" + }, + new + { + OfferRowID = 2, + BomOk = true, + Cost = 160.0, + Environment = "WINDOW", + Inserted = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9200), + ItemBOM = "", + ItemOk = true, + ItemSPP = "{}", + Modified = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9202), + Note = "Persiana per Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000000002", + Qty = 3.0, + RowNum = 2, + SellingItemID = 2, + SerStruct = "{}" + }, + new + { + OfferRowID = 3, + BomOk = true, + Cost = 200.0, + Environment = "WINDOW", + Inserted = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9211), + ItemBOM = "", + ItemOk = true, + ItemSPP = "{}", + Modified = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9213), + Note = "Installazione serramento", + OfferID = 1, + OfferRowUID = "OFF250000000003", + Qty = 3.0, + RowNum = 3, + SellingItemID = 3, + SerStruct = "{}" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderModel", b => + { + b.Property("OrderID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OrderID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.HasIndex("OfferID"); + + b.ToTable("Order"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderRowModel", b => + { + b.Property("OrderRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemSPP") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OrderID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("OrderRowID"); + + b.HasIndex("OrderID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("OrderRowList"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.PhaseModel", b => + { + b.Property("PhaseID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("PhaseID"); + + b.ToTable("RegPhase"); + + b.HasData( + new + { + PhaseID = 1, + Description = "Taglio tronchetti" + }, + new + { + PhaseID = 2, + Description = "Lavorazione pezzi serramento" + }, + new + { + PhaseID = 3, + Description = "Verniciatura" + }, + new + { + PhaseID = 4, + Description = "Assemblaggio completo" + }, + new + { + PhaseID = 5, + Description = "Assemblaggio Ferramenta" + }, + new + { + PhaseID = 6, + Description = "Installazione e posa in opera" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionBatchModel", b => + { + b.Property("ProductionBatchID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DueDate") + .HasColumnType("datetime(6)"); + + b.HasKey("ProductionBatchID"); + + b.ToTable("ProductionBatch"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemModel", b => + { + b.Property("ProdItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("OrderRowID") + .HasColumnType("int"); + + b.Property("ProductionBatchID") + .HasColumnType("int"); + + b.HasKey("ProdItemID"); + + b.HasIndex("OrderRowID"); + + b.HasIndex("ProductionBatchID"); + + b.ToTable("ProductionItem"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemRowModel", b => + { + b.Property("ProdItemRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemRowID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProdItemID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.Property("WorkTime") + .HasColumnType("double"); + + b.HasKey("ProdItemRowID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ProdItemID"); + + b.HasIndex("ResourceID"); + + b.ToTable("ProductionItemRowList"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ResourceModel", b => + { + b.Property("ResourceID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsAsset") + .HasColumnType("tinyint(1)"); + + b.Property("IsHuman") + .HasColumnType("tinyint(1)"); + + b.Property("UmFix") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UmProp") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UnitCostFix") + .HasColumnType("double"); + + b.Property("UnitCostProp") + .HasColumnType("double"); + + b.HasKey("ResourceID"); + + b.ToTable("RegResource"); + + b.HasData( + new + { + ResourceID = 1, + Description = "Sezionatrice", + IsAsset = true, + IsHuman = false, + UmFix = "€/h", + UmProp = "", + UnitCostFix = 15.0, + UnitCostProp = 0.0 + }, + new + { + ResourceID = 2, + Description = "Linea SAOMAD WoodPecker Just 3500", + IsAsset = true, + IsHuman = false, + UmFix = "€/h", + UmProp = "€/m", + UnitCostFix = 240.0, + UnitCostProp = 1.8999999999999999 + }, + new + { + ResourceID = 3, + Description = "Linea Pantografo", + IsAsset = true, + IsHuman = false, + UmFix = "€/h", + UmProp = "€/m", + UnitCostFix = 90.0, + UnitCostProp = 5.9000000000000004 + }, + new + { + ResourceID = 4, + Description = "Stazione Verniciatura", + IsAsset = true, + IsHuman = false, + UmFix = "€/h", + UmProp = "€/m", + UnitCostFix = 40.0, + UnitCostProp = 1.8999999999999999 + }, + new + { + ResourceID = 5, + Description = "Verniciatura Manuale", + IsAsset = false, + IsHuman = true, + UmFix = "€/h", + UmProp = "€/m", + UnitCostFix = 10.0, + UnitCostProp = 1.8999999999999999 + }, + new + { + ResourceID = 6, + Description = "Montaggio Manuale", + IsAsset = false, + IsHuman = true, + UmFix = "", + UmProp = "€/h", + UnitCostFix = 0.0, + UnitCostProp = 40.0 + }, + new + { + ResourceID = 7, + Description = "Installatore", + IsAsset = false, + IsHuman = true, + UmFix = "", + UmProp = "€/h", + UnitCostFix = 0.0, + UnitCostProp = 40.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", b => + { + b.Property("SellingItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemSPP") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SellingItemID"); + + b.HasIndex("JobID"); + + b.ToTable("SellingItem"); + + b.HasData( + new + { + SellingItemID = 1, + Cost = 820.0, + Description = "Finestra anta Singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSPP = "", + JobID = 2, + Margin = 0.20000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 2, + Cost = 150.0, + Description = "Persiana anta singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSPP = "", + JobID = 1, + Margin = 0.10000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 3, + Cost = 200.0, + Description = "Installazione", + ExtItemCode = "", + IsService = true, + ItemCode = 0, + ItemSPP = "", + JobID = 1, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockMovModel", b => + { + b.Property("StockMovID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); + + b.Property("CodDoc") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DtCreate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("DtMod") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); + + b.Property("MovCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyRec") + .HasColumnType("double"); + + b.Property("StockStatusId") + .HasColumnType("int"); + + b.Property("UnitVal") + .HasColumnType("double"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("StockMovID"); + + b.HasIndex("MovCod"); + + b.HasIndex("StockStatusId"); + + b.ToTable("StockMov"); + + b.HasData( + new + { + StockMovID = 1, + CodDoc = "", + 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, + StockStatusId = 1, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 2, + CodDoc = "", + 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, + StockStatusId = 2, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 3, + CodDoc = "", + 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, + StockStatusId = 3, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 4, + CodDoc = "", + 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, + StockStatusId = 4, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 5, + CodDoc = "", + 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, + StockStatusId = 5, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 6, + CodDoc = "", + 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, + StockStatusId = 6, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 7, + CodDoc = "", + 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, + StockStatusId = 7, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 8, + CodDoc = "", + 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, + StockStatusId = 8, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 9, + CodDoc = "", + 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, + StockStatusId = 9, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 10, + CodDoc = "", + 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, + StockStatusId = 10, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockStatusModel", b => + { + b.Property("StockStatusId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("IsRemn") + .HasColumnType("tinyint(1)"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("Location") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyAvail") + .HasColumnType("double"); + + b.HasKey("StockStatusId"); + + b.HasIndex("ItemID"); + + b.ToTable("StockStatus"); + + b.HasData( + new + { + StockStatusId = 1, + IsDeleted = false, + IsRemn = false, + ItemID = 1, + Location = "B001-001-003", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 2, + IsDeleted = false, + IsRemn = false, + ItemID = 2, + Location = "B001-001-002", + QtyAvail = 8.0 + }, + new + { + StockStatusId = 3, + IsDeleted = false, + IsRemn = false, + ItemID = 3, + Location = "B001-001-001", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 4, + IsDeleted = false, + IsRemn = false, + ItemID = 4, + Location = "V002-001-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 5, + IsDeleted = false, + IsRemn = false, + ItemID = 5, + Location = "V001-001-002", + QtyAvail = 10.0 + }, + new + { + StockStatusId = 6, + IsDeleted = false, + IsRemn = false, + ItemID = 6, + Location = "V001-001-003", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 7, + IsDeleted = false, + IsRemn = false, + ItemID = 8, + Location = "V001-001-003", + QtyAvail = 50.0 + }, + new + { + StockStatusId = 8, + IsDeleted = false, + IsRemn = false, + ItemID = 11, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 9, + IsDeleted = false, + IsRemn = false, + ItemID = 9, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 10, + IsDeleted = false, + IsRemn = false, + ItemID = 10, + Location = "S001-001-001", + QtyAvail = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.SupplierModel", b => + { + b.Property("SupplierID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SupplierID"); + + b.ToTable("RegSupplier"); + + b.HasData( + new + { + SupplierID = 1, + CompanyName = "Company One", + FirstName = "Supplier A", + LastName = "Egalware", + VAT = "7294857103879254" + }, + new + { + SupplierID = 2, + CompanyName = "Company Two", + FirstName = "Supplier B", + LastName = "User", + VAT = "7294857103879254" + }, + new + { + SupplierID = 3, + CompanyName = "Company Two", + FirstName = "Supplier C", + LastName = "User Test", + VAT = "7294857103879254" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.TagsModel", b => + { + b.Property("TagID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("TagID"); + + b.ToTable("RegTags"); + + b.HasData( + new + { + TagID = 1, + Description = "Tag 01" + }, + new + { + TagID = 2, + Description = "Tag 02" + }, + new + { + TagID = 3, + Description = "Tag 03" + }, + new + { + TagID = 4, + Description = "Tag 04" + }, + new + { + TagID = 5, + Description = "Tag 05" + }); + }); + + 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") + .WithMany() + .HasForeignKey("CodGroup") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemGroupNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobRowModel", "JobRowNav") + .WithMany() + .HasForeignKey("JobRowID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + + b.Navigation("JobRowNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobModel", "JobNav") + .WithMany() + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("JobNav"); + + b.Navigation("PhaseNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.CustomerModel", "CustomerNav") + .WithMany() + .HasForeignKey("CustomerID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.DealerModel", "DealerNav") + .WithMany() + .HasForeignKey("DealerID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CustomerNav"); + + b.Navigation("DealerNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.OfferModel", "OfferNav") + .WithMany("OfferRowNav") + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OfferNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.CustomerModel", "CustomerNav") + .WithMany() + .HasForeignKey("CustomerID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.DealerModel", "DealerNav") + .WithMany() + .HasForeignKey("DealerID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.OfferModel", "OfferNav") + .WithMany() + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CustomerNav"); + + b.Navigation("DealerNav"); + + b.Navigation("OfferNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.OrderModel", "OrderNav") + .WithMany() + .HasForeignKey("OrderID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.OrderRowModel", "OrderRowNav") + .WithMany() + .HasForeignKey("OrderRowID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.ProductionBatchModel", "ProductionBatchNav") + .WithMany() + .HasForeignKey("ProductionBatchID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderRowNav"); + + b.Navigation("ProductionBatchNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.ProductionItemModel", "ProdItemNav") + .WithMany() + .HasForeignKey("ProdItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("PhaseNav"); + + b.Navigation("ProdItemNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobModel", "JobNav") + .WithMany() + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("JobNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockMovModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.MovTypeModel", "MovTypeNav") + .WithMany() + .HasForeignKey("MovCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.StockStatusModel", "StockStatusNav") + .WithMany() + .HasForeignKey("StockStatusId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("MovTypeNav"); + + b.Navigation("StockStatusNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockStatusModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferModel", b => + { + b.Navigation("OfferRowNav"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.cs b/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.cs new file mode 100644 index 00000000..96c9fd57 --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.cs @@ -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 +{ + /// + public partial class AggiuntaGenClassVal : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "GenClass", + columns: table => new + { + ClassCod = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(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(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + ClassCod = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Ordinal = table.Column(type: "int", nullable: false), + ValString = table.Column(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"); + } + + /// + 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)); + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs index 99c7dc50..b6ffb194 100644 --- a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs +++ b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs @@ -148,6 +148,102 @@ namespace EgwCoreLib.Lux.Data.Migrations }); }); + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.GenClassModel", b => + { + b.Property("ClassCod") + .HasColumnType("varchar(255)"); + + b.Property("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("GenValID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); + + b.Property("ClassCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Ordinal") + .HasColumnType("int"); + + b.Property("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("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") diff --git a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs index f266ca3d..f2484c40 100644 --- a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs +++ b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs @@ -18,7 +18,7 @@ namespace EgwCoreLib.Lux.Data /// public static void Seed(this ModelBuilder modelBuilder) { - // inizializzazione dei valori di default x Ruoli + // inizializzazione dei valori di default x Ruoli/Tags modelBuilder.Entity().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().HasData( + new GenClassModel { ClassCod = "WoodMat", Description = "Elenco Materiali Legno" }, + new GenClassModel { ClassCod = "WoodCol", Description = "Elenco Colori Legno" } + ); + + modelBuilder.Entity().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().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().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 diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 45a556bc..3ed6c5d6 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2509.1807 + 0.9.2509.1812 diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 9412c631..3b8c9558 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2509.1810 + 0.9.2509.1812 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index deeb2ee5..2d5516c2 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 0.9.2509.1810

+

Versione: 0.9.2509.1812


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 5425c8b4..f3b6368d 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2509.1810 +0.9.2509.1812 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 1e8c07ba..16784692 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2509.1810 + 0.9.2509.1812 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 5097cb9861c6de882e8d868e1e447214010404e2 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 18 Sep 2025 12:52:40 +0200 Subject: [PATCH 02/65] Aggiunta migration x gestione anagrafiche generiche --- .../Controllers/LuxController.cs | 57 ++++++++++++++- ...0918100936_AggiuntaGenClassVal.Designer.cs | 2 +- .../20250918100936_AggiuntaGenClassVal.cs | 2 +- .../DataLayerContextModelSnapshot.cs | 2 +- EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs | 2 +- .../Services/DataLayerServices.cs | 69 +++++++++++++++++++ 6 files changed, 128 insertions(+), 6 deletions(-) diff --git a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs index 89182996..d7d5ce11 100644 --- a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs +++ b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs @@ -69,6 +69,59 @@ namespace EgwCoreLib.Lux.Data.Controllers return dbResult; } + /// + /// Elenco completo GenClass + /// + /// + public async Task> GenClassGetAllAsync() + { + List dbResult = new List(); + //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + dbResult = await dbCtx + .DbSetGenClass + .ToListAsync(); + } + catch (Exception exc) + { + Log.Error($"Eccezione durante GenClassGetAllAsync{Environment.NewLine}{exc}"); + } + } + return dbResult; + } + + /// + /// Elenco valori x classe richiesta + /// + /// + /// + public async Task> GenValGetFiltAsync(string codClass) + { + List dbResult = new List(); + if (!string.IsNullOrEmpty(codClass)) + { + //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + dbResult = await dbCtx + .DbSetGenVal + .Where(x => x.ClassCod == codClass) + .ToListAsync(); + } + catch (Exception exc) + { + Log.Error($"Eccezione durante GenValGetFiltAsync{Environment.NewLine}{exc}"); + } + } + } + return dbResult; + } + /// /// Eliminazione record item /// @@ -420,8 +473,8 @@ namespace EgwCoreLib.Lux.Data.Controllers try { dbResult = await dbCtx - .DbSetItemGroup - .ToListAsync(); + .DbSetItemGroup + .ToListAsync(); } catch (Exception exc) { diff --git a/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.Designer.cs index 32afbed2..62570a50 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.Designer.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.Designer.cs @@ -222,7 +222,7 @@ namespace EgwCoreLib.Lux.Data.Migrations GenValID = 3, ClassCod = "WoodCol", Ordinal = 1, - ValString = "Lergno" + ValString = "Legno" }, new { diff --git a/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.cs b/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.cs index 96c9fd57..144575be 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.cs @@ -167,7 +167,7 @@ namespace EgwCoreLib.Lux.Data.Migrations { { 1, "WoodMat", 1, "Pine" }, { 2, "WoodMat", 2, "Maple" }, - { 3, "WoodCol", 1, "Lergno" }, + { 3, "WoodCol", 1, "Legno" }, { 4, "WoodCol", 2, "Bianco" }, { 5, "WoodCol", 3, "Rosso" }, { 6, "WoodCol", 4, "Nero" } diff --git a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs index b6ffb194..7491dab7 100644 --- a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs +++ b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs @@ -219,7 +219,7 @@ namespace EgwCoreLib.Lux.Data.Migrations GenValID = 3, ClassCod = "WoodCol", Ordinal = 1, - ValString = "Lergno" + ValString = "Legno" }, new { diff --git a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs index f2484c40..52ca27d2 100644 --- a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs +++ b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs @@ -36,7 +36,7 @@ namespace EgwCoreLib.Lux.Data modelBuilder.Entity().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 = 3, Ordinal = 1, ClassCod = "WoodCol", ValString = "Legno" }, 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" } diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index 98387b12..af425d73 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -148,6 +148,75 @@ namespace EgwCoreLib.Lux.Data.Services return answ; } + /// + /// Elenco completo GenClass + /// + /// + public async Task> GenClassGetAllAsync() + { + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + List? result = new List(); + // cerco in redis... + string currKey = $"{redisBaseKey}:GenClass"; + RedisValue rawData = await redisDb.StringGetAsync(currKey); + if (rawData.HasValue) + { + result = JsonConvert.DeserializeObject>($"{rawData}"); + source = "REDIS"; + } + else + { + result = await dbController.GenClassGetAllAsync(); + // serializzo e salvo con config x evitare loop... + rawData = JsonConvert.SerializeObject(result, JSSettings); + await redisDb.StringSetAsync(currKey, rawData, LongCache); + } + if (result == null) + { + result = new List(); + } + sw.Stop(); + Log.Debug($"GenClassGetAllAsync | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } + + /// + /// Elenco valori x classe richiesta + /// + /// + /// + public async Task> GenValGetFiltAsync(string codClass) + { + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + List? result = new List(); + // cerco in redis... + string currKey = $"{redisBaseKey}:GenVal:{codClass}"; + RedisValue rawData = await redisDb.StringGetAsync(currKey); + if (rawData.HasValue) + { + result = JsonConvert.DeserializeObject>($"{rawData}"); + source = "REDIS"; + } + else + { + result = await dbController.GenValGetFiltAsync(codClass); + // serializzo e salvo con config x evitare loop... + rawData = JsonConvert.SerializeObject(result, JSSettings); + await redisDb.StringSetAsync(currKey, rawData, LongCache); + } + if (result == null) + { + result = new List(); + } + sw.Stop(); + Log.Debug($"GenValGetFiltAsync | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } + /// /// Eliminazione record item /// From 31bd6a74fc744e5901b93b5cebaed05542edf3e0 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 18 Sep 2025 12:52:47 +0200 Subject: [PATCH 03/65] Inizio pagina gestione anagrafiche generiche --- Lux.UI/Components/Compo/GenValMan.razor | 65 ++++++ Lux.UI/Components/Compo/GenValMan.razor.cs | 249 +++++++++++++++++++++ Lux.UI/Components/Compo/ItemMan.razor | 2 - Lux.UI/Components/Compo/ItemMan.razor.cs | 3 - Lux.UI/Components/Layout/NavMenu.razor | 8 +- Lux.UI/Components/Pages/GenList.razor | 42 ++++ Lux.UI/Components/Pages/GenList.razor.cs | 106 +++++++++ Lux.UI/Components/Pages/Items.razor.cs | 3 - 8 files changed, 468 insertions(+), 10 deletions(-) create mode 100644 Lux.UI/Components/Compo/GenValMan.razor create mode 100644 Lux.UI/Components/Compo/GenValMan.razor.cs create mode 100644 Lux.UI/Components/Pages/GenList.razor create mode 100644 Lux.UI/Components/Pages/GenList.razor.cs diff --git a/Lux.UI/Components/Compo/GenValMan.razor b/Lux.UI/Components/Compo/GenValMan.razor new file mode 100644 index 00000000..3931eb5a --- /dev/null +++ b/Lux.UI/Components/Compo/GenValMan.razor @@ -0,0 +1,65 @@ +@if (isLoading || ListRecords == null) +{ + +} +else if (totalCount == 0) +{ +
    Nessun record trovato
    +} +else +{ + if (editRecord != null) + { + @* *@ + } + + + + + + + + + + + + + @foreach (var item in ListRecords) + { + + + + + + + + + + } + + + + + + +
    + + IDGruppoOrdinValore
    + + + + @item.GenValID + @if (item.GenClassNav != null) + { + @item.GenClassNav.Description + } + else + { + @item.ClassCod + } + @item.Ordinal@item.ValString + +
    + +
    +} diff --git a/Lux.UI/Components/Compo/GenValMan.razor.cs b/Lux.UI/Components/Compo/GenValMan.razor.cs new file mode 100644 index 00000000..4698c5d9 --- /dev/null +++ b/Lux.UI/Components/Compo/GenValMan.razor.cs @@ -0,0 +1,249 @@ +using EgwCoreLib.Lux.Core; +using EgwCoreLib.Lux.Data.DbModel; +using EgwCoreLib.Lux.Data.Services; +using Microsoft.AspNetCore.Components; +using Microsoft.JSInterop; + +namespace Lux.UI.Components.Compo +{ + public partial class GenValMan + { + #region Public Properties + + [Parameter] + public List ListGenClass { get; set; } = null!; + + [Parameter] + public FiltSelect SelFilt { get; set; } = null!; + + #endregion Public Properties + + #region Public Classes + + /// + /// Filtro selezione items + /// + public class FiltSelect + { + #region Public Properties + + public string SearchVal { get; set; } = ""; + public string SelCodGroup { get; set; } = ""; + + #endregion Public Properties + + #region Public Methods + + public override bool Equals(object? obj) + { + if (obj == null) + return false; + if (!(obj is FiltSelect item)) + return false; + + if (SelCodGroup != item.SelCodGroup) + return false; + + if (SearchVal != item.SearchVal) + return false; + + return true; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + #endregion Public Methods + } + + #endregion Public Classes + + #region Protected Fields + + protected List AllRecords = new List(); + protected List ListRecords = new List(); + + #endregion Protected Fields + + #region Protected Properties + + [Inject] + protected DataLayerServices DLService { get; set; } = null!; + + [Inject] + protected IJSRuntime JSRuntime { get; set; } = null!; + + #endregion Protected Properties + + #region Protected Methods + + /// + /// Clona record + /// + /// + protected void DoClone(GenValueModel curRec) + { +#if false + editRecord = new ItemModel() + { + ItemIDParent = curRec.ItemType == Enums.ItemClassType.Bom ? curRec.ItemID : curRec.ItemIDParent, + CodGroup = curRec.CodGroup, + ItemType = curRec.ItemType == Enums.ItemClassType.Bom ? Enums.ItemClassType.BomAlt : curRec.ItemType, + IsService = curRec.IsService, + ItemCode = curRec.ItemCode, + ExtItemCode = $"{curRec.ExtItemCode} - COPY", + SupplCode = curRec.ItemType == Enums.ItemClassType.Bom ? $"{curRec.SupplCode} ALT" : curRec.SupplCode, + Description = $"{curRec.Description} - COPY", + Cost = curRec.Cost, + Margin = curRec.Margin, + QtyMin = curRec.QtyMin, + QtyMax = curRec.QtyMax, + UM = curRec.UM + }; +#endif + } + + /// + /// impossta record x eliminazione + /// + /// + protected async Task DoDelete(GenValueModel selRec) + { + if (!await JSRuntime.InvokeAsync("confirm", $"Sicuro di voler eliminare il record? Dettagli: {selRec.ClassCod} | {selRec.ValString}")) + return; + //// esegue eliminazione del record... + //await DLService.ItemDeleteAsync(selRec); + + editRecord = null; + selRecord = null; + await ReloadData(); + UpdateTable(); + } + + /// + /// Edit articolo selezionato + /// + /// + protected void DoEdit(GenValueModel curRec) + { + editRecord = curRec; + } + + /// + /// Reset selezione + /// + protected void DoReset() + { + editRecord = null; + } + + /// + /// Selezione articolo x display info + /// + /// + protected void DoSelect(GenValueModel curRec) + { + selRecord = curRec; + } + + protected override async Task OnParametersSetAsync() + { + if (!SelFilt.Equals(actFilt) || true) + { + actFilt = SelFilt; + await ReloadData(); + UpdateTable(); + } + } + + protected void SaveNumRec(int newNum) + { + numRecord = newNum; + UpdateTable(); + } + + protected void SavePage(int newNum) + { + currPage = newNum; + UpdateTable(); + } + + #endregion Protected Methods + + #region Private Fields + + private FiltSelect actFilt = new FiltSelect(); + + private int currPage = 1; + + private GenValueModel? editRecord = null; + + private bool isLoading = false; + + private int numRecord = 10; + + private GenValueModel? selRecord = null; + + private int totalCount = 0; + + #endregion Private Fields + + #region Private Methods + + private async Task DoCancel() + { + await ResetEdit(); + UpdateTable(); + } + + private async Task DoSave(GenValueModel currRec) + { + // salvo +#if false + await DLService.ItemUpsertAsync(currRec); +#endif + await ResetEdit(); + UpdateTable(); + } + + private async Task ReloadData() + { + isLoading = true; + AllRecords = await DLService.GenValGetFiltAsync(actFilt.SelCodGroup); + // se ho ricerca testuale faccio filtro ulteriore... + if (!string.IsNullOrEmpty(actFilt.SearchVal)) + { + AllRecords = AllRecords + .Where(x => + x.ClassCod.Contains(actFilt.SearchVal, StringComparison.InvariantCultureIgnoreCase) || + x.ValString.Contains(actFilt.SearchVal, StringComparison.InvariantCultureIgnoreCase)) + .ToList(); + } + totalCount = AllRecords.Count; + } + + private async Task ResetEdit() + { + // reset edit + editRecord = null; + await ReloadData(); + } + + /// + /// Filtro e paginazione + /// + private void UpdateTable() + { + // fix paginazione + ListRecords = AllRecords + .Skip(numRecord * (currPage - 1)) + .Take(numRecord) + .ToList(); + isLoading = false; + } + + #endregion Private Methods + } +} \ No newline at end of file diff --git a/Lux.UI/Components/Compo/ItemMan.razor b/Lux.UI/Components/Compo/ItemMan.razor index b3575735..b26d13d2 100644 --- a/Lux.UI/Components/Compo/ItemMan.razor +++ b/Lux.UI/Components/Compo/ItemMan.razor @@ -99,5 +99,3 @@ else } - - diff --git a/Lux.UI/Components/Compo/ItemMan.razor.cs b/Lux.UI/Components/Compo/ItemMan.razor.cs index b8ccb1b7..b924b374 100644 --- a/Lux.UI/Components/Compo/ItemMan.razor.cs +++ b/Lux.UI/Components/Compo/ItemMan.razor.cs @@ -68,9 +68,6 @@ namespace Lux.UI.Components.Compo #region Protected Fields protected List AllRecords = new List(); -#if false - protected List ListItemGroup = new List(); -#endif protected List ListRecords = new List(); #endregion Protected Fields diff --git a/Lux.UI/Components/Layout/NavMenu.razor b/Lux.UI/Components/Layout/NavMenu.razor index 48a83e64..196b251a 100644 --- a/Lux.UI/Components/Layout/NavMenu.razor +++ b/Lux.UI/Components/Layout/NavMenu.razor @@ -34,12 +34,16 @@ + - +
    - +
    +
    + +
    +
    + +
    +
    \ No newline at end of file diff --git a/Lux.UI/Components/Pages/GenList.razor.cs b/Lux.UI/Components/Pages/GenList.razor.cs index 83181e56..9cd9cdd0 100644 --- a/Lux.UI/Components/Pages/GenList.razor.cs +++ b/Lux.UI/Components/Pages/GenList.razor.cs @@ -54,7 +54,7 @@ namespace Lux.UI.Components.Pages editRecord = new ItemModel() { #if false - CodGroup = ListGenClass.FirstOrDefault()?.CodGroup ?? "", + CodGroup = ListGenClass.FirstOrDefault()?.CodGroup ?? "", #endif ItemType = EgwCoreLib.Lux.Core.Enums.ItemClassType.ND, IsService = false, @@ -101,6 +101,11 @@ namespace Lux.UI.Components.Pages ListGenClass = await DLService.GenClassGetAllAsync(); } + private void SaveSel(string codGroup) + { + SelCodGroup = codGroup; + } + #endregion Private Methods } } \ No newline at end of file diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 3b8c9558..a0fcec6b 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2509.1812 + 0.9.2509.1813 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 2d5516c2..53d02dee 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

    Versione: 0.9.2509.1812

    +

    Versione: 0.9.2509.1813


    Note di rilascio:
    • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index f3b6368d..9f8d908b 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2509.1812 +0.9.2509.1813 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 16784692..2499a925 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2509.1812 + 0.9.2509.1813 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 184d536bb0ba2f933a6442f00a77a4d630662fea Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 18 Sep 2025 16:53:22 +0200 Subject: [PATCH 05/65] OK edit classe liste --- .../Controllers/LuxController.cs | 137 +++++++++++++----- EgwCoreLib.Lux.Data/DbModel/GenClassModel.cs | 14 +- .../Services/DataLayerServices.cs | 114 +++++++++------ Lux.UI/Components/Compo/EditBom.razor | 2 +- Lux.UI/Components/Compo/GenClassMan.razor | 100 +++++++++++-- Lux.UI/Components/Compo/GenClassMan.razor.cs | 124 ++++++++++++---- Lux.UI/Components/Pages/GenList.razor | 37 ++--- Lux.UI/Components/Pages/GenList.razor.cs | 33 +---- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 12 files changed, 390 insertions(+), 179 deletions(-) diff --git a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs index d7d5ce11..b26a9320 100644 --- a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs +++ b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs @@ -4,28 +4,21 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; using NLog; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; using static EgwCoreLib.Lux.Core.Enums; -using static System.Runtime.InteropServices.JavaScript.JSType; namespace EgwCoreLib.Lux.Data.Controllers { - public class LuxController + internal class LuxController { // manca costruttore parametrico contoller... - #region Public Methods + #region Internal Methods /// /// Elenco completo Customers da DB /// /// - public List CustomersGetAll() + internal List CustomersGetAll() { List dbResult = new List(); //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -49,7 +42,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// Elenco completo Dealers da DB ///
/// - public List DealersGetAll() + internal List DealersGetAll() { List dbResult = new List(); //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -69,11 +62,47 @@ namespace EgwCoreLib.Lux.Data.Controllers return dbResult; } + /// + /// Esegue eliminazione + refresh cache + /// + /// + /// + internal async Task GenClassDeleteAsync(GenClassModel upsRec) + { + bool answ = false; + //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + var dbResult = dbCtx + .DbSetGenClass + .Where(x => x.ClassCod == upsRec.ClassCod) + .FirstOrDefault(); + + var numChild = dbCtx + .DbSetGenVal + .Count(x => x.ClassCod == upsRec.ClassCod); + // se trovato e NON HA record child --> elimino + if (dbResult != null && numChild == 0) + { + dbCtx.DbSetGenClass.Remove(dbResult); + await dbCtx.SaveChangesAsync(); + } + } + catch (Exception exc) + { + Log.Error($"Eccezione durante GenClassDeleteAsync{Environment.NewLine}{exc}"); + } + } + return answ; + } + /// /// Elenco completo GenClass /// /// - public async Task> GenClassGetAllAsync() + internal async Task> GenClassGetAllAsync() { List dbResult = new List(); //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -83,6 +112,7 @@ namespace EgwCoreLib.Lux.Data.Controllers { dbResult = await dbCtx .DbSetGenClass + .Include(o => o.GenValNav) .ToListAsync(); } catch (Exception exc) @@ -93,12 +123,51 @@ namespace EgwCoreLib.Lux.Data.Controllers return dbResult; } + /// + /// Upsert record GenClass + /// + /// + /// + internal async Task GenClassUpsertAsync(GenClassModel upsRec) + { + bool answ = false; + //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + var currRec = dbCtx + .DbSetGenClass + .Where(x => x.ClassCod == upsRec.ClassCod) + .FirstOrDefault(); + // se trovato --> aggiorno + if (currRec != null) + { + currRec.Description = upsRec.Description; + dbCtx.Entry(currRec).State = EntityState.Modified; + } + // se mancasse --> aggiungo + else + { + dbCtx.DbSetGenClass.Add(upsRec); + } + // salvo... + await dbCtx.SaveChangesAsync(); + } + catch (Exception exc) + { + Log.Error($"Eccezione durante GenClassUpsertAsync{Environment.NewLine}{exc}"); + } + } + return answ; + } + /// /// Elenco valori x classe richiesta /// /// /// - public async Task> GenValGetFiltAsync(string codClass) + internal async Task> GenValGetFiltAsync(string codClass) { List dbResult = new List(); if (!string.IsNullOrEmpty(codClass)) @@ -127,7 +196,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// /// /// - public async Task ItemDeleteAsync(ItemModel rec2del) + internal async Task ItemDeleteAsync(ItemModel rec2del) { bool result = false; //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -157,7 +226,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// Elenco completo Items /// /// - public List ItemGetAll() + internal List ItemGetAll() { List dbResult = new List(); //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -183,7 +252,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// /// ID parent (valido quindi >0) /// - public List ItemGetChild(int ItemIdParent) + internal List ItemGetChild(int ItemIdParent) { List dbResult = new List(); if (ItemIdParent > 0) @@ -213,7 +282,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// /// ID item corrente (valido quindi >0) /// - public List ItemGetAlt(int ItemId) + internal List ItemGetAlt(int ItemId) { List dbResult = new List(); if (ItemId > 0) @@ -264,7 +333,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// /// /// - public List ItemGetFilt(string CodGroup, ItemClassType ItemType) + internal List ItemGetFilt(string CodGroup, ItemClassType ItemType) { List dbResult = new List(); //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -293,7 +362,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// /// /// - public List ItemGetFilt(string CodGroup, ItemClassType ItemType, string SearchVal) + internal List ItemGetFilt(string CodGroup, ItemClassType ItemType, string SearchVal) { List dbResult = new List(); //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -327,7 +396,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// /// /// - public async Task> ItemGetFiltAsync(string CodGroup, ItemClassType ItemType) + internal async Task> ItemGetFiltAsync(string CodGroup, ItemClassType ItemType) { List dbResult = new List(); //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -357,7 +426,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// /// /// - public async Task> ItemGetFiltAsync(string CodGroup, ItemClassType ItemType, string SearchVal) + internal async Task> ItemGetFiltAsync(string CodGroup, ItemClassType ItemType, string SearchVal) { List dbResult = new List(); //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -389,7 +458,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// /// /// - public List ItemGetSearch(string SearchVal) + internal List ItemGetSearch(string SearchVal) { List dbResult = new List(); //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -415,7 +484,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// /// /// - public async Task> ItemGetSearchAsync(string SearchVal) + internal async Task> ItemGetSearchAsync(string SearchVal) { List dbResult = new List(); //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -440,7 +509,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// Elenco completo ItemGroup gestiti /// /// - public List ItemGroupGetAll() + internal List ItemGroupGetAll() { List dbResult = new List(); //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -464,7 +533,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// Elenco completo ItemGroup gestiti async /// /// - public async Task> ItemGroupGetAllAsync() + internal async Task> ItemGroupGetAllAsync() { List dbResult = new List(); //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -484,7 +553,7 @@ namespace EgwCoreLib.Lux.Data.Controllers return dbResult; } - public bool ItemUpsert(ItemModel newRec) + internal bool ItemUpsert(ItemModel newRec) { bool answ = false; //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -529,7 +598,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// /// /// - public async Task ItemUpsertAsync(ItemModel currRec) + internal async Task ItemUpsertAsync(ItemModel currRec) { bool result = false; //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -576,7 +645,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// /// /// - public bool ItemUpsertFromBom(List bomList) + internal bool ItemUpsertFromBom(List bomList) { bool answ = false; //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -634,7 +703,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// Elenco completo offerte da DB /// /// - public async Task> OfferGetAll() + internal async Task> OfferGetAll() { List dbResult = new List(); //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -662,7 +731,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// /// /// - public List OfferRowGetByOffer(int OfferID) + internal List OfferRowGetByOffer(int OfferID) { List dbResult = new List(); //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -691,7 +760,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// ID riga offerta da aggiornare /// Bom aggiornata da salvare /// - public async Task OffertRowUpdateBom(int OfferRowID, List newBomList) + internal async Task OffertRowUpdateBom(int OfferRowID, List newBomList) { bool answ = false; //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -749,7 +818,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// /// /// - public async Task OffertUpdateCost(int OfferID) + internal async Task OffertUpdateCost(int OfferID) { bool answ = false; //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -864,7 +933,7 @@ namespace EgwCoreLib.Lux.Data.Controllers /// /// /// - public bool OfferUpsertFromBom(string uID, List bomList) + internal bool OfferUpsertFromBom(string uID, List bomList) { bool answ = false; //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -917,7 +986,7 @@ namespace EgwCoreLib.Lux.Data.Controllers return answ; } - #endregion Public Methods + #endregion Internal Methods #region Private Fields diff --git a/EgwCoreLib.Lux.Data/DbModel/GenClassModel.cs b/EgwCoreLib.Lux.Data/DbModel/GenClassModel.cs index 888c6791..eb97b3f6 100644 --- a/EgwCoreLib.Lux.Data/DbModel/GenClassModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/GenClassModel.cs @@ -20,7 +20,19 @@ namespace EgwCoreLib.Lux.Data.DbModel /// Descrizione /// public string Description { get; set; } = ""; + + /// + /// Numero Item compresi + /// + [NotMapped] + public int NumChild + { + get => GenValNav?.Count ?? 0; + } - + /// + /// Navigazione alle righe dei valori associati + /// + public virtual ICollection GenValNav { get; set; } = new List(); } } diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index af425d73..ab810e43 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -32,8 +32,8 @@ namespace EgwCoreLib.Lux.Data.Services } else { - dbController = new LuxController(); //dbController = new Controllers.LuxController(configuration); + dbController = new LuxController(); StringBuilder sb = new StringBuilder(); sb.AppendLine($"DataLayerServices | LuxController OK"); Log.Info(sb.ToString()); @@ -42,12 +42,6 @@ namespace EgwCoreLib.Lux.Data.Services #endregion Public Constructors - #region Public Properties - - public static LuxController dbController { get; set; } = null!; - - #endregion Public Properties - #region Public Methods /// @@ -148,6 +142,19 @@ namespace EgwCoreLib.Lux.Data.Services return answ; } + /// + /// Esegue eliminazione + refresh cache + /// + /// + /// + public async Task GenClassDeleteAsync(GenClassModel selRec) + { + bool result = await dbController.GenClassDeleteAsync(selRec); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:GenClass"); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:GenVal:*"); + return result; + } + /// /// Elenco completo GenClass /// @@ -182,6 +189,19 @@ namespace EgwCoreLib.Lux.Data.Services return result; } + /// + /// Esegue Upsert del record ricevuto + /// + /// + /// + public async Task GenClassUpsertAsync(GenClassModel upsRec) + { + bool result = await dbController.GenClassUpsertAsync(upsRec); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:GenClass"); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:GenVal:*"); + return result; + } + /// /// Elenco valori x classe richiesta /// @@ -266,43 +286,6 @@ namespace EgwCoreLib.Lux.Data.Services return result; } -#if false - /// - /// Elenco item Child da ParentId (per sostituzione) async - /// - /// ID corrente di cui cercare parent + fratelli - /// - public List ItemGetChild(int ItemId) - { - string source = "DB"; - Stopwatch sw = new Stopwatch(); - sw.Start(); - List? result = new List(); - // cerco in redis... - string currKey = $"{redisBaseKey}:Item:ListChild:{ItemId}"; - RedisValue rawData = redisDb.StringGet(currKey); - if (rawData.HasValue) - { - result = JsonConvert.DeserializeObject>($"{rawData}"); - source = "REDIS"; - } - else - { - result = dbController.ItemGetChild(ItemId); - // serializzo e salvo con config x evitare loop... - rawData = JsonConvert.SerializeObject(result, JSSettings); - redisDb.StringSet(currKey, rawData, FastCache); - } - if (result == null) - { - result = new List(); - } - sw.Stop(); - Log.Debug($"ItemGetChild | {source} | {sw.Elapsed.TotalMilliseconds}ms"); - return result; - } -#endif - /// /// Elenco item da ricerca completa Async /// @@ -801,5 +784,48 @@ namespace EgwCoreLib.Lux.Data.Services private string redisBaseKey = "Lux:Cache"; #endregion Private Fields + + #region Private Properties + + private static LuxController dbController { get; set; } = null!; + + #endregion Private Properties + +#if false + /// + /// Elenco item Child da ParentId (per sostituzione) async + /// + /// ID corrente di cui cercare parent + fratelli + /// + public List ItemGetChild(int ItemId) + { + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + List? result = new List(); + // cerco in redis... + string currKey = $"{redisBaseKey}:Item:ListChild:{ItemId}"; + RedisValue rawData = redisDb.StringGet(currKey); + if (rawData.HasValue) + { + result = JsonConvert.DeserializeObject>($"{rawData}"); + source = "REDIS"; + } + else + { + result = dbController.ItemGetChild(ItemId); + // serializzo e salvo con config x evitare loop... + rawData = JsonConvert.SerializeObject(result, JSSettings); + redisDb.StringSet(currKey, rawData, FastCache); + } + if (result == null) + { + result = new List(); + } + sw.Stop(); + Log.Debug($"ItemGetChild | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } +#endif } } \ No newline at end of file diff --git a/Lux.UI/Components/Compo/EditBom.razor b/Lux.UI/Components/Compo/EditBom.razor index b68183c1..7ee0f337 100644 --- a/Lux.UI/Components/Compo/EditBom.razor +++ b/Lux.UI/Components/Compo/EditBom.razor @@ -15,7 +15,7 @@ @foreach (var item in bomDict) { - @if (item.Key == currIdx && EditRecord != null) + @if (EditRecord != null && item.Key == currIdx) { @(item.Key + 1) diff --git a/Lux.UI/Components/Compo/GenClassMan.razor b/Lux.UI/Components/Compo/GenClassMan.razor index 589a5c07..d988515a 100644 --- a/Lux.UI/Components/Compo/GenClassMan.razor +++ b/Lux.UI/Components/Compo/GenClassMan.razor @@ -1,4 +1,50 @@ - +@if (AddVisible) +{ + +} +
- + + @foreach (var item in ListRecords) { - - - - - - + + @if (EditRecord != null && item.ClassCod == EditRecord.ClassCod) + { + + + + + + } + else + { + + + + + + } } diff --git a/Lux.UI/Components/Compo/GenClassMan.razor.cs b/Lux.UI/Components/Compo/GenClassMan.razor.cs index 02d63d9f..2c3a0f62 100644 --- a/Lux.UI/Components/Compo/GenClassMan.razor.cs +++ b/Lux.UI/Components/Compo/GenClassMan.razor.cs @@ -1,13 +1,22 @@ using EgwCoreLib.Lux.Data.DbModel; using EgwCoreLib.Lux.Data.Services; using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.DataProtection; using Microsoft.JSInterop; using NLog.LayoutRenderers; +using System.Threading.Tasks; namespace Lux.UI.Components.Compo { public partial class GenClassMan { + #region Public Properties + + [Parameter] + public EventCallback EC_Selected { get; set; } + + [Parameter] + public EventCallback EC_Updated { get; set; } [Parameter] public List ListGenClass { get; set; } = null!; @@ -15,8 +24,7 @@ namespace Lux.UI.Components.Compo [Parameter] public string SearchVal { get; set; } = ""; - [Parameter] - public EventCallback EC_Selected { get; set; } + #endregion Public Properties #region Protected Fields @@ -37,6 +45,50 @@ namespace Lux.UI.Components.Compo #region Protected Methods + protected void ToggleAdd() + { + AddVisible = !AddVisible; + NewRecord = new GenClassModel() + { + ClassCod = "NewClass", + Description = $"Descrizione-{DateTime.Now:yyyy.MM.dd-HH.mm.ss}" + }; + } + private bool AddVisible = false; + private string ErrorMsg = ""; + + /// + /// Genera nuovo record e lo salva + /// + /// + protected async Task DoAdd() + { + if (NewRecord != null) + { + // verifico non sia duplicato... + var recExist = ListRecords.Count(x => x.ClassCod == NewRecord.ClassCod); + if (recExist > 0) + { + ErrorMsg = $"Errore: record già esistente con codice {NewRecord.ClassCod}"; + } + else + { + ErrorMsg = ""; + // faccio upsert record... + await DLService.GenClassUpsertAsync(NewRecord); + // segnalo update x reload + await EC_Updated.InvokeAsync(true); + NewRecord = null; + } + } + } + + protected void DoCancel() + { + ResetEdit(); + UpdateTable(); + } + /// /// Clona record /// @@ -59,34 +111,39 @@ namespace Lux.UI.Components.Compo QtyMin = curRec.QtyMin, QtyMax = curRec.QtyMax, UM = curRec.UM - }; + }; #endif } /// - /// impossta record x eliminazione + /// Eliminazione record /// /// protected async Task DoDelete(GenClassModel selRec) { + // controlo che NON abbia child obj... altrimenti esco + if (selRec.NumChild > 0) + return; + if (!await JSRuntime.InvokeAsync("confirm", $"Sicuro di voler eliminare il record? Dettagli: {selRec.ClassCod} | {selRec.Description}")) return; - //// esegue eliminazione del record... - //await DLService.ItemDeleteAsync(selRec); - editRecord = null; - selRecord = null; - ReloadData(); - UpdateTable(); + // esegue eliminazione del record... + await DLService.GenClassDeleteAsync(selRec); + + // segnalo update x reload + await EC_Updated.InvokeAsync(true); } /// /// Edit articolo selezionato /// /// - protected void DoEdit(GenClassModel curRec) + protected async void DoEdit(GenClassModel curRec) { - editRecord = curRec; + EditRecord = curRec; + SelRecord = curRec; + await EC_Selected.InvokeAsync(curRec.ClassCod); } /// @@ -94,17 +151,26 @@ namespace Lux.UI.Components.Compo /// protected async void DoReset() { - editRecord = null; + EditRecord = null; + SelRecord = null; await EC_Selected.InvokeAsync(""); } + protected async Task DoSave(GenClassModel currRec) + { + // faccio upsert record... + await DLService.GenClassUpsertAsync(currRec); + // segnalo update x reload + await EC_Updated.InvokeAsync(true); + } + /// /// Selezione articolo x display info /// /// protected async void DoSelect(GenClassModel curRec) { - selRecord = curRec; + SelRecord = curRec; await EC_Selected.InvokeAsync(curRec.ClassCod); } @@ -130,16 +196,16 @@ namespace Lux.UI.Components.Compo #region Private Fields - private int currPage = 1; - private GenClassModel? editRecord = null; + private GenClassModel? EditRecord = null; + private GenClassModel? NewRecord = null; private bool isLoading = false; private int numRecord = 10; - private GenClassModel? selRecord = null; + private GenClassModel? SelRecord = null; private int totalCount = 0; @@ -147,21 +213,14 @@ namespace Lux.UI.Components.Compo #region Private Methods - private void DoCancel() + private string checkSel(GenClassModel curRec) { - ResetEdit(); - UpdateTable(); - } - - private async Task DoSave(GenClassModel currRec) - { - // salvo - await Task.Delay(10); -#if false - await DLService.ItemUpsertAsync(currRec); -#endif - ResetEdit(); - UpdateTable(); + string answ = ""; + if (SelRecord != null) + { + answ = curRec.ClassCod == SelRecord.ClassCod ? "table-info" : ""; + } + return answ; } private void ReloadData() @@ -183,7 +242,7 @@ namespace Lux.UI.Components.Compo private void ResetEdit() { // reset edit - editRecord = null; + EditRecord = null; ReloadData(); } @@ -194,6 +253,7 @@ namespace Lux.UI.Components.Compo { // fix paginazione ListRecords = AllRecords + .OrderBy(x => x.ClassCod) .Skip(numRecord * (currPage - 1)) .Take(numRecord) .ToList(); diff --git a/Lux.UI/Components/Pages/GenList.razor b/Lux.UI/Components/Pages/GenList.razor index 569e1bcb..903e41a0 100644 --- a/Lux.UI/Components/Pages/GenList.razor +++ b/Lux.UI/Components/Pages/GenList.razor @@ -8,24 +8,6 @@ Anagrafiche Generiche
-
- @if (!string.IsNullOrEmpty(SelCodGroup)) - { - - } -
-
-
- Gruppo - -
-
@@ -38,12 +20,19 @@
-
- -
-
- -
+ @if (isLoading) + { + + } + else + { +
+ +
+
+ +
+ }
\ No newline at end of file diff --git a/Lux.UI/Components/Pages/GenList.razor.cs b/Lux.UI/Components/Pages/GenList.razor.cs index 9cd9cdd0..ba25de8d 100644 --- a/Lux.UI/Components/Pages/GenList.razor.cs +++ b/Lux.UI/Components/Pages/GenList.razor.cs @@ -2,6 +2,7 @@ using EgwCoreLib.Lux.Data.DbModel; using EgwCoreLib.Lux.Data.Services; using Lux.UI.Components.Compo; using Microsoft.AspNetCore.Components; +using System.Threading.Tasks; namespace Lux.UI.Components.Pages { @@ -49,35 +50,10 @@ namespace Lux.UI.Components.Pages #region Protected Methods - protected void DoAdd() - { - editRecord = new ItemModel() - { -#if false - CodGroup = ListGenClass.FirstOrDefault()?.CodGroup ?? "", -#endif - ItemType = EgwCoreLib.Lux.Core.Enums.ItemClassType.ND, - IsService = false, - ItemCode = 0, - ExtItemCode = "NEW-ITEM", - SupplCode = "", - Description = $"Nuova Offerta {DateTime.Today:ddd yyyy.MM.dd}", - Cost = 0, - Margin = 0, - QtyMin = 0, - QtyMax = 0, - UM = "#" - }; - } - protected override async Task OnInitializedAsync() { isLoading = true; await ReloadBaseData(); -#if false - await ReloadData(); - UpdateTable(); -#endif } protected void ResetSearch() @@ -96,9 +72,16 @@ namespace Lux.UI.Components.Pages #region Private Methods + private async Task ForceReloadAsync() + { + await ReloadBaseData(); + } + private async Task ReloadBaseData() { + isLoading = true; ListGenClass = await DLService.GenClassGetAllAsync(); + isLoading = false; } private void SaveSel(string codGroup) diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index a0fcec6b..328212b0 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2509.1813 + 0.9.2509.1816 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 53d02dee..2c553fa7 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 0.9.2509.1813

+

Versione: 0.9.2509.1816


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 9f8d908b..b1f250ea 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2509.1813 +0.9.2509.1816 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 2499a925..90bf740f 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2509.1813 + 0.9.2509.1816 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 7fbec59c8de6ca8ed97cf558bbbe934e303945c5 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 18 Sep 2025 18:23:49 +0200 Subject: [PATCH 06/65] Completato editing dei record elenchi generico, compreso spostamenti + eliminazioni varie --- .../Controllers/LuxController.cs | 165 +++++++++++++++++- .../Services/DataLayerServices.cs | 40 +++++ Lux.UI/Components/Compo/GenClassMan.razor | 22 +-- Lux.UI/Components/Compo/GenClassMan.razor.cs | 47 ++--- Lux.UI/Components/Compo/GenValMan.razor | 94 +++++----- Lux.UI/Components/Compo/GenValMan.razor.cs | 66 +++++-- Lux.UI/Components/Pages/GenList.razor | 9 +- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 11 files changed, 339 insertions(+), 112 deletions(-) diff --git a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs index b26a9320..8c771e48 100644 --- a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs +++ b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs @@ -4,6 +4,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; using NLog; +using NLog.LayoutRenderers; using static EgwCoreLib.Lux.Core.Enums; namespace EgwCoreLib.Lux.Data.Controllers @@ -63,11 +64,11 @@ namespace EgwCoreLib.Lux.Data.Controllers } /// - /// Esegue eliminazione + refresh cache + /// Esegue eliminazione /// - /// + /// /// - internal async Task GenClassDeleteAsync(GenClassModel upsRec) + internal async Task GenClassDeleteAsync(GenClassModel rec2del) { bool answ = false; //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) @@ -77,12 +78,12 @@ namespace EgwCoreLib.Lux.Data.Controllers { var dbResult = dbCtx .DbSetGenClass - .Where(x => x.ClassCod == upsRec.ClassCod) + .Where(x => x.ClassCod == rec2del.ClassCod) .FirstOrDefault(); var numChild = dbCtx .DbSetGenVal - .Count(x => x.ClassCod == upsRec.ClassCod); + .Count(x => x.ClassCod == rec2del.ClassCod); // se trovato e NON HA record child --> elimino if (dbResult != null && numChild == 0) { @@ -152,7 +153,8 @@ namespace EgwCoreLib.Lux.Data.Controllers dbCtx.DbSetGenClass.Add(upsRec); } // salvo... - await dbCtx.SaveChangesAsync(); + int numAct = await dbCtx.SaveChangesAsync(); + answ = numAct > 0; } catch (Exception exc) { @@ -162,6 +164,51 @@ namespace EgwCoreLib.Lux.Data.Controllers return answ; } + /// + /// Esegue eliminazione + /// + /// + /// + internal async Task GenValDeleteAsync(GenValueModel rec2del) + { + bool answ = false; + //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + var dbResult = dbCtx + .DbSetGenVal + .Where(x => x.GenValID == rec2del.GenValID) + .FirstOrDefault(); + + // se trovato --> elimino e sposto i rimanenti... + if (dbResult != null) + { + // modifico record successivi... + var list2Move = dbCtx + .DbSetGenVal + .Where(x => x.ClassCod == rec2del.ClassCod && x.Ordinal> dbResult.Ordinal) + .ToList(); + foreach (var item in list2Move) + { + item.Ordinal--; + dbCtx.Entry(item).State = EntityState.Modified; + } + // elimino + dbCtx.DbSetGenVal.Remove(dbResult); + // salvo tutto + await dbCtx.SaveChangesAsync(); + } + } + catch (Exception exc) + { + Log.Error($"Eccezione durante GenValDeleteAsync{Environment.NewLine}{exc}"); + } + } + return answ; + } + /// /// Elenco valori x classe richiesta /// @@ -191,6 +238,112 @@ namespace EgwCoreLib.Lux.Data.Controllers return dbResult; } + /// + /// Esegue spostamento nell'ordinamento relativo alla classe + /// NB: verifica spostamento sia ammissibile: se primo rec non "sale", se ultimo non "scende"... + /// + /// + /// + /// + internal async Task GenValMoveAsync(GenValueModel selRec, bool moveUp) + { + bool answ = false; + //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + var currRec = dbCtx + .DbSetGenVal + .Where(x => x.GenValID == selRec.GenValID) + .FirstOrDefault(); + + if (currRec != null) + { + // recupero info del num rec del suo gruppo + int numRec = dbCtx + .DbSetGenVal + .Count(x => x.ClassCod == selRec.ClassCod); + + // verifico NON sia primo/ultimo... + bool canMove = false; + int newPos = moveUp ? currRec.Ordinal - 1 : currRec.Ordinal + 1; + if (moveUp) + { + canMove = newPos > 0; + } + else + { + canMove = newPos <= numRec; + } + // se abilitato --> aggiorno i 2 record... + if (canMove) + { + var otherRec = dbCtx + .DbSetGenVal + .Where(x => x.ClassCod == selRec.ClassCod && x.Ordinal == newPos) + .FirstOrDefault(); + if (otherRec != null) + { + otherRec.Ordinal = currRec.Ordinal; + dbCtx.Entry(otherRec).State = EntityState.Modified; + currRec.Ordinal = newPos; + dbCtx.Entry(currRec).State = EntityState.Modified; + } + // salvo... + int numAct = await dbCtx.SaveChangesAsync(); + answ = numAct > 0; + } + } + } + catch (Exception exc) + { + Log.Error($"Eccezione durante GenValMoveAsync{Environment.NewLine}{exc}"); + } + } + return answ; + } + + /// + /// Esegue Upsert del record ricevuto + /// + /// + /// + internal async Task GenValUpsertAsync(GenValueModel upsRec) + { + bool answ = false; + //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + var currRec = dbCtx + .DbSetGenVal + .Where(x => x.GenValID == upsRec.GenValID) + .FirstOrDefault(); + // se trovato --> aggiorno + if (currRec != null) + { + currRec.ValString = upsRec.ValString; + dbCtx.Entry(currRec).State = EntityState.Modified; + } + // se mancasse --> aggiungo + else + { + dbCtx.DbSetGenVal.Add(upsRec); + } + // salvo... + int numAct = await dbCtx.SaveChangesAsync(); + answ = numAct > 0; + } + catch (Exception exc) + { + Log.Error($"Eccezione durante GenValUpsertAsync{Environment.NewLine}{exc}"); + } + } + return answ; + } + /// /// Eliminazione record item /// diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index ab810e43..b24592be 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -202,6 +202,33 @@ namespace EgwCoreLib.Lux.Data.Services return result; } + /// + /// Esegue eliminazione + refresh cache + /// + /// + /// + public async Task GenValDeleteAsync(GenValueModel selRec) + { + bool result = await dbController.GenValDeleteAsync(selRec); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:GenClass"); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:GenVal:*"); + return result; + } + + /// + /// Esegue spostamento nell'ordinamento relativo alla classe + refresh cache + /// + /// + /// + /// + public async Task GenValMoveAsync(GenValueModel selRec, bool moveUp) + { + bool result = await dbController.GenValMoveAsync(selRec, moveUp); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:GenClass"); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:GenVal:*"); + return result; + } + /// /// Elenco valori x classe richiesta /// @@ -237,6 +264,19 @@ namespace EgwCoreLib.Lux.Data.Services return result; } + /// + /// Esegue Upsert del record ricevuto + /// + /// + /// + public async Task GenValUpsertAsync(GenValueModel upsRec) + { + bool result = await dbController.GenValUpsertAsync(upsRec); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:GenClass"); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:GenVal:*"); + return result; + } + /// /// Eliminazione record item /// diff --git a/Lux.UI/Components/Compo/GenClassMan.razor b/Lux.UI/Components/Compo/GenClassMan.razor index d988515a..c35d993e 100644 --- a/Lux.UI/Components/Compo/GenClassMan.razor +++ b/Lux.UI/Components/Compo/GenClassMan.razor @@ -69,7 +69,7 @@
- + } - - - + + - - + + + + }
@@ -6,24 +52,50 @@ Cod Descrizione# Val + +
- - @* - *@ - @item.ClassCod@item.Description - @* *@ -
+ + + @item.ClassCod@item.NumChild + + + + + @* *@ + @item.ClassCod@item.Description@item.NumChild + @if (item.NumChild > 0) + { + + } + else + { + + } +
@item.ClassCod @item.NumChild @@ -88,7 +88,7 @@ @if (item.NumChild > 0) { - + } else { @@ -99,14 +99,14 @@
- @if (totalCount >= numRecord) - { + @if (totalCount >= numRecord) + { +
- } -
\ No newline at end of file diff --git a/Lux.UI/Components/Compo/GenClassMan.razor.cs b/Lux.UI/Components/Compo/GenClassMan.razor.cs index 2c3a0f62..5d1cf650 100644 --- a/Lux.UI/Components/Compo/GenClassMan.razor.cs +++ b/Lux.UI/Components/Compo/GenClassMan.razor.cs @@ -45,18 +45,6 @@ namespace Lux.UI.Components.Compo #region Protected Methods - protected void ToggleAdd() - { - AddVisible = !AddVisible; - NewRecord = new GenClassModel() - { - ClassCod = "NewClass", - Description = $"Descrizione-{DateTime.Now:yyyy.MM.dd-HH.mm.ss}" - }; - } - private bool AddVisible = false; - private string ErrorMsg = ""; - /// /// Genera nuovo record e lo salva /// @@ -95,24 +83,6 @@ namespace Lux.UI.Components.Compo /// protected void DoClone(GenClassModel curRec) { -#if false - editRecord = new ItemModel() - { - ItemIDParent = curRec.ItemType == Enums.ItemClassType.Bom ? curRec.ItemID : curRec.ItemIDParent, - CodGroup = curRec.CodGroup, - ItemType = curRec.ItemType == Enums.ItemClassType.Bom ? Enums.ItemClassType.BomAlt : curRec.ItemType, - IsService = curRec.IsService, - ItemCode = curRec.ItemCode, - ExtItemCode = $"{curRec.ExtItemCode} - COPY", - SupplCode = curRec.ItemType == Enums.ItemClassType.Bom ? $"{curRec.SupplCode} ALT" : curRec.SupplCode, - Description = $"{curRec.Description} - COPY", - Cost = curRec.Cost, - Margin = curRec.Margin, - QtyMin = curRec.QtyMin, - QtyMax = curRec.QtyMax, - UM = curRec.UM - }; -#endif } /// @@ -192,17 +162,26 @@ namespace Lux.UI.Components.Compo UpdateTable(); } + protected void ToggleAdd() + { + AddVisible = !AddVisible; + NewRecord = new GenClassModel() + { + ClassCod = "NewClass", + Description = $"Descrizione-{DateTime.Now:yyyy.MM.dd-HH.mm.ss}" + }; + } + #endregion Protected Methods #region Private Fields + private bool AddVisible = false; private int currPage = 1; - private GenClassModel? EditRecord = null; - private GenClassModel? NewRecord = null; - + private string ErrorMsg = ""; private bool isLoading = false; - + private GenClassModel? NewRecord = null; private int numRecord = 10; private GenClassModel? SelRecord = null; diff --git a/Lux.UI/Components/Compo/GenValMan.razor b/Lux.UI/Components/Compo/GenValMan.razor index 3931eb5a..a637a5ea 100644 --- a/Lux.UI/Components/Compo/GenValMan.razor +++ b/Lux.UI/Components/Compo/GenValMan.razor @@ -8,58 +8,74 @@ else if (totalCount == 0) } else { - if (editRecord != null) - { - @* *@ - } - - - - - - + @* *@ + + + @foreach (var item in ListRecords) { + string cssBtnUp = EditRecord == null && item.Ordinal > 1 ? "btn-outline-primary" : "btn-outline-secondary opacity-50 disabled"; + string cssBtnDown = EditRecord == null && item.Ordinal < totalCount ? "btn-outline-primary" : "btn-outline-secondary opacity-50 disabled"; - - - - - - - + @if (EditRecord != null && item.GenValID == EditRecord.GenValID) + { + + @* *@ + + + + } + else + { + + @* *@ + + + + } } - - - - - + @if (totalCount >= numRecord) + { + + + + + + }
+ IDGruppoOrdinValoreIDOrd.Valore + +
- - - - @item.GenValID - @if (item.GenClassNav != null) - { - @item.GenClassNav.Description - } - else - { - @item.ClassCod - } - @item.Ordinal@item.ValString - - + + + @* *@ + @item.GenValID + + @item.Ordinal + + + + + + + @* *@ + @item.GenValID + + @item.Ordinal + + @item.ValString + +
- -
+ +
} diff --git a/Lux.UI/Components/Compo/GenValMan.razor.cs b/Lux.UI/Components/Compo/GenValMan.razor.cs index 4698c5d9..da60f478 100644 --- a/Lux.UI/Components/Compo/GenValMan.razor.cs +++ b/Lux.UI/Components/Compo/GenValMan.razor.cs @@ -101,7 +101,7 @@ namespace Lux.UI.Components.Compo QtyMin = curRec.QtyMin, QtyMax = curRec.QtyMax, UM = curRec.UM - }; + }; #endif } @@ -113,13 +113,18 @@ namespace Lux.UI.Components.Compo { if (!await JSRuntime.InvokeAsync("confirm", $"Sicuro di voler eliminare il record? Dettagli: {selRec.ClassCod} | {selRec.ValString}")) return; - //// esegue eliminazione del record... - //await DLService.ItemDeleteAsync(selRec); - editRecord = null; - selRecord = null; + // esegue eliminazione del record... + await DLService.GenValDeleteAsync(selRec); + + EditRecord = null; + SelRecord = null; await ReloadData(); UpdateTable(); +#if false + // segnalo update x reload + await EC_Updated.InvokeAsync(true); +#endif } /// @@ -128,7 +133,7 @@ namespace Lux.UI.Components.Compo /// protected void DoEdit(GenValueModel curRec) { - editRecord = curRec; + EditRecord = curRec; } /// @@ -136,7 +141,7 @@ namespace Lux.UI.Components.Compo /// protected void DoReset() { - editRecord = null; + EditRecord = null; } /// @@ -145,7 +150,7 @@ namespace Lux.UI.Components.Compo /// protected void DoSelect(GenValueModel curRec) { - selRecord = curRec; + SelRecord = curRec; } protected override async Task OnParametersSetAsync() @@ -178,13 +183,13 @@ namespace Lux.UI.Components.Compo private int currPage = 1; - private GenValueModel? editRecord = null; + private GenValueModel? EditRecord = null; private bool isLoading = false; private int numRecord = 10; - private GenValueModel? selRecord = null; + private GenValueModel? SelRecord = null; private int totalCount = 0; @@ -192,6 +197,30 @@ namespace Lux.UI.Components.Compo #region Private Methods + private async Task DoAdd() + { + // aggiungo un nuovo record in coda... + EditRecord = new GenValueModel() + { + ClassCod = actFilt.SelCodGroup, + ValString = $"Nuovo-{DateTime.Now:yy.MM.ss HH.mm.ss}", + Ordinal = totalCount + 1 + }; + await DoSave(EditRecord); + } + + /// + /// Esegue spostamento + /// + /// + /// + /// + private async Task MoveRec(GenValueModel curRec, bool moveUp) + { + await DLService.GenValMoveAsync(curRec, moveUp); + await DoCancel(); + } + private async Task DoCancel() { await ResetEdit(); @@ -201,11 +230,11 @@ namespace Lux.UI.Components.Compo private async Task DoSave(GenValueModel currRec) { // salvo -#if false - await DLService.ItemUpsertAsync(currRec); -#endif + await DLService.GenValUpsertAsync(currRec); await ResetEdit(); UpdateTable(); + EditRecord = null; + SelRecord = null; } private async Task ReloadData() @@ -213,12 +242,19 @@ namespace Lux.UI.Components.Compo isLoading = true; AllRecords = await DLService.GenValGetFiltAsync(actFilt.SelCodGroup); // se ho ricerca testuale faccio filtro ulteriore... - if (!string.IsNullOrEmpty(actFilt.SearchVal)) + if (string.IsNullOrEmpty(actFilt.SearchVal)) + { + AllRecords = AllRecords + .OrderBy(x => x.Ordinal) + .ToList(); + } + else { AllRecords = AllRecords .Where(x => x.ClassCod.Contains(actFilt.SearchVal, StringComparison.InvariantCultureIgnoreCase) || x.ValString.Contains(actFilt.SearchVal, StringComparison.InvariantCultureIgnoreCase)) + .OrderBy(x => x.Ordinal) .ToList(); } totalCount = AllRecords.Count; @@ -227,7 +263,7 @@ namespace Lux.UI.Components.Compo private async Task ResetEdit() { // reset edit - editRecord = null; + EditRecord = null; await ReloadData(); } diff --git a/Lux.UI/Components/Pages/GenList.razor b/Lux.UI/Components/Pages/GenList.razor index 903e41a0..0a7f65ca 100644 --- a/Lux.UI/Components/Pages/GenList.razor +++ b/Lux.UI/Components/Pages/GenList.razor @@ -26,11 +26,14 @@ } else { -
+
-
- +
+ @if (!string.IsNullOrEmpty(CurrFilt.SelCodGroup)) + { + + }
}
diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 328212b0..4d9a2dba 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2509.1816 + 0.9.2509.1818 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 2c553fa7..f1896895 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 0.9.2509.1816

+

Versione: 0.9.2509.1818


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index b1f250ea..08a4f762 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2509.1816 +0.9.2509.1818 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 90bf740f..76e01771 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2509.1816 + 0.9.2509.1818 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 2893e53a9f6208f8018fafb4103ba7529d0c257a Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 19 Sep 2025 10:53:05 +0200 Subject: [PATCH 07/65] Riorganizzazione classe datalayer preliminare x inserimento classi costing --- EgwCoreLib.Lux.Data/AdminContext.cs | 2 +- EgwCoreLib.Lux.Data/Controllers/LuxController.cs | 2 ++ EgwCoreLib.Lux.Data/DataLayerContext.cs | 4 ++++ .../DbModel/{ => General}/CountersModel.cs | 2 +- .../DbModel/{ => General}/GenClassModel.cs | 2 +- .../DbModel/{ => General}/GenValueModel.cs | 9 ++------- EgwCoreLib.Lux.Data/DbModel/{ => Identity}/TagsModel.cs | 2 +- .../DbModel/{ => Identity}/UserPrivModel.cs | 2 +- EgwCoreLib.Lux.Data/DbModel/OrderModel.cs | 3 ++- EgwCoreLib.Lux.Data/DbModel/{ => Production}/JobModel.cs | 2 +- .../DbModel/{ => Production}/JobRowItemModel.cs | 2 +- .../DbModel/{ => Production}/JobRowModel.cs | 2 +- .../DbModel/{ => Production}/PhaseModel.cs | 2 +- .../DbModel/{ => Production}/ProductionBatchModel.cs | 2 +- .../DbModel/{ => Production}/ProductionItemModel.cs | 2 +- .../DbModel/{ => Production}/ProductionItemRowModel.cs | 2 +- EgwCoreLib.Lux.Data/DbModel/{ => Sales}/OfferModel.cs | 2 +- EgwCoreLib.Lux.Data/DbModel/{ => Sales}/OfferRowModel.cs | 2 +- EgwCoreLib.Lux.Data/DbModel/SellingItemModel.cs | 3 ++- EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj | 2 ++ EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs | 4 ++++ EgwCoreLib.Lux.Data/Services/DataLayerServices.cs | 2 ++ Lux.API/Lux.API.csproj | 2 +- Lux.UI/Components/Compo/GenClassMan.razor.cs | 2 +- Lux.UI/Components/Compo/GenValMan.razor.cs | 2 +- Lux.UI/Components/Compo/OfferCheck.razor | 1 + Lux.UI/Components/Compo/OfferMan.razor.cs | 1 + Lux.UI/Components/Compo/OfferRowMan.razor.cs | 2 +- Lux.UI/Components/Pages/GenList.razor.cs | 1 + Lux.UI/Components/Pages/Offers.razor.cs | 2 +- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 34 files changed, 46 insertions(+), 32 deletions(-) rename EgwCoreLib.Lux.Data/DbModel/{ => General}/CountersModel.cs (94%) rename EgwCoreLib.Lux.Data/DbModel/{ => General}/GenClassModel.cs (95%) rename EgwCoreLib.Lux.Data/DbModel/{ => General}/GenValueModel.cs (82%) rename EgwCoreLib.Lux.Data/DbModel/{ => Identity}/TagsModel.cs (93%) rename EgwCoreLib.Lux.Data/DbModel/{ => Identity}/UserPrivModel.cs (92%) rename EgwCoreLib.Lux.Data/DbModel/{ => Production}/JobModel.cs (91%) rename EgwCoreLib.Lux.Data/DbModel/{ => Production}/JobRowItemModel.cs (96%) rename EgwCoreLib.Lux.Data/DbModel/{ => Production}/JobRowModel.cs (97%) rename EgwCoreLib.Lux.Data/DbModel/{ => Production}/PhaseModel.cs (92%) rename EgwCoreLib.Lux.Data/DbModel/{ => Production}/ProductionBatchModel.cs (95%) rename EgwCoreLib.Lux.Data/DbModel/{ => Production}/ProductionItemModel.cs (97%) rename EgwCoreLib.Lux.Data/DbModel/{ => Production}/ProductionItemRowModel.cs (98%) rename EgwCoreLib.Lux.Data/DbModel/{ => Sales}/OfferModel.cs (98%) rename EgwCoreLib.Lux.Data/DbModel/{ => Sales}/OfferRowModel.cs (98%) diff --git a/EgwCoreLib.Lux.Data/AdminContext.cs b/EgwCoreLib.Lux.Data/AdminContext.cs index 275d7b2e..7221a70e 100644 --- a/EgwCoreLib.Lux.Data/AdminContext.cs +++ b/EgwCoreLib.Lux.Data/AdminContext.cs @@ -1,4 +1,4 @@ -using EgwCoreLib.Lux.Data.DbModel; +using EgwCoreLib.Lux.Data.DbModel.Identity; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using System; diff --git a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs index 8c771e48..d7690ab1 100644 --- a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs +++ b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs @@ -1,5 +1,7 @@ using EgwCoreLib.Lux.Core.RestPayload; using EgwCoreLib.Lux.Data.DbModel; +using EgwCoreLib.Lux.Data.DbModel.General; +using EgwCoreLib.Lux.Data.DbModel.Sales; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; diff --git a/EgwCoreLib.Lux.Data/DataLayerContext.cs b/EgwCoreLib.Lux.Data/DataLayerContext.cs index 2e3acfcc..fca15cd9 100644 --- a/EgwCoreLib.Lux.Data/DataLayerContext.cs +++ b/EgwCoreLib.Lux.Data/DataLayerContext.cs @@ -1,4 +1,8 @@ using EgwCoreLib.Lux.Data.DbModel; +using EgwCoreLib.Lux.Data.DbModel.General; +using EgwCoreLib.Lux.Data.DbModel.Identity; +using EgwCoreLib.Lux.Data.DbModel.Production; +using EgwCoreLib.Lux.Data.DbModel.Sales; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using NLog; diff --git a/EgwCoreLib.Lux.Data/DbModel/CountersModel.cs b/EgwCoreLib.Lux.Data/DbModel/General/CountersModel.cs similarity index 94% rename from EgwCoreLib.Lux.Data/DbModel/CountersModel.cs rename to EgwCoreLib.Lux.Data/DbModel/General/CountersModel.cs index ef4de190..9dc2229c 100644 --- a/EgwCoreLib.Lux.Data/DbModel/CountersModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/General/CountersModel.cs @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.General { // // This is here so CodeMaid doesn't reorganize this document diff --git a/EgwCoreLib.Lux.Data/DbModel/GenClassModel.cs b/EgwCoreLib.Lux.Data/DbModel/General/GenClassModel.cs similarity index 95% rename from EgwCoreLib.Lux.Data/DbModel/GenClassModel.cs rename to EgwCoreLib.Lux.Data/DbModel/General/GenClassModel.cs index eb97b3f6..535649d3 100644 --- a/EgwCoreLib.Lux.Data/DbModel/GenClassModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/General/GenClassModel.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations.Schema; // // This is here so CodeMaid doesn't reorganize this document // -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.General { [Table("GenClass")] diff --git a/EgwCoreLib.Lux.Data/DbModel/GenValueModel.cs b/EgwCoreLib.Lux.Data/DbModel/General/GenValueModel.cs similarity index 82% rename from EgwCoreLib.Lux.Data/DbModel/GenValueModel.cs rename to EgwCoreLib.Lux.Data/DbModel/General/GenValueModel.cs index 2a339c43..0a44993c 100644 --- a/EgwCoreLib.Lux.Data/DbModel/GenValueModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/General/GenValueModel.cs @@ -1,15 +1,10 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; -using System.Text; -using System.Threading.Tasks; // // This is here so CodeMaid doesn't reorganize this document // -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.General { [Table("GenValue")] diff --git a/EgwCoreLib.Lux.Data/DbModel/TagsModel.cs b/EgwCoreLib.Lux.Data/DbModel/Identity/TagsModel.cs similarity index 93% rename from EgwCoreLib.Lux.Data/DbModel/TagsModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Identity/TagsModel.cs index 6e2fbd5d..9b0fba7a 100644 --- a/EgwCoreLib.Lux.Data/DbModel/TagsModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Identity/TagsModel.cs @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Identity { // // This is here so CodeMaid doesn't reorganize this document diff --git a/EgwCoreLib.Lux.Data/DbModel/UserPrivModel.cs b/EgwCoreLib.Lux.Data/DbModel/Identity/UserPrivModel.cs similarity index 92% rename from EgwCoreLib.Lux.Data/DbModel/UserPrivModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Identity/UserPrivModel.cs index fa2a83c6..7baa8be5 100644 --- a/EgwCoreLib.Lux.Data/DbModel/UserPrivModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Identity/UserPrivModel.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Identity { /// /// Tabella dei USER di MySql diff --git a/EgwCoreLib.Lux.Data/DbModel/OrderModel.cs b/EgwCoreLib.Lux.Data/DbModel/OrderModel.cs index cc544a59..aa4596c4 100644 --- a/EgwCoreLib.Lux.Data/DbModel/OrderModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/OrderModel.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore; +using EgwCoreLib.Lux.Data.DbModel.Sales; +using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; diff --git a/EgwCoreLib.Lux.Data/DbModel/JobModel.cs b/EgwCoreLib.Lux.Data/DbModel/Production/JobModel.cs similarity index 91% rename from EgwCoreLib.Lux.Data/DbModel/JobModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Production/JobModel.cs index 8d7effef..299a097b 100644 --- a/EgwCoreLib.Lux.Data/DbModel/JobModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Production/JobModel.cs @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Production { [Table("JobList")] diff --git a/EgwCoreLib.Lux.Data/DbModel/JobRowItemModel.cs b/EgwCoreLib.Lux.Data/DbModel/Production/JobRowItemModel.cs similarity index 96% rename from EgwCoreLib.Lux.Data/DbModel/JobRowItemModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Production/JobRowItemModel.cs index 015e2173..6be8ffe6 100644 --- a/EgwCoreLib.Lux.Data/DbModel/JobRowItemModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Production/JobRowItemModel.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; // // This is here so CodeMaid doesn't reorganize this document // -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Production { [Table("JobRowItemList")] public class JobRowItemModel diff --git a/EgwCoreLib.Lux.Data/DbModel/JobRowModel.cs b/EgwCoreLib.Lux.Data/DbModel/Production/JobRowModel.cs similarity index 97% rename from EgwCoreLib.Lux.Data/DbModel/JobRowModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Production/JobRowModel.cs index 7c885d68..fba7e5d7 100644 --- a/EgwCoreLib.Lux.Data/DbModel/JobRowModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Production/JobRowModel.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; // // This is here so CodeMaid doesn't reorganize this document // -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Production { [Table("JobRowList")] public class JobRowModel diff --git a/EgwCoreLib.Lux.Data/DbModel/PhaseModel.cs b/EgwCoreLib.Lux.Data/DbModel/Production/PhaseModel.cs similarity index 92% rename from EgwCoreLib.Lux.Data/DbModel/PhaseModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Production/PhaseModel.cs index 4a963625..ae2b8ac7 100644 --- a/EgwCoreLib.Lux.Data/DbModel/PhaseModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Production/PhaseModel.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; // // This is here so CodeMaid doesn't reorganize this document // -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Production { [Table("RegPhase")] diff --git a/EgwCoreLib.Lux.Data/DbModel/ProductionBatchModel.cs b/EgwCoreLib.Lux.Data/DbModel/Production/ProductionBatchModel.cs similarity index 95% rename from EgwCoreLib.Lux.Data/DbModel/ProductionBatchModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Production/ProductionBatchModel.cs index 8a333ea2..249d9a6a 100644 --- a/EgwCoreLib.Lux.Data/DbModel/ProductionBatchModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Production/ProductionBatchModel.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Production { // // This is here so CodeMaid doesn't reorganize this document diff --git a/EgwCoreLib.Lux.Data/DbModel/ProductionItemModel.cs b/EgwCoreLib.Lux.Data/DbModel/Production/ProductionItemModel.cs similarity index 97% rename from EgwCoreLib.Lux.Data/DbModel/ProductionItemModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Production/ProductionItemModel.cs index 802c0bb2..712669ae 100644 --- a/EgwCoreLib.Lux.Data/DbModel/ProductionItemModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Production/ProductionItemModel.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Production { // // This is here so CodeMaid doesn't reorganize this document diff --git a/EgwCoreLib.Lux.Data/DbModel/ProductionItemRowModel.cs b/EgwCoreLib.Lux.Data/DbModel/Production/ProductionItemRowModel.cs similarity index 98% rename from EgwCoreLib.Lux.Data/DbModel/ProductionItemRowModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Production/ProductionItemRowModel.cs index 0a423ef0..bb4e8748 100644 --- a/EgwCoreLib.Lux.Data/DbModel/ProductionItemRowModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Production/ProductionItemRowModel.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; // // This is here so CodeMaid doesn't reorganize this document // -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Production { /// /// Tabella delel effettiva righe della fgasi di lavorazione x ogni item da produrre diff --git a/EgwCoreLib.Lux.Data/DbModel/OfferModel.cs b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs similarity index 98% rename from EgwCoreLib.Lux.Data/DbModel/OfferModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs index 36406cdb..731f5e87 100644 --- a/EgwCoreLib.Lux.Data/DbModel/OfferModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs @@ -8,7 +8,7 @@ using System.Text; using System.Threading.Tasks; using static EgwCoreLib.Lux.Core.Enums; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Sales { // // This is here so CodeMaid doesn't reorganize this document diff --git a/EgwCoreLib.Lux.Data/DbModel/OfferRowModel.cs b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs similarity index 98% rename from EgwCoreLib.Lux.Data/DbModel/OfferRowModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs index 9050931b..6fa661fa 100644 --- a/EgwCoreLib.Lux.Data/DbModel/OfferRowModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs @@ -7,7 +7,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Sales { // // This is here so CodeMaid doesn't reorganize this document diff --git a/EgwCoreLib.Lux.Data/DbModel/SellingItemModel.cs b/EgwCoreLib.Lux.Data/DbModel/SellingItemModel.cs index 9f2d4101..d368eace 100644 --- a/EgwCoreLib.Lux.Data/DbModel/SellingItemModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/SellingItemModel.cs @@ -1,4 +1,5 @@ -using System.ComponentModel.DataAnnotations; +using EgwCoreLib.Lux.Data.DbModel.Production; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace EgwCoreLib.Lux.Data.DbModel diff --git a/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj b/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj index c3d746d3..4a258d24 100644 --- a/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj +++ b/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj @@ -48,6 +48,8 @@ + + diff --git a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs index 52ca27d2..58e2d2f0 100644 --- a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs +++ b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs @@ -1,4 +1,8 @@ using EgwCoreLib.Lux.Data.DbModel; +using EgwCoreLib.Lux.Data.DbModel.General; +using EgwCoreLib.Lux.Data.DbModel.Identity; +using EgwCoreLib.Lux.Data.DbModel.Production; +using EgwCoreLib.Lux.Data.DbModel.Sales; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index b24592be..9039ce53 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -1,6 +1,8 @@ using EgwCoreLib.Lux.Core.RestPayload; using EgwCoreLib.Lux.Data.Controllers; using EgwCoreLib.Lux.Data.DbModel; +using EgwCoreLib.Lux.Data.DbModel.General; +using EgwCoreLib.Lux.Data.DbModel.Sales; using EgwMultiEngineManager.Data; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 38194411..89ec2f41 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2509.1813 + 0.9.2509.1910 diff --git a/Lux.UI/Components/Compo/GenClassMan.razor.cs b/Lux.UI/Components/Compo/GenClassMan.razor.cs index 5d1cf650..2c54a581 100644 --- a/Lux.UI/Components/Compo/GenClassMan.razor.cs +++ b/Lux.UI/Components/Compo/GenClassMan.razor.cs @@ -1,4 +1,4 @@ -using EgwCoreLib.Lux.Data.DbModel; +using EgwCoreLib.Lux.Data.DbModel.General; using EgwCoreLib.Lux.Data.Services; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.DataProtection; diff --git a/Lux.UI/Components/Compo/GenValMan.razor.cs b/Lux.UI/Components/Compo/GenValMan.razor.cs index da60f478..aa925973 100644 --- a/Lux.UI/Components/Compo/GenValMan.razor.cs +++ b/Lux.UI/Components/Compo/GenValMan.razor.cs @@ -1,5 +1,5 @@ using EgwCoreLib.Lux.Core; -using EgwCoreLib.Lux.Data.DbModel; +using EgwCoreLib.Lux.Data.DbModel.General; using EgwCoreLib.Lux.Data.Services; using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; diff --git a/Lux.UI/Components/Compo/OfferCheck.razor b/Lux.UI/Components/Compo/OfferCheck.razor index 397890d0..1f596a37 100644 --- a/Lux.UI/Components/Compo/OfferCheck.razor +++ b/Lux.UI/Components/Compo/OfferCheck.razor @@ -1,4 +1,5 @@ @using EgwCoreLib.Lux.Data.DbModel +@using EgwCoreLib.Lux.Data.DbModel.Sales
    display check finali diff --git a/Lux.UI/Components/Compo/OfferMan.razor.cs b/Lux.UI/Components/Compo/OfferMan.razor.cs index c7c8e64f..2a07e7e9 100644 --- a/Lux.UI/Components/Compo/OfferMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferMan.razor.cs @@ -1,4 +1,5 @@ using EgwCoreLib.Lux.Data.DbModel; +using EgwCoreLib.Lux.Data.DbModel.Sales; using EgwCoreLib.Lux.Data.Services; using Microsoft.AspNetCore.Components; using System.Threading.Tasks; diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index 9af32a0b..c936dad0 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -1,6 +1,6 @@ using EgwCoreLib.Lux.Core.RestPayload; using EgwCoreLib.Lux.Data; -using EgwCoreLib.Lux.Data.DbModel; +using EgwCoreLib.Lux.Data.DbModel.Sales; using EgwCoreLib.Lux.Data.Services; using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; diff --git a/Lux.UI/Components/Pages/GenList.razor.cs b/Lux.UI/Components/Pages/GenList.razor.cs index ba25de8d..ac10128b 100644 --- a/Lux.UI/Components/Pages/GenList.razor.cs +++ b/Lux.UI/Components/Pages/GenList.razor.cs @@ -1,4 +1,5 @@ using EgwCoreLib.Lux.Data.DbModel; +using EgwCoreLib.Lux.Data.DbModel.General; using EgwCoreLib.Lux.Data.Services; using Lux.UI.Components.Compo; using Microsoft.AspNetCore.Components; diff --git a/Lux.UI/Components/Pages/Offers.razor.cs b/Lux.UI/Components/Pages/Offers.razor.cs index 3e0355c6..79978a77 100644 --- a/Lux.UI/Components/Pages/Offers.razor.cs +++ b/Lux.UI/Components/Pages/Offers.razor.cs @@ -1,4 +1,4 @@ -using EgwCoreLib.Lux.Data.DbModel; +using EgwCoreLib.Lux.Data.DbModel.Sales; using EgwCoreLib.Lux.Data.Services; using EgwCoreLib.Razor; using Microsoft.AspNetCore.Components; diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 4d9a2dba..3acbf6c8 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2509.1818 + 0.9.2509.1910 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index f1896895..869bc31f 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

    Versione: 0.9.2509.1818

    +

    Versione: 0.9.2509.1910


    Note di rilascio:
    • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 08a4f762..e1a2a911 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2509.1818 +0.9.2509.1910 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 76e01771..530ec369 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2509.1818 + 0.9.2509.1910 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 076a8d4667731a559431cd9d7e6d80eac298bf66 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 19 Sep 2025 14:57:27 +0200 Subject: [PATCH 08/65] Eliminazione proj non usato Test --- TestApp/Program.cs | 33 --------------------------------- TestApp/TestApp.csproj | 15 --------------- 2 files changed, 48 deletions(-) delete mode 100644 TestApp/Program.cs delete mode 100644 TestApp/TestApp.csproj diff --git a/TestApp/Program.cs b/TestApp/Program.cs deleted file mode 100644 index b7489eaa..00000000 --- a/TestApp/Program.cs +++ /dev/null @@ -1,33 +0,0 @@ -// See https://aka.ms/new-console-template for more information -using EgwCoreLib.Lux.Data.Controllers; - -Console.WriteLine("--------------"); -Console.WriteLine("Lux DB test"); -Console.WriteLine("--------------"); - -LuxController lControl = new LuxController(); - -var listRec = lControl.ItemGetAll(); -foreach (var item in listRec) -{ - Console.WriteLine($"{item.ItemID} | {item.Description} | {item.Cost}"); -} - -Console.WriteLine("--------------"); -string? search = "-"; -while (!string.IsNullOrEmpty(search)) -{ - Console.WriteLine("inserire una ricerca, enter per chiudere"); - search = Console.ReadLine(); - listRec = lControl.ItemGetSearch($"{search}"); - foreach (var item in listRec) - { - Console.WriteLine($"{item.ItemID} | {item.Description} | {item.Cost}"); - } -} - - - - -Console.WriteLine("Premere un tasto per chiudere"); -Console.ReadLine(); diff --git a/TestApp/TestApp.csproj b/TestApp/TestApp.csproj deleted file mode 100644 index 25eb3421..00000000 --- a/TestApp/TestApp.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - Exe - net8.0 - enable - enable - - - - - - - - From 0b4bc732de76f48117fdac0944721ec2dc5167e2 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 19 Sep 2025 14:57:51 +0200 Subject: [PATCH 09/65] Inizio update con udpate readme --- EgwCoreLib.Lux.Data/docs/Readme.md | 7 +++++++ README.md | 19 ++++++++++--------- README.pdf | Bin 80411 -> 80343 bytes 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/EgwCoreLib.Lux.Data/docs/Readme.md b/EgwCoreLib.Lux.Data/docs/Readme.md index d1aac232..9dfffdc2 100644 --- a/EgwCoreLib.Lux.Data/docs/Readme.md +++ b/EgwCoreLib.Lux.Data/docs/Readme.md @@ -7,6 +7,13 @@ Lbreria salvata come nuget SDK per accesso dati per EgalWare's LUX Necessaria rpesenza configurazione DB/Redis in appsettings.json: esempio dev ufficio: +```json + "ConnectionStrings": { + "DefaultConnection": "Server=mdb.ufficio;port=3306;database=Lux_000_dev_;uid=db_user;pwd=secure_password;sslmode=None;", + "Redis": "redis.ufficio:26379, serviceName=devel, DefaultDatabase=6, keepAlive=180, connectTimeout=15000, syncTimeout=15000, asyncTimeout=15000, abortConnect=false, ssl=false, allowAdmin=true" + }, +``` +esempio prod ufficio: ```json "ConnectionStrings": { "DefaultConnection": "Server=mdb.ufficio;port=3306;database=Lux_000;uid=db_user;pwd=secure_password;sslmode=None;", diff --git a/README.md b/README.md index aab3db0a..394b12e2 100644 --- a/README.md +++ b/README.md @@ -184,12 +184,13 @@ Esempi di vetri ## Version History tabella versioni -| Versione | Data | Note | -| -------- | ---------- | -------------------------------------------------- | -| 0.7.x.x | 2025.08.17 | Implementate correzioni calcoli BOM | -| 0.6.x.x | 2025.08.14 | Implementati HwList | -| 0.5.x.x | 2025.08.09 | Init DB completato, gestione SVG e BOM preliminari | -| 0.4.x.x | 2025.08.04 | Primi test con API calcolo | -| 0.3.x.x | 2025.07.24 | Aggiunta layer test REST con Insomnia | -| 0.2.x.x | 2025.07.03 | Primi layer DB | -| 0.1.x.x | 2025.06.14 | Avvio progetto | \ No newline at end of file +| Versione | Data | Note | +| -------- | ---------- | ----------------------------------------------------------------------------------- | +| 0.8.x.x | 2025.08.19 | Riorganizzazione DbModels e inserimento voci calcolo fasi/stage e costo lavorazioni | +| 0.7.x.x | 2025.08.17 | Implementate correzioni calcoli BOM | +| 0.6.x.x | 2025.08.14 | Implementati HwList | +| 0.5.x.x | 2025.08.09 | Init DB completato, gestione SVG e BOM preliminari | +| 0.4.x.x | 2025.08.04 | Primi test con API calcolo | +| 0.3.x.x | 2025.07.24 | Aggiunta layer test REST con Insomnia | +| 0.2.x.x | 2025.07.03 | Primi layer DB | +| 0.1.x.x | 2025.06.14 | Avvio progetto | \ No newline at end of file diff --git a/README.pdf b/README.pdf index f1103b9cc85b9740756615b3647029ab5bd8bbd2..1f761f47d18e64704a635b9b557764d3343335d0 100644 GIT binary patch delta 42866 zcmZs>byOTdvj>X1>*B7#-Q696`{M3ygS$h3;BJ8g*Wm61NRW`=8r+??-*@kQ=l$`{ znL1NbRbAD;*{+)2?#{b`TfT-%HDwm$HWp;&{D2f(U@$rlkIB1)e*(8Bl7;bUBBh-8ggDgYxE}k zdcGkpkiD_OC)i7Bau`hgF(CUd*B^_0G}k&~m-fCjm%!!9!u;al7s0%RvCnVnF1t^3 zTolA=Cf)<}iE$4_*3`3odz+3Ff4;rHSWIO&52hs8*!8;ut~Gl{Oyx5&e5&O?9@5@^ zyw)TFy^g|BRO+w6FQ4B=E)9;0E(6mt#LJ7G#Iq(g)O+f8pIR5>i0)t4H=2#q*wOvF z_df#XdDBw|SGv;mvJCYF%VNk!j2L?FOC-Jkagx@~<(MaBO_&oiwXf_r+``Mt)MV0X z&qxfJg7-AgKIcFB%dBcOh)*;jXl-k8EqM6fsF!s>tGb?e#=iqB%V5ExjfH>g6c+v& zj9Ic;u+V}%`XCRbAOn9I?4tKM%z|+mrd=W8W>~U9XYmHawXa$(f2|3$s`iip>fMse!FyYx;t$kW;4wWFF8u87 z)VH!Wg>iJgUM9_(`o_AVv36o3W*2*=-UvDqNeSothDIpU#%{@iz( z08S9N+1m=IXru>=u+z*2u_3fm`8swqYuEz7WAh^!WziVx8>u_PFVVA98J2y{vtge& zVOl&;9XO_3enoMPgJdP%D!W=*t2d6o!W_UU)QpL=q*Pv_x+L<}kJV)8gsOH%#Wx25++YyBsRf3j)joLy21%ApAr0VV zVD*>ot7J@)!gvjKIEI0Q4Y_-l)1dM^m}bFbX=sU3vHUW+)~3uf93yV7So&X^i$Opm zTtN=!VSmrQg0lF&7YF^V8mLq7ic9(0e;z4xNE=Z=iWhc&nsU#ktG4phV~Gm!?XH?; z`N=()Q}BTPb)&8S%Ehdwi;r-ygaP2XVO8UsNLi-aGRE{b7?U!-x-sb*rORs2q+<4e z>Y|^DMwql(CCb$ALZmy-%fWY^;0pQ7LEo5qu85VcKk6Jo(HM)Une8{MMa~vYljh!W zB=&EpS%&68zlS_mGn9qQhjO(6&zU0texGXw89W~&MRvnyF<5GbPHv725Cbe|o)%~p zantuv^}A=6^G0X$`Y>3^@UrZnpkuSkDVC3j`#8b+%&0Nh$1I9NUmP-qBfBEWvnDmn z?CLHH2H82T#t}CW0zL?!dBGG`3~?eZQAJb@?)F#dpl?2#7+FgyE<2i1&n^K0^$jFG zwGML0{G$Ar+!G-`PmY=&6aZbZw;*MYw;}e=AKh^pPT#26gZy6Ks1QjKss!Z?FKrD) zDyw2`AKUebO;owEgW9XBh^F|Vk%LiWzYp}ZPR`0U&DW;LT1BRHbzxQ0(HPs)Hb4)`i;NL$N_fb?y;tOBnGo)UO%C@%j|1XGi6Iv|`$Kl$>+S8)+|yNi-}{C7-tB??fLJe?5kitFumi#@|Xs@W6~>Kq33M5xI+dM|2bk$*ha(t*dua zo>jdfga}`#KfT15Imka6nRU=hc75OS9y))aU(-W43e_GV)YvEi-gy^3g$gvEw;zE8 z(fXUtQ#$&)wm*EB5x)5#dKBOK3^e?^*BD@T9Q(rGvYdRkWOT&Hc6lh<8UzWgDO{GT`WFFQ5++b!&I;D249x+RPw8dkChc zb=*a?MCYzjVLKnUwBY;0!DZ*M`UM4ES0p7{F7Rf z`9sk@IOvDpkrFr6l+fGA=!+;5r^Lp~8?>?XH$Kb-xq+X>fo@7|~v1p%J457+l0k^BUxzD;FfO_Ri!8>3~QO7X=YQaHjIih#kx|9iRpBCX=qxH8s1tSH*nV)J%hDscvOB$sg>1DWxv2D;yoHu=Lgf>;RHs9R|lgf^KsoBS212AwGbBBf*KlDcn zqD^cY|D0~k&e7H5_53ud#sRtUj-63|AvU^AW1P`Rs>fV?y(5jbLi8W_8o1AKvKxpY z9dU5}1tf=oI|T6(DmZONwN)E%gTG8_ljtx3_PS{(j`0Tu7XW5BuE>)1_|D<^1~X4k zE4&qh1Gl6yv7icyBSyyH=b_Y-aj;g$9tYFp3HLq+t*{3uy+9BRd5?S=tU&Kv*7ouH z9tW*+FuG-y<>!44rX*7O3f`C>U;5QscrO?a34_$-k;H1bpo!#u4Hmi>R7?{ zq^CUgG@bqM!OkMsM)yzO)ueF)jasQkrNc>6L3K-ha-SN*FV<(8m~UkNvgo+je2#%| zD+cd@hP4{hEc9dQfMT}NjT+Q6375KhNdnO>?+@N3u#w-58DNk_REV^KbuctwYGo)f zRetw#RU3pRYFvA_Nu3DSB<%VeQ+GymQDzHOC!E<()i1#d@0PP21g&_B5>gFKD~_`B zpM{fd+@1$7(!pAVoU7Mos6;n<5TXGb#BNe&;e8-PS1NV}S1MP6zf!dOLTjK0kQeIT zYFM~$KjT7yp-gDxT2hHbX6$14V+5>PFjU=QNa%@pbc;gsji40`Q)Cd5-lUkuzN|9S&>#+hzl z))jQ$U*T55j*`@L*ephLOqk0wj+z1UMMo}i9~{9HM!ilm`Zh^q$#BLo){0$8e;54o zEB9Y3G0PBDTr=bjpIATGgQG79Bci}_Q7x1cl7^YK^fPO}J!x1KChZ0Af*#kc1~F_E zn^5f~wQQi`(+Ow=P}mfFs8|67p&UeR0z#`ed`}}q)VKcieiz=D0k!F7CxPQoKC5f( z{QSq38t5RiR(M9}9+<+yj1~@I9p0U!md#hvjhH4zdn>kGYvuj)YXeuwrn0}KfS^^M z4ciNT<41xQGR+5Jq^v+lNg$xz%fqQ;d+BKu_pQjzUW)2djdTxf{Qy)Y8ob>s(N*z! zAElt}6B`(X{^YrV|K~!6&obwI(~uhDKbUUD3sV#3fRT`-PM(1FN5YTfk=;mdBtAC9cAd5y1?W*`EpaG37xY2T!7`5FIs}&}iyc zQ5B8MdU8(v+BDy8zE=R5yslshzVms4{*+?&3js2Gzsh9tAkaSY-><~b+SU6|;>DH{ zxrVS{-OUh<|as&pum{d!BLQR1j*Z7|xseKW9 zRR89Af`Hb?R6dkhgg+5R#}Wg<-cp-~9NwXk%*e%MlW?hFYtYFKl%c0BH0CcUC2a97 zK83$S-MiPS*qu1SoSl%{x%GZ`Rg!3mHQ)MIa2T#Ip{0}J$t5sE0g_FqQ9nw{W3ibM zvjk*srWQ}KcCGap(QvLru_0EPzbnj@l(@)c^##$=$w}puQDc5wO@dd(vc!zIv+OKm zXeip<4HjH>+Hc4iYDGfrhYw*E*URxWhUCO^SYJkLz&T!EP6dw!(9Agtf+E{*xmo6=FllDP&_*~j@-aJt477DJXeU6?&GUzi?>%<*;5JX?Y}oF{J-^k-S(&e)}FKUPMYifq~JyM-ro0=6xDACWq^XiZzNAs@UMH}ZyuIBUXihH9#@|^Y-Iq! zN0pz{rQ#b8Dy@+0gDqlGUi((eO7mZN*SB9r|LlB@91pSZJ4@si9Zm(M!en%L2G3KEo>^V(O6}xi--_ z>ZbZ>rZO*byoq*l55}(jcwA!Cf8>o7GJ&~v-6#9J{;C7(YYK9+b+SAi)qZ%rZX0IkY53QfZSkVu7$a zi6fp@!x21BRlQOClfo{JgOQ*`Kc^DyPv+wMHpMZ39Ki5^b_4ylq70gSNi(8v@TI?5 z2Y2(mmIDfxv0%t& zf_ab;Q&^voNx9Es0g+{2_E36R%$Wn7C9|9^zTqPd%Zcm`OWrQLa)n)fl;{s|8eWnu z_MJTN{p={gfmj^X_G);$@y*74u32Az;F#7bK>2Oqry9cWwNKY}wz9E0it&KW`Z&ce za+5ipNiHFNEu55Vx7;2UZlB!4P!Hp|SPMDct~8N)Vqei26zuw)g^^^ogwKzKES2xC zLmuFNith^+B)d>Pe{X&;CTGmaqv%cnPo%XJ`9FK2#5>yvT3SeVFcJQ3J`SNl;g981br!80DK+iEhIo&j}1Xbd1CWB;eix zI1IU~|3?^^jIk3r3ky+>{kLHv zZne8as{!Jst54?Pge{D^7;2w907*;f+28UNOE(jPDf<}?$M#vcyd=hYJ z#dabcmGk|0{?nTV)Bzx-PVs{Oggj_bu2#&6o6B}=0+vlhGnDcp(`Z~k3hpfd1M_Iy z6ZsC!(8-6tr`=Bw+&CSd zG=1!dM$2xn5<&Uv`v{>DqELP+wou%QY!W!E&=U~7mn%y^cmNUbtuXsAunE@f~b>wICQv_-pSQ6C3bheWP%o95?T>J;r59C1eN z%Tl3YDvhitbugUqO7+>u)}(TWZRu1`ER}!O<0~IGiYvc+n~&nGJS3_2e`dZkXXXqU z)aLg`({8*Zvq1wm4MBV+c92MGw7Ug-$d7V)ks^G#{fB!{^V-?=lbR(3Suj!M8GOjE zCz|bc0)TxF@)~tPi=x6%&fr~m4ekQH4}%~24fGkLAn>a&IEP=uF6*j7!D)k`vVzJ~ zr{VT2YHPE;FVGk6T-D(NZHZ;D6=P%qJ z#NiYOK67-O*kt=2M_SQzAU$AmU9!pch($sA1}I2#Q=|_`xx>$7_cQ;_ZG;!RLvr*b zA*;J`CQrrQOr#3r*pny(JG5lN@nWnd7$7c?Hq+QjdRSC{k9V1hDa~&>noP%%^`)2j zVS-zF$d0UeL%2=*Opd*2HJ7ZD>v> zWFXB1NzF<%du4E}( zCMsOomHXW(T-K#Y<%KCgi&~WXxj>8oh~;E{jt7TUH8GV|#|KY~UjqtTSqfXcS|Wkv zero%)V%ZXx>#$MX@F>1uwbE|H|K5Z@XB?h|4VvU+9A-&u@oGGXYIGPCyAkfgb&pAG zVeAjvz=aL|fwbaasMJEkn-kR#X_vT!^2FH?b?~NDD53Jic^SyRVXp;}1d&}%cm{at zh0P{OJaL}vOTb{Ya1tG=97cpHc-kE8XxpV+N>9j|duI5wqTg2tu}veRGI-*UTd56t zaxlDFC=AvsnyWPgj-NVL_rt7|hjL25Lv@=^!jKOxq2$BoLOq~!6Jk->tjvCbOPN-* zgS^4DiTvS%!F(@uKqM#Q!TA3Of{JZg(F@{yPi1MHZ=bdc)f4B>WWG!cM2hHX!5^An zu-Ko!$q_2ph#isfdmRd^8WAex2+iDP4PK#?4yxCN7cRgkC*xv_bb)zV5$#=Zf0rdP zj7);+l;K;G)dn=)mFEeR#j5)iGwMCM1XVX+35zwA%&nr|Q3M`rIz_`JD6q|G@Y;B% zX{vk%q)gRKqf)#Nka@}iwX-mubqPqa&V0gtkR+wDGkgmd^D06=bY37d>G^#}!4cU9 zVnGYszN5%G`3*2~x&8+9J;*Hv7f!JK~1)e19qq(30q? z{2Tak71k*!glTFb#5t!lHt>bd!gI+>*cU(3{HtphS7Na)y6TaLFMgf&&)DTt@i*bq zS7iVEF5-oNV+Vyx#&_FQ)3>=M&vSK!t(E7YrkvZp(MR@Anpey@5 zBXR0ont1GMbPIX+y_b4h5(+1@N7aTTpRNc?%eX}{pq3-7M6Dbss;zhiGCWD>7 z@?WVXb}qgnYobAKqH%r>e)#7KCFT-}N!TBgrbM&pT2&vt%N}}9*#G=tb8bi1zz629 z8Q*iG*TxB9`g!O*?nMafcQdH-l$nqfLWl|qAa9Sqmg#>+-F$_=XusB-Ax3%#4Ndv4 z9fdX#^(Xp(6$N z-hJrxJIW6VguS>!%gRGsnqhy zSMBoqvt@K6nTSn)`qH3fpL)CK**$o|ClWdEXYU_dzcru8xQE@gKl0ywf1eFCd3Iwy zzxDo+=Kz|V?;(RRGS1xT_Zei&{|??oz28?tH`U6Rb*u{#tz6TGAUUl zMyduKw3qg0C@u}*eob_^h5{eB#CNLhU_a|y^zPu%uZ4TWh!te+`QHuO{_tUcb(OGt zvFp34?`s!MQ8Q3;Y%Qw#!DsXQXyA*TB)EAAFbREoOz56#+hLFfuDgny?{Uu1a>c(y zbQhF=Lky8)$n9OA^%Waz9T*kA6#)Vc9=$%q)VQ$6)SR)z)V%$NbTK}@nllyK6h{x( zNO()42OJ|WQ7v)I%7+C+5swNoYpiNSkhjC|V(DOHSIk?>;&_M5-Q&a)F9(30R{#f& zI{Yuc`rqol4$0ZvQt-j z2ju~WUyG`ae}(5fk-~FU6g*v>lVLIGGJ5UXGpcut#e4^AB&Wm8lOm}|$4FO-#)k2ywa zkHhj-bY|q9*+Kr(CRewdzKYpn>vRPvoyuJz`)o&7Io;(`mS^c-|3`2(*SdS|H*K#1dng8f5-A;nW(*75-=of-;5#B!zawe z#9Y-i`6ah)Y@HY4-%*IdbJ;6++T?nV({~0El-CR*_)jmcA9K2GROjZkcp?32o+tO5 zk`&*DYIREKJe9hja>RM5_XR}u+tO+=e#tFo!S)jK?eV3nI!@2djafa0qnU!!4vEqneQWUehIjjh61*e0}x@7OtpI=?va*&txu*v8n4>0 zsM@gm>^Kf1f_O7re6{u{gga_Ri1$LpQ}kZ~=rqbDJK4f4Qa>seD@;^R9vLB|1^02m`dLG9`Ba+Dqz&_v*Q%KIg7>pVTsCzM4!bOeEJB%Mj14DMQY#R_ ziNKOC%Ry&>tr91XtPFPfzEX8y&gIu!z~Q zsEPlK>R>qC&~s8@#S&h##TZ@#&X)>TT@Hc!CzQCA;0f{^Z~ZsSs>8vH@dSsjxzmbL zIqBTVro*8l)G)Y;&Fu0VQ=4eS2Jrs=)uKDF6bUgT)8X)eeaPWO*Wm~T$>S#`fxbg# zy0MU%Zh(qyXfrW8#K!cCxx;tuft+9}o)<}Lj#kR+$b*p}7zBF`ULK72=z`s?9fP29 zKpgd>6m!LoC01#a)cex&S?cUTOQIflJC96=*a7(T}WA zWu3H2|2Ou8f$;Fc>EY%>zC2>{NgbKR(G{!$%OOdgMrV6-gh3Y}W}4HQyQr|f7?ixg z9EPb7^ufYb4(4&{fPrfaVgzyj>)cQTVGm6C>`=sjn$8U1S5F>43#2UCbItkYlaa0k z__)~}tPZdUPa+$NFY|rdgR4g)ha<0TyFM|`DzHUtzF}neuR(VvZp-z_=KL;%Mpp+) z>TMBYqHPh4P%r!fZ$2%1z>wjKaJWKT38?!aZOk@DsCr)LQ+T1lLph)`;@P=D;_RH5 z1AJUrxbx3t`JvWC zvlSIt`O2l<_-neV!R%U$q{P2wX848Zz^Tx6jWaTb0A2axhNEDZ!RWj_0VyaX<^yxY z2WBH)$cZD2hh_A)SJJhP{yt-1)6C_k3~LdD%r=X@UCiy|5JUpvRs8H1b9xU4s4t!| zK;gw4$;&m&dr%nAtAl$~jr9iEY<>@l0($$!Aq|TyBZ1C-z)*G5jN#=P;r)9yX49bz z&|BJPJa3kKC7JbS-i+;#o$x06!xQA?%i0`%!+rIZe)solXpIIA`^d1(QJ<#p zU-ua4cvz{QuJ;bznjx!aj!a;)#a=UI+JukwbPms}13MpV1cmi`_0JNoilWt_!@ zJCuvHWsM?A2@U~*Ni(ld4f-p^9pO8jGid`6=HHRd;HH>C4&Irg` zW&YghD-Wl?o|xa&_T#7VlHRmXBv_VwU z@o~GTo&>nJ{Q4?ZdS7r2%J!XCdLAp#mtL0XtqPMr@&hV4>1e{0D$+!?e=h70xYl#2 zp!Wa;UTpS`-rih=x#{4T0sUIPwdTTe;o2|)8$=MkC@zTExxoG!38T+k*J~mPc4Oy@^@_=iAz;FrFqRD7|~H z2w;vZ@RXI-aE3S?l#`K_&7NZ0S%CkBt1%Y`Xgih^8Z>=`a2g*(Up`(=RyQWb{fP3n z+3L0Z)Z2i$|JnKlC(btObeMZ8XEUjvy6NO)MkwoSxOx1rZv}a3X+cV4Xl&9?ihDAN zjm!rHf3!m6L!udxLH>c2izJ28MfhI?06Xzmrx$dx$$p12l&>J%Y*kh8(UatKI^AF{ zw#?%>O9$qsq;Rtnd1%zJU*u2{`_I)Oba8LZQ_qqDgRaF{+C1GLf;9s%D1JYTHUA?x zW91l2@@i=W^{9z3b#cT~v^AL2P*Z5Nv*LpPl)G`{JyB+x`1tzd>W;{j$Ix293HyK> z{;%@ZT@`P5@TD!87`TKdN$`4cn=ZY#x zVbmjX%#uji-)FuAGesgCgce8SiZV87wB1cII1l;-pj=H~Goh2}1~8L{(*;VSbvkZB zF?tk>owG#XkFU{C4H11SAJ9Aj3tBMp9OUrR#n*2Hur~y3VUZPZNrq+|eskAJ&Yvs# z;Bc}aGWh3x->d?NE|8LHm8aAUCN2odbTdVw$qOcV?|$Z-!|LKAfJ|GAa1r#Az?{|? z2Klfr-v+Wh!akaIa!?vF@EXMNzSus76^G3|)sL_BqJq#oj4g)c4kXb8fwsxzA2^0Z zlT%M{6Wxe8Hf7Rab7l;tz@MCtmA6{8buR;|Wf@LRU034rxiORknuA0u6vyAu^qFMI8SC zdkx$DQv^YnbE9di8g(soM#tS_f2k6|?ajkVKEV`PV{bgUA2Ng=_VhD%_(!SzDcCq= z;u?J8nB(c+F%x&B)CR8XsoE_t&BuFZ<_0N4VYyfQ8&KR@iw6d+gLpO}U~PRKbM!tDctK z9RKy_*HV+JXNS%CsrCmfCoOTle3}CB(5?rQ059pMCZfLLuZ)1lr><{|`c2;$l|=RM zScD<;M-Q(;6j6S#DS`&PRk+^Zr0$~cL(k9hCnIk`&YrQae)Qdf#nJHh8uA2441e1m zR%!|K&GWr++i25vS-Ag8vaeK1d5%cya`SVr@Y;Hhs+2Ok%0Ak92NSPU`K3eSvou~Y=a~nQP7^HLdGw5ZGzNonl)+6;ZAsI5`6KAdKK9hBii@(ieyz>6PiZRnF15 z7OgTJ2XY#uZ(POQuvTKd2r%OFYyG^Z(fV@jIPhp&qid`+kKCCSE=*b0Fo;8gdL|q^ zkE3DICb3pfG$$o>o17#q6p(!ewd($gwz1fRG~xb-_MS7~@4ma=^s;t)Fb2Li#lLR3 zUDN#q3ibTo$oUCH2BIX{Z*OLOzWs|C*pi~q0vYO(7l7yPoVw9%>))Cm=`No}g>r-6 z#)+nBM2HR^?-%8Vw$4IM>yzc*q~71J_lj0~RVc4U)Ya^EX(a^_m2e%&^AT+@W zpQ1io&WAyB(b=FU)I_E#zvnQL@t=BKB?EMew!PVf?yY}F&g7BMuRAmI*%HOgQWk$= zv8R#?9kbfF?AN`jIrPdP)J%CqqL!DG-v#Y&$?CD?M60&b7s`8dTFM-M8u(>O;z_;z zwGlWZ+3t~ZSOP0w7Ft|b(l#$De2~{HD?`lTt<6Q`G`0AL;+u=(6>za+f9hB;d4Z7|&>PKP z>7Fn0n7I^*Tt4^JbWVK>OC@EG{!BSKQUmxGqc=#OI=VHhyz-G9ZZSu?s|3M5(FF3= zB%gzj(PYRGEeF5$Us&l|lyLbqSm!h5^dP~LSt(%_Ak!u#^LuOgtbHl{3oO(&+m;7i zm{f3Up$z&Tb-(RI6|9}xq7AX|0)bg7~g5>1~B<(s=t(Jj=T#LY7uJ~w|Ui&qm|dD zF&CzrOip9R2_AY!+qhdgloH9I6wi*Y5SsKvu0K-KH12mWdAQGi929Q)U2z^Fce7q& zO{XAVV)ZAnH~AQCQ?1}&-tqxn{|L6Xl7q(xTn*ZzzhE2b(l4Ifi47vIt z?j^b$@PDW2`ck@1_+9$$GS`=WPA0a`qOVUvBs)Nb-=h0_oSR%-01CToY)Uo~Bi)cR zlQVU3CO@{u*|8T`D@ZQ(?F}8M&;R^RuLjGAPiQESL*v*$) zk&$3>@@I_Vg;4_ILRU1Ah^u4T>1`Wmds9krS$`)%XA_9H8wFWFTycscP zeTDLv+06FK)WiRUr(c~M{?D*4uTC>tNH2`^WT}&wTki`n2F}Oz{!_Q-V4$zuSoF`k zq18FD3?p{rFYj+ri+-Qef0Z_%?7qIkKwnV9g9qwC+K*hSz|Vw-G)30I9& z%VUAI@NYC`h2lFRpeZBLX!(21k%F)q<05cZrblDTDnYQ2He2~Hp#8a8!5dL*Gy*2 z@Ii6TXJGu0!$(vF^OXU%sgHd9FGLu)u$)#F#coc31tkLiXV4HmE^16t7>Jt_D}o-^ za^A`U&4r6IdKpv=#)5@!AC_>7sB2wFXPK&9>dhT{sXCD;JKIx`ia4 z*+SgM zh}lPo#ZV40n*ADzA&e+NSoKFJ@H-BzDx$Py;FBzONYxNWW}QJ8Wd_j?wB_m860#3i zPWl7ckXQ;uDc>7l25$5x2T>yR|1YRHvhn1tH5k4Z4uLu)f)lJ~?#IQ_s6iyM!li~c zZ5j!KLA?NLE2S8*6Q?$*7O1oI9F8v)K5b`(P$SPvpG?~5lmfiiM77Im$4jQK?%0f< z@I>vNs^LcDt)UE6w&A4z*|C}CQdm22=eFC4Z-G3ma40MUu2ZoFuDikNJ2VBZ*Diuz z?VHEYuc2a;@EOXbV3? z$ovIVW^c6zlbv@S1Bh>M_#wWNMP1&?iD+v@UHnKBk-K4rGQe?BlbZus?xp5;)OcR0 zGvw{*JVJkMQb_(=HbAsnqQ_VpPw<1;F`@~Fm9EO-(M@1-p zpMKsNhp|QAXBK$#WJoJ5`iV771k9iT@^d{>9J4N9-72|g?lbP3&MWuBc(h}?3|xwh z1fC^>2)NgjcXt-HZ75sN(1F^c`t4fWDkI zPhgC7c^UV|73gbpHQcY(=W8^TJS#F z!{td2`tyl`P)aIIM96O?5jk;4z=c3(W)Kgr+ps&KOYVVZNhHCLW=Uz`Jm8(9{#FA^ zYk6^~OlQtNXQF(9VQ=M+=D46Pz#@u~Zh(;$63vVoC28W>NP<`&%1g`HtUFeAcP$+2 zQiGw6pSYFO{0)tFNQb~XOC1LqTh``iBHd9}$e7mI(Sm{{D}UwPXt@Cs); zdG2)_&xDfnx13CV4@Xm7OH*okeTb*oFXJWzgrjnOyD3m@duq2C~5 z?_-Ud<8 zh)l=7t~`-P|=3OQKH}4DW31JfRY{ zZlQF2erUl)`~hfj^=cW4WFV6^~7nZ`@9!mFoD5xOXoj4Uik0-u5z@v4837zf6{A-)=p9 z2Rk}Q#tfUUZ0J8Uw%l%}ruk36y;_mZN(k$GYYwaI?i=>~oFQ0hnNEx*r^GXWB>g=Z z%%WvsbU~WVU`fjNPa*OLuQXF5Ya2#q9w%-rM-D~`7-BTL(=`AZgB3yoXO5C^AlZXn z|9#O0;*`;-m#r%@e5^Ew$)C5GU^D1^lFbM#^AC*MWGS1zCv3`*hQefpN@{QMGowmZ zFkhL+R_43Z7PO69pM0y2mW&}w^iT;N+G>aAJN9pDUHO+2p&3xUF5}?ryxioh8M=Il zP$sgJx1gIJZ#yhke?FGBq``Px|Hl~5>A{;QnF>w}Y9nKzLmU*yH3db?FHnc1 zIti*A59U~-!RU=rj&mS@Nk%D`I1nuRK_je*oZlkqXMOr>zmdaojq)~>gDev%M3DCZ zCN_R}m_k8#eo+t{TA`TE|Dep}MB28~*YXz91`$sqJVC?e(cp0Bmmvg3J%(AUD;6W- zO%YKV-qe-26W;%o^3>4NKDCh_+~68mtiUS7TUq$r(msjwWV;l7gAW5a-N z1RVi})Bw!`BvAJY3XlBC=vJp)i_pu_r=cRS`-49ji*p++AF?RMVgW4db0IF2dg$l) zDV4NPTh$+`m~hw;Rch7`NehD-wRe8uiDS#2w|-J~qX|Q}3U@~HTaJ4G(-%wFL}$`M zjnfObIw}~+JghK{o%80u!$mE9%e61TV(7Y_x6Mz1B&m1zf_4phIpq3xcyNCGnS>AV zNCf!~lYLG%+OjF^>#wAWtLux?=}t5J)K4}4vW9PHzf>f2JckMMmaTB`HE9d(=&W2m z_RJGE{Vm@(C%7?LK&DD(76ZcOTBTJk1B_S^P9!D$}KtGj)&F&*!z38H5s z*dnia5AarZbfS|TYF+l{6usE}r)d+7aSQ)lz6Yw|F+8v8HiJR1s=kQwI%DYD^xXX9 z%K^4(`B+ZU4akJ1=eog6w?8ND2DBTK`bcCXEjr3_&E3TX3`ITybC!>#Fr94qG^a?y z;FN+PD|0C?F6a`O{G(kp>^P0OSQie?czuvj<`%yas&q~KBaz|fqH!N^h@4a1*rC+x za8dLVQS;JVb!i9!!LjYQmU!8RTW(iORW>taNV(z^kbdncihBA6&2*eCSvJsxew#o! z5C6R+B$K7<6aPBEo?BZwaj*`MAAGIrAoX(lH&N*|-kEJcsTGxz7aU}M8a-0k(1b-B; z(8f;&=`Tu*IuVaoZy``r(r3G(*k#Xy!uJpk5z$#dE;(g#f#`V)X$ml+l({@uvI(a6 zto$lEI+}Z^E=boZCgK$FtHNr*VRVX4bP+56k7evR0h@#&W<83Rvxnwy_{!fX<8d~`2i!ntT+>N-lJ zw76KWLF>~r1S$PQ!%DCYT`^6#S}|+0r;2cN!pf+DVLtI}gKJl@t)q+I(qqxjV`nE#itevlg~70gU-0w* z=dv;toJ0bCmR}BVhY!n6DaV#r4TJvM5!O+T^G$=;`^)%W!8TEjhY+6N7li+ZvfK~R ztuzhtPS?4io9K4@KUBQ~a9~XnHX37NZ)|LwjcwaDH+HhoiEZ09cVlmC+qR9H_xtZ( zb#K*F^-Pb>sW~;%PfvFrxC|P+_p;4w|I-BRysY8g^1+A-LxY4VL$HLGd6_{RP?9uh z*wE@44yk@8Q?UQD9Z*->BWS5{Oahy}m1@nwg+~=yJ2+CAS$2$XQ+kLumf3!rq>d$D zyzpZ?@Z|4*4Jig}j_L=VAO0*AjpS}7wbJ{sj+OM-R{PxHEQ&)|;lbm;V-`af^FsR3 zGwuaVIHs~9qARe4m*)?aSmCX!CSPXv7=N59qVrVe>4Cdz{@c6U_#nh!1XFMNQih== zFsM=kKl%8GoSYp^4Q;-;XBO$MR+F{ac<0m{9fEAouakGf*iY~g@N;tt@DYXCK-hzD zei21G44lvj{l*NZ5s+>6WXzTI*hY;JmW1D=S4q>r%k}=Q6$L8k8u0Fvh_w^gf$=mD%H0>vl_BROn{rxXLPqqHX$Dv)o`U0Yo{xG)%Tcj_)_kD@Xi94 z@;Nx3pQ%VT`_tz7mxBw3eY;OJ89Ft#&3F}a?&P<+ie3z>GJ@QieUcmG5LiaajcIyQ4 z9(^XDRz;eVpN+2=2h8yOyGuXZXwd}VGqv6{NU$38hYQHi;4Ef2N;rSwn0fBj(9Zaq zIrY||$37YHLw~FNFph@T=qcS%Z5fNRjerLu!2_Pxt8T!n#P|QM!~}teUy* z*3j?b$1Jyp?dbj6^expb7Y`+nm`U>JuRS))iR()14L>6t@*xi=#Z+7y&Fl^AF=avR z#qrHFJ}VQD{3*M1h(_(t;EPVbdFD|RS)-z@6FTHQz31F%(0|DkBb`{%E4bDh|Mjn8sv zjVu{6yAmuj0v@+ehM;zU!yy^Ztk1jXLZdHbr4Wk^{$QPVDU`O8ck0 zwG=z{XHMx?L9*2W<+%Ug(wp2Db|OO!Ds{>0Nh6W74gp+dj;T8o4jhOy`7Tf$a6RnQ zEt4nu$L#ofYCAkgCb(F+9vKO!d7B7(Hzfm#HX^cVf7A>rjmy3->^M_O5co?jle&c+ z35$_17+Mn<v9VA!mq;Ij~ViDAqI{Io=qx*NaT>XdjXK9J&6hphG3NWnDy^ zfXqgiJxv00%1%>yj%=B>*PkdUL`9Qu>mLsk8D=dGAg3~njwm!7k*>W!XFt+7MbHcpRe{YgcP+`>zgq-s?eeAah?)4 zUL5j4SfGM585)`_0Zm-y*SR&(wrk1Oki|D3MdlW>0)8Ir83k3bD?H1G7gyRnrRg6- zp#o}CP+A@CH9<-Y+_Ad{y8F3r?L}TbUT*K8Zl_OT7*G6g*p5uZHcj?zkdLMu1fO-6q zHV4Y+2X8c0NhzZ9bgd;Q?9qK3{Z)`x|~Uiw315^D-EUA@sSFO)fNmX2_hYE^n;ebQv5kyGj*)(-Ih-c!Cb|HuU`HD=Z-d-#&uw@OGyNUD3*$TK}5#>vv6ZuXD+_yls7KeDrMnO#!sg?= zIXl7|wdey~rJ*GG>*sU(jeg9gBqJXmFal%4)uhK!txd5hgO#0`uRh}~oi(R^iyPCb zm7{o$_iMsqdqQ}krHG)(wYi`@FJ#)?IVZ)MqsQSSpsJ%>JTIlTTBRB%GZXVzsW`*j zxoKw>ap1kLN7A@r##6NG`<=;=r_au^t6)(3V`Y~v@9WdCsD7H@N_J4JFr52OAleD` z>4MF%!Puk9Fg@8;em73t=DnZD)WsH(AXr_`{)$BRAfzr@L5#q+q8Vw<%-xtQ=n+i0 z^Fl03<2~Hl$PVo8YC$!$LS#gNdq6YTg^X?R54a$^6Ebhx2ZR&FBNo=v73WDG{S{#T zAw&Ace0xY&H?Z-qgTuh28>~4JK#qAo{y1iY7QN)On0MSf$X0iHNpX#IwKy2ef|lYh z_rO{q^QIrSN;s)Oc=o8Cm8SDQQ=%C>O4bT|F2c-n zElV=4|KhDFMF=#^kqpr{!Q4vI37spQ_B(%7>7{6S=mvOsN7F;s{sTPcbMa@3g6{Me zi8$mmD?@plB@2vpi;%+AQzXhmn-w*Tg6RL>@%swxVH|$ofys`rhX{frj#5z`sA~n% z)6jvPNkuSr&5+DhH&P6Ez#HrS%1Y@*-?L@Jv49?v_9zsi>VUEey7tqIAe(wa`a1(Q zoG*@VTT~Q&QVt9q(p2Gb#^+1KyZgJ7u4iJ{oi*2ST;#|>@~eZei?c0S;gA%&ihGqc z3Hssahhi5e=Me8f?(EcRgyQz15^HAPq*^$jbepus&#_QTE1@}(u_93IF<~ytTMH|p zxsb7*56901@<_%Zq*wjuJzGFG#7#~wHU81-Tja<}OAajd2<~xiNllS>W;(;KDM5iC z!jr1Xn}>lAhHeG233LlEGdqQhEC_9 zdM83&egb@*Jt9fJ1-tQx1UJlD-W(mSJiu=H#tjf#bd zJfkC8&i(>0apkY2Qa=|R9ksfOa2Sr9V|^sMvNbvmUJ*UYli1x}s-~UuN~~O`ym-fh za%V*bAlI`u?6gm?q~fHzWNZuJxWF?J2Q+c*Oo98+NaNWNTe=3re2L(xF z2M0+wCkK^YjnpI0Yv`i!Q~Q=z(!z~@p9SiXlQe!~=9AF$386XCim0lqX9k$DD}LSi zfWk%f)yC>T&!!CeCI|#<$<46Za}$6*QNpX@r-_1H(8r^xfxv=$hSKkdnTNTw)=vfE z!O1RTW2T3i=fP&f;hcH3Ebxv}!PUfKI-pMqp*hitNVWK9i(>45i@{97STJLtfdi&7 zSfD$x5yUeD(P*-R3U@6UxI|cNF`>9XN8#6tY&9gDr`TFg%17BXEeZ)uh*PL`HA)=v zEeCP-zbCW8)K@B6O!{Mj5<&IySRt<*K|sPJ%O#G9S_xwyvjOrnHpm|I76N5~S#X33 z{D#@=Fs$tkLL<23{YmV1tvD5YV!${Kt_t*2by>j?@?4R9?T#lkhKphnf#**tO^gttGGkRQev1@-GBWn~ms+dnw9m1Bf=g&yfIi$()=KUDl`uFFBi=y72V|k5)T(^5E;Ttix~Zi6h!D{Krcs)Qsr1Kb{Mn_Qsz+nr&>3 zf66XtC7a(f(Huq}aJaEdwiI|y;Cm0Y00sIHij6Z&c!$w-+iU-kZBDmH{4e6FCNJZr zR?-N6J>qiZ`5TcDqH#!s1Rwm*_6Im!4@Xj$20^zY37erXGDB@K6^Si+vPK@wYxKdg z+Z@eFzyq~-h;-M4iki>^{yz*~jmLO_BKUS3BZ1zdqcV(`41 zro)R2c<@J_L1%`=wAY5}kOQ4@b2fQW0G@6qOm|pSna4$WGItt%)USsI2Py~b!=SQU zwT(3RY>a;Eaz(6QpMo2Ez^#U+bQ{6CdX~pL@380X7yb=JhFjy=$?GOQ94A5*6t#|S8Z!N^dzC-xE|+m*ZjGhva=taE(qnq}Z_h7x zf!C9jriXenbx%oT2b_rx)|}(y$Vj17em?0^UPpZ=NAU|-rvwH+;7@fJqxPamYK;}i z+(aiORD&Jce2RzeZ~dGCW{5xT@?{972nvKbZA8v+0>l=0?V2td+*zw^ilm2akpGo;PY{c0{6RIBx{&G@C7})<14y=IlX|MV%_&5DKOpcMSXvh=?X;l*Yf{>=fATI&UNznhoKpM)XiDi z*I6y8#<_H6eoXIRbZ~l|X|e(`v~-uL1he%j7;wqQrmfbK zqEMwg!H%3<%5bXYRiaK@?5%v@p8yxpf)%>0_>%}RhfFDXS|lPSlni^_b&RNTk{vO_ zFpO45t9#Lcrj>j}A)dbrN6k%8lT|M2%u+`qRr8CHsDHK>POQWxMfR2&Q-u^J??_7I|K1<+uNsdqg?1F%LhEk`<0eP(naiu= z1}EO=1ph;ZVRHaS&ciW(+2+TZv8K^Kb4qY_9?REjOP{CfkIuT4SY<=~4i1uj??$hO zKz8v9nY0YnP7c|754Ed|g&H?zdx~Enqwy#vfO)*@6D_u(4+Zhug-m0g=`f5VGpwI0 z1@YJfS>SV8paO1bPO2O^T`EhOo;v32A=Rc~1UsGOU?R5*$VfehQl4>KX#AgV(JlCp zl}^6pB(^Ha8bzZzLa|xWD~7iwfloZxc@**sh&hy`W6&po^a-$_u0Mop)>2olr3 z16DVTzw2*NalkjD%#_)niyFlZLjK88aPT!+=TIv9<<*?sn3VhfQB+k|<;#)Pvj6>a ztqf))9!}lMhv}4OIBs}=&YXdJ87igG*-2V*-r4`}fgEMpM<{~khX9A`GL&ah8cz?EZ1T`n3~f(IY?!Dr9sd%dS(72x#UKj zBGSbbtzdGL$5n_q?5(v(sc8Yh+P0=Y4=##j0d}u7i}2E!n8tDF)cw&&7!~e)0--e{ z;M|#H{yUnNM>^D)6l@%}nIN3IS3Z>=RJ=6G6sEyiB$dBczLd9@pJ~BN18Fi_eG2Ev ztTCgWv$qCcNct|s+#%FrjrJ=ZX)<=}=)qOxNv@6aylRSFeVmuWa&**B!a!X41qsjv zi%cgP{eSGQI`|DrnUB-B85YDHXD(Yk0LrL|>wSAA%j3NK5@A*4O1-XQh!3ozbqdm? z>u+Ti`<$MB3tJqjTD;EqHRt3<$%sWz&%-d zeL#oz*{L(oMuVPp(y{D!vUJ;5X(iRlsB*Y5`>ZtFe_sNKx=DB0h-7JIS>HNGus)?J1N0euP5o9djcG=4oy-J=~_j4Z=M{m zx2vOp^n;8r&7DUuBHFH(+hlXL4Dylp8Z!7tzhPzao*wOuxDE7XNLhuBSv9Pd=l#mR zAh|a_)t4S^q$@-jV_r3G@=?vh#?|e4KHE3y?IVoqwW#xO+3MbY@sW_@<1IYEO}u^| zgC%G3Fjm*|5fF@$`4yya>Ugu`g>_Ss30+86?;iV@297@)ev^5*y(adu@1sopZ&6VG zg*X6s=X+e_X6rzDZQ|+~g0Dz&_pw|FPrN@Y0A8uyx)+1z>yoF9Joh6wAF zrXFKW4Zqi`o|^pqR!`uFewY>J+%`RAig^S--O=nV2IyqCCB|^^ z*;`9-(HCS$&*~|KA>AfH%Wp>T;Q)5RD`$0`%AzDRVr?h8snnG(JM5hdhZg+rhslqb zT|;i?Cj?zO%YUk*9%isnx*q+iQb`pvT>944m&7&nE$o>^btm6$7SmSK)Ap?wxGD45 z+BWph0e9dx*s(Wk5vfV+6#tyGm#)ZShdXD4X*prnPIgJjjC-NG7Lr`w`%v56?+*cb zC(qZ)j@k+Gi*}p^*x9C>=>4GZ8tObU(wRs*{E+?|b6j`&sKH-yyn0rV>@3;k@5S&} zE3>QL8fP9!`7hgO$T|4$k~>%*hVBBguSr=Ke$<>$j+m_nJ-nW^5B*xrIDNo__mM|E zac&cP^YcJWx*n)t+iqoey<}53h3a3D$a>BBDj4yO|1zpIFd@xfng3rE^#85$B*aop1pYT@I)-85 zc)6MA(*9TGf1H>9aeRc9Y!RPanX^NF)#{l@^yxN*=M$)?jzv(9P|TB@ln2!i=@|a) z9+xVLyX}^(3aytZs%!-JHrI(<+4yMa0k0ViXwTSEk?mX1+Q+~?A*{kr`nWFGN*r0xk6*g7B3C0BmKb3;|*l(UehJ<aKr)5YAR~Eh zI(Z8SRr|vCiov9nb<-nO2ohKEb{Y~0yu@Lhlx5K1?VeW47$HMMA+sNaxy*baE$pH20LH0d5>bTOVfmQ5FM49{K&~IiC%XaMPy22aYtC;( zkm~Og1wrAgvBZl4j=9%yLy!xYnxqFP&;JPSSxjm~JHzk8`pwAppoqHn)C^7bv-3gv z0|bf)hCaW|;9`>z1@td{htN9iMZM5-^LWmr25_6FG(a>#ySn~d*EM{Lc3^QLm8vJu~k$64}H z4sh1FG;EaRJ&H!)|NT4L0TO7<7B*raCroOQZ?qR=eo#$)4+b}9&JVb37`VdP&v>%R zN{3-ronrbN%3iQz2@N6*7&sH?K**V(T6?#@0w-a$S8+0s9jM8v;>9U?FcBTe$197J zx9PF5&+@**Su=S_p5a2sNJ2>-RPx{9;(J`6dR z9W>6jnd3eX*P@QM^pWxh5rXAazYziCC3u7XJY{gGTX)L-b4An&PAHC6}>-q zK=uNw?Ls^j#KNB`t^eF{>pcy=q)Jrnzl86^v3va8Y~3Mn$iamTrCcf^YoX9HXtP_RRG7e`R=-xTffud zlQH`{ShgSwD4|_ZCCCIKrGdY`@coyNO@)YSQynO#!~R#uTS|-Kez}}uR3+iR6XAvL ziwc`@Dmm`Rpv^gdgK>)DZB@VwfbnEJ za|Dko{+_^i|4hnmgAj42bI7{RiJ_IwS@_FqH*HUxoX=r=IXbu&W?7nd$wuE#+FyZN zr84PO`gtaz8?bQLiriRVKo+Nj>u3sHrJNPOin$`4N$*d^J_twC<61V8qQ3Fp zw}pTPl>IU-*8JQCd(a(khY@>8_NS5w8)sxEMyIFf2471hD^t%H48s{Zv~KNS%n6%^ z)S-Jcw~0vR7G(bI8t;W+#dgoLus(;amP7V2%E`BX1-DEXniF~nHc^)&JZgay2rgu> z>m7roPc~{M_cp&214RTb>%%_ai2M=DWuA>@{gL*aBOt z-DL>;li|+Q*sH<~=lIFZ&g<-+-|Aq`{@WdA!8_9$*@X0;v4|zYV<07~$(GST9oKHj z0*j-SqM7w+ZNFr@V);}iu?90t1@ zJf7-5TbFogBJBOw-pZ+bHjTNBR^usWXu#h$gHnWanSV+9P^Vec31 zc!540cV~6lI@F%ix7)_4Cyl+%?M2CWJ>fup`W*gSq&hbZly76=DrBlCfeV|(!WTO> zv|a9on74zlZ0zXmLdf4?G`}vRh>>fPvQj?qIgK^m?mqgw<>p z<)kDpd1jOS%MG$_Pxr~yD_@@wr9gy6;r$McHP%R3b2S3i<`F^h0hxvz{Fjd;^C!a5 zJDX|F+3nLun5}|)%_yLM4NQo00SQc=+yFBh)Bo4fr%FS+0+$`x=dotWi8$PhrBx6% zbGQGuEz=!zqik-hQ2ZxS*0gES{K^Jz@gVI+*1Xq@m(%^Uh4P1TF#qM<)puBD|HS;4 z+tuS&$qiD`f=Xt|_ovspL536kz9stpcu;cl$6%-n+8@APGo^&Bs5v0>Y=N7QSEkGFH`Wh`79VqaT zZA_;j3R5_xshF%9n>$2CR4!vsPbGk6s+!ADj;R@lkXebl6&|@LtG#FH9YGtf8spZ{ z)Q7+l+OP9{(BUA1Hi#tLPz7BQhK85WegSP-OP;JDTNalW6Oi?wO}mfWJgT#pF&-{F z^v}8%XM|T=xTh9J8q2RvNg=1;@9b=G z=;9|g7Evd7W;oKfmZJ2C2RDBdX~c|{IkZnWN8nF-e8s7=&hqz%tNmXIN2s)b`#x5U04!pFlouYUAgUK3S?!ZG$Jo$Th zgUNQF%qy%FBJRm>G480m?t@*6h#X;d?05{71{lT{ftw)4R`(H5)Kx@0FDIwis>AN5 zD;*MSJoC;YGI({T501H1uBA=HwPT$+I*&R@XE0WCc9WXRuzDPvnJEzH8|#IXa=I~? zk4}icO~)MMTo2~!Ne3==zfa8~&;5;lpt7)W6LU3z^V&RBbd~si!O#JpR-S`qE|Yz` z1-!*%tPDT=rfXVG<(Td_6RR{c8rEgRsccvBtw^9uQL2ekQE~r%vo)mzIJA^F zY|x#C)6(A;!h0zSiy#?tDA5)lSVb!b(iPf)8`=o*TtM|vGXIJ?F6Y*o5X{5Z4{3+v zC0w^9qrTQz_dKSo=DL|-cE{jgm#Z7i1PVzVoU6wo(|Pd>j7_(@9Z3-yUa-`};SEHB>68;jLr$ z24dLZuZ=KmEczC9b-xX=Zb9`4&8#lb7_HT^-I8 zrsw4aE=R`|k6u37tPiO@ss`ljXGA~(48w)KE>Bz?C z<@LjccTZO6Gv4SBzBV!`+0t_vpMXUX=9&v^J?=4r8pq3+t5$)Hh#pU!WUzWW&u+$5 zIr$~N?zINqjygkUi9#-A=)(dR@8StGi4zQ4S~<=-EpqtVT++|P52Sg;{rvwRZi9#K zDI^3V8{@YGIZpzBg_()t|GW2|x5K)th(54;m0xspF#P4#rd&Vnl%*V>5g-B;B8o?p z)PUzErjQ5@B#RXwB8JV#7ZDdBrRGAU-!0|f3MZY>?1pkSNOTZXG_%KZ5fc;@{S3$t zD5W}nRJj*|zRP&dethnHOnXdgEz{4^b~yp&9Obi=UD{>^K)U^j{CS*g)m*>aE7(Di zp%2tju;gn}T@Ghzu6=lauB*1S7em4`!V(D%+~hS?tR~^V#;gZFK7*8FL}(||624m0 zBN5$8f_NK9%4)+E`r{Hgf!>Ttr!UZLv>Uvdf^7T%!8XP{Nv=_4$D;#pZU-0euFnHH zi!V;qS3bk{Wj<1&#%d2NW#U@?^|#PU6oBs7t?^A*@SBtQX} z0Ov+KwqZqiqIDl4_ZYPEq=&i%B3MNbzgi+#u)IKD*_V(H5U&bYKPZ+wzA1k;X9DM3 z;kf{UX%Hw8((fp;c;f~_i9L}Pf^VReUy0wk#5iC%^8fgF*$_TT+eA^G}I7~vhrb{1n1`cRyR;2h8+VY2+D@dmpk`gMi` z@!$%CJ_C88cMVu}+@qfvp{{|SL!y}=#wc(^40jk$hImHAk>Z&!&!M8B`a(=P!5Uy_ z$drPDM=UY}lx{f10>nEisiE$igGy9FnNa^iXAPB(;8J@WC}hMkA(fHM`{t$&8AEn; zn(^x3rG!fi2xP=*58WZh1S);g@&EzyF`>*D_ixpK%MuK}EupFk!A}5lG@PN{5s-^B zf?~DxtzR@WN03g1WTD5a-=i7Tfr%Ez`e`kz@Ms?Rj^yuAKVyyAkq??Xd>+d&T;z zYGJQ!n_;Cd1$m$zd&ff`1-dG2rx7hljw_Sn$5Cga!wtly5!)EYn zc6-Vl(kr-r@$KrV&F#Neqf?t(OiSTU9BWa{S-WWVNIREXdi|8!>Y>~me2|Z%7lHbu zP+Oq=^!;wRxCA0+ej&)7+uKvCwQxRY9&oNsUN{7T@Vy10o?CxIJvlD|zF?%^d0tm< z!xhBNCFe!RCNV(ZONsIc!i}60P=cHjl9k84O$34b38S0W)eVQIA86a3l1q69)eheg z8e)L8LsN@;t?G_*%?N>_AHW-07NX7fRS?6`Io>H)UlXzgu!e*+028nb&v4Z;yUWh$r8J8=BLXk*B^5_e8VvD_Xx- zJ5;}CHS{yk4SCZ34d;Wv19GCbEp)TnGjx-L!2fdV`wk~Z^b>D;%oF(F?Umt?=}`b$ zDDe}_HPFTO{^^ZxY=~e;?=u)Jj#Xib@u?09$ zs(to6fg>VE&M7Xot@L$iKrCT+j*bpScF;U6(xy_h>~ZI0IZ7RQv75V}C<~F-|A7nR zeL@9Ko}pa~5ytzl=9H!zJHb8~ssJf1eD{U-s*hXUpMBa#mnub_?kL_3MqekPAmsK-OqXIqoF#d;1KItFGI1~o>~7wE$v^h#}Oenr1@ z`p0&CI1@EPSDxSvV0c5ne#||}QgJ(zzLectL|k^8-+)A0BUNwzz2<@Q$ItuB z-Gu$o3(`XwiFp$wm51%wB)R0jNWbmPBy#oE91ClL zGchJqpIAv|ro63eJoeko-;}gIONvk*BLcX^jEaThZIr3*D=^4c#u3FXtQvE>d%ZMi~M3Pjv@; zhjNE<2J9H)m^4YQNynvty7WbfSBzJXSDIH_x2RLML;F3r7^ms>cjJ-#VAnGFV9;qG zsv*{zm{Y&X3ywF!{cqwq*x4VJ)ZUqEA~nPvEW%n90FL}%0=B)@-HuL|0AZo|vAZGH z4{|5NANbhG#Zu@w-DLV+1ae`MTT6Pv!&a(Lj&$!rroOgdEJ&+w1&l&>ur=M>y-fL- ze|t7X@Fj^$j*NS0=lsq8!74#E2fc3pFeGn*a-Bv6S$|9)FCAnaLbJdckzjjPgYgqE z&&AyT28@+36xijt=mvbe+A2}f3le4tFBHgr&{c=`%zT?iRz>}t#ulE%@?~^`@pt#= zMgj_@P^8&U1@^J5GuLj{XV*m$`Vv;&=u*E#9(MNM>Px9dq0 zSeQb*pP~nci*U>NxXNpGxlO~pnt$@h;e_%S@c}36QqEZghJ(DIW~3U=DY?*6!Kmhe z8UdOIoV)T73*=-83V$_d0k0xE#EUAQ2t7~O3+s#itYh3}KqCf~P#kdL=8aClOjw8l>yy{H9zVi9JV{ML#>ybY>bqX#M`yg2Iq`pRq8OT;JDck#g z1Av?@ldM@~cPsit)5)M93dn83uVAE;HEy}bY=2zU#YP<2i!TJWO_*;fHbJmj67ubW zJTpf>T9%eL37rdh>yu9OopZqXWLBwK0JfOw;rv)#ee1LM&1OD9ZE4~T>h%dV-dFl9 zbsbeMrqZ|J`?90SY;3feI$fpZJK;CK0aIpk^cOe^on(F=osFfn=>o@k@#rBOKI>Au zp)Eo1jx_9SP}_g|GHy$=N;W@+CBtCVBCOf45j?Wg3e+U?1z_Rnu4T&Az&1{NkM3pC zenzf)S~3<;&=+v!8Y~ok@PHPjH~e_#d>?9gB9Q}9X9;)7>f@1~`+}*-3CQi6fu#b7 z;kRWBiA}AuG8M2A4&JO;Z4MiemGgmbQejnj8nCgJMP!V>T!hUfU6{g8XHLU;MDJS- zh4Z9K#Fb)Hh`yFwREYvvZYnX}K^L7x>`aAdTv-QI;vT($03vWKKE1WOav6jCpX=W? z$E7KdALaM7-+axDy3clL75Xz^fzog=%ZXy{_AsLD~`2Z2wYLf+kS43wmw2x!HgCg_x=Lr?g_LspZ30N;6Zc zy2v_$dazO2Br&LpbRFs z+}yO%0VLaoS*gT{`foAZ3I>lV3+UXfsCiBkt=TGF@he>>OH=gAsM$;O37kUTBdD@F{!o6P%F+k7^gW#82VM^6L>yJpZWg;GiYb{?`);W4ub#n#gBdXtv9_82@yTsH z7K9+^;ujLgM^qa4&q6oY+gec%nr`2a= zgHOj7{;n(})k3Y%I~SC_*v}X%^c}!`WgZ=dB}do=BYXbLYv$9@1GpBIxjcP>lx8&X z(^hBdecZNh>gwuYFeIqTk0>=qgkRR_$?$q@l-F zlmyl(9lCyIB>CsfR$|K2t3)_6Gfpgi`gnD{`m8fMe_Jwit|>CT<>q#IA5oa^MUaak zE4@}w+g1w)V?)q=(*$`mOpNDvY|f}StrHWH z1g1*nF6Od~b9F-nL)jC&cbqRe=F*ZbDh~d69eZ z6}4$uSi16TjpZaiQw&dZXAGW{dY$B9TXa|OB8ZaW3`>qK?-;_|fRymBUzaRG!Cvvm zvcw43#0KB)*$eA!#1gV6HwiN7?8G=mq?W)Qx&*dBi#D@rkTk@1_!2<78*(^r%W4Mc zr<@WV5?PVQ#kH;eEqtHGwxL&eEvPcQ1mBYiev5JIvVwQ-JugT> zWM65?b>cfI;EtWZiM|83lZ}?52laGBx`f@HD8qb&h*;KAN{tg{K5l7`n7F!5ylT94 zl$XSJ1ZqR&+*tT%|0<~uH}hCeGyeOOq(B|)$AiV%_z@Gc5jUjk{_F~seAi_Yx-Msg z@<^4|*JlPc*qc(xT{}l$QGWMN!*VH=+rcKr7|si?h9~Wxr89Q|IDQlBlIR_~vK4Qt z1E(1kMno_35S|O=D(C!y0V~^RTrwDq*Sko*EI?$DuYimzmusA?q+6y^fI!^fP=78Z z(5s>uxk@RI(16>}yPFm?K$ws|(V~I1WZVEfXEBMnIOmz_fWYXDG|6{b5ZV#Yf&p6V z=IWskQX7$$5R3iK6P)@|C3#CfVp3Uo($zI$d7zrFeZTwSX4!D&jGVxYynafCFNMRQ z8JNOkDm^!O9VoXXoCqwMT`Ajh+3~N5Usl(*9IcqH{!#x^ayzDVAli)sR(V;M{M$EX zOJ;1+g+pMY+fiRViR)Gf@zd%dD2-KzdQ$|#OjL934Jjq@Y0 zIN@i>&fSY*#aSg=b$)&5D$HWeNclpt`3{eZZXu_SMVz+aoN$5<`z_?;P6i+T`?ZN%X_Kk30YIDX z(A*E(IrgfTslw2Rft*t1gs5XN2PEEI2qa63N03OhAYM*k8=D8jYPiFMW6A4g`R(?Z zd5`&dcJfddbmj&LhE%+n&Q_WNOfcjofCTTUhoR>&Hx&9R6e@^JB4uWOX~EPls`DFQ z31@?HY;bQA{NZ)(9etA3X0!i2{99>x%odK-|&#xwuQK~mY<-b=Sp}Y8Agw* zb?@&-PDrkJK3y3uh{Jdb-4+&5RYgm#f(spWT=etcz;_&~quyR%!e9`f1FqjxG!V#8 ztQ3kFxVFir638U}T=qiFI$``tV#whnH@13)e9kD`?ku<33m_GbrOuh$2xtg3{z27U zoFIWny!!V}wNUDlBPH~OgW)dBA`a0P{n8{pY11O;(7^eYU%N{SR$K)i~~%wUHYDJ9=y$;mx6g_0R3 z5iUHurk>0mWZDOIz9m|RB#`iInoy{EYSTz&s5P@+Ci+kx2q_7tbhwmKmU3)`mL8v6 zq_(;^&00SHQZbgH@>u$Jgkg0f&#ru9?sGg7^HeDhkE@R_sBcgi5%`f;vvlZ)@}m9F zf_ME&xBtUNt810nGBDX!Z9&N<50OR`yD2ZhaG+$gNm~aqpa+@kW5Y2*vIYqarvN1^ z+ff>Kt8>auK=K=-GO{V8Y#>H&W!tD>#O*)r)Q_#H3a=7mY|W}1gbo| zmOxxc6J`Rt=+ObyKJuOXHp=T93Mup=L6A%eL2!4Qb#!HQbRGV@mC0Zi;0!h~j1xUa9VntEm>SiSSW!JdMZLa~9uGc59r@Hd8e2vJ1u`w0eQOt*h;Lj`YHB?oiY%8d! zDz}l=f||6MPir+vriGbd@di2|5@}P-ZfrT04od*|E z81VFL{r{Bpl|gZIP1_+PxD#B1yDrP(f#47S33`ywk;hg0_?xJ~=t!m= z!12SKbHJo;7*0anaJ93kA`B9a*DqxmJ1 z;B*!~li9Pcg~AcYD*nZ|Mow*!XXnQLD_xj3R-`1V3_sfg1d^Z%# z>)|qNG%nEE*<>VP;Bx}@vqJZ&b6aFRJ(G2NIT?3R=D+w&$vq1Z{l!Ri{A-Wf(wVBJK%Pt1)0OTa?9-J>OLlEiJ9uprU@Qwv#J2+j!l)A&nMzN()3<5d zEev%o8Mc~xi6SyWxtGbf4zJ;IrIfL)qu9js;itU=yaC2kxt^#&RFe%!g71s#x+?qD zq!t8n>$7y#x30Sh_u$HGkP}P;8GsFu@o3H+(ua-z+(6bl65aQ@i!u%~W|^ipZCXK# zKaH(j4;5>`NsvC9PM8kCU4jM_)L1^s;T^udSw_R>@%s`(!9UN44G_5@?fLE!-0zjP zQkeG6IfN=4j-sj@)bB+^qq@xJvQLjKInqe{#qu(339V)87m1~`bBVQcYifTaE15j} zsJUVrGFbb}o#GB#p>nu_PoTn9U|<>ahu{zMne)pJ@M2H~x?UV7^JIw~@>*k^gQH>P zQ*GfKsb)jt=_9i@?fUcAkmnVbvx3f>BPg}tmwDaqo-e4}bS=8tQ##P|zZ+v_c6<|e zHv`AhGk`kZnmW9@0r5lq)H@V>k-hHeH7#3ZG2)O+h5agfQN2%I@*}pf4-}Lt?elaOg@T(avL&KtVspWM_ zqL&0Z&OX5}d$O^*20a9LJs73%@vQh~jY7BCy+=lt0V}jQCY))b`?q1Ze{N?(mes6C zA49pHAJh2_I;;4FW#z}sC>RtmV+OL!&yTK9NNO)peC#p}d|{^z+*h5XA{U)nu7!;jx7%svV9D4WT_Lg?j>qs<)}!nSKUNl<(R7>iFA-%zAwrL4!<& zPm&ENK!2x`r+%gg;uWU&(D{V<&wt+$O6_M z?%s82aMf5)p~a1*#BWz|(3WzC=S&*_z?cfl_Q>7PiS$2kaZN&|=L;hJ2I)c};*pDu zimImtqr@`PbNQ|XcHi8XHr#vCf;twtmOi9eNTx>rlBuDgBIZcJ{)QMzQ;T_$F675` z!YyE&Lld`{B}%dCw!{>h`x`EY^IA(imdQzXJLv*ZqwLnM6bVU2bMnlL-HIT5+i#p4np$?#8{w!}jg>olVq>6FI=2=gf zhxypHPy5k!KG{SobRcbbLHw-?wJh6)&sSL_t;Rg6+OONoI>D3HV&jXe#<;m?oZ(_K zcrpui{b}5F7Ko=*P+u3+SghGbJn-$9C-7jc;KV*9mkIIxZw|6~u>z@$ISH zOqW-lcY90=P0&m4?)OjQ$DKIuQoQSom+5d&> zyX9lH2;TkDVN*^IhBVgi%0QQ}So97Db)UPaYHuBFT9%?hFv7gNOLVr-tmSJ1izNeN z`{&nf2aD<0mrTaE%5x^%)Yzm#<_qlvmk3A4CFZfGSZJX@+^xptz_14OM$I;StSc4r z7TkRCKKY*Pv`E1K+8hE8FF3rI)n?yhv>6G$-=d6B&PYcw!UQk`>rI>`=mhL9jM|#s z>K~iZYl5Qm8Qm=CR55Z|B5~x7edhFtAF-|#MMnthv&&9oZpX_d9Gf9j;m_H?G$Z+b z@txg!4IWl8Ng#Vmz*a0@^v?6`-S+g(W#iM)H~&Vgt@MF-kVB_f3%H$0&!zQI?pLk^ zs&aO_A<}+)Ij&Fa6;{QpRH$r^mJ3y7Ws2u$8N2cC_MH|m`5~UIkn@d-p5XH~-*tk- z^1O?k9(WYUq1JBMSBGj>k8iy*60%!vB-&ni*3(}3D0pz>ZrQ-CSCdJ zop+jIPQxY2ITR?Hz;ak0mn-qRNO)d?8=Y6jDHwyguE3l-hv(3KYOmj$%MT0u~?#On1`$& zFyX7kR2bYOUFwH6ImS>5TLUhJdO~?fj<|^ecIVb1)Q3~3ox$=e1+Jp7zPl8Yyn^Ug zin%FXYN;({#1e9wu9M9E^WrQl={qa|+m~yfQei)jdN#Af`(`)UPYofWC|H~G;~c~a zWSj_ED7~GhCg9pfXRg&>rwZS1Sby97#ld-!ogG$&+?(}`x@(qr9eyg&_gO0biT!X% z|7=v5?qy!XjS9VpUw*$rZ5@kF3LxQcltL!AsNK(iZ;mB?B`#2)Ie2T_D(g?qYU>FPV8i z`hZ>TcIUbWu0OH4+-Zx01O3Qr+oOpwdkj19s&O7q)v^=TdU_mKxkpC1FiV&qJ{3Z!m|!VWtC*l`HbLP0lYyRxo#(TL z!eZbj?&?$wYr^0(sv{=b^Xfa|uWZ^9CC57CSJPm6b4gy;hUe^nb>OAi+ueMriW`N8JM$oXf0C^QV4sCDlL${InF3W&BH}lPxv85fFonB7(OC( z@enM!$SbWwqg}E8iE=idK#Vz}{AS?Ya#{rot$kgvMHsE;GzmpiDqStR^)bjKE^@z&x= zq57b(0QpvJK#_!NoUj3){k+YL>7P>@$>A7{@*V@*G8Aq$5H($D>jPd*RH8qQvF0iF zdpiW>$-w@;_Xb8han3=kML(aP&-F{Xb3@bhx}T;|zl^4eTF!@*qH+`Jb{7L=xn#MJ z{rhCM6ut-A=Ql1j&eaVSO@5b(Gb08YrAo;J8rJJ^u7W1>T7uUYtyS!1`C0f2R5gkh zjR`+bib~}Wu24lr10*d`9Dh58kfFAV=ZZni0I9MZo^rEuXpHrz`BAyfgp17dspJGr zBfno#A%TgxR5kqG;f$%R-!D z&BN#q^pa#})sV`%2c=27Ke+2InJJ{FT<0vzr?;Xwe0@86BMxeWkGQ+vfI2-Hh%}TE zUw&IC^M?<-o+%ow_qGkBt!TuWkB<~d3{a#1;83|FR*+kex<{g@3L!((w&4RJ{JlTW zhsf0;CFS~RX<}|~63&iGqi=m)XGy-BzDVD1tWaGfoJoWabf`@XSbrs}g;mQ(g_}TK zF>NaMz^;yT`0dI($K)ES`IkboM{$%L_5=^g{p`$2iJ~Y%MqSo50WScat5ZzQJSAYW zj}KfeL?@<}P;#W|yM%g7wQc;^PNJk|yptEBn09K~`e9Px<7d>AtI{%8H`c1?8uwtk z<>ENuHFX`T(NA5V{yP*me9;hSUhZ-zCo@-Ec8pqWJZ%~GeM%{Vz5|^kYjc0HBd*`Z8Pfiu<;b`##y3zXpAID4$QnTvFEmkqrAIv~-;M!GT{;mdG-mV6F z>T@K&`xgpvy#BlptS5$()uoyEU(qM?-1!CX*>kb5`GLj*UXpH6@pulyF?g=~Y1sVT z_F<e@T0S@ir4=7VC1gpE-bo1*v}Eh&l-gPE-4+?vFS|u&RINyu z0a|kS$UHqNm42iya+K#`V`Esq<$HvBz>0WQ;1hqYxQR#q8uzI9=%6;3aQx$8>N4(X zT6$VjTTAR7L)=DN{l5N$5JI<*AN_|wJp7G zrV9QA#W~y@^JzdXMAJg^^HzN6!4@g#gEYJQ%@VuD10)`v33hg6H3SVmb7aDlGLzs= z?wFBz2Hbh$GEQ?KFCSf?XE8Cvg_0Dx6I|(f6d2)RKTY&w-Eb!s=~W+x-`cu1<*$~6 zwt0lL7b1Zf?@oVM1!+c-DsG>b_FwEgIlzKtNtD7_oc%lsG!^(XI%a?c%a*i9eyMz% zT;Q%>a$A`kvpkln>6W$QjRl-0f@Fm`DvXmqYPk{jydP-0E3>aO>b5V`xQ@j*mlQmc zI(2EDoWK3dOqTsMz5D>9S_y>Zyl?+WY(=_`+bjXD-70pyru#c&6h=KDg2mbzgxNnw zwsM}NBC~$)elu5=c{LnYsw(t&KWhbDz3<#T17DG2@|xi(O*cu+JRW8XwVsca!Y@{s zVV`=mZhkmN7<~qK&{Fjh;5Mz7z9838N6HOgTU~eYZJK)$XW&W{4rJJqIMfM5%7y2m zI*5bE@g>qW%^itHAIb7}Kud%YTATX;puPw-Ln~sN(Ah?#SU! z@*%W!XN6vQlHiyz27p+uTOF_^2j@f7bhh-5Uueal!~PZ8u2gZ>Ltb=orUiL{`l_0V zMr=~Fj(f+nY6diGt`d)}k*y4v7scjcbp|xMR|GpUhZ=~~(_9(^Ol+2_i&wum@=uEM zPbTbz5)WgI2&8NyL^GdbDBykSl*RB3l`)HWzmDWj{8#gX6>cnL#dfgn90!|c^xHri zmpO-d!%bUiE=o?xx!XqCEu`yF5H@s8vj=TAfH;ZZFZq7=%L4)RO&?jMwHP!mE9$BE z;20Z#{CdqE#Vo_Wo`MpJxF+h~Cs)=_#RubJ+Y$*@IJtURkhvSoRG~eZa{5KdAi%PZ z+2Zig>SF@-&?!wqDp(8j#A&BsdY-3y#xp)-jUg}*gZ1@n zkTJ1z4>>{$W7{`!_E9!1+Y_(Ck2q%3br7bOdQIcNHlEJsxZ&?r5#ymT3NY2ng`KA6 zFe)F6Hjdf4_Wf8N=Is^&W6=Ztn6g`hFC%*{KU7Dp$vOp$(6rh9%sWSf-c+|9y5IoYBn?7p4BZPx z{NCo#0rs7w_(((S#l;4lW6YCS zyUMx*v_ra*-%NYxzH_9NZ!}i{DJcbA`CgwRdyjy}BPOU(F8}jX1Ba^gJ*3h}tNuvK zjBLOhq$7K$xoHHjn6O>^C!S<9XOnyfkItXV8-LchdU^b+V_GSE>BTTTSp4b#!%T$W zRj|xMWF3Vrc4KACQEdq0Y1ba`TeZ)m`qlFVOtg=!5OQ-{(`-oeyT=X1NU;A0#DWRT zn)$l<6z;D)CI}lo!P*V0#N)~MGA(@b!IRT727z#33>85-P_FnunR?wng zg_hls(>S;An)ox`a8N{O#HWj#cgUY@s<{A1hQjHGRckW{5jM}D4s)W=@E~mA5a(uo$G#io(vSs@WqmpDk>7sj9DY zi~ONHx!-Z-F3u%8Ac3pf<(heMpF})|UUkBWi@f8fX?4n7E=fN0Je@+fGLZ7flX4F~ zk~)yC5OJC(8T#P}`jx1obfAv3NsV&OL5}k2mZ+aTxfVg@&;WIJY@4|Z+}V(8^Q{MW zF8f)9PDXffln#n%8B-zF{BcCn$cDZe6Y{0B;?FL*M-uW^ccBH4R+z-DFnhU z8TdO;9T%SKdowo!9jbm5$V8~uq6Q(~A?kG3cKbj)1KPUdUI67>Ii-pMR{ah0n3U4$ zVGmjTNBRa8v1u}q)*Q=d8X6U0MJUSVzPmec%B;>uqxMV9fN-X_gn)I z%Ef9+Mm)5+vz%~@N$HqS6XZdysYq{WYhz(sZXprclh92QKiQa<-G(YwKMSp>s3fYu zkNB-TU#V!?FjGlqi$aC@d(>7fw;C z&1q6;HR+*hFpLcF{eICKsRHN;gO2f zlWYiniy(RVu?Hx2`V{Dw(z9W2i9n!6UKqJySJmmJ5F)nI0k_no`@r~9KF6vv`c>$8 zo|(mWU`ILPI!nz>=}bADuVtq1%qE-h>A-19VL!(3~`74$)P7Gw|<>KJCN1waKpsqh5p39DCnG(BC4zaE9pV zD}yJu+(>$k1Xg~e9<)RUR=<0T=N~CD#PX3PNA`6LSV>Hv;~O*8K{>ewi)c>-WsRxTJHw;Np=pW|5D|_-+F_L7%$)hy8UA?`+%f>?PndAWR)CJo?5iQAlY~+!o zgy6wF!NGY98vKEMEZSQWIf?#FWhV@=$_1Yg2R&@}?_#iABHBKI5=J|j zAWI8D()gA7g}WEZcn>>-Lh#p~Vnn9I=keTkoQ5#{f%xe9&+m;8a*>+g^#|tL4nZcm=U@C9?*?U!+shnqLlTzTOUf4_GGYJ*MK! z_)I$*XnZR&WjU$-6WrVQM6?B6#~0Qr%7;!aryLY$Q5>ACu4f<6+&OvPH6g_fuKxLi z_nJ z2ZL~oQ_J6}P|;2bkA;1Fp%amJbl*yrlEFu-PQXvn8WE;=Kzs})wn zaXKT!t-l1d&uf9LS7|zqtyenV6?ChOVn)`3I9ywhh=m+?f}6x^d0TWStB~8-cs}s) zEp!pxfY=M?xjfcdSI8~S(N*kJ)QZeX28wEDzs}m$%VbnElwxzKMwA)owN6?9-ab{% zD4?2SEvgB69fLtxMVn`V$`oH?ra4UT-R*=!gEnm`qsil^rkb#&EdG39j%QJNZ?@<0 zQqeBw70$V~#=Y&MUdww}cofurFt77^Rh-j#Q4^pd~IC?rLgta3A6 zK24L7_tspf^2xy4wAR;PSr3&WTYsEGOl+0v6M8?333&o5kIqHOW#KPq@AGy~3&Z{xms4ytWCNnMa$Qp+$f-XdTRs!=@z z&OXFmSxm@q3Mv4`*w(!b+GWe4ya;UJI|nC^{115IP5$6mK74uo_ht^D=)QwLOjM}E>3zaeAeo1ciDd{QqwI-k z?lSM2I=2w6@S`N$ApZ@3eA>` zlpX#%<+{qtol~igU-ApvK?+Cos?GhZ_c5Cv%iO@Ng^kF#@$o87%;)oXu2FYUtQRw% z)NW-nxfq~&THFImgj`1w0i%Z9;?)f_dw(SzSQs;ZFAba6?9?>SJkee?_?AAFg|VQ@ zmN98!$axm&23u;`xT?v?CTh{xlaQV@=vb|XYb6Z`pOvEE^JBw`L(0t6H>yNb17yN+ zQWn5=sbXQ)^O3I0cd-MMVjQMg{McRd?Ikui3(|z)JzyJrwo-4Lv~#w{B_9TT4XIAO z?<;d?3WWF^P=ErPr;k{YW<=AhwWOcJB!62w6+SP<7;$9EmU;nsFTRGZ;K;NkB_v7k zRV5}KoKfQcB2%?4b^cC;{zH1c$tPwJjcxGTP^-=Uu!pb)X<~h%iWPiednGfoZZbiyy_VH@oS zXboO!wXyi^HrJ(UC+VskE0u=nC>AFO-s|~jg42*pY>oflIES~DouMTXXDwGpzg=|1AUWH+Gy8Zw9F3QBG{KOv%>6M=;j+)E$Y zrYcEoo*WjwHZ_~f@fWtRa7eLJCBFtSjAEfFAwscF3=dJlTbp$7g1_emr{H}2a(!AF zUdxzHy0fxH60Tb=S_-~KC>$@jSy_WT^dr{$Cnr!#5_=WyjkP*qi-w>FD2_$Gn2~ja3;QLT%jutnS!Ut z#56%vB!n-4-4W%X9j*{fg3zH4%Y4H=HoI7lixQ3_mpSeEkWJ5up5b<%V&WODzjRu= z;}bw_JNKBr??Cs9nK1vtP3Y}6cfGd|_Ga`|?N0ZSBP^ z|JdUMu(PrMOOKPCi;LqQ4E+D;aRN92|2D`80C2MXdouvQ{cq9$5D4^df&db=lWlc|G_wU caJc`Q%|9Ry8z5eobN~PV delta 42926 zcmZsCbyOV95-;u&++7pg-3jiH;O?%$VQ_Z~5L|*J!9#FcoWDy9?__f&uFap#SWn%4<^K;hPRUAa>K3ax||%V!3kX4vaeqv~zEt zWUIckJ9Dz-kLaWS#?Ni=GfDdsnL(R5yUvE^2XAD|cyEPOWR0Q`#Y>^lIiq=Sy96mrK)_XxSJjSK*j1#|EL}1 zA{~5rbhzznGtu)GdOEGRK9+3!W zo=-7mm2cBZ`W!sI_)Fj(G%;D(mftEi`+U`v%gq27qLLytP}cG-gQ}u*BFKz6hO`V$ zB_9))sHylC?!QY<{^_p^Bww?0sAwuJz0aTye(%^W6Z2+CWaMoh_tK&iwyAY4+T=L4 z!NMCe8tdDmU$Fk+P+dgB#Fo=k%iG(}Eo$mJ(ZCv*Fe2;V`;L2_Ux2BUt;%YPQo!af zuL^TOk^5pL8|_yeAm>#B==C z$QHq}Iq@|THLy23?4m7>|EigAC1T~*#+YO-@Uk<$>lNfr{^#DkH&^GbNea6*bD#-l zneH@6&7>xREQQ>ZK?LMr!jxiIgdzVxuNM{kBJV9jhMf@1tRC5GJ!48Gle;}v4x9hY zOG+^!taKilh%k=|mEMfeVE1Pb&k13Tax522K_iP+km>Vim}#bWv;b{#mLHm+gHE;& zkT7AH?DMq=fsB`$s!Rq+&;mNkr}v-^nN1=xUd~G$Q!|t{xu2vmJKh&rkXAHQ1q`aY zHbWNVFrNta8%@p#1Rt0v9p|PaMK}A+zxP;jufU_iqM?F3%KkbxDVLYFx z%U0cNJ({_VDL-~P2JftP_Y=FY6M*o3;;HJ>nIaO^YS9 zF0a2RXP~2}4b^cm)_Pzn{N>|dT1v5e<}_6@qgqR)q^*rxMi4W@!YpFFh$K6+9NNGkw2ga*YDE%*N>{zzi4MckB)O*hwthh5gD6=n(Gq z682(eouTRvt!@?mSt+cAqs%~wF=D@;>D>IP`yB&J_gJHakHI#pn-ZZtOCOE=1zChS zy|80KXGXUng>_l$XlIY3qw*;HUrdL&o-Vq%mjNCauZx%SWU8^T!t{3|@Ry_k@Pc z@dj@tRjlz#=UVQTYzx*0Cv{b>3}+bZN8A|iP(Ssf{M7W)oDcB8SQQvfLLb$;}o%S zFqq>%6ELDX+?&N|?o`%Om)v>V%9SWGcBkuLWhLNSA`$E28L7K8lNmO^;} zRtjFWMod9-&&aw)FOF6ptwZg@em6ez)|>ExQWy4p1T+2X3#Rw0$*x&{4PnUg$%z`epyZW#8K zt;XP-Ca_)?Ry7NqtT$`))fewRx)FgK{w3t>0I6H{3;p^iyY;!>EXKOjZzOS;0NCvr zPN-4auHZFtn!x+Aw;PJL3pU{C=x93sX2%(L+sGe28qa?vd3$&QoPk`@oRxc}^(XXu zm6;5Jbs=?qouD(PE`aqvS5+7AsEm3}Ve8L9_pSeO#UD zd~YA?ejM+99R8o{6yezx74Eem3u;YuU5wPYUSFZrvENsx? z)lNmh1l$UuH(=-2#elo|=r;kiTRDvo53xN^$MS_U7lSUzJs)23R%-&FNe64O34F-4 z=sp)41>F~2Or={%W_)>$jeqddFbnEi4XZ9akri(sODmn`>v^Zlytq| z1I$AC2WXQ5kD#J#L@J@5NcX_5-1*+w3z9Q4{;7p*fJHhFc}Kh~hZ6Apf!{%x7e^2G zK+{_be}IO^Cry*>`ryWuNQ0pEWCmWImPz`QT114e_h+0%4oTI_M_*bV2RTDpuk#A# z)UT*tBqTc!7qv1VrqQerbIe2P=I|D|z*5#@^O5XdL?hL*kwoRF09i)qA+N9Ep=);b z%Qw+DT0&pg!=fKvWvt+LuVyvu$IUJTN-a}iTy6y5=BcpIF9X}8%3gG;x`K7CWFmfj zV}?m_#x3csln29xN#c2N1y1sw8>|Zqo~I%8z8vPvOkP;1ZUkGO6Un&*hnT!LB0^Wf z(H9Ny7_3zs?b!GD07oK)2qV5zvwdKL6|C}U)O(ASSa$kM+9(O}nw0)KPh_}j$c)FyC33nO&~YBgw>Cqc^VIC)U$sO>r>P{od}=}VO)k7-hoXQhVDos z5XRTEIpRp^BOqR&-7_a8dp_OlGgS$I31?G4`}?L6m{&kp>6;dk1(K9Ao_lnmY3DAx z9qORUj8#Ymw_7Ie94UP`S0vS9GN{C5#8e|~(Hd+j=ef;JE96dyJuH$5N>W;qaV+y5 zF_l|-B<^P(;2bs8AQn(ku*WFY4$il+Uss=CyU$B_=dWcA^VdNWp;~(tN>D2@h-QM9 zQso3@Pz!*hQD9b^O>UcwkdMR%!mdP;bCA4|%lX<6>g~%r&E=r8NLZTl7i52chE2}5 zCWBTe_^i6?j$r)>!(S};jBou3{{EGgt$+=#LrhnZOax|aZ7{at9b88z)EakO7bb&G zAurDQ0J484^cuxax@e5K6brtUNYqo%kY37h51^Nl=B(#JQR3LSF1jM8m_okt5hd!0 z-<9IOMuy^@QBMMry)T(aJ)$f8inHjOq6RK!)lGK{)&iq^6HlLJ;MwHUTh>3$D;Qo^ zXC&NYv0Z3S^ge=rwg5Zn%_g!r(mP7C3zkCawgO~8uF6mSTUiWap*a>s3xnes0Deg2 zFvRq?CIK_a%*ShSL+MUU0_xxu9sN*dUyq~Dhmwd$KFum{*xs3(C6AS)1#nu?;^di) z!Io=25Wh&Ueo-S>9hKCpK=mAyHynGYIr3$djL1rjGj>{m z7w9-zd-|@3F!=m8UymUR&3uQI5HR6h4_ko;I57T78mau1{L9=HE(iY7z;Vv8kKd+_ zh-CBw2l_4IJuJ4CKoH?4YH`#VbV@A{lup?T)FOapn{0L9J}9Gs^zd%(aaA|H@TQdF zSDx1#P-^x2XMH?(RsK!S6!~26!=~p{2rZ(m`m?T!1m{>K-(1ms{d!2-5y05QxY46m zLvs2Pe#mn!L|TDbr%^$Jyh?Vi=(<2`dKFuHu1B=de=)ljOe{o-+=MZb;z810dd06i z`lL)DgPHl4K7Qgx|MOH2+6Ef}Dku-tRw5;|fpJ_Z`}dzc8NH;mX&1)(%jTglvau8k zf~k-aFcdBwi<}FtLDI3L9+2e0j%mfrI*84*+n9p?9NZkdYKIY;n`yo1G6U^6xLd(5 zaAm6rd*5M)ss`f=FD$}fYwB5P*H2>G{Up$VX{kOnXfQaE0jArl{~KZ<+y3#*Z7^`u z;GW5>jQL)u=-lfa^PQaM2D98SADxony`MR7s=&rpfeL&>+Jdsz22_aZpARY&RqPL^ zD2Tv3b&XIzZ1+*;Rs}!kVS1DFSoaQ`-OQ6ox<>ZC-1!2#6mExgMM zn1=-_3Wn`1gomd8kIp;TzeQ5i5TML|cj+T3>Xej-XgFzo_SI?N_$A`r17A0Okqu56 zXr9K~`d&I`#@%s_XHH0B%z@AbVT@q!d^Sa$oAR}(9;b)2Au0Omafv60BMr1*;a8GL z1A?(X#n+-HzX$?DLs>xlwv#Ed zuiGC^{4Gm8qFC4I9-Zs{Axp|{IUpUvSdPD8ap6jJWxoVq%#*jqbfVxm%^cC)toQNj z9LOjwwgj;TmraM0Hh#DTA*<2BSVJ8mcuJtd(uNV&)Z+@kTB`S`=%V3KT2B6+km@=P zv@s2IObo_gp)FyKz|R2eVqfbbp){wOY~TMOjQ7)eB8)J8AIo8qnAVr6P1Fz$_L;)J zv?^q|w!5No#LYo(LHsil9P)G+)-`E*2!;F!TU<6BnG*IlEa|K`)UvH?*FA-lA@1t2 z@E_xj2sI|!cg6`X#?~OcV8#pYtIT04JDw;

      30c!^K(E>M2WCTqJT0>%JdAUTejX@ z&UbvUZ3DcHg_Lm(>AZS(ouMoys(&U!2}~uH9FdlLl0i@c6}q~;cw^CL^R~ebFK88A z_w3IJIT6ybD$_Ck#*jYP-hgf8JkyMlj#H+St_LCfHg`NzYD`VK31JGkfbx%|=>}f6 z?76udK&Bc-c5<$(w7}R!l#GhMVhnDDXcsM^dI>tH93NVtz!@r651~r{o&Vi4M&SlR z;fAMVXg2YBHOc)5{PPaXs~ZisohUMT3RxJ!5NjBMyz2QL>it#x1m%H*&CE)7KEwSL z!fRWQSbiA7b@=)?!GG0i@s#&h@-{(00@goXLe{Hso_$~eQ30hCGE%D%K8#f1vvu}G z5-*HY3j&PP62!N&_7iS$2@@LlD)>XfT$rJzvs#AFt=7Pz?0_OhW+hlzYb=empHm1JB@*1rjfX z&==1#?)%uA67InxOohWG zUy6bItjz$IhoOn6RGtDQRH-CRR8DqYjsUY#Nd>(FpjAjPRk_kHoJ7^W_~#*&S#%MZ z=zI;9&3M1Tam3lrGoHA2VY7mfU&NOvqS<3HxRnMRwB-X$zmwx~lFjFu-UP-Rt~68n zVFkE&`@wqHWIyK8)~zxr0$ua)l-Jg_4Y2F&vyA^TA4CV9G+S8dl81@U{!Fzjel1M6 z=8me_?)n-}n~`EX`pPudkzxfxY=1ba8%F^#XDyaUXd%>&|3OR@>EH8aNym)cU;42Fggke2q_uOj) zMmjLaLF-E>lf=u1QkaNyg3xeN)fUT#roHC{CDN6k8~ooGFax-V%TQ97p=n(L2&HUl zB&N9b1#>+GQfi$NKg1@mP1TrfYT1>ETHcox_KD2^IM*uYMEkI9in6dq<;4g<_(QPu z5BjdRPo_|~YAoUk%4)3NEA8ZC>p5EF$D7nT1`5efO+WJW06<@)*u-5}{2tMdfXAk3 zyiZ~3f=Pfdv%&%mOBuCY&*Ko{AF}A&$`xyc}9NlI^((YM=n~_-ib#a+t;Q%+@_Gxrev|7 zA}x8gX_g*NCA8#w8{B@nR>$0v&^t|eSbcGJ9yC6BJg2_dc+`3WrLkm&_*_>ax=L?P zkvlzesjsDdyo1okZ3o5bqzw7dlt*YeSQG$2iHe;gg3J&boV^(^QwNsFz2vpi#SDJ* zA-NeWn$YlP4`HsG$bKbqHHu?l#78_|T^;2*mOQ7j$9_g{MO2BB)= zQVwdx*udVqW-Sa}Bw0jm5daXE+4t zRA%&Z%Ka1V?Q_aQ1#~y1+Xte3V{yLpMpwEPow^oPxfU7yBSa=6>qpK-?2qJAQSxe{K7bFNe5PYKl?9qw5(qSX7ek<8b0)L{yTF@fqa& z`;q4}_%Ce!>5VBt2!N@Zy6(Ina{oPED`3IOVk{vQ(IB%3O5(dl9L^0n!y$``7K9P$ zmyKA|ZWCc1Yz_2A=#0Ic-QwYnW7g~#4>K^?kduqN+7VbtZjC8MF&^qk-j2~ktsNRB zf2i?S#>CKa5GROR&?tRX{AoE^xc{L@$7ApvS@y?B?xIjD;GP;+g1CCIJEY^u@GpnY zdQaQJdk~be=bO2V+ri)W&d^d{6kNJW4E7}Rl%cDp>CNRi(sl$pQ>ZIvzkHydn}u_# z;Uyp4nd+-ytvGoKm}c_@PmnwoM-ntDsodFsGmH20$|cMbGTT3g_UDlJ-6IiyN5tku zC;rYA5=9~b0vbk4rV2KAY~YZHr)|&%u(-hu%%l=hKhGYWZa0Xk(8V*i7SPwt=B|s6 zCphC|52y$^_?t)3p@My(&NIiLtiBrt(dxmh+kciSP`#2gxqlnS7GV3Ol3m{OKMxi+#X`puWTr!@*XJW2bph~ z$isbFpICfKm4yd3&icMd^IcI1NMO%vbQ@n5vSV)a;_00~ZsTdYcgIIIG@YV436F-; znYlc!%+IBC8+zjiC|Hh1hP3WVbsJt%iSj=K$q`nfw2|SPDA{bmpBj10QQeNQ=1zG9 zb#|78DQUWhq;5@ygM~peHt&(`Nb3mdF-ioiWXD3bd)0jKRx>a^3Rq63(^18oDn%8w z(o0VoV;AkS^~zt*hcOOg6*sdYtEbh=8A`p#0?JWEq%MN2xx1u00W?%8T$a7CW((K= zb?dvF!ECrl&}p}TW65DJFU^%_jxZDm7ycb*I?RgN3zTv_ZqR~*;KVD2J2s*_Hs&s^ zDDnGe^7kt&8cnF~*emG*$S;f&H8L@QRyKOneeR|zJ?^o%<18A&dfytQW31C^S&}!2 zk~b&iE{>Bob!ozRVUuBed*v=xAjSa1GF^aU$D~A!N3z64d$;#zXmSrra*ut9_pRJT z4p`owHF&cb5ycA?_p~QR+6(jF8z;l$Dr|TwJHsSPaF2b#xnF_HA92VD2C`>ja1R+c zdK3vJycN>QR7I(jkTK7%z}qQ!6MC1n!*AwLE=f{qm-aqX;J{c5Ab}uQunn=*^Xf?B z+oippmIU?W!0}Z|va6%1pvtjVppBRFNbJ%I7c;_VrJfu7Lzy`EDiFzFPS~D_%41(r zn0{(kj>%op^0Hbme2qM`c@PSeXLlOBa99N%KPor$If)f3r6jl}mkF6XD|G^6m$o5Q zAbLDp;2;n1W@or){vSb58D^&LL!1w1l{Y(r?Xl`d1!Q>B|fVUCPJRDCC6&w*>Npt>tGoQ%_D0FdMTnK>7# zy#wnW>OtPt;$fDTo)D_-*t=VP;CcFivD;wH!;(vXs^ zKj>Iwqg{hOV_1Jd@a}~AOY!Zch7F>EdKGrU+lvmmBj|cUU3cF5mCf_+92%P9KXzi} zoYHM#o=>&MfN*!1i1XSB!{4S{lb$;FKNO00tAU$0%T8h$tM7okCgMxsFDfn+45wQW zPd<1>VrauSlN7A2FAiZ*uP(>8AOV_3kZVY^E!N~&_5R&}lUV(F*ZKVMU2@<4${ENQ z{U|X1;!ndlE>kv|129NoQ$h9o$4VvZ!dh{9As z6oZd}`LAxrcL&ZcovL3KoUrXjZ*xulG)na$*a+!5P&e+umpQbWD+x5l_NUoAIjXHT zat)xF3weWs=qkbo0`r~xAmLL^kZ^7*16s$=8z9`pkYj72_gUj=q~)F`#qCQ#YoZBY zv3v@dj7T`$3yrIgIsfNrkYLx|;h(sziH44%kW=J($SHCL65*Sa=hOM{A&KWxoT11F4~Bx!Ccn>bhgL^wgSDWE`^mr^eZbj^ zJhv`q&Q46V*b#htRewrN?B2BnXnGi35qRZ04yZ=F?tT$lKBZeB;s!n=dI`xJV?M{J za0isipZbT{hsFbkKCjnfR|lUlG*^uvq>G{X@(=wY{r=dkAwDXO9y%Iy7(#qKgHtY5 zZkm$_bA!SY=dM*ySBN0u1aC)KNy@5NI1)p9_?&k}hs#rS!+u)}%$n#hef|~vqH7o# z4?YxgK*%Poj9n_A-v1_ zaGBY@uhHzh!csd(zpM&Hb~8c)d!g+X$=#R3 z*QMrY@Ac1Ky}^z&pC}rMvg)_Cp$Wb-iYHazPDC6cT4a|(f$aX-7!wu=6BhZW0ic<3 zSL!oY>eWr@7ThsBq0leUI2U!v<-P7S>d{|&nz5Z-ssCg}X1%^hbNg;#}Y}Z2oo`OACbvNut%Z2pOhIUB-?XU8(JJqWp5AwsMl`)X)O0 zka5*3;vn3VH9GDAK4Z#dIiOe|7wTpR(??mBA)cHjrU&zpIP8p=Q6_4TnEDcndTza7 z)Wju-m4knOpP7H3nUcRNjDx>K-$jkb%mpgl+(qrk#6?XABMdOaQbN~()4WuNP$|;) zl9AiOl&a-Og%$^j4+nJt#s31sG5Pvw_x2hMUxi5quf<5-#B>VYj{Yn!%(re@oMg8`8O6kjPhLt9j9wy=S zG+HaSn4gIL7yx#SzifYnR3QH_u@kH`IYv0=uqUoGd1O!cKuE&j4cY0wgY0y#Av;}b z9wUgew$I%&-W4GnPm(tGp~EJ261&Lbu@7))Qzmvcq`2rpL!g2Bd%3qj{O@5}3dN|Z z%rp1ZZ_k^?*dNr`aS)xi*5^Y-y$qano0&y6tjIw^zyrhc!#2#o&1WHz-FDsMJL&=M z0lFM4Qsg!lvoARzsqtQ*X)lkeF0liH3x;o7^%P`aY=t@V@Sei^>n%Gj+>bSJwuv=b z7`18co`~sE7YB$tR*Zuti>@B*sCUJox{Z(qb@d)mrG5uVgFihOMUN)C&uc&b66exe ztMga@Modf$^gh6DY4=-Z?Uz`I)997JW|Jt57nxdyb>Y97)w3(b{FY)~w2$2UCw5A` zXH@C(WcP(YB8JtXu2ApP4q}qd1Rrmqo3k|{sjLumEe*`*5&~-Rtn;v zn4t=-|BHc%z!UV8ABo833on-&i5Qw&nGIa%iQwkGk(W(d1>k$bf32Qm-Ep{^tjbm6HsH^;I@Sed2A}bt%P<(x;l>Rsd2KqQgBmVlu z?LJfW4xHczZcg=5x?!O*NW~FqCm|Mt1(WjL*n!=b^{I;%nSv0vI5W} zw{9>QxjS$d0+^Uqi$*G4b@e$xrGEcYL?YHV5I|*~Nb`;$Z*pN^CXD-f*BDynnf=OA zg?zRO;FY}6_!j-ZHMS_c)?kjr!9twzy<^@DrarE4nwg*d8ADqOL0hZQj`~%G^t_tn z`AML`H5h0Hx;j@XqxD38MC)~Qi5YL?4{)#`y#=Z`8?EP8pN|vV?_s%5 zz`XhYpr2BwdWL*#etkfB^A83f4aEnL-rR!U8nU}ORqprDUwzmpEGDC0{XYWD1)Zcj zq0Fs?ody%etov-**N`7S7Cd3h@OTvQdUbAMj}A-%Lc$9&QTuEJ*I$_)N7NN;^rWx% zMkY6`Ag5<@8a*A~13EM0@XPcRXKw352eiR%kg>%(`7ON)y45TC+@C?lm}B$ey%I); z|BIsJXkM>~UiS2sofQ4da5$}KnNgP39LXjQ5LFf)&Je*aGyS1+ zP3Bhic_PVX`tOAd{Vr$WtjRf>Wz?V-n4xiAM@%_$|qf+Q=m! zfG0UG>j@*YR_mg{T4c>j3zh|p!T!OQo?UCn)o`ZRkSmHPr_TqztceX@fbg(^G47D0zR z=kqY&jq6A_e$%VM{PC;u>AnVFKlDP@gsIT+!Qs3rR=+DT&9;<0r(HyMHk|I|{-;i6 z936Y{R>Qe-m9PJ?wiy_0RV5wr2 z#%4Xt>Rm|VCtbc36*`G7?Bdbs--p(xPcSN3I+$dbRO;kO2E(Y;rw0f?zR>NGzFb2# z4=o2f0}Gom`M8@9(=$Us9?o0&oTNy-MHz%E`0RUMwwbPOPJ~m8dIjzY82=DpN&)5? zxu?S(XI_rB&fw@K3I1rY`0(uu^J=tp@+44;lTlF`?j4bsei3GsMq(&g)wlB#CileI!ZXVbRi_q)@#_S*|?quY2Z(dVeUVbJB*ZDdeUMi~(V_NVGhZ zRM`ALj3uH5cuMGYn4A>}p?{XUWSn6?Eif*gKAE~Ja_trLCt#6!%o?TbYtM1jg zxS)TJq%E=gZdsoqt?3ZCJf~RNUuxu$v9(T%19An<@P<6f}E{b4_131!=vu|srgX?9l*mC0N>kpMIU2;uu*b{)jDCF~q zaU9L!_{W!!rw5bQGUr4pY#OVKV5XA$EHtZV8h^@7fLQjPy;mgR+%(FMlxmSK0q*-% z!2IrvZ}~tXk7d5AFrxE~4iTA2d(1 z4oi?aK?BvdADi3Y3T5>5=bga>{C1dv;bgL4$P~U9sbw5+j{A5iYG4+HZF+|N30L`* zf^Z-_CuC<@(y5QUD=FYxez*h_qE*e6Nv$D68h6x~rJ)h*o>o_&@N-W;5DwGxN27|f zdv0e~3sB`HU36XO@>k0^V~l60YS7HU4o*60T{~ZblKQ(Y~(keyZ4Q_Y&iG zF^N`}bwzTaYFtKQDHVGFHxlr5fLD%ZOQfEq{VYIME;R>AFco;LE}6)4-sO7w*s5|j z+g140`GRVpB+!9hRuF*ta?yIdA8~ET6)0h-4s3t;Vys?cVXU6!Tg9m3389v1Mg>2N zgfL4)*`6MeX4A#Im6~HEC!H1szS8(9wZPz5eB9l9$rP&+7;>bcLvbO8r?ECqd?`z!i7vp{{=2Qj5TP;GAAM+hz%xlq;zFfRDV zP}YmcE*Ym#)&BW}>L0GV`d5v=6D<7NWoyTo#}5MiTis9&@C&%xYKAs<*p7&Y`10^) zy^h#^uatSF?)vd(}|jS-?H=srj$qqX=tDY7eqD3z9Ckbt=9Z^4Xh- z0ms#g@O-%Zlfi8M+b@4LRIY~RHpW%;7rV;ElYv)*STp2AE8Rb3YZQ*m9E&-L)=ILL z!?t01oje=&02cn8PUm@Z-->0e=n-35U5jwPHM}DJ9FtBPga1c_8-vB+p3LcbSLi~C z&jUyB(QNmXD?c9Y^OZ%dbrH8Ix!44;)vnF8*1(#>zN?qub)SS4RKB5#>dB+a$?Yq_ z3#^~urYx%wXgt0vHqwZ2k|$i8v*z&*`5L2L{88m=fb!=M?|Px3@mH-s&%b{56urA6 zMbL?RYi=oQZ{IjOn`0SmdB1;TH}lMlnR82AdIUOF)TolFURTOj{3}|oIdf-LN87oB zbD*z8b?>V7!KtM3Ot$3n-h9Z_xW=!hk^&qz8h9^p8Pjk&8T=Km#{#;77Kh*lA+h}M zutPGENWp8?Rp`2{N1~20ORSWw7Wq^2>$cIY^UUfBrzg@6hoW;{@q_K)Qn5V#KREmZ zV)eeftS>K}vUOb(saO&s&;qHd66XNd&Gz5?#zXsd&0@OM5Ak2PpPrMsGG!q}(N||> zi4maHmnD6&#OLtWx4qG3f9ut4Z+DO4yJ)Qg!xn2_=^3I^W&@|YN4UfnQPK;WKbz7kR+i*U-I$p2h|ndf{_HdD}bdCdjv-f}j` zy96Vt2XKU+>_pa#TR>12aPT-n%sVx^QkZYKyzT~QswPRE~`+^@Icp%a| zKx|$cf19>D@Pb@I$d?jteht*7c)1kBmD)0P5WReIM^LvQ%6 z4%pbg=WL!JI#FsHA4DL0Rmy)b^6j7XbZ(-c;s)<&xV5mq`irP&OSOsn?w4;Xu7Gu) za%cRb(KNp9AQ8w($)7xcL9tZ^?C9T|l!X(w-3Fp&m_mQG^X^Lb8Up5%e7%10Gv%O+ zO_9F!0XeI(F24O6 z+Ol)9FNDY<3N3sU*2LX0H@;^JdY^LB?O(4~OfSs~rf-mO-}s|DD{b-nT)wYB#*xc6 zY|qQ@p~@s5QC|6qh71(WVOEDJQ^tdGzt)r)A${kF^pHZIB5ZZ5o(#Etz$T0m#^?_- z4Bi;3>6NrRHyPnqXZOQG5gbe-7sQbxCUZV4Id0JY*#1`X$$DJwVZBwsx&$}uYRcs_D)*L`V2QFpTO*b>rWX=F0 zOR*&HVZM52lNBjGA`Ev55rc%|sIJ1=*b`Tv@J01uth-bq=Lh$@nk~rJqu9+|7vB@R zI3{nhK1Y`xps~*Otd=Y>@Dk|{jr(N zJMwso=S(Rt`W?_02n2hx-efxUdivmO#Od7N8pXV$V8c>Vh=|l!k`{mOOkI%n2TN`E z8xkYlh*X7xH)A?FW@+6frg)_9@H4DL&0l~En z!R3*>Q3997n-uv!T$rWyr@9wvcJ7G`p1#VfEW&BthYv+V0`WD`K^hB}YAE(_X+88X z3Z{zE?;WBT!z)&5-eDO_!XlGU_f$=shr|b2oZF0;j!0AEdL+FU@t{uvxCQ^t$S>Mf z$M_nvt9#~~7LBp9{CMf8A2!LQb^xiXw!Q`Zyx4m5tHZKb<1#c2 z;A56vXCQ4$ktgV3nor4VE z00bx^1n49LXc{|U?z#p+>JAw}2vW8Gixd^hqPQ?cnOl0|p8(QQbdEYvU1X?OZ8h(x zGQyEoYTtEdgewpav)Gyzrr@FuZP_TW4|5PC2Fc_|lsWo#7^mpM|527S|LSQoS+zK&1#zzq;;d zJIdpy{@A-;pB5e8`j^BChnlJu63u|WtUB7K)<1545{cEJlp`k!y81cUkRMU&h{?o) zIP%-8G0zM8Hq+9cGQangT9Vp)X~ziN>Jc0zwXg1^2uR)2?9f8F$6j6meR!U@B1r10 z2{p_pa|n9iBBe(#8|)R|02X@1(VRFrB9!UzF-TxJtjs78lfVIn+Ru z2q;d`!RrXR_N8>X8K24mULq!kI5Dr1lAx@GLlLp!;fN?fSP6`_it8}{U5xNxIV?D9 zUAB2}%x!RBIokTgH~tgHj56X2T5nWzFyRU$>^H)wE}(G5JUV!Zjyp*it)xW~RL}7a zjoi_P1U6W0LV}kgDTQ0ms4`e6JXX1BgFU4%SKX^ZpcHPryTJ z{Mj|zoQ{W7|5LnRD2|Xj3oG;+ILZ`+5=X@}AThk<6i3#|gf zh3}PJ1VI16AyPs7XdB8DYxS%WY09Wu40M))!i{l}NG+jgijlw?a+q zqMp3rVU@<))c(I!BeZ0c+)K_X@mnETD8wV#rma^t;R=VGur@+8(3X{RR1rqD+<$e$ zy-(+K+ayKmxAH8{C8y=La?VeP;|U+Z0K!I1?+#_zlI}kK$hc4WO~i@L)}w8dobR7u zF=m(R5jiE&w1|68z9+bm6M0m*`_=kE<<3jQ*K0OFl#u5aZj!Uw^HU`r&3eU}-F;_k0*`2BlAb}dgTS`D9s&800xyzv zG}6(P_4(s2_jtKwdCt$~xB9?*+bh)Tr@}qXff(zxL+CH9sx~~PmL>7)28W;3Mu&uvWKZ_I-mPko<$WLokysm3 zXvL(@=TXjC|L#*~>YX*aM&EoMOJK)W;~C>l)uf#OdQNh$G9v zYP#M<`H^Gth%v`B#ta2v;{Z&LWDSPfK+ERNlSu970-EHvh>SwdBP8DCjTMEuG)aVr z*vfB8&e~#9ntEVc_XyL{_YsZnf0CwAuZnUB11Zd5^M@KetAv`C>-4RoWf2PJn#Ok% zE%mNL77K5|_R&qE6$pPsn1hwt$JI2nNyN*+AFTPuXkh&Wdnxh{N7Et7$=Ek$a)iY1 z$6g!&KN9>Z%>to;Jn<^)0wL)?dx>##7it*rrjT=al$7OO*4#@t0U>8wl40$Q2m;@Y zNQ80#TdQ4EFozTx8nKzl#5>r~Z^t4d}xy-BMT(a=usP>)$2V&<0oK7pY?I7gAu zQDy6CWvbB*y?5eKAjR~izI+Luz_MQUhMz!rFqIVgV(IVW@rhk1e9#f}&*P#}1Oz@y zAmYnnK9&?Znp1hODa53&Vzs=Y&`=UJI)hkC+s0>74Hk_&Uf^{2l@j+l$pX{ly?pT= zo&GK2$tU$QRJ-#)H7PMWcD}}eABx49chR_vWmwifpsXDtGC&RyW85U>dT9PKq`*^c zbS_s38)iu9cz@A{4Dys9$Eh+lMixW?8NnOwCWFS~{O_UTX6INXR+CGFn9g0}_U!ps z7KdMZMGIGbgMK;ut`SnZz$oswxRvk$JxD2fpxZu)jK_i#ttGU0I8nTV&2XjXB%@KL z#1eFOv!H=@M2Tj7H1c6C?U=)7(LjW7-O^EjdWX?xAb5)`(Wuvc`3*ET6M_-lUDH{6 zZf<+jO+|B+g8VqdpA+m^X=Dwn>;*)haWc3|576=u#--VWU`2S7fpkiG8`lMBRr~oJ z=8}<$?ISeI^c~3D_{{0wnX;3SgWg4W=MH=cqnkN+?}5 zqQG!6SQI64+oy>@uXs$_$=uIB-s})7Zs9}F9nTL1&kP+}-s7x=AEEGRyZfE8z^ayz zWAey?u|9ezh7jRS=3@lN8P#Ft%E7*No&&M?TCF*HW@)L)a=8eqdJA2~r<||!7e8Ke z7ztz&O8N=f{)nEJ{#3((2*Ank_s7kBsF!LbcN2f2*pyUl?m;87^nfo}-t_xgRLOYh z6Q@2E#gWH38`&>Idf7a$j%&VcM;J;8B7ATV(ow(&bLDPlM<^`)_)NLzmN^s7F+vDe z6(^Boiq^v$CsA&S)*r+XqfcmVgs7i;67QC-b9|GpHR#j8vtt>IHAA^yQ4Vy zvLg`+2UPxxlE?gA?_`x(oPnNB+zVdbc}h8Z3#ZIj1_u%o*GLu&RT^x7DH=@3h#hJ& zhYBhFFy)Mz%$QWF09#seeNo&4cP9EZECR1Atrfp4`Yp;8>_}dUI3{BTmw3beCnr(|{@p}$J%B5%dy{rL)36UAz%Y3Kbl?yszCbTYIU|i^AfQJB*R$_F_o_m9Q#6Lf z?)iXclTZ^6a-X#MazD)!DF)g+zY^40azJ#z_9gu;gotn}!T^;A#fA4ZiyC@7yXYG^ z5;cNq?(jKDX?UU5$psuyV)fqPMc70fK_o-c@t*?FJTR>Jc>sZMnP0eYX#-hD3ND0~ z3Z}4s&AL5W%oeEr^zh_Q{B!rv`sR+8^5o2Y!lasAq~`cN(s|H(wsSlzX8zeUU~#`9 zhTOR6Ng$=Jxh#urG22=CT63Ny`au4(B7y52te2fkt*L`Wgt6sDXU+N3kag+(UXd*Fh{ljQmlAq>-k^ys%h{oH^Vcy(= zLQI5x^_7|L`p|qa7>(=@)jQD_+T;qJPxXjF)lEfTOk$TI(l{%>F#TbiCR;9%gXDmt zMaFl}wDV^W2hIV#G{`W>Wwk1#td7iOz0PqLjs8cRBx#lMqLjk zXQ0WL`_sqN@#Z(-F+*Kff&KNlRON#tceZ-|%E9h$&R8acNulHP%ogB?@VF||je}TZ zR3a`@s!&DZ!K4iYW6zcKlRt>uXieRa^MA_uZboY%la7fk_Dccw^DvG;7oyCv`#D^s zrghvEk5BK|o36FO*UFjE((UZdhcrSHnE;;qreXw&dG7P;`Lr8h(07;K@(-jOHQ$5d z7P*tuLFl4N%B*X+6Rd?Ca3kmwn8Z5lE9|oIx5T`qG|6zj;@q~BG5GBt^qev)D~pB+ zR^IJqwFD~Ewtv*&VE|7HSGxGiT%8h2^}m__euY#+{pY57^megw4+tyk4K4uL_?(SY zLEcO2lzA~wQzHdru(yrTTdQ8(u^sYB+5(O4F zu%}fLQR0t4)wbjB)OI>dOCroKP||B6nmI^8aj?L>ON~Z1Tk1pL(0xnXdT9uZfx`Rs zS2eY4(yoM}p}IjU!4hm!WxEHwYGUj|Ek+miR@jr8*yN%ae;|S#Sf@=MAM3kD*Xc=Np;o{vid@AfF*jwNO@0Hw>|B_+MZ9>s8 z+YiddtWBH6-k#ev$fOGQ(z@w^*<>gL|I>XxVy}&dS>(cD!=aN!mi2)H(=+@FpS#aw zLqJ_%i=if-sIbJ4C6Qs}2qM^$}9R89%To4mabBR@It4oV_-w+{Ed->-f87N1_*4wLT} z3w}Hb_Pn18@_qPh9ZFK~D&!(-0w1jQ@W?N(Q-H5-@7tw8&-+FE@pbxVwn8;Ozeq$P z(ZgXR!QISh`t^)~|La31@nNx`|Ld*i^qGNY$%~Rs#53yLZfmdq>$_9T2SGz@zRTPE z_2=#j05i3^lau}(u5S^V)e1;W^llJB3mW_=CmTHoqw!*x{}(msmHq-&BJ!IDz;84GP=5YG$&QQa;M;vFX1lxY8Lq1 zT*bLB?!P?GOy&){c}_kjPGPiTukUc@G#L-iN>X*R9evgpV3@!Gr(AQxE8%kie6x~x z9D@6##`rH6E-54%cTOp;lZTOHI}%2bm^>F+b@8ZE{>Lsfu}?z}G_jA?@}2CeY0^GI zhccPq`V!nsFYg^%L(J1oDqa!ePzfT((U#C0JSdDaQD{&+9a+Q`bk?`CCg0PE#HY;g zA~J&35hcLS1H7bw_<5MpCBvUg0!%iE5Ltro2!!Gk(L}%DD)7bG)%F0S&0Jg7A6vRd zWdx?uhjMI(TkFh>1nn`vumVwy7gE`H@5U$6$7rCyU(Dw$dVIM?EVx5}4L0JO{XBx*vpR2$P&n55yN`#z) zf=N*Z%tW8iM1G9Rs`j3OX*v}GYU_ugAwC*T1$p4ND%*(!kgvI$(AjTaKv>UooQPL+ zhewC?2l^L4p9DgT5*XMTVA)?M2I*E@RrUo^z;=7GAxHO*lMw~#KGA6vAzU7^A#Wxi zhTzngKi03uVoMQyVlqzOoPY=POw*8rG%1)ySu_!6S&@u*3YhM7;ZnkZ?nSvhKvq*--(IJp}sgcj#w)vCKr%=xiGU>d1?$+DhDfbDz`H4+XX zmlAlg6v0&FjIyr!d&q|-;u97g8j|&WT z{OnIQ%sFwULw1x!&3le5Dk=rUv61r7jxB?j| zlBAr%E~+St^6keyGMrWUlc)U!O6u9?4Kz{MicW^{}0zzu1 zENU8lFvMvfm#1my zYq?a8EXEM{Gw?5^wkTaXl)5ph9Q(o^yz%$zZ)ur42Zp=6DB#fKvTzCBDQ^B5sDX^*9`kL3mDNH>1)z9b4pP}O59{5f9`AfiFa!64bhZi;#sg zVD3RHc-?{EwmD8my*;D!q&)6(U-Ji+puUZtW;kL3Py=tdda;$idn*TfeW*|0k*k*$ zFUH}|wmCPzAG_oa{ZmsJkhfxbZo9dR-;`n65OhX%<7(08s?~woM8GD>Dbkqrlfj+W znB*jKYY`|~WuCpAhxZ_I9;e@@F6}3LM&!R6Eq?7X9fXamME>t&(4pLJ?Z`qu zTPn*rWoi9;4(a86uwTlode%q07w0Z#`tdf>Vhs}WW~1qYb(B1?$1ar-yX5CpRTx1 z1{tmZiw{};H~!m0fWBdL<99cgp=lpjTMWuqHla_pjNqb2f@bS>2bZa8?spkp30}6_ z-AV9LV)1TxyCi}1KP|%dOJTn4n$Gs)pKYA`pCC?<<5Pl%-5683%*&-%!tRxBe~!|$ zL!L{q3jf2KrfWmAmtqB)SBfX-S)(4LYlp0sE)KbVsQ?!}>ti>>n|tmKf5uCFVTGxN#@T1>9tW>XDARSFiO}fiS zjjKF{(yh-iDy~C42j*|!L%M`?39#UuL^a7M##D&V=^4N>WHplTB+R6&h2l!WKtr1z z#UH@e66S>nr4W4@DcDIAlud)pZK9Yu*~Nk7uu`ZK%_t_r$|jt&q|+^u8v;j4%S3*8 z9w__o;2_XpiB;uIVgblvjw1LZh6UJ4;_DT34bmD}MHX4Ix7@Y(S$GjsFsRlnB2<_g znX0Tt0t>Q7qblHzeC$lU?BW&wvhXr2S#a`-WGoT-&z($oEe-pxQ||B(Ic$|DXkdZ6 zfFtDzYVEtKqeyAh1=Uo>h?6}?P?rD*uk8JsvETi?Qqc0;PAE{qX%NLL&@m45E&i4U zp6!&8nNWde1lTSsmmfG}YL7~(ds;Vp&F(Vn`qQon?oz$7HM+Nc;QXlr*}UhAmL1c_ zS%_=~W$h?zawP`S=f~&2O5F=F+M9u~J@1YJ+$}byNo6nEYCUs;!BBYy>-5r1M1@i7 zbaD)u2g}xYx+O*f8Y+Q^Tw`uTZ{e1~0paI3tRFh<9VUhUNGA9z35 z1(_b`d{HCCs%$!k_{woZ2KZ)7Sn)(bq*M4bTKleL6OS01Jr)!X=orF3@sMc$-#iug zdh84Pfd4Bt!|1={HN&*)Hfj*+5=(ZUx zTpHKu{43NnN3nWDz= zRa-AJ(vF~mKF;E8OIAzcm8Jw&0z38ah(8kpLR5yCg`Fvg@R3L-5*l)D&)?wh?~>{E z(98%^8QFghHKVaYdqv=>z>ymzApX;%eS! zBh+U1o(q!eNAwN)*aswkStJFrjF3bwQo$c=3cdx5NOp6SJLQ1if+7^UqANoi-Cc?Q z0l%FWt|*NQY!Hd>P#o?8!y@GjJ{Mv&G@B)@mpJBHrbj@f(+vSY^GI00^Ffb;JR-49 zBy{9jo{2p65{&%PjQGjdQ0l+AbX`m6AHp+8^*c$y<;f_!qQV&Y6N**D3OP%2fRX-{ zBnjc6ks48vlIEq6Vs(p=O`08`IA)V2Tk3az{%*K8P0$wXim)yL1%d=6s-|F?7|sPZ{$@V{+P8{$PqTRzaAT?KDQr zX}Wg%^Pfy;d$y>Rpju#nbtO&Mxl=0TM83^0EB_$dEJ6CEo!PgLXEwn?jxS-$mryq= zU#JOND&b!=#dvx$y7a%_bUO++*pK8M6BfXQU(PxoC4ZG_zU0A0j-f>%L*X2~ zqvQd$zS3{N*E(M@dv%IE5@{}LH9vhCEJ^14%T}q4ls&X8S(aEOuWCpYEaWq^#21Mx z@aS0^sD0V0DV5juP!E+?Mw*7ag*eldxvr?S3S~F3pZuMOqwVOc43oKP7#e1V0)o&iFD38omp!wFZb##DQ^*W|g~ zaC^62v{Liz2I1jD&-VI%$OU)n<9~>|I#n5OwWxNO=RVIMnfENhix!Z zaF%e3A^p^BMzPGs60?>dCf9V3U)D92YFpCxU0c#2P|LU1btW_Ixf7LOZig)Z*cQo) zvCQ>EpMmu~nS!4-WaEqMs0XK6FfC1&LxvCha`&bB8XHT8M+kxR8|ablvKIJ+0h2OZ z%9(wt6g*RvN1g&=sHa_(qY?O}lmoF921~(*z(|Yw2?)z+PnVZr;q1 z4#?E@{K(5Za$)FBZ?0n;o-Vx156`J>csn~;Eo5ZTp!3sxYH4d!3Ifhn&AFm=)=&@j=V@aXgnH|3D^fbga+JCj zFXoajrAmWN$cT_@t38X7P(yVpt{;NaYj1ffno+i$p(f4Kk#Swu4mwi&t%$7xgA8q`@Wxz3tV${F~<_rT+k> zo~^|oi@&DTGk>%>;|*)lE`Pib3i!F#4m&Ady-_}&DGW*}$g_3Qhx*XT)I6P;ZiPwO z3F=QE3vO<5s^dG;oK<5>hP1_}StxkA>`kV$YwbqQsn%IQ0=-u6-kjhTN#1RAxWew= zD#NFeP!BB7M9wG0_;u4_NH~*GEG^Im&c0mTd?}cgz?UIcn#%r?k-Lt@3<1e!B%LlR zCEl|2N^r%r--&R9(PAmhYL4UQ)P}j>s+dm2jYBkg2WUZOy2{AeROCa4BQWe1`>d4SRzeIhGvL|n#+V1 zfs-MVg32i^Q!}3mYVwGHlO0(Gd;QuR^0iY0uX?SVay)!4q!t0E+M-XBbDOP@Bd3-E zu2Ckn0S_w1%}6M@Qs-I`6}Yt)ICtltNW-|UGyyArddxVuUS(9)>UJVQT#Tk2(jCw zt#!|)#IE_r%Quo9;pVW;Z!_vw6{Yb#1X(}- z5o9f#8aCeGFxgw8tP6EOT?~+e^ad4Hfj9o>lk4PXi$;U0yZo50IiYKi*LXPkn6^EC zn5HAm<9|6`CMu@Vpp{<^_1*9c0ih_ z`X6p1@@Xdb?I&W5dftyy_P1SzcZyRia@ZunwmtYN9u?(x9iLIYSEj*n`jiknJNhYvm0@yZ3oA`!_ z@+gNIPy-Jjbm3PBx2eYS1IXw9u!LxFkc|^>Q_T}?6XV#h)`VLeVm3qd;GTbTh`X}+ zg4yreS_EWxobX>MjLgC=8oBwZ{|B=0wT;I^-O*U3Nj_QE~<&i?D9}oF%=o zzTj*VL{Rh+p#XIyLqlKW_JH?NAhneZ3mqz zz0+hCnsirlZz<>h=z^QbmEGrDc7drUym1@YLea_aKtNFwLaWGiy7bT>F!?9qwnf5W zzkPo;>8YwN>+nt9m!AaP>3JSN`8L*^!~e9S3#$HlBR{HfpO=KpdReW%QP5dk<>z*B zHc=9nQ!{)sxYwOA=6orAN|uDo<1&xBYa=SVWN z7yLO8?S$rF6Wj=YElKyuRMwgblxcd zayd;^C0YLE&t~QGi<@eGQ2gh2LbnGQzp19BlkM8eO~}wHQ{?;DNc1zqo&q=W4;|BMl1o--o-oW@lb&!F{Ntrpxk?NJX#V4Hgpd2zb%V?0 z=Ed`+69{tF8ugv$N^4~Og>L^AYt64?1vwrZw`%Nu!MEt@RF99S6fX>wOpAszi$3il zg11j*+u|16t&~9_((7kBzYA6%)VmC^7XI_l03*HO>3q4!#DHGyX4A^q1T~;^pcBzkhq< zPo31W(m8VfOK=@#$s&%^u+F;r`1+pdE%T_xyyyKo)>d}bv6UJRc`-Zp?%q}4`r`&- z_7zQ9l1o?wP+`1wLzR2n*{4gZ^nZ);$;*@8P292K=R$mBy_`LK25%ofKW};%;7M=0 zwbrDPUFsnogU2*b6OocA!Q13Pirlxr_hg72wvy-9w~66o%Zqw1L%3Q!w!_u7dQF^q zy^w~TMD8|oNabgFFR^%&jlHL?eu?bT@+f>4;ALd7^Kto?7uiRVxWs zyy!Q3?^gq?|Ygc+Yt6pqlMTKn6UDozQp30}s4~`9RpO|`QqrLJh1`bggtS+uiOqqww-!$^ zqcJNbJmTFoo_~1AM7Rpv1H(nBbU2MPr2t7&|0~P**(xY$073%7ifZO?lqE6E zosGW>V42B|3t4)_KnAZ2^;#qgnV?CVFqEfp^9PeAIF^;#OzD9`m9{M& zJr9|FZ_(wDThiUA`+DgF@oE<}b3P$BX(N+qp@2{PdPrO@Lz-U%kO@K6{>d{UzrPmc zZAiGMpMLCt*+kc%-bTC`$9v;7E|D4hei1WfMRNv6F?6nGYIIgm0@)ERP)6PZAdh1a z&=Q1=Z4tnJx*EZH)bV!v%BKQ|x|VbSH36FjYfsBski%{1;Dma^g>repfB33?4oDZW zpf@UeNtigBG3O1oJZHb(JkPjgypv7vGGVc`u$lx~8r7Vs{{dS8H3?)h9-{%zejm^z z(Z+=jfj0@XHKI!(WWxHm4zgGz-9(CR<@#YbEZ-t6+$4DmjNj>^~E+*UIvx)DRiSi zR|+~5x)8`l@By%65zV$v9g=%7&8Ht_LHe*Vdc{ zB}=@Q22xh1(s>pOCWgJRE$G;Dh`Ob6ha))aT+N$}4|M0av3k>|9yc&MycUKEW7pt| z9(#-rcIUZsd1cjRjPZk(U=eR@G8OoC|E|*_*?!9CK*wg2pHTq@CGlmFV*!LdbxSOz z2hG|hNWRT1#W1Hykl17=l~p^kkP~z@{NAQs5=#Bl%8lALCt?(QKWAe$&CIIDt5eEVYVu%W+7~ z)q!4R*e!S!ka687gZRSj2nm2ybR6~Lcku#Fb9xMIyAe}#+cpbE_e@3J z^BH*=!{8D14qV02c{99s_||P$R)1usPfDX!3E3E?P43pPnw@_!vDVVvn#C_Ihc_}y z&!mOv;(UioYNf=1ly)k{VX?__p9;D6>qn)C8zWH9v>1XHCJv8#lUW)Q{ z|0>ePhM)gT*q?69=1A%daN~SsTbxyuYvwNpIfVUpiTa)QojF4_4bDmi38nwLw`$Zn zOdDORh7RKa@v~NQ!MygwE);LGOT;vzEy`t32|5kHePO+&`TpGJrs8JK^#YMC!UkS= zO;#Bsh4Ot@M+j=?F-Th(+Wu%GqR~{?6UMRfv{-1Gz&u6eH=lG^;fu1eE}}YtcT#Xu z4qsqSQQW0!N)K4atErHUeSPcHo&@v4zoBAS6*+j)mLSnN0LntDy(VuTZYfJRD?P#u z_izZ9j0#eyAvv5@iN_b?VN*=RsXZ2esc}o8QN^k_Yp$j0)&ljf@@cEu3)TsZ#eXG{&9fYqkGHvJMG%Pq*{ zv1#0; z2Pc-Jmt{VT#ZkZI{o$H;bcJks#@jY-DXifidY&=6{I@;YDm%_{9(5 z=vFwaBFi!lEh9b}TS#tQ@UO;5djI)}LU6YHWz8f5T5pTsUTe&avQrPpo9mXmK`Ym? zJGOr7-)iXtKkFNbZvwutK|t^Aj!nt~%Ru=*9KzX*g}Kn7<7lMfJEm4!!=MvRF!ojb z?M)~pr;Mg2)nv)?f8TO#aT)^+vX?Ngi#ZwH9V0eyn>_^lHC99DHi~kRljeN0%hm`3 z?Ay|SFOOAM1RX!8y&Of_R;la!IQ;d_k zYiYl??n#hal*jkKuuIs78erjI`G0r){M1|<#pgunc~m*-KoMu1Jpw7++KhGiXM6^ZZ}NhdE$l!Jf~ynbW*zsq(B6CU|-0h);L~@m>7>aA~ep#XpV# z&uoO^{(bH^K7U@2&I6C{GZd`8!-!q+`Sw*(4SKUT2iO3bPsVy7=_#r~P*|4_$(X&Y z39sf`*N)#8DogD1aVyS{QxJK?gp@58&QFgmOgsgl$PMDY(wLWRfa46t$H4bitZkMf zx4s5I6p#wV1i{om{qnP*n7d%K8>j7m{!a6!0+%fzs%r@fKfjuyQ)%Q6$iZcK)ndS( z@ap$J`G5lzNL`admr5TxYNTGI&}vgu+uVt){hy!3!smnq@xpUGCW++zRGxd9@ao(U zbxC7c`Z>0 zT@u^fqv=9vqKs6>lTa4DQ8>KmvhFllj!{3e?|??jpXroMMEw%+;>koZ=KK-({8)0{ zbeVU$C0dNpi{4r+r>ORKnrz1nVt3LTrV8!fU6xHa?vw}i2c448%L$F-1eZ*`Y*j|S zN8zFRnntV{MBTU1;q7=0K@PU_xZ9^Tu9eR8S=$*b(QEeTWiX#+Npxb!YW~!EP#wb; zvjfP*PSatE>J;|!jq}1UIv~?$NYjgZ68&{xa6MeK zAsw>R=Qq(wT5)Ojwfdy(B;jO=?8|sx!9{_vTb)8WcPFzGGvb1q^Lbk4-sq=)xC+?H z=2#lDl5?;&95CP@rq!@hr&i6{x!uGmC*d7e!4X^Yp=eVf*T%CkbeidLN6YY6Lbq0s zl5w6G$uwkX*K*6F{z~W}KGR0uF|lFlVohGmm|vf9L83W-;@Hzm@GbfGLv_W)?z}W# z(PdAK#S@du!@XflS6*^>rk#b=`T=kZh)qoeAB*KmkQ4neRej;c&t#;FHHh5o_`|+s z|FhVnW6OJSZE^WoctG1stX+Z0tM(`}~ymP-Klz~SU}>DBiH!J$KOv@C#&rJhr> z7h=OjASd%VqV8&YTuERw`xaFI>+gVMG_-X$1=Y7%3>j7naD`F}y|uSn$66$n@q3r% z^x3Q*I+u!70(qrgKfx98$Ya^B$;wk3BTgqC0)m5b2{H7Y6g{6@{_sN+!YxD2y8A%$ zYLv4x#_8lN@FrHjv?ZTO$~yoXPnoozU>e}# zh(nH;^WPt9(dy&5?42Y{ikd@KiE1ydtmnpQy9cWK&aShDKVa(M_lj|Rhs@|nply-4 z)-LoL^bCns^8D+KU?@7=x#0GSDY*&u!Eq=n9Zj5QA{S_lj?|prQm-Hd2O_K>|6>iC zRs&8U!C5$%k`)Ju0X8;H&i~ggp8LXjs)}P>RCYW*oOe5T{F3jO^UIbWm=z)c6(LDN zLcto8kAO`gC55Fx`SAlRs7OpwjGTri>a^ku#JOVCgA(GH=_=0S5)7MRsOnmvxS?QD zzRRmIx(aQMzivEkydL(IyPwp0J;SHkN^y-YqUM7$hqJZ5Ra*m-|yEr&Tt+e(mQ# zo#x~!v06OtFI_#nzI7wde5KwlyNNgS)j-d9x4%Pw%Cb(X|7_GltT_zbgr{lLSuM)` z@&#A)hTfzxh6gac-v#gz3&LFz@4bAzNLz=in%5nU-qs}w9zLKopEPn|0u3<Kpq_61przrorXipzrF8lch z6T*)6GLVqOu(?D91G00R3QHHi7HbsyS#K%Kzhfta5T+t+)2_OeiZ%MG7*kWMb z(Qmlp0uv)lxUu@Ehu}$&od{w83A&KCY0j;1<_K{nEGIq;5_zFFyl(@L5x<#`oX{}B zdV)rt_IiT8D~51k{vp@@+W_&6L_Rn&V$MkU2x5GT3;i4UWYG7BCL`-3nT$av2Hglv zILg9ZCgd{mG^Z{YbCR^d@oB*VFmuvLNj@a(LE94SKHVW{YVkMB;ZP<<;Lf8Wh-JvS z4aNy|2U`&wGopowxB-blLKgvEB!3Vs?p`r+8Kf7^4@#yG?%0d~zYx!fn{MC@Q!#jX zr~%hnG=D(4Lew^pGU6w}T7keFY)uf<&_X@NHQG?T5h9(aF8mlOV<=`sx|1%nTtvDk z>kei;iz~vSi*3025N#nMa809$`2ypQSdChD&<4r?>j$&chc^^kk9DoxhH=f)Mt2A5 z+Q&0=y6rr^67mGP4x&M_0dtD#5JZd0Nlp}+y-hQuv$Yh_8(1wWxuqW0+7C5EUypk2 z-i9S}DZ~fnG2j;AAuM_1*M?s!*#*r(`jNKV?MS}k=ZL=ZUXSYp(C+wLfvm?ok*o(j zp}av|8?~|Dae6}7!*|2S4`2-qZ@CZI5fF#-q5#kyWCEZb{|l@}5k0SZ6y=7pVVgX9rDTo<9kDEVP_g}no;S6n-n z+!w){q!-~-D4!s}8ftzh6>5GkVIk)>2n5O}Om1Os-z|Yb0K*V=A@3bj7X*IR@~>~@+j+ebIdbC~xTfyH@J0j#0)ium2gV|Zo%o>YNc<7P zQ3L}uPz6JmMC%4D2n53gN&P_qB*LKHL8BqSkq^m%#2?lnOg|9)N@J*w%OBB!)F0e| z`~!VMm~Z4-=Sk?jly6h-#9x8#C=g8bNfxFTV8@Y$ZJ7*x zp4@%j@&NCrpN_d7kAO}&@Bz>BetYZsV$oYLC&;f*4%|2#-I*}wZp=!S19x9a^4d8; zo-g@dx0i4yo_Eo&%RQd=L9X17elMPP>ZN1Jc6q@U;)=P=51?dj^Qlh$^Q*KngD2#&m`~Y2kDu_>bFse)me?k6FEOc2DgJ>AL5VQbPHR%&(u)F~X}+N??gg%QTQ0J~gdWHjV>(V2 zR*Fkq5uMgZ`e+B6(#oRz6@jfg8NYT^xo zwm@0v0FywFo~Ioh-6D^I|XL7hE0Nc?g~)(KsTjECD_H&AVNBtrHrj)$l!)E%2Dk(JUu=NVscp$T?Bvn^@gMxSl)|Iq7+n;)!#vc8X zPGh$Q2-SXtnkU;t#mAL1PmY%2*OKH&${xwxL-ES>m58?dt|y@Yb3Y)xjqAjx@A6yy zdTEw@_C9OMd&~#{OIL!fRGJRm9$mncCCOS+QRqbl7!+5THO~Mq$;bxlZuf zW9h0T;Y@)3YhsFj+^?@sMVvG>!nvn&LyoRnRfu#__#u+8{J;idK-{ z(|kJf(Wmfnb%VZJubaPOCHV@sY@4QSW?)K!S2I@K4$=B9Txk*+oxD~L4_E9@qE#CU z{D^X6QcZtqSJt{X(SZq~tAr{N4XY+EERa8T$2r}jcKdMi?aS*DVr`hwG*rZ4Yp8P+VpnifaNx&_cO!!Nyfc@y)C55vt#!DhnC z9A7!wWQkon$-)gCZnZtJO`faSdd2?vQCmR8CUHb2blWf`2sbE}f5p;8PC(k&hPi=x zPZ3H`9uL=~2$zRCEVaLddJ#w!n!4w_EENrUCuq%CNH9ebU#w3}$-U=83IUcIsGLH@ zl-(246AG-}qcv}~CTlyvt{&+&BDvj=x6wjL)3OD#N$pXtlDJPp%z~?~hc%5+;ff`o zZCfjUUoYhr-jo1#*_Dtl;T5)y42l)t=6=_eaF-By^z9!})*$G?+LSt9Pnp8PlpwH( zn;$O0au-3X+;J+dneNi8DJ4S|{>X^qc2CK%q6V;U6-C!Wmk2AU#8L{N)_1WBv3xMS z*-F`9WGGmLe}a?rtn)(qRZC7=GYU@~VBN`X3Vj+8{(8b$&CcFpZY+Fcxy#mVbJ?Jp zE0MZmw^Fu*IWKUSYj>5|JdCc+l{&MG>=CL)W|CipC)_cZk)%Vg6UojF`EV8_SRuP( zj|aBtdWVS0U|vaEJ)q7JecATDdEfoTn>qExBTA#JNb`G&0pFYA+8is0 zn}ltFb?ZiKL*m?~d2(t|FZ^hi*ZuyX{RY}yp6xWX9=kCEB-OygbiTC5GD)qIP68N=WGu)h9lvg;j=jkeb$U4 zI0(j{xR>%0T2(%z?3D~bWUDn~$Vmk2m#4BPQ7eK4M|USz%?qik360;#XR?I+^QmSo z=3ywNDKK6v>EQ!yiE66!<9`3!{zM=TWXuuoQbcKkK#D?D|JG-Bv@FsntH?<8CEJaH`#$& z&TX=^akU1{j=~~7Ar8ZInrzr?HBW!H4dXPG7FEQfuHEi?LYeBTnG!b$!%09}K|?zW z;Otnj`fV*~)xLyI?dnNeMa9F5UT8A8dZF5zwc2X>cT4^^p8m3Y6Qu}_+_jiqO^ixT zt`en-F|EvUM3;&Z37BJXSHD{ovBwy(sqbqfiFXiP??&}R{4LNI(OiGLjgIo)funG7Pjt(CJ)#~Bqr_tPx0RkKke|ksuf>#7 zx0+Hu%@pe0qtQw0gSq1+0UWds7D`FzQK!QYKW;ut+8A{8S(bEIeEflS?R6zgt+k|C z0gvsQnTAFf%pVzw3|y8WMM#0^MT!g&%uU(OCPL#wf{55Bs|7XUm3!P`xfqI7Wg!hB zm)CFEsX>Kxn)G=&Ke2Gl4P)vq-#&WV8u<52RgVan`29L0|Tt;98fm^c`{z(A?Pg#Kj388=tio2q1< zDxRv~!Uu7EwQKjYvZ+}M-mK{Aq9AmH^Y#tYjOI$PrK-FbT$bfAX&xSHUg5t(_HS|W z1Cd>@OBxX7FEm|&;sSNUI{M)*#{}RK3RVjcCDbvOcS$xD9xuR1i_2m9r8>yGjm%gl zbs>7y9}QP?L#=0fOgYG@Qo3}rM*P%&La_a%$3@zcm&@nSmWQQeQ(KSh!eD#~_!H!c z=q1~Hlf<2gda7t&EFC@% zKMlVO&xl0P4m1KCOcuyDag@{iaTsWlRKK{xEuf`*4mEpCI329yLz)P=we)@HkR>OV zckl*22GH|8+@Wp{(mmqAZS%>UV=Mx#vDG4S%7zblcharuz(4$nh_mzv%*sDUlq4p>X59mPpK^=)@Gppey0*>5 zK@#375%CAQE;^YKc-pwDUtu|Z)!0l#vCpxdrqUdLNE%HcsFJ!2&2mUcNjlAYp;r{HKWrx9jFtQ|aeKY^zxl1^@d_)+z9@^?4X(+Y1_Og6Vfi)vJ zLV&0KmEf$$j6bk6PRJyb@sIMv!Fr&N55n4(iRb)18ueL=?lbe(40yNbp5d!s&?BkU{1RhArJtkA5|v;p@h%o*qzc{ zk<=HPdwy49%m|CIQM+#sx8@m zgniTgJ61@=h~^vgfh!}T>fx+Nq3MFR61Z33M&^pVV#lAaNEj7%w$zpT!A;mOxNbdv zRW=)vCs(#S#WS!>YT|DS4acV8CI)!z^Bzh2IL9 zt+cFDP3XJDnpPbv&593@yrOTC-U(mI4&(+q)0&qPqEe=%9=;O@`)m*sQDZw1WW}|Nqt&ElXSeJ8iAuzzb$VBS-yMLgCH?6m6jV<3r@Kmjb^3@ z`mJfyht0ZbN6Z43kZbS~xGqSGnF*T-a$~Ac%()*OzSBqa^6ue5p!Gej{I7$LgWxr0C6!FCZ5xys@CIZ5My&MbZfKmM zMu#}tD`i?z1HLFkpbM)({Mu&}qIZPHII}HpL+o-sN+CiF8ZQ!#Clcp7cg10KwZ#-{ zL{vAFsH6`DBqS@&%YeiF&dJ`6^}$Y5^}d4H08T0wgP)beh(lvcf~Jo7Vw#xh2&2;X zh5B%e1Vj{dOxi&OAOyPW3#|{N_!>`GC_vHpQRp6B?Jm3G^->&1C=D-mOsBuTYB1fimr{;L8&i5<_DB1+^p^~JZ4xB6BxcG zXQ9OZSJqcW)e$Y*hJ@hm7F+{_jcnLB1b6q~?!gJxXmEFTcXtTx?oM!b37W?__v5{n z+h41ztE=XkHAa8*D)G!bt%zJXdt7wph(FX)LdnfB*2*}^SMxbM6;0>U*szHko3CSig~K|`;s+&pp2aw6^?LB$kRl5z|{|!MqjG&N*A*G zd>A4%^~`sJJ=mmBpL7Hgy+1xcD58vKY_eR+1#=oL32O_IH5Nt_V9I#hQ;RxRf;Un^ zr9#N#lXr%Og?tFW7CUgOjRehqX&Z`TF%%{*X9qmO~CVv5JSU#P$6OMaF%C@^Z+?5d$;4#~>G%%MkA%G7(Rsq9vM>#DX zl(+nH^01sPu$XX(fB6&X=12x7w=aJIRob3YWI>>iZE^>Ue_9M}RnpC#{n?b6PX9z> zNqT@}*aUa+3K0>z&JdEkJwZRQauxrfg9sLg zSeG6L0~lq$SlOBUns1S}RxGwKeG<1$d{U0t{ybzCzcbHZ!(9VsM5lpe>Ul+{%5Qm% z<{lMxCdn&(7X?fmz?|F@8YJjnZ<01sk$>yh{?ScgQ@1fAg9Y>D zQH(N_3r&c^M

      MDok=x;Tr-O9NyvaanaB|PI=*@;(nh3<<_<2UaH|Cs?RjsiSQ~7 zOdK>MvENKSUBx7WHx;S&`v!}=nc-vceH(REH6ouHjE?~qp6@@->V#9X!LDP|KV^b> zGng{IIecH*S}tY3_qy97`MR@k$ISs#q1gz&)M?qfN-3@A&|G`yj;UAK*EGWo^QO@H%AW1EXl~|wALrOoQ*Nd@&96?mE(_9&zM4+9jcK^ zOJ+$ix=ag@iIvx?5^e`4QCr7F<@i%e9^?r3Mm$^(TkZC{ZEN>i_a}x;v+1WCswz}v z55Lb9jiPE7jG7`yk%s-qtbium1wCtqVXV)z78*f8b^mlr8Z!7E_SPWki;3;E!q_z7e;9dE(<}WSU|&A6*kzgRsB=T z3=w5&)4_}11M%o^x)FP}z=QB_Q54S$rH}I-)V2=~gn^I3vsO5vAIH}HKOS_XOnTPu z=BB&$*ba{2J|Yj{_TJpQpBMg!Kz{WHGu%t4quNuoV=6P=_GG`;QJk+a0UNz^iN<@P zdW7}}VDk-z2}mnUI({$8Y$55{+{~%3WpNuu**w2WS*cQm(Xu-_chlJUEY|~A#4Cf4a8_9PA?8mU z-Th;A0frLG%Qq1>jPQ}vJf8 zUB8%EuxmX_P_l#-GLUnQI+79yb;ctPw#b_+&eL4dKu;!f zz#SVtJdQn~eZ(2d`7@{X-dX9$qgkzF9IXlc1A%f*L9y^IV3q4!B=@!2*VS(+myjBn z^+b@H?t6Pb+lnO5x^gcO_bs2oG0GGg5xsjy(l8oc@eu z${;(H9JqxgZYs4j(Pw#i3|^l@bd!5I3`lK_*s4*>eU(fg?yGOh$ix|gl@{*hFTr+d z8cNPW%6;orEK}|)u*CBAJM*W&48yYO+J-*0hB%I5Hd-uo4YB8`vV)P}CFEOk4WRcp zw9Oi)Gzx26$iL^A)sNCj(8L!(oUZUIaAHsP&#D6=1&t;$9KjOzu*pa%j$mf;bYLFSb9hrUd9W@=IBg4-o0{O; z{bI5^uQ%tsGd->`{e4Zj^RZs0KHxoK;GAlj^0Af^-2}Z`8#dNA!D*#_SkM;WEvPW;DtB=b3&4Vo!OGJv*Wd;$>#iWfRO(`QtiJ;Yvz45tgI zp4xF~ba%8F*r=K0w6@yWPVE;8>W;NtsBER&xlTiO5^Lox5e;`Mr+o4(;n%x7RAdG{Kg$d-wcZ@VX1E4+JbzzFsjxo& zvLU(mIk6(C;kDc(x7`YVs>8{j*5%e~_DSZvuzgML3{!Nq{rDGeD&Tw~z(nB)BTyp1 zBm~2Hs&}Ow7oqv`)RfyT$E=B)$kaDw5EtP<%w{ke3L*eVitV|c(V}GxLC<`O_eN~7 z1i8sORt2IYx4bdAu)9SXEW+BP?R-c3!tm*wTw!JrMB_h7!jc#fIG#3cgoDl>I`U7v z)w&u!UuUviQ${Qe10dtz1|7BhZ}e8GIx!gwCu$vvNSejIaZ?(S?POWcGk@e}_{X@W zXj6o1^(K!g6@ywH7T@v3y>YgU@#lg8HQHxA7J&S)9F53|-8~pl*|BAV~1*^G}Wbmn-z#swMHT z6P@b8$|1-0)h|j990?qMLwv)JSgYm#-(wp6n zS9XrMX>J|%B;94@$mQ;3^R9;y))H60^Bx_!D z!l3mvfo`2Y zBpY%o1zeljc^4M|AIN;FVWDYD+0xY?7#p1x}6 zOtkL=Zj5#2>gbeXKuDH|fLr1= zCwyy8tsrLT&g)h%MJV&zY2jt%*sDdXFm%_f`@EkV^%vyM;LKcD*BM)Sf8w2X#PA_a zWV$vGxA;DQ7e=fwug_^^iBrNY*=Ud6D_Er-S8}*_nN94tHklCZO}` z@%U-!awYH!4|lh~&03?D>Qbl`vY1cqAfT{SB=T~6&k|zpxieX{Tew&Is5YSxQDVxt zLSXayDnKr(VoRw1n-u>esYx6LV+dj@#4;SSExNr9$tr7-r4!y&EGyWCZJhy)Ju!BP z=HcgO23k0|0v4XsK{|#L<4RbIDQd+))o<2q{eQ^6f1A zy>RMsAIW8p8QN=UO>*hDm*vBPOOuyRH?sPnZ6Z%e7e!^&3ZY9p(mBB~!u1D~D6w_o z7U2#I4nZW?9jc{5wWch|V+iiDDhL@w3QvY2!cM1;5|dSq+FT53Y3{eI}!-#w%zY{QvQh6iGCiyTw; zuCaunG2ZASFlk`g6WSNgLX8Oo3YudM=O0&Ne!S0)?et6=X|V%C=|Uh5d%*WjC2P(n zK7JJH!(E#+3>!m?hUKiHRBu~VDX8s5+9mRdbTYDHpKHXBH7VFS&Y{D-+PPV4 z_HyA+GlFFRX;$~!#zo?M7yuH57mBO;C`97CGA*k2sN&N3N>O&g*ZvodDn^r>E}?TS zJp=oTm={${js0I`N|rHPE+*xD0vt#px0a*js3jxe&4Q*4hjlG9V`egcJ#AB;aw*l6 zMZG$sX!@8SulbN$czFAM!U>nQy`*Ld{qBACi=DGwCx5VYdK}ip4Pa=2f8re4SLSrf zoL>P^ItoddPB(tbZ0Aim*f&clLYS|*-!Hb>B0$z6m&s3=N}I|cGrFl2yKUhuSvX~G zxA~js##;s}*wgqpk*spQIN&8)N*}*kS3q1VW<`&=8{~ZdFup0{#SWBy@+xNR<1;+D zZh=`bto(7K*-5pL1B6vC_g|=S(>G(K3Y|aAC|;MpC|+CRjd_`NOf#Y95*jKB2YF&g ze9^X$lpnk#Bv4ZFQI`*bCnmHvV5dBx*cA)2-?^n&-h-|L#pQ6`X)<#^W31N3I}^F? zPWuHGq9$=LI$kaPp#MU!Mfc!swN_=^e~NmC5_>o5VRy=F3lx}|jH=JI#vpaN&6xRl zn8Zh=HagqCfN4)-zh=UV$uE~j$znFuRn90)#hDZ6rQ1BuAX}dJxX=E7n9IeuF1=JwNNQIuU)@(i2b35@6uV$*!Pbn+s(pOz*vxK5g( z??iV|<=~Q45r_9QRHarGrZIM}P2)6Juy>v46)up}jjbC)Z1|rps88-Stfhy`Mi;h8 zvNgaatlaX~EGF$p(*0#7cT=%o3)?b(T9l2&R2AIP=_ItnDcZO${c5e|&KES$LCovbr$r0fszDak37B6TC$<5D?L=U;< zV^a4$fW5bT)vR@ZKNL}@K_PZAA*WQ8<Br{^JDpXAD>V9&#HKiN5I5~UNrr6%=H0TB=`#t8O)I$k9r>xf)NJ2pZfPIb#n zi^w`W7jp}mLnp}Et_~c*E~3L@o@<+R;c=A!v~;nNEAdbh&v-^%ReydF;mV)JDnFWA z`cxu|*7l{4dMKEM5;GiErup?&x`y-mRXQa(CdOoZ)rv|rdZaUbgzpJ5^J|wsx>I!v zAgN_Zu2bwl4D-M>TMPwR&L;A;;`-**tW@yIm51uval|jNa&QOv-R}h5?ridMCLvlH z^KuH$#|lljb+77l`qZC-YWO~l@)~<`Rh4QBIJ8g6woRq)hZ7BBjI<^1IFY9Q_R6xM z^-m^!XZa=F31Jl*hU$42WuB2zOnOKT;4L%NdnAnpTr2hq`bNhjEksSC$`0?O`#&9| z+OgPl*83xmGE;qFeYTrldSYb_Ii~iisrfi2D+u+dG_$ntt@?^@!MBp&+QCYQiCKdY zt_oY7976=X*nBGaYS%h(??CcN*h95FM{dS1!wjh@JMgsoQyC`P7s^%wFw5U2fId(o zE=VaZwU>WV@;6Cpjwu^?Xs7cQ7KXU>YRdKC^ju?WCB*f7du{#Wc8cvOU1hrSE*|r7 z13n^d{P|M#u{7|w(jQ=G<9;xDT4yJ6o065@Q%3-@{i&)A&+QF`p$@XU$kJ z@_19R6P+a9jtNONZ8ejzUm1zZ$?z4*w5yiBZ8s#Gk&dimEbn?btmfWs_V``Amy#+xpEotb>Bfp$g#3f#-B17kj?5g_j?)l=dBKSUZ62K{)lg(i0L! zK2*`OH(cThA7H?2PyFZUOm;&Zr7Vj21tk5MJ2uxx`!@(mZ`dD>H?b@3zpm;2>QwSn zxWGuuZ{9@ABz{JFf^lRUo$ocS{=4y_iwxY@(RRDJt7}(d@9FdSR=+dE?`KOG_ya1B z$h&?uJ(Vy%QL2J_dA~{@UwuE_NyHXe>r%U4clq9(^`?{Lds*x&cI3~O2^OvHB}W>` zF~K@Dtb2kd5{)Ruuq89oB_?KJ+#l~mHCLJpB>ZJBMh(>barAPU z$iIf#@n9_W)xebtzS2$EVa9^kzhXxDE1;+NG8l=OK|R73z%lk;ivQw!K%F6oqI;5o zAxAg~9k`K_t;JS6cuJeUc;|(+Rt8=rvH-W(z*MTW?;AQs>Kj; zy2;}QNhcoIj>u(&bjHs3L9F*~&}3`lX_lKVEw>+8`gaL)9q4><-p2GIm;pV!OE9;T z0u5Ufx=>PjFneYF>Y*+&t_%KYBfmeG^*(V;QK8^U^$u-)40@=Zw$N$8!N#z({Wx#j znK$Wc&LgIsIX|9IRRgp5vw;e>yyv@e-{+DFw;eSFM)pg)I{o7@9@F=g3!~BD?LH1j zeKF)#h3GS!NsZ9Qje_)@r9D6$O0ycpyuB>u6Ano~T~aNa)X^r!X!?-5x{s&WQ_4@? zvc5YteXY+8YyPL~0?5-~aSlTbsWK)o``ciIITc5g9G4%Uq)5N9TKpd>CyC`4mbowq zBCbrmt!|^n`K8~}%Bz1=*PCrRm_PSjGVC2^=LDGl!UtciT67S2?&ASAg>)=R@%J?d zQkH)_mevfco-kf-)W<)+vK_mwSXY~}U=Q@F7Wyn`buG9sRO$|J9xXBnUd~nQ7Kw^t z?W+9nqTj2!wT$5HtG(9Sl};e2GNDJpKEvP&F!lGub3t_Xr+F0DloD3WwV(I*tfZp0 z(x=-4h?)FE7?J0~XQY6UBTY@h6xE_1LV>%owwhD34GqmUNK8umvy2*Z>T5YDN$c`6 z)3eKUP1bspp^3Ii4nL76l%$T2XU#;MzA8yMC`maHHb9gaEqd7r5@s9g4V22A7)y^W z0!yedmFAohi&#^SRpV;7W=a;=%Po`$Qxn)`i@-8tmRjnc;=uqvgW8yZ#JZl7tdpTb zJ6FD&h>X%0%V>L5u~z_>v5GbQadBNowu*I_t*M<-C|8HRf}s$yEaf!C6`Ovch2>01 zLJC*B%t6di0+-WV$Z`u#efXH6MKM=-c7ctE<(hhZeT8hfR!31qLqmnCHPU`by;C`u z5qZqYw=HtHr2#nl**~BCEt2g5oEd?k(7&4pzGJwScU#hdxS&P`m*TExO39BCJj5zb zQOoYvO#6a!t{@jg6}7j2&n=K=0B}DL((k>ZW--LSdB7=XASDY2R^XH?Mi>T_j=Myw~kie8y*+&<%PJtHb z`80A~OQ54T7UA~(Iwq9L1I6HJFej-~C$k#j6nxyTAc4sdHvSze8oW$@)1xE+ zR7_UVJ3vA*+e@>$KIM@(mGa%ci1Zu~qWuaIgBSjo8)Apk|2b?74=mmuJexWhVaMA4 z#0&$(XuaEbFXR1Ftz0g{fO6ploZ`syLo7^F(`-`IVCf zM^3i@*g2F+Y60ExXtT6k0&(oq%Tmsk_m?TC~q7E-g}>icBXVblJi=|=(5G= zS4L(-(gC5=M+Ufk7vZJ7CZ2_VLeuTR+j8+TQhW+XR?=oTUEnPO zdGI?*%VOGO?pJL&{K3ocqremK5SYlu;|&bw2}D*$LuCHa+eESrA4V2NuyYppp))x5 zBQv2PS$_cDf+3HOLQkN>dy0U9K{S^OpK3u$J(7reAN}G55^8-r4gHjvU4|Zugo?7RGv3}&i&Oi*n>>53tN3~1 zUVE#@ucZW75{XX$Q_^*-_8CXoLbL8LiUsrjVHs(cQRJ|O3%6KnBgsygnn9Pg_8Gl; z&4_2SLydcKEbeRoqSsuAi&v<-?7YW4mX&ReL-fib5^X&k(0h`r29_Wj~{}H=Ohfa(IdObSG1gB#0>6$QDfQ{?j7NBnNqVQHQO7_ za@AbydS%3A;k$fP67F#ti$CsU;e+x!bzkvC*R|wx@(-+`G5j$!SzLJN;7=-jVni%9 zXTRA-9hgp_imzW%>e2heOkes;b;M*5rC<(T$3yRE;3m3Y*c*P_gE^=de4oE7h+&{X zNOVGz@BD!bm`CP-sB`J{AY)_e$?0gDG1Z0F?#ZS6VU@@3YMPik@jSS>^kJlO7-<#d zdv$&M6C!|8C`6Vg^}bV|pSM2ML#X3(MpLTCSWL*(S~uiM=8`CZDJ)f8K>>r(I1N?# z3VfA);4$`4XO@poQlzPtbY20{rJfh-KuRFZl!Z+O(wLMAw>`-9J<`kZ`!Km#Ss-!< zEqrN(V3F{B&ZJ3wN=))xWZI?j@1@cmYAZ7 z(!tn3^v3mYiKepB#Pm^%KtQ97K~_Jv!YNVfrfCRn)mHU-aC%i%Q(c>bPp6H+g8JV@ z1KZo)kh7s$(Vg4F;}&&Y3X>OU!&-Gi3U%GsYp()GB(|K1=Wcb!)!Y3`><`^vBA%*0 z3UT_?q}9=6TZ;uF4YYPIl*8myQwHqtiI0J5-QSCT6(fdv7b?(U>z7cNqN;3pX5#4d z-Q|5DqbH3^w?urnQ+{szwSMWG+||1T?R`azVhBMt+ZBbn`((92Lr(pBnng*EJn*up(c%=7 z^P~3|C&7xUNYS8XoyhcenX+jD?HF~v(B05-bwb+&rb1i6AJH0kR7Ts;6O2ebj&KD+ zps_ACvBA5Qn$`DX4##yrZ2Y`(wC0he9mTZDFS`D|lTRrqs@?8Ld=GH`zx9yX(Q6j| zAhdwTPy;!=NR^jSf4L)&LkRzWuZzJ8Di2Cqo(U zoiVwRzIT4r%iBEK?OzWr4ax>7&2qcL56b(;gDF#1j8P!$&Pl==??#^{w&hYd&$a#Tpk`*5L?o7Lt-8)5Om25ZN%)GDjoeYwkO2((0+ z9Rb)pO}lW?<<2)pdb>EwBcu?+?6&hUTKgrdgG=s+r({OCU`}!=n3f-uo=hBUB&cj8 z{9{;|^)$#irU-&|ikS0>{vN#Byv6`HtQwj!d>M&I3w)A1qkJ$_Skyq_vA zy|=Td`%JLFMQeE3A;Zx;SI@`KVG~=4d>46<`@vivVS2q(+Gj@dcc{uhHB5Ehny!Eiv>*s=emh6BRM V!IBul2_*u@$%a5hB_b#Ke*m Date: Fri, 19 Sep 2025 18:54:17 +0200 Subject: [PATCH 10/65] Update globale datamodels --- EgwCoreLib.Lux.Data/AdminContext.cs | 2 +- .../Controllers/LuxController.cs | 14 +- EgwCoreLib.Lux.Data/DataLayerContext.cs | 26 +- EgwCoreLib.Lux.Data/DbConfig.cs | 6 +- .../{Identity => Admin}/UserPrivModel.cs | 2 +- .../DbModel/Cost/CostDriverModel.cs | 42 + .../DbModel/Cost/ResourceModel.cs | 149 ++ .../DbModel/{ => Items}/ItemGroupModel.cs | 4 +- .../DbModel/{ => Items}/ItemModel.cs | 8 +- .../DbModel/{ => Items}/SellingItemModel.cs | 11 +- .../DbModel/{ => Items}/SupplierModel.cs | 4 +- .../DbModel/Production/JobModel.cs | 26 - .../DbModel/Production/JobRowModel.cs | 71 - .../Production/ProductionBatchModel.cs | 2 +- .../DbModel/Production/ProductionItemModel.cs | 5 +- ...RowModel.cs => ProductionItemStepModel.cs} | 12 +- EgwCoreLib.Lux.Data/DbModel/ResourceModel.cs | 59 - .../DbModel/{ => Sales}/CustomerModel.cs | 4 +- .../DbModel/{ => Sales}/DealerModel.cs | 4 +- .../DbModel/Sales/OfferModel.cs | 4 +- .../DbModel/Sales/OfferRowModel.cs | 79 +- .../DbModel/{ => Sales}/OrderModel.cs | 7 +- .../DbModel/{ => Sales}/OrderRowModel.cs | 73 +- .../DbModel/{ => Stock}/StockMovModel.cs | 9 +- .../DbModel/{ => Stock}/StockStatusModel.cs | 9 +- EgwCoreLib.Lux.Data/DbModel/Task/JobModel.cs | 35 + .../JobStepItemModel.cs} | 20 +- .../DbModel/Task/JobStepModel.cs | 116 + .../{Production => Task}/PhaseModel.cs | 10 +- .../{General => Utils}/CountersModel.cs | 4 +- .../{General => Utils}/GenClassModel.cs | 4 +- .../{General => Utils}/GenValueModel.cs | 4 +- .../DbModel/{ => Utils}/MovTypeModel.cs | 4 +- .../DbModel/{Identity => Utils}/TagsModel.cs | 4 +- .../EgwCoreLib.Lux.Data.csproj | 3 +- .../20250808143628_InitDb.Designer.cs | 80 +- .../Migrations/20250808143628_InitDb.cs | 28 +- ...0250916152301_AddItemParentRel.Designer.cs | 80 +- ...0918100936_AggiuntaGenClassVal.Designer.cs | 82 +- .../20250918100936_AggiuntaGenClassVal.cs | 2 +- ...250919164620_GlobalModelUpdate.Designer.cs | 2239 ++++++++++++++++ .../20250919164620_GlobalModelUpdate.cs | 2256 +++++++++++++++++ .../DataLayerContextModelSnapshot.cs | 1986 ++++++++------- EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs | 69 +- .../Services/DataLayerServices.cs | 4 +- 45 files changed, 6313 insertions(+), 1349 deletions(-) rename EgwCoreLib.Lux.Data/DbModel/{Identity => Admin}/UserPrivModel.cs (91%) create mode 100644 EgwCoreLib.Lux.Data/DbModel/Cost/CostDriverModel.cs create mode 100644 EgwCoreLib.Lux.Data/DbModel/Cost/ResourceModel.cs rename EgwCoreLib.Lux.Data/DbModel/{ => Items}/ItemGroupModel.cs (90%) rename EgwCoreLib.Lux.Data/DbModel/{ => Items}/ItemModel.cs (94%) rename EgwCoreLib.Lux.Data/DbModel/{ => Items}/SellingItemModel.cs (84%) rename EgwCoreLib.Lux.Data/DbModel/{ => Items}/SupplierModel.cs (94%) delete mode 100644 EgwCoreLib.Lux.Data/DbModel/Production/JobModel.cs delete mode 100644 EgwCoreLib.Lux.Data/DbModel/Production/JobRowModel.cs rename EgwCoreLib.Lux.Data/DbModel/Production/{ProductionItemRowModel.cs => ProductionItemStepModel.cs} (88%) delete mode 100644 EgwCoreLib.Lux.Data/DbModel/ResourceModel.cs rename EgwCoreLib.Lux.Data/DbModel/{ => Sales}/CustomerModel.cs (94%) rename EgwCoreLib.Lux.Data/DbModel/{ => Sales}/DealerModel.cs (94%) rename EgwCoreLib.Lux.Data/DbModel/{ => Sales}/OrderModel.cs (95%) rename EgwCoreLib.Lux.Data/DbModel/{ => Sales}/OrderRowModel.cs (58%) rename EgwCoreLib.Lux.Data/DbModel/{ => Stock}/StockMovModel.cs (92%) rename EgwCoreLib.Lux.Data/DbModel/{ => Stock}/StockStatusModel.cs (91%) create mode 100644 EgwCoreLib.Lux.Data/DbModel/Task/JobModel.cs rename EgwCoreLib.Lux.Data/DbModel/{Production/JobRowItemModel.cs => Task/JobStepItemModel.cs} (73%) create mode 100644 EgwCoreLib.Lux.Data/DbModel/Task/JobStepModel.cs rename EgwCoreLib.Lux.Data/DbModel/{Production => Task}/PhaseModel.cs (80%) rename EgwCoreLib.Lux.Data/DbModel/{General => Utils}/CountersModel.cs (91%) rename EgwCoreLib.Lux.Data/DbModel/{General => Utils}/GenClassModel.cs (92%) rename EgwCoreLib.Lux.Data/DbModel/{General => Utils}/GenValueModel.cs (92%) rename EgwCoreLib.Lux.Data/DbModel/{ => Utils}/MovTypeModel.cs (89%) rename EgwCoreLib.Lux.Data/DbModel/{Identity => Utils}/TagsModel.cs (90%) create mode 100644 EgwCoreLib.Lux.Data/Migrations/20250919164620_GlobalModelUpdate.Designer.cs create mode 100644 EgwCoreLib.Lux.Data/Migrations/20250919164620_GlobalModelUpdate.cs diff --git a/EgwCoreLib.Lux.Data/AdminContext.cs b/EgwCoreLib.Lux.Data/AdminContext.cs index 7221a70e..e78ef64f 100644 --- a/EgwCoreLib.Lux.Data/AdminContext.cs +++ b/EgwCoreLib.Lux.Data/AdminContext.cs @@ -1,4 +1,4 @@ -using EgwCoreLib.Lux.Data.DbModel.Identity; +using EgwCoreLib.Lux.Data.Data.DbModel.Admin; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using System; diff --git a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs index d7690ab1..c8b6921f 100644 --- a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs +++ b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs @@ -1,6 +1,5 @@ using EgwCoreLib.Lux.Core.RestPayload; -using EgwCoreLib.Lux.Data.DbModel; -using EgwCoreLib.Lux.Data.DbModel.General; +using EgwCoreLib.Lux.Data.DbModel.Utils; using EgwCoreLib.Lux.Data.DbModel.Sales; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; @@ -8,6 +7,7 @@ using Newtonsoft.Json; using NLog; using NLog.LayoutRenderers; using static EgwCoreLib.Lux.Core.Enums; +using EgwCoreLib.Lux.Data.DbModel.Items; namespace EgwCoreLib.Lux.Data.Controllers { @@ -952,7 +952,7 @@ namespace EgwCoreLib.Lux.Data.Controllers // salvo BOM... string itemBom = JsonConvert.SerializeObject(newBomList); currRec.ItemBOM = itemBom; - currRec.Cost = totCost; + currRec.BomCost = totCost; currRec.BomOk = numElems == numGroupOk; currRec.ItemOk = numElems == numItemOk; dbCtx.Entry(currRec).State = EntityState.Modified; @@ -1064,7 +1064,7 @@ namespace EgwCoreLib.Lux.Data.Controllers // salvo BOM... string itemBom = JsonConvert.SerializeObject(bomList); currRec.ItemBOM = itemBom; - currRec.Cost = totCost; + currRec.BomCost = totCost; currRec.BomOk = numElems == numGroupOk; currRec.ItemOk = numElems == numItemOk; dbCtx.Entry(currRec).State = EntityState.Modified; @@ -1124,7 +1124,7 @@ namespace EgwCoreLib.Lux.Data.Controllers // salvo BOM... string itemBom = JsonConvert.SerializeObject(bomList); currRec.ItemBOM = itemBom; - currRec.Cost = totCost; + currRec.BomCost = totCost; currRec.BomOk = numElems == numGroupOk; currRec.ItemOk = numElems == numItemOk; dbCtx.Entry(currRec).State = EntityState.Modified; @@ -1211,13 +1211,13 @@ namespace EgwCoreLib.Lux.Data.Controllers { numItemOk++; item.ItemID = recCost.ItemID; - //item.PriceEff = recCost.Cost * (1 + recCost.Margin); + //item.PriceEff = recCost.BomCost * (1 + recCost.Margin); item.PriceEff = recCost.Cost; // se selezione esatta sovrascrivo altri valori if (selExact) { item.ItemCode = recCost.ExtItemCode; - //item.DescriptionCode = recCost.Description; + //item.DescriptionCode = recCost.Name; } } else diff --git a/EgwCoreLib.Lux.Data/DataLayerContext.cs b/EgwCoreLib.Lux.Data/DataLayerContext.cs index fca15cd9..7dcf1874 100644 --- a/EgwCoreLib.Lux.Data/DataLayerContext.cs +++ b/EgwCoreLib.Lux.Data/DataLayerContext.cs @@ -1,8 +1,8 @@ -using EgwCoreLib.Lux.Data.DbModel; -using EgwCoreLib.Lux.Data.DbModel.General; -using EgwCoreLib.Lux.Data.DbModel.Identity; +using EgwCoreLib.Lux.Data.DbModel.Cost; +using EgwCoreLib.Lux.Data.DbModel.Utils; using EgwCoreLib.Lux.Data.DbModel.Production; using EgwCoreLib.Lux.Data.DbModel.Sales; +using EgwCoreLib.Lux.Data.DbModel.Task; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using NLog; @@ -11,6 +11,8 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using EgwCoreLib.Lux.Data.DbModel.Stock; +using EgwCoreLib.Lux.Data.DbModel.Items; namespace EgwCoreLib.Lux.Data { @@ -48,7 +50,7 @@ namespace EgwCoreLib.Lux.Data public virtual DbSet DbSetItemGroup { get; set; } public virtual DbSet DbSetItem { get; set; } public virtual DbSet DbSetSellItem { get; set; } - public virtual DbSet DbSetRole { get; set; } + public virtual DbSet DbSetTags { get; set; } public virtual DbSet DbSetCustomer { get; set; } public virtual DbSet DbSetDealer { get; set; } public virtual DbSet DbSetSupplier { get; set; } @@ -59,11 +61,11 @@ namespace EgwCoreLib.Lux.Data public virtual DbSet DbSetResource { get; set; } public virtual DbSet DbSetPhase { get; set; } public virtual DbSet DbSetJob { get; set; } - public virtual DbSet DbSetJobRow { get; set; } - public virtual DbSet DbSetJobRowItem { get; set; } + public virtual DbSet DbSetJobRow { get; set; } + public virtual DbSet DbSetJobRowItem { get; set; } public virtual DbSet DbSetProdBatch { get; set; } public virtual DbSet DbSetProdItem { get; set; } - public virtual DbSet DbSetProdItemRow { get; set; } + public virtual DbSet DbSetProdItemRow { get; set; } public virtual DbSet DbSetStockStatus { get; set; } public virtual DbSet DbSetMovType { get; set; } public virtual DbSet DbSetStockMov { get; set; } @@ -81,12 +83,22 @@ namespace EgwCoreLib.Lux.Data string connString = DbConfig.CONNECTION_STRING; if (string.IsNullOrEmpty(connString)) { +#if DEBUG + connString = "Server=mdb.ufficio;port=3306;database=Lux_000_dev;uid=lux_user;pwd=Egal_pwd!;sslmode=None;"; +#else connString = "Server=mdb.ufficio;port=3306;database=Lux_000;uid=lux_user;pwd=Egal_pwd!;sslmode=None;"; +#endif } if (!optionsBuilder.IsConfigured) { var serverVersion = ServerVersion.AutoDetect(connString); optionsBuilder.UseMySql(connString, serverVersion); + // verificare setup componente +#if false + optionsBuilder + .UseMySql(connString, serverVersion) + .UseSnakeCaseNamingConvention(); // via EFCore.NamingConventions +#endif } } diff --git a/EgwCoreLib.Lux.Data/DbConfig.cs b/EgwCoreLib.Lux.Data/DbConfig.cs index 9d91849e..23862df5 100644 --- a/EgwCoreLib.Lux.Data/DbConfig.cs +++ b/EgwCoreLib.Lux.Data/DbConfig.cs @@ -74,8 +74,12 @@ namespace EgwCoreLib.Lux.Data DATABASE_NAME = $"Lux_{nKey}"; DATABASE_USER = $"user_{nKey}"; DATABASE_PWD = $"pwd_{sKey}"; - CONNECTION_STRING = $"server={DATABASE_SERV};port=3306;database={DATABASE_NAME};uid={DATABASE_USER};pwd={DATABASE_PWD};sslmode=None"; // stringa admin con utente root egalware... +#if DEBUG + CONNECTION_STRING = $"server={DATABASE_SERV};port=3306;database={DATABASE_NAME}_dev;uid={DATABASE_USER};pwd={DATABASE_PWD};sslmode=None"; +#else + CONNECTION_STRING = $"server={DATABASE_SERV};port=3306;database={DATABASE_NAME};uid={DATABASE_USER};pwd={DATABASE_PWD};sslmode=None"; +#endif ADMIN_CONNECTION_STRING = $"server={DATABASE_SERV};port=3306;database=mysql;uid=root;pwd=Egalware_24068!;sslmode=None"; } diff --git a/EgwCoreLib.Lux.Data/DbModel/Identity/UserPrivModel.cs b/EgwCoreLib.Lux.Data/DbModel/Admin/UserPrivModel.cs similarity index 91% rename from EgwCoreLib.Lux.Data/DbModel/Identity/UserPrivModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Admin/UserPrivModel.cs index 7baa8be5..54831403 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Identity/UserPrivModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Admin/UserPrivModel.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EgwCoreLib.Lux.Data.DbModel.Identity +namespace EgwCoreLib.Lux.Data.Data.DbModel.Admin { ///

      /// Tabella dei USER di MySql diff --git a/EgwCoreLib.Lux.Data/DbModel/Cost/CostDriverModel.cs b/EgwCoreLib.Lux.Data/DbModel/Cost/CostDriverModel.cs new file mode 100644 index 00000000..a5ba4046 --- /dev/null +++ b/EgwCoreLib.Lux.Data/DbModel/Cost/CostDriverModel.cs @@ -0,0 +1,42 @@ +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; + +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace EgwCoreLib.Lux.Data.DbModel.Cost +{ + /// + /// Rappresenta la definizione di un Driver Risorsa da convertire in WorkOur (driver di ResourceModel) + /// + [Table("cost_driver")] + public class CostDriverModel + { + [Key] + public int CostDriverID { get; set; } + + /// + /// Nome driver + /// e.g. "WorkHour" + /// + public string Name { get; set; } = ""; + + /// + /// Nome dell'UM + /// e.g. "hour", "meter" + /// + public string Unit { get; set; } = ""; + + /// + /// Descrizione driver + /// e.g. "WorkHour" + /// + public string Descript { get; set; } = ""; + } + +} diff --git a/EgwCoreLib.Lux.Data/DbModel/Cost/ResourceModel.cs b/EgwCoreLib.Lux.Data/DbModel/Cost/ResourceModel.cs new file mode 100644 index 00000000..96d49aad --- /dev/null +++ b/EgwCoreLib.Lux.Data/DbModel/Cost/ResourceModel.cs @@ -0,0 +1,149 @@ +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; + +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace EgwCoreLib.Lux.Data.DbModel.Cost +{ + /// + /// Risorsa / Centro di Costo, con costi / Hourly + /// + [Table("cost_resource")] + public class ResourceModel + { + /// + /// ID del record + /// + [Key] + public int ResourceID { get; set; } + + /// + /// Nome/Descrizione + /// + public string Name { get; set; } = string.Empty; + + /// + /// ID del driver di costo impiegato, tipicamente 1 = WorkHour + /// + public int CostDriverID { get; set; } + + /// + /// Valore di riferimento del CostDriver per il calcolo dell'importo unitario della risorsa + /// Se è basato su WorkHour diventa il budget annuale della risorsa disponibile + /// Tipicamente le Ore di impiego a buget risorsa, es 220gg x 8h + /// + public decimal CostDriverBudget { get; set; } = 1; + + /// + /// Costo totale (rif al CostDriverBudget) componente FIXED (macchinari) della risorsa (ove applicabile), comprendendo + /// - ammortamenti + /// - costi di manutenzione ordinaria + /// - costi di manutenzione straordinaria (se stimabili, in periodo post ammortamento) + /// + public decimal FixedCost { get; set; } = 0; + + /// + /// Costo totale (rif al CostDriverBudget) componente variabile (tipicamente Energia) + /// nb: stima basata sul (costo medio energia aziendale) * consumo effettivo (se disponibile), altrimenti (stima potenza media impiegata) * (ore di impiego stimate) + /// + public decimal VariableCost { get; set; } = 0; + + /// + /// Costo della componente HR sulla gestione impianto (rif al CostDriverBudget) + /// + public decimal LaborCost { get; set; } = 0; + + /// + /// Costi di OverHead (rif al CostDriverBudget) da ribaltare su risorsa (tipicamente struttura) + /// + public decimal OverHeadCost { get; set; } = 0; + + /// + /// Costo di overhead (come % on top del resto) + /// + public decimal OverHeadPerc { get; set; } = 0.15M; + + /// + /// EBT ovvero marginalità minima garantita on top del resto dei costi e OH + /// + public decimal EBTPerc { get; set; } = 0.1M; + + /// + /// Margine sul prezzo ovvero valore da potersi eventualmente scontare + /// + public decimal PriceMargin { get; set; } = 0.2M; + + /// + /// Costo Netto la risorsa su base CostDriver + /// + + [NotMapped] + private decimal BaseNetCost + { + get => CostDriverBudget == 0 ? 0 : (FixedCost + VariableCost + OverHeadCost) / CostDriverBudget; + } + + /// + /// Costo RockBottom Risorsa su base CostDriver + /// + [NotMapped] + public decimal BaseRockBottomCost + { + get => BaseNetCost * (1 + OverHeadPerc) * (1 + EBTPerc); + } + + /// + /// Prezzo comprensivo di margine di ricarico massimo scontabile (sul RockBottom) + /// + [NotMapped] + public decimal BasePrice + { + get => BaseRockBottomCost * (1 + PriceMargin); + } + + + /// + /// Navigazione Driver costo + /// + [ForeignKey("CostDriverID")] + public virtual CostDriverModel DriverNav { get; set; } = null!; +#if false + /// + /// Indica gli asset/cespiti + /// + public bool IsAsset { get; set; } = false; + + /// + /// Indica che è un operatore umano + /// + public bool IsHuman { get; set; } = false; + + /// + /// Costo fisso risorsa per UM tipo ammortamento + /// + public double UnitCostFix { get; set; } = 0; + + /// + /// Unità di misura della risorsa tipo fisso/ammortamento + /// + public string UmFix { get; set; } = ""; + + /// + /// Costo unitario risorsa per UM tipo consumabili + /// + public double UnitCostProp { get; set; } = 0; + + /// + /// Unità di misura della risorsa + /// + public string UmProp { get; set; } = string.Empty; +#endif + + } +} diff --git a/EgwCoreLib.Lux.Data/DbModel/ItemGroupModel.cs b/EgwCoreLib.Lux.Data/DbModel/Items/ItemGroupModel.cs similarity index 90% rename from EgwCoreLib.Lux.Data/DbModel/ItemGroupModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Items/ItemGroupModel.cs index e4c88aca..732f0aa0 100644 --- a/EgwCoreLib.Lux.Data/DbModel/ItemGroupModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Items/ItemGroupModel.cs @@ -6,12 +6,12 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Items { // // This is here so CodeMaid doesn't reorganize this document // - [Table("RegItemGroup")] + [Table("item_group")] public class ItemGroupModel { diff --git a/EgwCoreLib.Lux.Data/DbModel/ItemModel.cs b/EgwCoreLib.Lux.Data/DbModel/Items/ItemModel.cs similarity index 94% rename from EgwCoreLib.Lux.Data/DbModel/ItemModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Items/ItemModel.cs index 8c7e3754..0a5f5aeb 100644 --- a/EgwCoreLib.Lux.Data/DbModel/ItemModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Items/ItemModel.cs @@ -2,13 +2,13 @@ using System.ComponentModel.DataAnnotations.Schema; using static EgwCoreLib.Lux.Core.Enums; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Items { // // This is here so CodeMaid doesn't reorganize this document // - [Table("RegItem")] + [Table("item_item")] public class ItemModel { /// @@ -85,7 +85,7 @@ namespace EgwCoreLib.Lux.Data.DbModel [NotMapped] public bool IsOkQty { - get => QtyMax > 0 && (QtyMax - QtyMin) > 0; + get => QtyMax > 0 && QtyMax - QtyMin > 0; } /// @@ -117,7 +117,7 @@ namespace EgwCoreLib.Lux.Data.DbModel [NotMapped] public bool IsProtected { - get => this.ItemType == EgwCoreLib.Lux.Core.Enums.ItemClassType.Bom; + get => ItemType == ItemClassType.Bom; } /// diff --git a/EgwCoreLib.Lux.Data/DbModel/SellingItemModel.cs b/EgwCoreLib.Lux.Data/DbModel/Items/SellingItemModel.cs similarity index 84% rename from EgwCoreLib.Lux.Data/DbModel/SellingItemModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Items/SellingItemModel.cs index d368eace..e61f3ace 100644 --- a/EgwCoreLib.Lux.Data/DbModel/SellingItemModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Items/SellingItemModel.cs @@ -1,14 +1,14 @@ -using EgwCoreLib.Lux.Data.DbModel.Production; +using EgwCoreLib.Lux.Data.DbModel.Task; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Items { // // This is here so CodeMaid doesn't reorganize this document // - [Table("SellingItem")] + [Table("item_selling_item")] public class SellingItemModel { /// @@ -68,9 +68,10 @@ namespace EgwCoreLib.Lux.Data.DbModel public string SerStruct { get; set; } = ""; /// - /// Json contenente la serializzazione delle fasi previste per la stima dei tempi e costi in formato SerializedPhasePreview; potrebbe contenere anche altre info accessorie x definire dati logistico/gestionali + /// Elenco StepDTO (Fasi) per la stima tempi / costi + /// potrebbe contenere anche altre info accessorie x definire dati logistico/gestionali /// - public string ItemSPP { get; set; } = ""; + public string ItemSteps { get; set; } = ""; /// /// Navigazione Job/Cicli diff --git a/EgwCoreLib.Lux.Data/DbModel/SupplierModel.cs b/EgwCoreLib.Lux.Data/DbModel/Items/SupplierModel.cs similarity index 94% rename from EgwCoreLib.Lux.Data/DbModel/SupplierModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Items/SupplierModel.cs index a43db096..437256ff 100644 --- a/EgwCoreLib.Lux.Data/DbModel/SupplierModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Items/SupplierModel.cs @@ -6,13 +6,13 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Items { // // This is here so CodeMaid doesn't reorganize this document // - [Table("RegSupplier")] + [Table("item_supplier")] public class SupplierModel { /// diff --git a/EgwCoreLib.Lux.Data/DbModel/Production/JobModel.cs b/EgwCoreLib.Lux.Data/DbModel/Production/JobModel.cs deleted file mode 100644 index 299a097b..00000000 --- a/EgwCoreLib.Lux.Data/DbModel/Production/JobModel.cs +++ /dev/null @@ -1,26 +0,0 @@ -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; - -namespace EgwCoreLib.Lux.Data.DbModel.Production -{ - - [Table("JobList")] - public class JobModel - { - /// - /// ID del record - /// - [Key] - public int JobID { get; set; } - - /// - /// Descrizione del ciclo - /// - public string Description { get; set; } = ""; - } -} diff --git a/EgwCoreLib.Lux.Data/DbModel/Production/JobRowModel.cs b/EgwCoreLib.Lux.Data/DbModel/Production/JobRowModel.cs deleted file mode 100644 index fba7e5d7..00000000 --- a/EgwCoreLib.Lux.Data/DbModel/Production/JobRowModel.cs +++ /dev/null @@ -1,71 +0,0 @@ -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; - -// -// This is here so CodeMaid doesn't reorganize this document -// -namespace EgwCoreLib.Lux.Data.DbModel.Production -{ - [Table("JobRowList")] - public class JobRowModel - { - /// - /// ID del record - /// - [Key] - public int JobRowID { get; set; } - - /// - /// Ciclo di appartenenza - /// - public int JobID { get; set; } - - /// - /// Indice della fase all'interno del Job - /// - public int Index { get; set; } = 0; - - /// - /// ID della fase realizzata - /// - public int PhaseID { get; set; } - - /// - /// ID dellaa risorsa impiegata - /// - public int ResourceID { get; set; } - - /// - /// Descrizione della fase del Job - /// - public string Description { get; set; } = ""; - - /// - /// Margine percentuale standard - /// - public double Qty { get; set; } = 1; - - /// - /// Navigazione Job/Cicli - /// - [ForeignKey("JobID")] - public virtual JobModel JobNav { get; set; } = null!; - - /// - /// Navigazione Job/Cicli - /// - [ForeignKey("PhaseID")] - public virtual PhaseModel PhaseNav { get; set; } = null!; - - /// - /// Navigazione Job/Cicli - /// - [ForeignKey("ResourceID")] - public virtual ResourceModel ResourceNav { get; set; } = null!; - } -} diff --git a/EgwCoreLib.Lux.Data/DbModel/Production/ProductionBatchModel.cs b/EgwCoreLib.Lux.Data/DbModel/Production/ProductionBatchModel.cs index 249d9a6a..861240e1 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Production/ProductionBatchModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Production/ProductionBatchModel.cs @@ -7,7 +7,7 @@ namespace EgwCoreLib.Lux.Data.DbModel.Production // This is here so CodeMaid doesn't reorganize this document // - [Table("ProductionBatch")] + [Table("production_batch")] public class ProductionBatchModel { /// diff --git a/EgwCoreLib.Lux.Data/DbModel/Production/ProductionItemModel.cs b/EgwCoreLib.Lux.Data/DbModel/Production/ProductionItemModel.cs index 712669ae..a3c30f23 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Production/ProductionItemModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Production/ProductionItemModel.cs @@ -1,4 +1,5 @@ -using System.ComponentModel.DataAnnotations; +using EgwCoreLib.Lux.Data.DbModel.Sales; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace EgwCoreLib.Lux.Data.DbModel.Production @@ -7,7 +8,7 @@ namespace EgwCoreLib.Lux.Data.DbModel.Production // This is here so CodeMaid doesn't reorganize this document // - [Table("ProductionItem")] + [Table("production_item")] public class ProductionItemModel { /// diff --git a/EgwCoreLib.Lux.Data/DbModel/Production/ProductionItemRowModel.cs b/EgwCoreLib.Lux.Data/DbModel/Production/ProductionItemStepModel.cs similarity index 88% rename from EgwCoreLib.Lux.Data/DbModel/Production/ProductionItemRowModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Production/ProductionItemStepModel.cs index bb4e8748..d980c01a 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Production/ProductionItemRowModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Production/ProductionItemStepModel.cs @@ -1,4 +1,6 @@ -using System; +using EgwCoreLib.Lux.Data.DbModel.Cost; +using EgwCoreLib.Lux.Data.DbModel.Task; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -12,16 +14,16 @@ using System.Threading.Tasks; namespace EgwCoreLib.Lux.Data.DbModel.Production { /// - /// Tabella delel effettiva righe della fgasi di lavorazione x ogni item da produrre + /// Tabella delle fasi di lavorazione x ogni item da produrre /// - [Table("ProductionItemRowList")] - public class ProductionItemRowModel + [Table("production_item_step")] + public class ProductionItemStepModel { /// /// ID del record /// [Key] - public int ProdItemRowID { get; set; } + public int ProdItemStepID { get; set; } /// /// Item di appartenenza diff --git a/EgwCoreLib.Lux.Data/DbModel/ResourceModel.cs b/EgwCoreLib.Lux.Data/DbModel/ResourceModel.cs deleted file mode 100644 index 3b8d08e6..00000000 --- a/EgwCoreLib.Lux.Data/DbModel/ResourceModel.cs +++ /dev/null @@ -1,59 +0,0 @@ -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; - -// -// This is here so CodeMaid doesn't reorganize this document -// -namespace EgwCoreLib.Lux.Data.DbModel -{ - [Table("RegResource")] - public class ResourceModel - { - /// - /// ID del record - /// - [Key] - public int ResourceID { get; set; } - - /// - /// Descrizione - /// - public string Description { get; set; } = ""; - - /// - /// Indica gli assec/cespiti - /// - public bool IsAsset { get; set; } = false; - - /// - /// Indica che è un operatore umano - /// - public bool IsHuman { get; set; } = false; - - /// - /// Costo fisso risorsa per UM tipo ammortamento - /// - public double UnitCostFix { get; set; } = 0; - - /// - /// Unità di misura della risorsa tipo fisso/ammortamento - /// - public string UmFix { get; set; } = ""; - - /// - /// Costo unitario risorsa per UM tipo consumabili - /// - public double UnitCostProp { get; set; } = 0; - - /// - /// Unità di misura della risorsa - /// - public string UmProp { get; set; } = ""; - - } -} diff --git a/EgwCoreLib.Lux.Data/DbModel/CustomerModel.cs b/EgwCoreLib.Lux.Data/DbModel/Sales/CustomerModel.cs similarity index 94% rename from EgwCoreLib.Lux.Data/DbModel/CustomerModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Sales/CustomerModel.cs index 0bb9b024..cb9e62db 100644 --- a/EgwCoreLib.Lux.Data/DbModel/CustomerModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Sales/CustomerModel.cs @@ -6,13 +6,13 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Sales { // // This is here so CodeMaid doesn't reorganize this document // - [Table("RegCustomer")] + [Table("sales_customer")] public class CustomerModel { /// diff --git a/EgwCoreLib.Lux.Data/DbModel/DealerModel.cs b/EgwCoreLib.Lux.Data/DbModel/Sales/DealerModel.cs similarity index 94% rename from EgwCoreLib.Lux.Data/DbModel/DealerModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Sales/DealerModel.cs index 45678c6c..b2e9cd5b 100644 --- a/EgwCoreLib.Lux.Data/DbModel/DealerModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Sales/DealerModel.cs @@ -6,13 +6,13 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Sales { // // This is here so CodeMaid doesn't reorganize this document // - [Table("RegDealer")] + [Table("sales_dealer")] public class DealerModel { /// diff --git a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs index 731f5e87..39ccd0c0 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs @@ -14,7 +14,7 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales // This is here so CodeMaid doesn't reorganize this document // - [Table("Offer")] + [Table("sales_offer")] public class OfferModel { /// @@ -98,7 +98,7 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales [NotMapped] public double TotalCost { - get => OfferRowNav?.Sum(x => x.Cost) ?? 0; + get => OfferRowNav?.Sum(x => x.BomCost) ?? 0; } #if false diff --git a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs index 6fa661fa..8a4914be 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore; +using EgwCoreLib.Lux.Data.DbModel.Items; +using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; @@ -13,7 +14,7 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales // This is here so CodeMaid doesn't reorganize this document // - [Table("OfferRowList")] + [Table("sales_offer_row")] public class OfferRowModel { /// @@ -57,19 +58,74 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales public int SellingItemID { get; set; } /// - /// Costo (standard / senza listini) - /// - public double Cost { get; set; } = 0; - - /// - /// Margine percentuale standard + /// Quantità della risorsa /// public double Qty { get; set; } = 1; + /// + /// Costo dei componeti BOM (RockBottom) + /// + public double BomCost { get; set; } = 0; + + /// + /// Prezzo dei componeti BOM (scontabile) + /// + public double BomPrice { get; set; } = 0; + + + /// + /// Costo produzione Fase/Step (RockBottom) + /// + public double StepCost { get; set; } = 0; + + /// + /// Prezzo produzione Fase/Step (scontabile) + /// + public double StepPrice { get; set; } = 0; + + /// + /// Costo Totale Risorsa (BOM + Fase) + /// + [NotMapped] + public double UnitCost + { + get => BomCost + StepCost; + } + + /// + /// Costo Totale Risorsa (BOM + Fase) + /// + [NotMapped] + public double UnitPrice + { + get => BomPrice + StepPrice; + } + + /// + /// Sconto massimo applicabile + /// + [NotMapped] + public double MaxDiscount + { + get => (UnitCost > 0 && UnitPrice > UnitCost) ? (UnitPrice - UnitCost) / UnitPrice : 0; + } + + /// + /// Costo Totale risorsa + /// [NotMapped] public double TotalCost { - get => Qty * Cost; + get => UnitCost * Qty; + } + + /// + /// Costo Totale risorsa + /// + [NotMapped] + public double TotalPrice + { + get => UnitPrice * Qty; } /// @@ -78,9 +134,10 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales public string SerStruct { get; set; } = ""; /// - /// Json contenente la serializzazione delle fasi previste per la stima dei tempi e costi in formato SerializedPhasePreview; potrebbe contenere anche altre info accessorie x definire dati logistico/gestionali + /// Elenco StepDTO (Fasi) per la stima tempi / costi + /// potrebbe contenere anche altre info accessorie x definire dati logistico/gestionali /// - public string ItemSPP { get; set; } = ""; + public string ItemSteps { get; set; } = ""; /// /// BOM serializzata per la produzione dell'item diff --git a/EgwCoreLib.Lux.Data/DbModel/OrderModel.cs b/EgwCoreLib.Lux.Data/DbModel/Sales/OrderModel.cs similarity index 95% rename from EgwCoreLib.Lux.Data/DbModel/OrderModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Sales/OrderModel.cs index aa4596c4..047f6a3b 100644 --- a/EgwCoreLib.Lux.Data/DbModel/OrderModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Sales/OrderModel.cs @@ -1,5 +1,4 @@ -using EgwCoreLib.Lux.Data.DbModel.Sales; -using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; @@ -9,7 +8,7 @@ using System.Text; using System.Threading.Tasks; using static EgwCoreLib.Lux.Core.Enums; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Sales { // // This is here so CodeMaid doesn't reorganize this document @@ -18,7 +17,7 @@ namespace EgwCoreLib.Lux.Data.DbModel /// /// Classe degli ordini commerciali /// - [Table("Order")] + [Table("sales_order")] public class OrderModel { /// diff --git a/EgwCoreLib.Lux.Data/DbModel/OrderRowModel.cs b/EgwCoreLib.Lux.Data/DbModel/Sales/OrderRowModel.cs similarity index 58% rename from EgwCoreLib.Lux.Data/DbModel/OrderRowModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Sales/OrderRowModel.cs index 162720d4..d9cc6a37 100644 --- a/EgwCoreLib.Lux.Data/DbModel/OrderRowModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Sales/OrderRowModel.cs @@ -1,4 +1,5 @@ -using Microsoft.EntityFrameworkCore; +using EgwCoreLib.Lux.Data.DbModel.Items; +using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; @@ -7,13 +8,13 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Sales { // // This is here so CodeMaid doesn't reorganize this document // - [Table("OrderRowList")] + [Table("sales_order_row")] public class OrderRowModel { /// @@ -47,19 +48,74 @@ namespace EgwCoreLib.Lux.Data.DbModel public int SellingItemID { get; set; } /// - /// Costo (standard / senza listini) + /// Costo dei componeti BOM (RockBottom) /// - public double Cost { get; set; } = 0; + public double BomCost { get; set; } = 0; /// /// Margine percentuale standard /// public double Qty { get; set; } = 1; + /// + /// Prezzo dei componeti BOM (scontabile) + /// + public double BomPrice { get; set; } = 0; + + + /// + /// Costo produzione Fase/Step (RockBottom) + /// + public double StepCost { get; set; } = 0; + + /// + /// Prezzo produzione Fase/Step (scontabile) + /// + public double StepPrice { get; set; } = 0; + + /// + /// Costo Totale Risorsa (BOM + Fase) + /// + [NotMapped] + public double UnitCost + { + get => BomCost + StepCost; + } + + /// + /// Costo Totale Risorsa (BOM + Fase) + /// + [NotMapped] + public double UnitPrice + { + get => BomPrice + StepPrice; + } + + /// + /// Sconto massimo applicabile + /// + [NotMapped] + public double MaxDiscount + { + get => (UnitCost > 0 && UnitPrice > UnitCost) ? (UnitPrice - UnitCost) / UnitPrice : 0; + } + + /// + /// Costo Totale risorsa + /// [NotMapped] public double TotalCost { - get => Qty * Cost; + get => UnitCost * Qty; + } + + /// + /// Costo Totale risorsa + /// + [NotMapped] + public double TotalPrice + { + get => UnitPrice * Qty; } /// @@ -68,9 +124,10 @@ namespace EgwCoreLib.Lux.Data.DbModel public string SerStruct { get; set; } = ""; /// - /// Json contenente la serializzazione delle fasi previste per la stima dei tempi e costi in formato SerializedPhasePreview; potrebbe contenere anche altre info accessorie x definire dati logistico/gestionali + /// Elenco StepDTO (Fasi) per la stima tempi / costi + /// potrebbe contenere anche altre info accessorie x definire dati logistico/gestionali /// - public string ItemSPP { get; set; } = ""; + public string ItemSteps { get; set; } = ""; /// /// Note libere diff --git a/EgwCoreLib.Lux.Data/DbModel/StockMovModel.cs b/EgwCoreLib.Lux.Data/DbModel/Stock/StockMovModel.cs similarity index 92% rename from EgwCoreLib.Lux.Data/DbModel/StockMovModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Stock/StockMovModel.cs index 7e986260..f7db6947 100644 --- a/EgwCoreLib.Lux.Data/DbModel/StockMovModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Stock/StockMovModel.cs @@ -1,4 +1,5 @@ -using System; +using EgwCoreLib.Lux.Data.DbModel.Utils; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -6,7 +7,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Stock { // // This is here so CodeMaid doesn't reorganize this document @@ -14,7 +15,7 @@ namespace EgwCoreLib.Lux.Data.DbModel /// /// Tabella dei movimenti degli item in giacenza /// - [Table("StockMov")] + [Table("stock_mov")] public class StockMovModel { /// @@ -39,7 +40,7 @@ namespace EgwCoreLib.Lux.Data.DbModel public DateTime DtMod { get; set; } = DateTime.Now; /// - /// Qty movimento registrato (delta +/-) + /// ProductivityRate movimento registrato (delta +/-) /// public double QtyRec { get; set; } = 0; diff --git a/EgwCoreLib.Lux.Data/DbModel/StockStatusModel.cs b/EgwCoreLib.Lux.Data/DbModel/Stock/StockStatusModel.cs similarity index 91% rename from EgwCoreLib.Lux.Data/DbModel/StockStatusModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Stock/StockStatusModel.cs index 15b7d604..fad8b9fd 100644 --- a/EgwCoreLib.Lux.Data/DbModel/StockStatusModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Stock/StockStatusModel.cs @@ -1,4 +1,5 @@ -using System; +using EgwCoreLib.Lux.Data.DbModel.Items; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; @@ -6,7 +7,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Stock { // // This is here so CodeMaid doesn't reorganize this document @@ -15,7 +16,7 @@ namespace EgwCoreLib.Lux.Data.DbModel /// Tabelal delle giacenze di magazzino /// - [Table("StockStatus")] + [Table("stock_status")] public class StockStatusModel { /// @@ -30,7 +31,7 @@ namespace EgwCoreLib.Lux.Data.DbModel public int ItemID { get; set; } = 0; /// - /// Qty in giacenza + /// ProductivityRate in giacenza /// public double QtyAvail { get; set; } = 0; diff --git a/EgwCoreLib.Lux.Data/DbModel/Task/JobModel.cs b/EgwCoreLib.Lux.Data/DbModel/Task/JobModel.cs new file mode 100644 index 00000000..c26e9c5a --- /dev/null +++ b/EgwCoreLib.Lux.Data/DbModel/Task/JobModel.cs @@ -0,0 +1,35 @@ +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; +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace EgwCoreLib.Lux.Data.DbModel.Task +{ + /// + /// Definizione macro dei Cicli di Lavoro / Job + /// + [Table("task_job")] + public class JobModel + { + /// + /// ID del record + /// + [Key] + public int JobID { get; set; } + + /// + /// Descrizione del ciclo di lavoro + /// + public string Description { get; set; } = ""; + + /// + /// Navigation verso JobStep + /// + public virtual ICollection JobStepNav { get; set; } = new List(); + } +} diff --git a/EgwCoreLib.Lux.Data/DbModel/Production/JobRowItemModel.cs b/EgwCoreLib.Lux.Data/DbModel/Task/JobStepItemModel.cs similarity index 73% rename from EgwCoreLib.Lux.Data/DbModel/Production/JobRowItemModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Task/JobStepItemModel.cs index 6be8ffe6..20229775 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Production/JobRowItemModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Task/JobStepItemModel.cs @@ -1,29 +1,25 @@ -using System; -using System.Collections.Generic; +using EgwCoreLib.Lux.Data.DbModel.Items; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; -using System.Text; -using System.Threading.Tasks; // // This is here so CodeMaid doesn't reorganize this document // -namespace EgwCoreLib.Lux.Data.DbModel.Production +namespace EgwCoreLib.Lux.Data.DbModel.Task { - [Table("JobRowItemList")] - public class JobRowItemModel + [Table("task_job_step_item")] + public class JobStepItemModel { /// /// ID del record /// [Key] - public int JobRowItemID { get; set; } + public int JobStepItemID { get; set; } /// /// Fase del Ciclo di appartenenza /// - public int JobRowID { get; set; } + public int JobStepID { get; set; } /// /// Indice della fase all'interno del Job @@ -48,8 +44,8 @@ namespace EgwCoreLib.Lux.Data.DbModel.Production /// /// Navigazione su fasi ciclo /// - [ForeignKey("JobRowID")] - public virtual JobRowModel JobRowNav { get; set; } = null!; + [ForeignKey("JobStepID")] + public virtual JobStepModel JobStepNav { get; set; } = null!; /// /// Navigazione su Items diff --git a/EgwCoreLib.Lux.Data/DbModel/Task/JobStepModel.cs b/EgwCoreLib.Lux.Data/DbModel/Task/JobStepModel.cs new file mode 100644 index 00000000..e0881858 --- /dev/null +++ b/EgwCoreLib.Lux.Data/DbModel/Task/JobStepModel.cs @@ -0,0 +1,116 @@ +using EgwCoreLib.Lux.Data.DbModel.Cost; +using EgwCoreLib.Lux.Data.DbModel.Task; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace EgwCoreLib.Lux.Data.DbModel.Task +{ + /// + /// Routing dei cicli di lavoro, con riferimento a risorse e fasi + /// + [Table("task_job_step")] + public class JobStepModel + { + /// + /// ID del record + /// + [Key] + public int JobStepID { get; set; } + + /// + /// Ciclo di appartenenza + /// + public int JobID { get; set; } + + /// + /// Indice della fase all'interno del Job + /// + public int Index { get; set; } = 0; + + /// + /// ID del driver di costo impiegato + /// + public int CostDriverID { get; set; } + + /// + /// ID della fase realizzata + /// + public int PhaseID { get; set; } + + /// + /// ID della risorsa impiegata + /// + public int ResourceID { get; set; } + + /// + /// Descrizione della fase del Job + /// + public string Description { get; set; } = ""; + + /// + /// Rapporto produttività tra CostDriver Step e CostDriver Risorsa (es: m/h) + /// + public decimal ProductivityRate { get; set; } = 1; + + /// + /// Costo RockBottom Fase (step) di produzione + /// sulla base del costo della risorsa, della produttività e della quantità impiegata + /// + /// Quantità risorsa impiegata + /// + public decimal RockBottomCost(decimal quantity) + { + decimal stepCost = 0; + var unitRequired = quantity / ProductivityRate; + if (ResourceNav != null) + { + stepCost = ResourceNav.BaseRockBottomCost * quantity; + } + return stepCost; + } + + /// + /// Prezzo calcolato per Fase (step) di produzione + /// sulla base del costo RockBottom + marginalità standard + /// + /// Quantità risorsa impiegata + /// + public decimal RockBottomPrice(decimal quantity) + { + decimal stepCost = 0; + var unitRequired = quantity / ProductivityRate; + if (ResourceNav != null) + { + stepCost = ResourceNav.BasePrice * quantity; + } + return stepCost; + } + + /// + /// Navigazione Job/Cicli + /// + [ForeignKey("JobID")] + public virtual JobModel JobNav { get; set; } = null!; + + /// + /// Navigazione Driver costo + /// + [ForeignKey("CostDriverID")] + public virtual CostDriverModel DriverNav { get; set; } = null!; + + /// + /// Navigazione Fasi + /// + [ForeignKey("PhaseID")] + public virtual PhaseModel PhaseNav { get; set; } = null!; + + /// + /// Navigazione Risorse + /// + [ForeignKey("ResourceID")] + public virtual ResourceModel ResourceNav { get; set; } = null!; + } +} diff --git a/EgwCoreLib.Lux.Data/DbModel/Production/PhaseModel.cs b/EgwCoreLib.Lux.Data/DbModel/Task/PhaseModel.cs similarity index 80% rename from EgwCoreLib.Lux.Data/DbModel/Production/PhaseModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Task/PhaseModel.cs index ae2b8ac7..56d799e1 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Production/PhaseModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Task/PhaseModel.cs @@ -9,10 +9,12 @@ using System.Threading.Tasks; // // This is here so CodeMaid doesn't reorganize this document // -namespace EgwCoreLib.Lux.Data.DbModel.Production +namespace EgwCoreLib.Lux.Data.DbModel.Task { - - [Table("RegPhase")] + /// + /// Fase di lavorazione / ProductionStage + /// + [Table("task_phase")] public class PhaseModel { /// @@ -25,7 +27,5 @@ namespace EgwCoreLib.Lux.Data.DbModel.Production /// Descrizione /// public string Description { get; set; } = ""; - - } } diff --git a/EgwCoreLib.Lux.Data/DbModel/General/CountersModel.cs b/EgwCoreLib.Lux.Data/DbModel/Utils/CountersModel.cs similarity index 91% rename from EgwCoreLib.Lux.Data/DbModel/General/CountersModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Utils/CountersModel.cs index 9dc2229c..7103769b 100644 --- a/EgwCoreLib.Lux.Data/DbModel/General/CountersModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Utils/CountersModel.cs @@ -6,13 +6,13 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EgwCoreLib.Lux.Data.DbModel.General +namespace EgwCoreLib.Lux.Data.DbModel.Utils { // // This is here so CodeMaid doesn't reorganize this document // - [Table("Counter")] + [Table("utils_counter")] public class CounterModel { /// diff --git a/EgwCoreLib.Lux.Data/DbModel/General/GenClassModel.cs b/EgwCoreLib.Lux.Data/DbModel/Utils/GenClassModel.cs similarity index 92% rename from EgwCoreLib.Lux.Data/DbModel/General/GenClassModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Utils/GenClassModel.cs index 535649d3..7e7f0b90 100644 --- a/EgwCoreLib.Lux.Data/DbModel/General/GenClassModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Utils/GenClassModel.cs @@ -4,10 +4,10 @@ using System.ComponentModel.DataAnnotations.Schema; // // This is here so CodeMaid doesn't reorganize this document // -namespace EgwCoreLib.Lux.Data.DbModel.General +namespace EgwCoreLib.Lux.Data.DbModel.Utils { - [Table("GenClass")] + [Table("utils_gen_class")] public class GenClassModel { /// diff --git a/EgwCoreLib.Lux.Data/DbModel/General/GenValueModel.cs b/EgwCoreLib.Lux.Data/DbModel/Utils/GenValueModel.cs similarity index 92% rename from EgwCoreLib.Lux.Data/DbModel/General/GenValueModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Utils/GenValueModel.cs index 0a44993c..6c4bdf8f 100644 --- a/EgwCoreLib.Lux.Data/DbModel/General/GenValueModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Utils/GenValueModel.cs @@ -4,10 +4,10 @@ using System.ComponentModel.DataAnnotations.Schema; // // This is here so CodeMaid doesn't reorganize this document // -namespace EgwCoreLib.Lux.Data.DbModel.General +namespace EgwCoreLib.Lux.Data.DbModel.Utils { - [Table("GenValue")] + [Table("utils_gen_value")] public class GenValueModel { /// diff --git a/EgwCoreLib.Lux.Data/DbModel/MovTypeModel.cs b/EgwCoreLib.Lux.Data/DbModel/Utils/MovTypeModel.cs similarity index 89% rename from EgwCoreLib.Lux.Data/DbModel/MovTypeModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Utils/MovTypeModel.cs index b580edbc..037d1133 100644 --- a/EgwCoreLib.Lux.Data/DbModel/MovTypeModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Utils/MovTypeModel.cs @@ -6,12 +6,12 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EgwCoreLib.Lux.Data.DbModel +namespace EgwCoreLib.Lux.Data.DbModel.Utils { // // This is here so CodeMaid doesn't reorganize this document // - [Table("RegMovType")] + [Table("utils_mov_type")] public class MovTypeModel { diff --git a/EgwCoreLib.Lux.Data/DbModel/Identity/TagsModel.cs b/EgwCoreLib.Lux.Data/DbModel/Utils/TagsModel.cs similarity index 90% rename from EgwCoreLib.Lux.Data/DbModel/Identity/TagsModel.cs rename to EgwCoreLib.Lux.Data/DbModel/Utils/TagsModel.cs index 9b0fba7a..1529bf12 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Identity/TagsModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Utils/TagsModel.cs @@ -6,13 +6,13 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace EgwCoreLib.Lux.Data.DbModel.Identity +namespace EgwCoreLib.Lux.Data.DbModel.Utils { // // This is here so CodeMaid doesn't reorganize this document // - [Table("RegTags")] + [Table("utils_tags")] public class TagsModel { /// diff --git a/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj b/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj index 4a258d24..235936b3 100644 --- a/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj +++ b/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj @@ -17,6 +17,7 @@ + @@ -48,8 +49,6 @@ - - diff --git a/EgwCoreLib.Lux.Data/Migrations/20250808143628_InitDb.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20250808143628_InitDb.Designer.cs index 4f00571f..52f903ff 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20250808143628_InitDb.Designer.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20250808143628_InitDb.Designer.cs @@ -156,7 +156,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("CodGroup") .HasColumnType("varchar(255)"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -199,10 +199,10 @@ namespace EgwCoreLib.Lux.Data.Migrations .IsRequired() .HasColumnType("varchar(255)"); - b.Property("Cost") + b.Property("BomCost") .HasColumnType("double"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -445,7 +445,7 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -468,13 +468,13 @@ namespace EgwCoreLib.Lux.Data.Migrations modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowItemModel", b => { - b.Property("JobRowItemID") + b.Property("JobStepItemID") .ValueGeneratedOnAdd() .HasColumnType("int"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobRowItemID")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -484,17 +484,17 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("ItemID") .HasColumnType("int"); - b.Property("JobRowID") + b.Property("JobStepID") .HasColumnType("int"); - b.Property("Qty") + b.Property("ProductivityRate") .HasColumnType("double"); - b.HasKey("JobRowItemID"); + b.HasKey("JobStepItemID"); b.HasIndex("ItemID"); - b.HasIndex("JobRowID"); + b.HasIndex("JobStepID"); b.ToTable("JobRowItemList"); @@ -530,13 +530,13 @@ namespace EgwCoreLib.Lux.Data.Migrations modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowModel", b => { - b.Property("JobRowID") + b.Property("JobStepID") .ValueGeneratedOnAdd() .HasColumnType("int"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobRowID")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -549,13 +549,13 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("PhaseID") .HasColumnType("int"); - b.Property("Qty") + b.Property("ProductivityRate") .HasColumnType("double"); b.Property("ResourceID") .HasColumnType("int"); - b.HasKey("JobRowID"); + b.HasKey("JobStepID"); b.HasIndex("JobID"); @@ -623,7 +623,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("MovCod") .HasColumnType("varchar(255)"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -678,7 +678,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("DealerID") .HasColumnType("int"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -739,7 +739,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("BomOk") .HasColumnType("tinyint(1)"); - b.Property("Cost") + b.Property("BomCost") .HasColumnType("double"); b.Property("Environment") @@ -756,7 +756,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("ItemOk") .HasColumnType("tinyint(1)"); - b.Property("ItemSPP") + b.Property("ItemSteps") .IsRequired() .HasColumnType("longtext"); @@ -774,7 +774,7 @@ namespace EgwCoreLib.Lux.Data.Migrations .IsRequired() .HasColumnType("longtext"); - b.Property("Qty") + b.Property("ProductivityRate") .HasColumnType("double"); b.Property("RowNum") @@ -869,7 +869,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("DealerID") .HasColumnType("int"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -916,13 +916,13 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); - b.Property("Cost") + b.Property("BomCost") .HasColumnType("double"); b.Property("Inserted") .HasColumnType("datetime(6)"); - b.Property("ItemSPP") + b.Property("ItemSteps") .IsRequired() .HasColumnType("longtext"); @@ -936,7 +936,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("OrderID") .HasColumnType("int"); - b.Property("Qty") + b.Property("ProductivityRate") .HasColumnType("double"); b.Property("RowNum") @@ -966,7 +966,7 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1021,7 +1021,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("DateStart") .HasColumnType("datetime(6)"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1065,11 +1065,11 @@ namespace EgwCoreLib.Lux.Data.Migrations modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemRowModel", b => { - b.Property("ProdItemRowID") + b.Property("ProdItemStepID") .ValueGeneratedOnAdd() .HasColumnType("int"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemRowID")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); b.Property("DateEnd") .HasColumnType("datetime(6)"); @@ -1077,7 +1077,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("DateStart") .HasColumnType("datetime(6)"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1090,7 +1090,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("ProdItemID") .HasColumnType("int"); - b.Property("Qty") + b.Property("ProductivityRate") .HasColumnType("double"); b.Property("ResourceID") @@ -1099,7 +1099,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("WorkTime") .HasColumnType("double"); - b.HasKey("ProdItemRowID"); + b.HasKey("ProdItemStepID"); b.HasIndex("PhaseID"); @@ -1118,7 +1118,7 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1234,10 +1234,10 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); - b.Property("Cost") + b.Property("BomCost") .HasColumnType("double"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1251,7 +1251,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("ItemCode") .HasColumnType("int"); - b.Property("ItemSPP") + b.Property("ItemSteps") .IsRequired() .HasColumnType("longtext"); @@ -1699,7 +1699,7 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1754,15 +1754,15 @@ namespace EgwCoreLib.Lux.Data.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobRowModel", "JobRowNav") + b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobRowModel", "JobStepNav") .WithMany() - .HasForeignKey("JobRowID") + .HasForeignKey("JobStepID") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("ItemNav"); - b.Navigation("JobRowNav"); + b.Navigation("JobStepNav"); }); modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowModel", b => diff --git a/EgwCoreLib.Lux.Data/Migrations/20250808143628_InitDb.cs b/EgwCoreLib.Lux.Data/Migrations/20250808143628_InitDb.cs index c5cb7536..14ce1989 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20250808143628_InitDb.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20250808143628_InitDb.cs @@ -491,7 +491,7 @@ namespace EgwCoreLib.Lux.Data.Migrations name: "FK_JobRowItemList_JobRowList_JobRowID", column: x => x.JobRowID, principalTable: "JobRowList", - principalColumn: "JobRowID", + principalColumn: "JobStepID", onDelete: ReferentialAction.Restrict); table.ForeignKey( name: "FK_JobRowItemList_RegItem_ItemID", @@ -652,7 +652,7 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.InsertData( table: "JobList", - columns: new[] { "JobID", "Description" }, + columns: new[] { "JobID", "Name" }, values: new object[,] { { 1, "Rivendita / servizi" }, @@ -681,7 +681,7 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.InsertData( table: "RegItemGroup", - columns: new[] { "CodGroup", "Description" }, + columns: new[] { "CodGroup", "Name" }, values: new object[,] { { "WindowGlass", "Vetri serramento" }, @@ -692,7 +692,7 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.InsertData( table: "RegMovType", - columns: new[] { "MovCod", "Description" }, + columns: new[] { "MovCod", "Name" }, values: new object[,] { { "CAR", "Carico a magazzino" }, @@ -705,7 +705,7 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.InsertData( table: "RegPhase", - columns: new[] { "PhaseID", "Description" }, + columns: new[] { "PhaseID", "Name" }, values: new object[,] { { 1, "Taglio tronchetti" }, @@ -718,7 +718,7 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.InsertData( table: "RegResource", - columns: new[] { "ResourceID", "Description", "IsAsset", "IsHuman", "UmFix", "UmProp", "UnitCostFix", "UnitCostProp" }, + columns: new[] { "ResourceID", "Name", "IsAsset", "IsHuman", "UmFix", "UmProp", "UnitCostFix", "UnitCostProp" }, values: new object[,] { { 1, "Sezionatrice", true, false, "€/h", "", 15.0, 0.0 }, @@ -742,7 +742,7 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.InsertData( table: "RegTags", - columns: new[] { "TagID", "Description" }, + columns: new[] { "TagID", "Name" }, values: new object[,] { { 1, "Tag 01" }, @@ -754,7 +754,7 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.InsertData( table: "JobRowList", - columns: new[] { "JobRowID", "Description", "Index", "JobID", "PhaseID", "Qty", "ResourceID" }, + columns: new[] { "JobStepID", "Name", "Index", "JobID", "PhaseID", "ProductivityRate", "ResourceID" }, values: new object[,] { { 1, "", 1, 2, 1, 1.0, 1 }, @@ -766,12 +766,12 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.InsertData( table: "Offer", - columns: new[] { "OfferID", "CustomerID", "DealerID", "Description", "Inserted", "Modified", "OffertState", "RefNum", "RefRev", "RefYear", "ValidUntil" }, + columns: new[] { "OfferID", "CustomerID", "DealerID", "Name", "Inserted", "Modified", "OffertState", "RefNum", "RefRev", "RefYear", "ValidUntil" }, values: new object[] { 1, 2, 2, "Offerta per tre serramenti", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4215), new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4216), 0, 1, 1, 2024, new DateTime(2025, 9, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4212) }); migrationBuilder.InsertData( table: "RegItem", - columns: new[] { "ItemID", "CodGroup", "Cost", "Description", "ExtItemCode", "IsService", "ItemCode", "ItemType", "Margin", "QtyMax", "QtyMin", "SupplCode", "UM" }, + columns: new[] { "ItemID", "CodGroup", "BomCost", "Name", "ExtItemCode", "IsService", "ItemCode", "ItemType", "Margin", "QtyMax", "QtyMin", "SupplCode", "UM" }, values: new object[,] { { 1, "WindowTrunk", 20.0, "BARRA-60x80 generica", "", false, 1001, 1, 0.29999999999999999, 0.0, 0.0, "BARR.001", "#" }, @@ -790,7 +790,7 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.InsertData( table: "SellingItem", - columns: new[] { "SellingItemID", "Cost", "Description", "ExtItemCode", "IsService", "ItemCode", "ItemSPP", "JobID", "Margin", "SerStruct", "SupplCode", "UM" }, + columns: new[] { "SellingItemID", "BomCost", "Name", "ExtItemCode", "IsService", "ItemCode", "ItemSteps", "JobID", "Margin", "SerStruct", "SupplCode", "UM" }, values: new object[,] { { 1, 820.0, "Finestra anta Singola", "", false, 0, "", 2, 0.20000000000000001, "", "", "#" }, @@ -800,7 +800,7 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.InsertData( table: "JobRowItemList", - columns: new[] { "JobRowItemID", "Description", "Index", "ItemID", "JobRowID", "Qty" }, + columns: new[] { "JobStepItemID", "Name", "Index", "ItemID", "JobStepID", "ProductivityRate" }, values: new object[,] { { 1, "Grezzo legno abete", 1, 1, 1, 1.0 }, @@ -810,7 +810,7 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.InsertData( table: "OfferRowList", - columns: new[] { "OfferRowID", "BomOk", "Cost", "Environment", "Inserted", "ItemBOM", "ItemOk", "ItemSPP", "Modified", "Note", "OfferID", "OfferRowUID", "Qty", "RowNum", "SellingItemID", "SerStruct" }, + columns: new[] { "OfferRowID", "BomOk", "BomCost", "Environment", "Inserted", "ItemBOM", "ItemOk", "ItemSteps", "Modified", "Note", "OfferID", "OfferRowUID", "ProductivityRate", "RowNum", "SellingItemID", "SerStruct" }, values: new object[,] { { 1, true, 950.0, "WINDOW", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4243), "", true, "{}", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4245), "Finestra anta singola 2025", 1, "OFF0000000001", 3.0, 1, 1, "{}" }, @@ -860,7 +860,7 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.CreateIndex( name: "IX_JobRowItemList_JobRowID", table: "JobRowItemList", - column: "JobRowID"); + column: "JobStepID"); migrationBuilder.CreateIndex( name: "IX_JobRowList_JobID", diff --git a/EgwCoreLib.Lux.Data/Migrations/20250916152301_AddItemParentRel.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20250916152301_AddItemParentRel.Designer.cs index 955a8470..3ee1980b 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20250916152301_AddItemParentRel.Designer.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20250916152301_AddItemParentRel.Designer.cs @@ -156,7 +156,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("CodGroup") .HasColumnType("varchar(255)"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -199,10 +199,10 @@ namespace EgwCoreLib.Lux.Data.Migrations .IsRequired() .HasColumnType("varchar(255)"); - b.Property("Cost") + b.Property("BomCost") .HasColumnType("double"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -460,7 +460,7 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -483,13 +483,13 @@ namespace EgwCoreLib.Lux.Data.Migrations modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowItemModel", b => { - b.Property("JobRowItemID") + b.Property("JobStepItemID") .ValueGeneratedOnAdd() .HasColumnType("int"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobRowItemID")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -499,17 +499,17 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("ItemID") .HasColumnType("int"); - b.Property("JobRowID") + b.Property("JobStepID") .HasColumnType("int"); - b.Property("Qty") + b.Property("ProductivityRate") .HasColumnType("double"); - b.HasKey("JobRowItemID"); + b.HasKey("JobStepItemID"); b.HasIndex("ItemID"); - b.HasIndex("JobRowID"); + b.HasIndex("JobStepID"); b.ToTable("JobRowItemList"); @@ -545,13 +545,13 @@ namespace EgwCoreLib.Lux.Data.Migrations modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowModel", b => { - b.Property("JobRowID") + b.Property("JobStepID") .ValueGeneratedOnAdd() .HasColumnType("int"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobRowID")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -564,13 +564,13 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("PhaseID") .HasColumnType("int"); - b.Property("Qty") + b.Property("ProductivityRate") .HasColumnType("double"); b.Property("ResourceID") .HasColumnType("int"); - b.HasKey("JobRowID"); + b.HasKey("JobStepID"); b.HasIndex("JobID"); @@ -638,7 +638,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("MovCod") .HasColumnType("varchar(255)"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -693,7 +693,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("DealerID") .HasColumnType("int"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -754,7 +754,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("BomOk") .HasColumnType("tinyint(1)"); - b.Property("Cost") + b.Property("BomCost") .HasColumnType("double"); b.Property("Environment") @@ -771,7 +771,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("ItemOk") .HasColumnType("tinyint(1)"); - b.Property("ItemSPP") + b.Property("ItemSteps") .IsRequired() .HasColumnType("longtext"); @@ -789,7 +789,7 @@ namespace EgwCoreLib.Lux.Data.Migrations .IsRequired() .HasColumnType("longtext"); - b.Property("Qty") + b.Property("ProductivityRate") .HasColumnType("double"); b.Property("RowNum") @@ -884,7 +884,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("DealerID") .HasColumnType("int"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -931,13 +931,13 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); - b.Property("Cost") + b.Property("BomCost") .HasColumnType("double"); b.Property("Inserted") .HasColumnType("datetime(6)"); - b.Property("ItemSPP") + b.Property("ItemSteps") .IsRequired() .HasColumnType("longtext"); @@ -951,7 +951,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("OrderID") .HasColumnType("int"); - b.Property("Qty") + b.Property("ProductivityRate") .HasColumnType("double"); b.Property("RowNum") @@ -981,7 +981,7 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1036,7 +1036,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("DateStart") .HasColumnType("datetime(6)"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1080,11 +1080,11 @@ namespace EgwCoreLib.Lux.Data.Migrations modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemRowModel", b => { - b.Property("ProdItemRowID") + b.Property("ProdItemStepID") .ValueGeneratedOnAdd() .HasColumnType("int"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemRowID")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); b.Property("DateEnd") .HasColumnType("datetime(6)"); @@ -1092,7 +1092,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("DateStart") .HasColumnType("datetime(6)"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1105,7 +1105,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("ProdItemID") .HasColumnType("int"); - b.Property("Qty") + b.Property("ProductivityRate") .HasColumnType("double"); b.Property("ResourceID") @@ -1114,7 +1114,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("WorkTime") .HasColumnType("double"); - b.HasKey("ProdItemRowID"); + b.HasKey("ProdItemStepID"); b.HasIndex("PhaseID"); @@ -1133,7 +1133,7 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1249,10 +1249,10 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); - b.Property("Cost") + b.Property("BomCost") .HasColumnType("double"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1266,7 +1266,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("ItemCode") .HasColumnType("int"); - b.Property("ItemSPP") + b.Property("ItemSteps") .IsRequired() .HasColumnType("longtext"); @@ -1714,7 +1714,7 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1769,15 +1769,15 @@ namespace EgwCoreLib.Lux.Data.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobRowModel", "JobRowNav") + b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobRowModel", "JobStepNav") .WithMany() - .HasForeignKey("JobRowID") + .HasForeignKey("JobStepID") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("ItemNav"); - b.Navigation("JobRowNav"); + b.Navigation("JobStepNav"); }); modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowModel", b => diff --git a/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.Designer.cs index 62570a50..383e977c 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.Designer.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.Designer.cs @@ -156,7 +156,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("ClassCod") .HasColumnType("varchar(255)"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -252,7 +252,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("CodGroup") .HasColumnType("varchar(255)"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -295,10 +295,10 @@ namespace EgwCoreLib.Lux.Data.Migrations .IsRequired() .HasColumnType("varchar(255)"); - b.Property("Cost") + b.Property("BomCost") .HasColumnType("double"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -556,7 +556,7 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -579,13 +579,13 @@ namespace EgwCoreLib.Lux.Data.Migrations modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowItemModel", b => { - b.Property("JobRowItemID") + b.Property("JobStepItemID") .ValueGeneratedOnAdd() .HasColumnType("int"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobRowItemID")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -595,17 +595,17 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("ItemID") .HasColumnType("int"); - b.Property("JobRowID") + b.Property("JobStepID") .HasColumnType("int"); - b.Property("Qty") + b.Property("ProductivityRate") .HasColumnType("double"); - b.HasKey("JobRowItemID"); + b.HasKey("JobStepItemID"); b.HasIndex("ItemID"); - b.HasIndex("JobRowID"); + b.HasIndex("JobStepID"); b.ToTable("JobRowItemList"); @@ -641,13 +641,13 @@ namespace EgwCoreLib.Lux.Data.Migrations modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowModel", b => { - b.Property("JobRowID") + b.Property("JobStepID") .ValueGeneratedOnAdd() .HasColumnType("int"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobRowID")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -660,13 +660,13 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("PhaseID") .HasColumnType("int"); - b.Property("Qty") + b.Property("ProductivityRate") .HasColumnType("double"); b.Property("ResourceID") .HasColumnType("int"); - b.HasKey("JobRowID"); + b.HasKey("JobStepID"); b.HasIndex("JobID"); @@ -734,7 +734,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("MovCod") .HasColumnType("varchar(255)"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -789,7 +789,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("DealerID") .HasColumnType("int"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -850,7 +850,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("BomOk") .HasColumnType("tinyint(1)"); - b.Property("Cost") + b.Property("BomCost") .HasColumnType("double"); b.Property("Environment") @@ -867,7 +867,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("ItemOk") .HasColumnType("tinyint(1)"); - b.Property("ItemSPP") + b.Property("ItemSteps") .IsRequired() .HasColumnType("longtext"); @@ -885,7 +885,7 @@ namespace EgwCoreLib.Lux.Data.Migrations .IsRequired() .HasColumnType("longtext"); - b.Property("Qty") + b.Property("ProductivityRate") .HasColumnType("double"); b.Property("RowNum") @@ -980,7 +980,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("DealerID") .HasColumnType("int"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1027,13 +1027,13 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); - b.Property("Cost") + b.Property("BomCost") .HasColumnType("double"); b.Property("Inserted") .HasColumnType("datetime(6)"); - b.Property("ItemSPP") + b.Property("ItemSteps") .IsRequired() .HasColumnType("longtext"); @@ -1047,7 +1047,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("OrderID") .HasColumnType("int"); - b.Property("Qty") + b.Property("ProductivityRate") .HasColumnType("double"); b.Property("RowNum") @@ -1077,7 +1077,7 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1132,7 +1132,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("DateStart") .HasColumnType("datetime(6)"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1176,11 +1176,11 @@ namespace EgwCoreLib.Lux.Data.Migrations modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemRowModel", b => { - b.Property("ProdItemRowID") + b.Property("ProdItemStepID") .ValueGeneratedOnAdd() .HasColumnType("int"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemRowID")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); b.Property("DateEnd") .HasColumnType("datetime(6)"); @@ -1188,7 +1188,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("DateStart") .HasColumnType("datetime(6)"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1201,7 +1201,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("ProdItemID") .HasColumnType("int"); - b.Property("Qty") + b.Property("ProductivityRate") .HasColumnType("double"); b.Property("ResourceID") @@ -1210,7 +1210,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("WorkTime") .HasColumnType("double"); - b.HasKey("ProdItemRowID"); + b.HasKey("ProdItemStepID"); b.HasIndex("PhaseID"); @@ -1229,7 +1229,7 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1345,10 +1345,10 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); - b.Property("Cost") + b.Property("BomCost") .HasColumnType("double"); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1362,7 +1362,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("ItemCode") .HasColumnType("int"); - b.Property("ItemSPP") + b.Property("ItemSteps") .IsRequired() .HasColumnType("longtext"); @@ -1810,7 +1810,7 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); - b.Property("Description") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); @@ -1876,15 +1876,15 @@ namespace EgwCoreLib.Lux.Data.Migrations .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobRowModel", "JobRowNav") + b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobRowModel", "JobStepNav") .WithMany() - .HasForeignKey("JobRowID") + .HasForeignKey("JobStepID") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("ItemNav"); - b.Navigation("JobRowNav"); + b.Navigation("JobStepNav"); }); modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowModel", b => diff --git a/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.cs b/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.cs index 144575be..52c20bf6 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.cs @@ -55,7 +55,7 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.InsertData( table: "GenClass", - columns: new[] { "ClassCod", "Description" }, + columns: new[] { "ClassCod", "Name" }, values: new object[,] { { "WoodCol", "Elenco Colori Legno" }, diff --git a/EgwCoreLib.Lux.Data/Migrations/20250919164620_GlobalModelUpdate.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20250919164620_GlobalModelUpdate.Designer.cs new file mode 100644 index 00000000..45cba103 --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20250919164620_GlobalModelUpdate.Designer.cs @@ -0,0 +1,2239 @@ +// +using System; +using EgwCoreLib.Lux.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace EgwCoreLib.Lux.Data.Migrations +{ + [DbContext(typeof(DataLayerContext))] + [Migration("20250919164620_GlobalModelUpdate")] + partial class GlobalModelUpdate + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.17") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", b => + { + b.Property("CostDriverID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CostDriverID")); + + b.Property("Descript") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Unit") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CostDriverID"); + + b.ToTable("cost_driver"); + + b.HasData( + new + { + CostDriverID = 1, + Descript = "Ore lavorate per step/fase", + Name = "WorkHour", + Unit = "h" + }, + new + { + CostDriverID = 2, + Descript = "Metri prodotti per step/fase", + Name = "Meter", + Unit = "m" + }, + new + { + CostDriverID = 3, + Descript = "Numero unità prodotte (lavorate) per step/fase", + Name = "Unit", + Unit = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.Property("ResourceID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); + + b.Property("CostDriverBudget") + .HasColumnType("decimal(65,30)"); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("EBTPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("FixedCost") + .HasColumnType("decimal(65,30)"); + + b.Property("LaborCost") + .HasColumnType("decimal(65,30)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OverHeadCost") + .HasColumnType("decimal(65,30)"); + + b.Property("OverHeadPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("PriceMargin") + .HasColumnType("decimal(65,30)"); + + b.Property("VariableCost") + .HasColumnType("decimal(65,30)"); + + b.HasKey("ResourceID"); + + b.HasIndex("CostDriverID"); + + b.ToTable("cost_resource"); + + b.HasData( + new + { + ResourceID = 1, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 12000m, + LaborCost = 30m, + Name = "Sezionatrice", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 2, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 100000m, + LaborCost = 40m, + Name = "Linea SAOMAD WoodPecker Just 3500", + OverHeadCost = 15000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 30000m + }, + new + { + ResourceID = 3, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 35m, + Name = "Linea Pantografo", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 4, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 30m, + Name = "Stazione Verniciatura", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 5, + CostDriverBudget = 220m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 6000m, + LaborCost = 30m, + Name = "Verniciatura Manuale", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 2000m + }, + new + { + ResourceID = 6, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 500m, + LaborCost = 30m, + Name = "Montaggio Manuale", + OverHeadCost = 500m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 500m + }, + new + { + ResourceID = 7, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 0m, + LaborCost = 40m, + Name = "Installatore", + OverHeadCost = 0m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 3000m + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", b => + { + b.Property("CodGroup") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CodGroup"); + + b.ToTable("item_group"); + + b.HasData( + new + { + CodGroup = "WindowTrunk", + Description = "Barre legno per lavorazione" + }, + new + { + CodGroup = "WindowGlass", + Description = "Vetri serramento" + }, + new + { + CodGroup = "WindowVarnish", + Description = "Vernici per legno" + }, + new + { + CodGroup = "WindowHardware", + Description = "Ferramenta serramento" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.Property("ItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); + + b.Property("CodGroup") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemIDParent") + .HasColumnType("int"); + + b.Property("ItemType") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("QtyMax") + .HasColumnType("double"); + + b.Property("QtyMin") + .HasColumnType("double"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ItemID"); + + b.HasIndex("CodGroup"); + + b.ToTable("item_item"); + + b.HasData( + new + { + ItemID = 1, + CodGroup = "WindowTrunk", + Cost = 20.0, + Description = "BARRA-60x80 generica", + ExtItemCode = "", + IsService = false, + ItemCode = 1001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.29999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "BARR.001", + UM = "#" + }, + new + { + ItemID = 2, + CodGroup = "WindowTrunk", + Cost = 16.5, + Description = "Barra 60x80, lunghezza 12m", + ExtItemCode = "BARRA-60x80x12000", + IsService = false, + ItemCode = 1002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.12000", + UM = "#" + }, + new + { + ItemID = 3, + CodGroup = "WindowTrunk", + Cost = 17.5, + Description = "Barra 60x80, lunghezza 8m", + ExtItemCode = "BARRA-60x80x8000", + IsService = false, + ItemCode = 1003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.22, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.8000", + UM = "#" + }, + new + { + ItemID = 4, + CodGroup = "WindowTrunk", + Cost = 15.5, + Description = "Barra 60x80, lunghezza 16m", + ExtItemCode = "BARRA-60x80x16000", + IsService = false, + ItemCode = 1004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.16000", + UM = "#" + }, + new + { + ItemID = 5, + CodGroup = "WindowGlass", + Cost = 300.0, + Description = "Vetro triplo, basso indice termico, 800x1000", + ExtItemCode = "VETRO-3L-THERMO-800x1000", + IsService = false, + ItemCode = 2001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3T.800.1000", + UM = "m2" + }, + new + { + ItemID = 6, + CodGroup = "WindowGlass", + Cost = 200.0, + Description = "Vetro doppio, 800x1000", + ExtItemCode = "VETRO-2L-800x1000", + IsService = false, + ItemCode = 2002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.14999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V2.800.1000", + UM = "m2" + }, + new + { + ItemID = 7, + CodGroup = "WindowGlass", + Cost = 250.0, + Description = "Vetro triplo, 800x1000", + ExtItemCode = "VETRO-3L-800x1000", + IsService = false, + ItemCode = 2003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.17999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3.800.1000", + UM = "m2" + }, + new + { + ItemID = 8, + CodGroup = "WindowVarnish", + Cost = 20.0, + Description = "Vernice trasparente", + ExtItemCode = "VERN-TRASP", + IsService = false, + ItemCode = 3001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "VT.STD", + UM = "l" + }, + new + { + ItemID = 9, + CodGroup = "WindowHardware", + Cost = 65.0, + Description = "Kit standard completo AGB tipo 001", + ExtItemCode = "KIT-001", + IsService = false, + ItemCode = 5001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-KIT-001", + UM = "#" + }, + new + { + ItemID = 10, + CodGroup = "WindowHardware", + Cost = 10.0, + Description = "Cerniera AGB tipo 001", + ExtItemCode = "CERN-001", + IsService = false, + ItemCode = 5002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-CERN-001", + UM = "#" + }, + new + { + ItemID = 11, + CodGroup = "WindowHardware", + Cost = 15.0, + Description = "Serratura AGB tipo 001", + ExtItemCode = "SERR-001", + IsService = false, + ItemCode = 5003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-SERR-001", + UM = "#" + }, + new + { + ItemID = 12, + CodGroup = "WindowHardware", + Cost = 25.0, + Description = "Maniglia AGB tipo 001", + ExtItemCode = "MAN-001", + IsService = false, + ItemCode = 5004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-MAN-001", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.Property("SellingItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SellingItemID"); + + b.HasIndex("JobID"); + + b.ToTable("item_selling_item"); + + b.HasData( + new + { + SellingItemID = 1, + Cost = 820.0, + Description = "Finestra anta Singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 2, + Margin = 0.20000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 2, + Cost = 150.0, + Description = "Persiana anta singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.10000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 3, + Cost = 200.0, + Description = "Installazione", + ExtItemCode = "", + IsService = true, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SupplierModel", b => + { + b.Property("SupplierID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SupplierID"); + + b.ToTable("item_supplier"); + + b.HasData( + new + { + SupplierID = 1, + CompanyName = "Company One", + FirstName = "Supplier A", + LastName = "Egalware", + VAT = "7294857103879254" + }, + new + { + SupplierID = 2, + CompanyName = "Company Two", + FirstName = "Supplier B", + LastName = "User", + VAT = "7294857103879254" + }, + new + { + SupplierID = 3, + CompanyName = "Company Two", + FirstName = "Supplier C", + LastName = "User Test", + VAT = "7294857103879254" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", b => + { + b.Property("ProductionBatchID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DueDate") + .HasColumnType("datetime(6)"); + + b.HasKey("ProductionBatchID"); + + b.ToTable("production_batch"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.Property("ProdItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("OrderRowID") + .HasColumnType("int"); + + b.Property("ProductionBatchID") + .HasColumnType("int"); + + b.HasKey("ProdItemID"); + + b.HasIndex("OrderRowID"); + + b.HasIndex("ProductionBatchID"); + + b.ToTable("production_item"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.Property("ProdItemStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProdItemID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.Property("WorkTime") + .HasColumnType("double"); + + b.HasKey("ProdItemStepID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ProdItemID"); + + b.HasIndex("ResourceID"); + + b.ToTable("production_item_step"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", b => + { + b.Property("CustomerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CustomerID"); + + b.ToTable("sales_customer"); + + b.HasData( + new + { + CustomerID = 1, + CompanyName = "", + FirstName = "Customer A", + LastName = "Egalware", + VAT = "1234567890123456" + }, + new + { + CustomerID = 2, + CompanyName = "", + FirstName = "Customer B", + LastName = "User", + VAT = "1234567890123456" + }, + new + { + CustomerID = 3, + CompanyName = "", + FirstName = "Customer C", + LastName = "User Test", + VAT = "1234567890123456" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", b => + { + b.Property("DealerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("DealerID"); + + b.ToTable("sales_dealer"); + + b.HasData( + new + { + DealerID = 1, + CompanyName = "Company First", + FirstName = "Dealer A", + LastName = "Egalware", + VAT = "9587362514671527" + }, + new + { + DealerID = 2, + CompanyName = "Company First", + FirstName = "Dealer B", + LastName = "User", + VAT = "9587362514671527" + }, + new + { + DealerID = 3, + CompanyName = "Company Second", + FirstName = "Dealer C", + LastName = "User Test", + VAT = "9587362514671527" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Property("OfferID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OfferID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.ToTable("sales_offer"); + + b.HasData( + new + { + OfferID = 1, + CustomerID = 2, + DealerID = 2, + Description = "Offerta per tre serramenti", + Inserted = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1216), + Modified = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1218), + OffertState = 0, + RefNum = 1, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 10, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1213) + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferRowModel", b => + { + b.Property("OfferRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomOk") + .HasColumnType("tinyint(1)"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Environment") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemBOM") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemOk") + .HasColumnType("tinyint(1)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OfferRowUID") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OfferRowID"); + + b.HasIndex("OfferID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_offer_row"); + + b.HasData( + new + { + OfferRowID = 1, + BomCost = 950.0, + BomOk = true, + BomPrice = 0.0, + Environment = "WINDOW", + Inserted = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1314), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1317), + Note = "Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000000001", + Qty = 3.0, + RowNum = 1, + SellingItemID = 1, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 2, + BomCost = 160.0, + BomOk = true, + BomPrice = 0.0, + Environment = "WINDOW", + Inserted = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1336), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1338), + Note = "Persiana per Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000000002", + Qty = 3.0, + RowNum = 2, + SellingItemID = 2, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 3, + BomCost = 200.0, + BomOk = true, + BomPrice = 0.0, + Environment = "WINDOW", + Inserted = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1350), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1352), + Note = "Installazione serramento", + OfferID = 1, + OfferRowUID = "OFF250000000003", + Qty = 3.0, + RowNum = 3, + SellingItemID = 3, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", b => + { + b.Property("OrderID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OrderID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.HasIndex("OfferID"); + + b.ToTable("sales_order"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.Property("OrderRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OrderID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OrderRowID"); + + b.HasIndex("OrderID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_order_row"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.Property("StockMovID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); + + b.Property("CodDoc") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DtCreate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("DtMod") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); + + b.Property("MovCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyRec") + .HasColumnType("double"); + + b.Property("StockStatusId") + .HasColumnType("int"); + + b.Property("UnitVal") + .HasColumnType("double"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("StockMovID"); + + b.HasIndex("MovCod"); + + b.HasIndex("StockStatusId"); + + b.ToTable("stock_mov"); + + b.HasData( + new + { + StockMovID = 1, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(844), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(889), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 1, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 2, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(892), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(894), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 8.0, + StockStatusId = 2, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 3, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(897), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(898), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 3, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 4, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(901), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(903), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 4, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 5, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(905), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(907), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 10.0, + StockStatusId = 5, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 6, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(909), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(911), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 6, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 7, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(914), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(915), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 50.0, + StockStatusId = 7, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 8, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(918), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(920), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 8, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 9, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(922), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(924), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 9, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 10, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(927), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(928), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 10, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.Property("StockStatusId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("IsRemn") + .HasColumnType("tinyint(1)"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("Location") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyAvail") + .HasColumnType("double"); + + b.HasKey("StockStatusId"); + + b.HasIndex("ItemID"); + + b.ToTable("stock_status"); + + b.HasData( + new + { + StockStatusId = 1, + IsDeleted = false, + IsRemn = false, + ItemID = 1, + Location = "B001-001-003", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 2, + IsDeleted = false, + IsRemn = false, + ItemID = 2, + Location = "B001-001-002", + QtyAvail = 8.0 + }, + new + { + StockStatusId = 3, + IsDeleted = false, + IsRemn = false, + ItemID = 3, + Location = "B001-001-001", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 4, + IsDeleted = false, + IsRemn = false, + ItemID = 4, + Location = "V002-001-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 5, + IsDeleted = false, + IsRemn = false, + ItemID = 5, + Location = "V001-001-002", + QtyAvail = 10.0 + }, + new + { + StockStatusId = 6, + IsDeleted = false, + IsRemn = false, + ItemID = 6, + Location = "V001-001-003", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 7, + IsDeleted = false, + IsRemn = false, + ItemID = 8, + Location = "V001-001-003", + QtyAvail = 50.0 + }, + new + { + StockStatusId = 8, + IsDeleted = false, + IsRemn = false, + ItemID = 11, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 9, + IsDeleted = false, + IsRemn = false, + ItemID = 9, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 10, + IsDeleted = false, + IsRemn = false, + ItemID = 10, + Location = "S001-001-001", + QtyAvail = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => + { + b.Property("JobID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("JobID"); + + b.ToTable("task_job"); + + b.HasData( + new + { + JobID = 1, + Description = "Rivendita / servizi" + }, + new + { + JobID = 2, + Description = "Serramento Completo Legno su linea Saomad e installatore interno" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.Property("JobStepItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("JobStepID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.HasKey("JobStepItemID"); + + b.HasIndex("ItemID"); + + b.HasIndex("JobStepID"); + + b.ToTable("task_job_step_item"); + + b.HasData( + new + { + JobStepItemID = 1, + Description = "Grezzo legno abete", + Index = 1, + ItemID = 1, + JobStepID = 1, + Qty = 1.0 + }, + new + { + JobStepItemID = 2, + Description = "Vernice trasparente standard 1L", + Index = 2, + ItemID = 8, + JobStepID = 3, + Qty = 0.10000000000000001 + }, + new + { + JobStepItemID = 3, + Description = "Ferramenta AGB - rif. AGFD.00000.00000", + Index = 3, + ItemID = 9, + JobStepID = 4, + Qty = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.Property("JobStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProductivityRate") + .HasColumnType("decimal(65,30)"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.HasKey("JobStepID"); + + b.HasIndex("CostDriverID"); + + b.HasIndex("JobID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ResourceID"); + + b.ToTable("task_job_step"); + + b.HasData( + new + { + JobStepID = 1, + CostDriverID = 3, + Description = "", + Index = 1, + JobID = 2, + PhaseID = 1, + ProductivityRate = 1m, + ResourceID = 1 + }, + new + { + JobStepID = 2, + CostDriverID = 2, + Description = "", + Index = 2, + JobID = 2, + PhaseID = 2, + ProductivityRate = 1m, + ResourceID = 2 + }, + new + { + JobStepID = 3, + CostDriverID = 3, + Description = "", + Index = 3, + JobID = 2, + PhaseID = 3, + ProductivityRate = 1m, + ResourceID = 4 + }, + new + { + JobStepID = 4, + CostDriverID = 3, + Description = "", + Index = 4, + JobID = 2, + PhaseID = 4, + ProductivityRate = 1m, + ResourceID = 6 + }, + new + { + JobStepID = 5, + CostDriverID = 3, + Description = "", + Index = 5, + JobID = 2, + PhaseID = 6, + ProductivityRate = 1m, + ResourceID = 7 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", b => + { + b.Property("PhaseID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("PhaseID"); + + b.ToTable("task_phase"); + + b.HasData( + new + { + PhaseID = 1, + Description = "Taglio tronchetti" + }, + new + { + PhaseID = 2, + Description = "Lavorazione pezzi serramento" + }, + new + { + PhaseID = 3, + Description = "Verniciatura" + }, + new + { + PhaseID = 4, + Description = "Assemblaggio completo" + }, + new + { + PhaseID = 5, + Description = "Assemblaggio Ferramenta" + }, + new + { + PhaseID = 6, + Description = "Installazione e posa in opera" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.CounterModel", b => + { + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("CountName") + .HasColumnType("varchar(255)"); + + b.Property("Counter") + .HasColumnType("int"); + + b.HasKey("RefYear", "CountName"); + + b.ToTable("utils_counter"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Property("ClassCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ClassCod"); + + b.ToTable("utils_gen_class"); + + b.HasData( + new + { + ClassCod = "WoodMat", + Description = "Elenco Materiali Legno" + }, + new + { + ClassCod = "WoodCol", + Description = "Elenco Colori Legno" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.Property("GenValID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); + + b.Property("ClassCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Ordinal") + .HasColumnType("int"); + + b.Property("ValString") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("GenValID"); + + b.HasIndex("ClassCod"); + + b.ToTable("utils_gen_value"); + + 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 = "Legno" + }, + 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.Utils.MovTypeModel", b => + { + b.Property("MovCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("MovCod"); + + b.ToTable("utils_mov_type"); + + b.HasData( + new + { + MovCod = "CAR", + Description = "Carico a magazzino" + }, + new + { + MovCod = "MOV", + Description = "Movimento interno (spostamento)" + }, + new + { + MovCod = "ND", + Description = "Non Definito" + }, + new + { + MovCod = "OFOR", + Description = "Ordine Fornitore" + }, + new + { + MovCod = "RETT", + Description = "Rettifica magazzino" + }, + new + { + MovCod = "SCAR", + Description = "Scarico da magazzino" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", b => + { + b.Property("TagID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("TagID"); + + b.ToTable("utils_tags"); + + b.HasData( + new + { + TagID = 1, + Description = "Tag 01" + }, + new + { + TagID = 2, + Description = "Tag 02" + }, + new + { + TagID = 3, + Description = "Tag 03" + }, + new + { + TagID = 4, + Description = "Tag 04" + }, + new + { + TagID = 5, + Description = "Tag 05" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", "ItemGroupNav") + .WithMany() + .HasForeignKey("CodGroup") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemGroupNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") + .WithMany() + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("JobNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", "OrderRowNav") + .WithMany() + .HasForeignKey("OrderRowID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", "ProductionBatchNav") + .WithMany() + .HasForeignKey("ProductionBatchID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderRowNav"); + + b.Navigation("ProductionBatchNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", "ProdItemNav") + .WithMany() + .HasForeignKey("ProdItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("PhaseNav"); + + b.Navigation("ProdItemNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", 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.OfferRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany("OfferRowNav") + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OfferNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", 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.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany() + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CustomerNav"); + + b.Navigation("DealerNav"); + + b.Navigation("OfferNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", "OrderNav") + .WithMany() + .HasForeignKey("OrderID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", "MovTypeNav") + .WithMany() + .HasForeignKey("MovCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", "StockStatusNav") + .WithMany() + .HasForeignKey("StockStatusId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("MovTypeNav"); + + b.Navigation("StockStatusNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", "JobStepNav") + .WithMany() + .HasForeignKey("JobStepID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") + .WithMany("JobStepNav") + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + + b.Navigation("JobNav"); + + b.Navigation("PhaseNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", "GenClassNav") + .WithMany("GenValNav") + .HasForeignKey("ClassCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GenClassNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Navigation("OfferRowNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => + { + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Navigation("GenValNav"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/20250919164620_GlobalModelUpdate.cs b/EgwCoreLib.Lux.Data/Migrations/20250919164620_GlobalModelUpdate.cs new file mode 100644 index 00000000..6a3211cd --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20250919164620_GlobalModelUpdate.cs @@ -0,0 +1,2256 @@ +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 +{ + /// + public partial class GlobalModelUpdate : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Counter"); + + migrationBuilder.DropTable( + name: "GenValue"); + + migrationBuilder.DropTable( + name: "JobRowItemList"); + + migrationBuilder.DropTable( + name: "OfferRowList"); + + migrationBuilder.DropTable( + name: "ProductionItemRowList"); + + migrationBuilder.DropTable( + name: "RegSupplier"); + + migrationBuilder.DropTable( + name: "RegTags"); + + migrationBuilder.DropTable( + name: "StockMov"); + + migrationBuilder.DropTable( + name: "GenClass"); + + migrationBuilder.DropTable( + name: "JobRowList"); + + migrationBuilder.DropTable( + name: "ProductionItem"); + + migrationBuilder.DropTable( + name: "RegMovType"); + + migrationBuilder.DropTable( + name: "StockStatus"); + + migrationBuilder.DropTable( + name: "RegPhase"); + + migrationBuilder.DropTable( + name: "RegResource"); + + migrationBuilder.DropTable( + name: "OrderRowList"); + + migrationBuilder.DropTable( + name: "ProductionBatch"); + + migrationBuilder.DropTable( + name: "RegItem"); + + migrationBuilder.DropTable( + name: "Order"); + + migrationBuilder.DropTable( + name: "SellingItem"); + + migrationBuilder.DropTable( + name: "RegItemGroup"); + + migrationBuilder.DropTable( + name: "Offer"); + + migrationBuilder.DropTable( + name: "JobList"); + + migrationBuilder.DropTable( + name: "RegCustomer"); + + migrationBuilder.DropTable( + name: "RegDealer"); + + migrationBuilder.CreateTable( + name: "cost_driver", + columns: table => new + { + CostDriverID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Unit = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Descript = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_cost_driver", x => x.CostDriverID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "item_group", + columns: table => new + { + CodGroup = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_item_group", x => x.CodGroup); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "item_supplier", + columns: table => new + { + SupplierID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + CompanyName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FirstName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + LastName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + VAT = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_item_supplier", x => x.SupplierID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "production_batch", + columns: table => new + { + ProductionBatchID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DueDate = table.Column(type: "datetime(6)", nullable: false), + DateStart = table.Column(type: "datetime(6)", nullable: true), + DateEnd = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_production_batch", x => x.ProductionBatchID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "sales_customer", + columns: table => new + { + CustomerID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + CompanyName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FirstName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + LastName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + VAT = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_sales_customer", x => x.CustomerID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "sales_dealer", + columns: table => new + { + DealerID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + CompanyName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FirstName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + LastName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + VAT = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_sales_dealer", x => x.DealerID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "task_job", + columns: table => new + { + JobID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_task_job", x => x.JobID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "task_phase", + columns: table => new + { + PhaseID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_task_phase", x => x.PhaseID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "utils_counter", + columns: table => new + { + RefYear = table.Column(type: "int", nullable: false), + CountName = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Counter = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_utils_counter", x => new { x.RefYear, x.CountName }); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "utils_gen_class", + columns: table => new + { + ClassCod = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_utils_gen_class", x => x.ClassCod); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "utils_mov_type", + columns: table => new + { + MovCod = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_utils_mov_type", x => x.MovCod); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "utils_tags", + columns: table => new + { + TagID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_utils_tags", x => x.TagID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "cost_resource", + columns: table => new + { + ResourceID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CostDriverID = table.Column(type: "int", nullable: false), + CostDriverBudget = table.Column(type: "decimal(65,30)", nullable: false), + FixedCost = table.Column(type: "decimal(65,30)", nullable: false), + VariableCost = table.Column(type: "decimal(65,30)", nullable: false), + LaborCost = table.Column(type: "decimal(65,30)", nullable: false), + OverHeadCost = table.Column(type: "decimal(65,30)", nullable: false), + OverHeadPerc = table.Column(type: "decimal(65,30)", nullable: false), + EBTPerc = table.Column(type: "decimal(65,30)", nullable: false), + PriceMargin = table.Column(type: "decimal(65,30)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_cost_resource", x => x.ResourceID); + table.ForeignKey( + name: "FK_cost_resource_cost_driver_CostDriverID", + column: x => x.CostDriverID, + principalTable: "cost_driver", + principalColumn: "CostDriverID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "item_item", + columns: table => new + { + ItemID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + CodGroup = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ItemType = table.Column(type: "int", nullable: false), + IsService = table.Column(type: "tinyint(1)", nullable: false), + ItemCode = table.Column(type: "int", nullable: false), + ExtItemCode = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SupplCode = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Cost = table.Column(type: "double", nullable: false), + Margin = table.Column(type: "double", nullable: false), + QtyMin = table.Column(type: "double", nullable: false), + QtyMax = table.Column(type: "double", nullable: false), + UM = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ItemIDParent = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_item_item", x => x.ItemID); + table.ForeignKey( + name: "FK_item_item_item_group_CodGroup", + column: x => x.CodGroup, + principalTable: "item_group", + principalColumn: "CodGroup", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "sales_offer", + columns: table => new + { + OfferID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + RefYear = table.Column(type: "int", nullable: false), + RefNum = table.Column(type: "int", nullable: false), + RefRev = table.Column(type: "int", nullable: false), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CustomerID = table.Column(type: "int", nullable: false), + DealerID = table.Column(type: "int", nullable: false), + ValidUntil = table.Column(type: "datetime(6)", nullable: false), + Inserted = table.Column(type: "datetime(6)", nullable: false), + Modified = table.Column(type: "datetime(6)", nullable: false), + OffertState = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_sales_offer", x => x.OfferID); + table.ForeignKey( + name: "FK_sales_offer_sales_customer_CustomerID", + column: x => x.CustomerID, + principalTable: "sales_customer", + principalColumn: "CustomerID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_sales_offer_sales_dealer_DealerID", + column: x => x.DealerID, + principalTable: "sales_dealer", + principalColumn: "DealerID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "item_selling_item", + columns: table => new + { + SellingItemID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + IsService = table.Column(type: "tinyint(1)", nullable: false), + JobID = table.Column(type: "int", nullable: false), + ItemCode = table.Column(type: "int", nullable: false), + ExtItemCode = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SupplCode = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Cost = table.Column(type: "double", nullable: false), + Margin = table.Column(type: "double", nullable: false), + UM = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SerStruct = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ItemSteps = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_item_selling_item", x => x.SellingItemID); + table.ForeignKey( + name: "FK_item_selling_item_task_job_JobID", + column: x => x.JobID, + principalTable: "task_job", + principalColumn: "JobID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "utils_gen_value", + columns: table => new + { + GenValID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + ClassCod = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Ordinal = table.Column(type: "int", nullable: false), + ValString = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_utils_gen_value", x => x.GenValID); + table.ForeignKey( + name: "FK_utils_gen_value_utils_gen_class_ClassCod", + column: x => x.ClassCod, + principalTable: "utils_gen_class", + principalColumn: "ClassCod", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "task_job_step", + columns: table => new + { + JobStepID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + JobID = table.Column(type: "int", nullable: false), + Index = table.Column(type: "int", nullable: false), + CostDriverID = table.Column(type: "int", nullable: false), + PhaseID = table.Column(type: "int", nullable: false), + ResourceID = table.Column(type: "int", nullable: false), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProductivityRate = table.Column(type: "decimal(65,30)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_task_job_step", x => x.JobStepID); + table.ForeignKey( + name: "FK_task_job_step_cost_driver_CostDriverID", + column: x => x.CostDriverID, + principalTable: "cost_driver", + principalColumn: "CostDriverID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_task_job_step_cost_resource_ResourceID", + column: x => x.ResourceID, + principalTable: "cost_resource", + principalColumn: "ResourceID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_task_job_step_task_job_JobID", + column: x => x.JobID, + principalTable: "task_job", + principalColumn: "JobID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_task_job_step_task_phase_PhaseID", + column: x => x.PhaseID, + principalTable: "task_phase", + principalColumn: "PhaseID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "stock_status", + columns: table => new + { + StockStatusId = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + ItemID = table.Column(type: "int", nullable: false), + QtyAvail = table.Column(type: "double", nullable: false), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false), + IsRemn = table.Column(type: "tinyint(1)", nullable: false), + Location = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_stock_status", x => x.StockStatusId); + table.ForeignKey( + name: "FK_stock_status_item_item_ItemID", + column: x => x.ItemID, + principalTable: "item_item", + principalColumn: "ItemID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "sales_order", + columns: table => new + { + OrderID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + OfferID = table.Column(type: "int", nullable: false), + RefYear = table.Column(type: "int", nullable: false), + RefNum = table.Column(type: "int", nullable: false), + RefRev = table.Column(type: "int", nullable: false), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CustomerID = table.Column(type: "int", nullable: false), + DealerID = table.Column(type: "int", nullable: false), + ValidUntil = table.Column(type: "datetime(6)", nullable: false), + Inserted = table.Column(type: "datetime(6)", nullable: false), + Modified = table.Column(type: "datetime(6)", nullable: false), + OffertState = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_sales_order", x => x.OrderID); + table.ForeignKey( + name: "FK_sales_order_sales_customer_CustomerID", + column: x => x.CustomerID, + principalTable: "sales_customer", + principalColumn: "CustomerID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_sales_order_sales_dealer_DealerID", + column: x => x.DealerID, + principalTable: "sales_dealer", + principalColumn: "DealerID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_sales_order_sales_offer_OfferID", + column: x => x.OfferID, + principalTable: "sales_offer", + principalColumn: "OfferID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "sales_offer_row", + columns: table => new + { + OfferRowID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + OfferID = table.Column(type: "int", nullable: false), + RowNum = table.Column(type: "int", nullable: false), + Environment = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + OfferRowUID = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SellingItemID = table.Column(type: "int", nullable: false), + Qty = table.Column(type: "double", nullable: false), + BomCost = table.Column(type: "double", nullable: false), + BomPrice = table.Column(type: "double", nullable: false), + StepCost = table.Column(type: "double", nullable: false), + StepPrice = table.Column(type: "double", nullable: false), + SerStruct = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ItemSteps = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ItemBOM = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + BomOk = table.Column(type: "tinyint(1)", nullable: false), + ItemOk = table.Column(type: "tinyint(1)", nullable: false), + Note = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Inserted = table.Column(type: "datetime(6)", nullable: false), + Modified = table.Column(type: "datetime(6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_sales_offer_row", x => x.OfferRowID); + table.ForeignKey( + name: "FK_sales_offer_row_item_selling_item_SellingItemID", + column: x => x.SellingItemID, + principalTable: "item_selling_item", + principalColumn: "SellingItemID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_sales_offer_row_sales_offer_OfferID", + column: x => x.OfferID, + principalTable: "sales_offer", + principalColumn: "OfferID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "task_job_step_item", + columns: table => new + { + JobStepItemID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + JobStepID = table.Column(type: "int", nullable: false), + Index = table.Column(type: "int", nullable: false), + ItemID = table.Column(type: "int", nullable: false), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Qty = table.Column(type: "double", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_task_job_step_item", x => x.JobStepItemID); + table.ForeignKey( + name: "FK_task_job_step_item_item_item_ItemID", + column: x => x.ItemID, + principalTable: "item_item", + principalColumn: "ItemID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_task_job_step_item_task_job_step_JobStepID", + column: x => x.JobStepID, + principalTable: "task_job_step", + principalColumn: "JobStepID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "stock_mov", + columns: table => new + { + StockMovID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + StockStatusId = table.Column(type: "int", nullable: false), + DtCreate = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), + DtMod = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn), + QtyRec = table.Column(type: "double", nullable: false), + UnitVal = table.Column(type: "double", nullable: false), + UserId = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + MovCod = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CodDoc = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Note = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_stock_mov", x => x.StockMovID); + table.ForeignKey( + name: "FK_stock_mov_stock_status_StockStatusId", + column: x => x.StockStatusId, + principalTable: "stock_status", + principalColumn: "StockStatusId", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_stock_mov_utils_mov_type_MovCod", + column: x => x.MovCod, + principalTable: "utils_mov_type", + principalColumn: "MovCod", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "sales_order_row", + columns: table => new + { + OrderRowID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + OrderID = table.Column(type: "int", nullable: false), + RowNum = table.Column(type: "int", nullable: false), + SellingItemID = table.Column(type: "int", nullable: false), + BomCost = table.Column(type: "double", nullable: false), + Qty = table.Column(type: "double", nullable: false), + BomPrice = table.Column(type: "double", nullable: false), + StepCost = table.Column(type: "double", nullable: false), + StepPrice = table.Column(type: "double", nullable: false), + SerStruct = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ItemSteps = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Note = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Inserted = table.Column(type: "datetime(6)", nullable: false), + Modified = table.Column(type: "datetime(6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_sales_order_row", x => x.OrderRowID); + table.ForeignKey( + name: "FK_sales_order_row_item_selling_item_SellingItemID", + column: x => x.SellingItemID, + principalTable: "item_selling_item", + principalColumn: "SellingItemID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_sales_order_row_sales_order_OrderID", + column: x => x.OrderID, + principalTable: "sales_order", + principalColumn: "OrderID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "production_item", + columns: table => new + { + ProdItemID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + OrderRowID = table.Column(type: "int", nullable: false), + ItemCode = table.Column(type: "int", nullable: false), + ExtItemCode = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProductionBatchID = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_production_item", x => x.ProdItemID); + table.ForeignKey( + name: "FK_production_item_production_batch_ProductionBatchID", + column: x => x.ProductionBatchID, + principalTable: "production_batch", + principalColumn: "ProductionBatchID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_production_item_sales_order_row_OrderRowID", + column: x => x.OrderRowID, + principalTable: "sales_order_row", + principalColumn: "OrderRowID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "production_item_step", + columns: table => new + { + ProdItemStepID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + ProdItemID = table.Column(type: "int", nullable: false), + Index = table.Column(type: "int", nullable: false), + PhaseID = table.Column(type: "int", nullable: false), + ResourceID = table.Column(type: "int", nullable: false), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Qty = table.Column(type: "double", nullable: false), + DateStart = table.Column(type: "datetime(6)", nullable: true), + DateEnd = table.Column(type: "datetime(6)", nullable: true), + WorkTime = table.Column(type: "double", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_production_item_step", x => x.ProdItemStepID); + table.ForeignKey( + name: "FK_production_item_step_cost_resource_ResourceID", + column: x => x.ResourceID, + principalTable: "cost_resource", + principalColumn: "ResourceID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_production_item_step_production_item_ProdItemID", + column: x => x.ProdItemID, + principalTable: "production_item", + principalColumn: "ProdItemID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_production_item_step_task_phase_PhaseID", + column: x => x.PhaseID, + principalTable: "task_phase", + principalColumn: "PhaseID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.InsertData( + table: "cost_driver", + columns: new[] { "CostDriverID", "Descript", "Name", "Unit" }, + values: new object[,] + { + { 1, "Ore lavorate per step/fase", "WorkHour", "h" }, + { 2, "Metri prodotti per step/fase", "Meter", "m" }, + { 3, "Numero unità prodotte (lavorate) per step/fase", "Unit", "#" } + }); + + migrationBuilder.InsertData( + table: "item_group", + columns: new[] { "CodGroup", "Description" }, + values: new object[,] + { + { "WindowGlass", "Vetri serramento" }, + { "WindowHardware", "Ferramenta serramento" }, + { "WindowTrunk", "Barre legno per lavorazione" }, + { "WindowVarnish", "Vernici per legno" } + }); + + migrationBuilder.InsertData( + table: "item_supplier", + columns: new[] { "SupplierID", "CompanyName", "FirstName", "LastName", "VAT" }, + values: new object[,] + { + { 1, "Company One", "Supplier A", "Egalware", "7294857103879254" }, + { 2, "Company Two", "Supplier B", "User", "7294857103879254" }, + { 3, "Company Two", "Supplier C", "User Test", "7294857103879254" } + }); + + migrationBuilder.InsertData( + table: "sales_customer", + columns: new[] { "CustomerID", "CompanyName", "FirstName", "LastName", "VAT" }, + values: new object[,] + { + { 1, "", "Customer A", "Egalware", "1234567890123456" }, + { 2, "", "Customer B", "User", "1234567890123456" }, + { 3, "", "Customer C", "User Test", "1234567890123456" } + }); + + migrationBuilder.InsertData( + table: "sales_dealer", + columns: new[] { "DealerID", "CompanyName", "FirstName", "LastName", "VAT" }, + values: new object[,] + { + { 1, "Company First", "Dealer A", "Egalware", "9587362514671527" }, + { 2, "Company First", "Dealer B", "User", "9587362514671527" }, + { 3, "Company Second", "Dealer C", "User Test", "9587362514671527" } + }); + + migrationBuilder.InsertData( + table: "task_job", + columns: new[] { "JobID", "Description" }, + values: new object[,] + { + { 1, "Rivendita / servizi" }, + { 2, "Serramento Completo Legno su linea Saomad e installatore interno" } + }); + + migrationBuilder.InsertData( + table: "task_phase", + columns: new[] { "PhaseID", "Description" }, + values: new object[,] + { + { 1, "Taglio tronchetti" }, + { 2, "Lavorazione pezzi serramento" }, + { 3, "Verniciatura" }, + { 4, "Assemblaggio completo" }, + { 5, "Assemblaggio Ferramenta" }, + { 6, "Installazione e posa in opera" } + }); + + migrationBuilder.InsertData( + table: "utils_gen_class", + columns: new[] { "ClassCod", "Description" }, + values: new object[,] + { + { "WoodCol", "Elenco Colori Legno" }, + { "WoodMat", "Elenco Materiali Legno" } + }); + + migrationBuilder.InsertData( + table: "utils_mov_type", + columns: new[] { "MovCod", "Description" }, + values: new object[,] + { + { "CAR", "Carico a magazzino" }, + { "MOV", "Movimento interno (spostamento)" }, + { "ND", "Non Definito" }, + { "OFOR", "Ordine Fornitore" }, + { "RETT", "Rettifica magazzino" }, + { "SCAR", "Scarico da magazzino" } + }); + + migrationBuilder.InsertData( + table: "utils_tags", + columns: new[] { "TagID", "Description" }, + values: new object[,] + { + { 1, "Tag 01" }, + { 2, "Tag 02" }, + { 3, "Tag 03" }, + { 4, "Tag 04" }, + { 5, "Tag 05" } + }); + + migrationBuilder.InsertData( + table: "cost_resource", + columns: new[] { "ResourceID", "CostDriverBudget", "CostDriverID", "EBTPerc", "FixedCost", "LaborCost", "Name", "OverHeadCost", "OverHeadPerc", "PriceMargin", "VariableCost" }, + values: new object[,] + { + { 1, 880m, 1, 0.15m, 12000m, 30m, "Sezionatrice", 5000m, 0.15m, 0.2m, 6000m }, + { 2, 1760m, 1, 0.15m, 100000m, 40m, "Linea SAOMAD WoodPecker Just 3500", 15000m, 0.15m, 0.2m, 30000m }, + { 3, 1760m, 1, 0.15m, 24000m, 35m, "Linea Pantografo", 5000m, 0.15m, 0.2m, 6000m }, + { 4, 880m, 1, 0.15m, 24000m, 30m, "Stazione Verniciatura", 3000m, 0.15m, 0.2m, 6000m }, + { 5, 220m, 1, 0.15m, 6000m, 30m, "Verniciatura Manuale", 3000m, 0.15m, 0.2m, 2000m }, + { 6, 3520m, 1, 0.15m, 500m, 30m, "Montaggio Manuale", 500m, 0.15m, 0.2m, 500m }, + { 7, 3520m, 1, 0.15m, 0m, 40m, "Installatore", 0m, 0.15m, 0.2m, 3000m } + }); + + migrationBuilder.InsertData( + table: "item_item", + columns: new[] { "ItemID", "CodGroup", "Cost", "Description", "ExtItemCode", "IsService", "ItemCode", "ItemIDParent", "ItemType", "Margin", "QtyMax", "QtyMin", "SupplCode", "UM" }, + values: new object[,] + { + { 1, "WindowTrunk", 20.0, "BARRA-60x80 generica", "", false, 1001, 0, 1, 0.29999999999999999, 0.0, 0.0, "BARR.001", "#" }, + { 2, "WindowTrunk", 16.5, "Barra 60x80, lunghezza 12m", "BARRA-60x80x12000", false, 1002, 0, 1, 0.20999999999999999, 0.0, 0.0, "ABC.00123.12000", "#" }, + { 3, "WindowTrunk", 17.5, "Barra 60x80, lunghezza 8m", "BARRA-60x80x8000", false, 1003, 0, 1, 0.22, 0.0, 0.0, "ABC.00123.8000", "#" }, + { 4, "WindowTrunk", 15.5, "Barra 60x80, lunghezza 16m", "BARRA-60x80x16000", false, 1004, 0, 1, 0.20000000000000001, 0.0, 0.0, "ABC.00123.16000", "#" }, + { 5, "WindowGlass", 300.0, "Vetro triplo, basso indice termico, 800x1000", "VETRO-3L-THERMO-800x1000", false, 2001, 0, 1, 0.20000000000000001, 0.0, 0.0, "V3T.800.1000", "m2" }, + { 6, "WindowGlass", 200.0, "Vetro doppio, 800x1000", "VETRO-2L-800x1000", false, 2002, 0, 1, 0.14999999999999999, 0.0, 0.0, "V2.800.1000", "m2" }, + { 7, "WindowGlass", 250.0, "Vetro triplo, 800x1000", "VETRO-3L-800x1000", false, 2003, 0, 1, 0.17999999999999999, 0.0, 0.0, "V3.800.1000", "m2" }, + { 8, "WindowVarnish", 20.0, "Vernice trasparente", "VERN-TRASP", false, 3001, 0, 1, 0.20000000000000001, 0.0, 0.0, "VT.STD", "l" }, + { 9, "WindowHardware", 65.0, "Kit standard completo AGB tipo 001", "KIT-001", false, 5001, 0, 1, 0.20000000000000001, 0.0, 0.0, "AGB-KIT-001", "#" }, + { 10, "WindowHardware", 10.0, "Cerniera AGB tipo 001", "CERN-001", false, 5002, 0, 1, 0.20000000000000001, 0.0, 0.0, "AGB-CERN-001", "#" }, + { 11, "WindowHardware", 15.0, "Serratura AGB tipo 001", "SERR-001", false, 5003, 0, 1, 0.20000000000000001, 0.0, 0.0, "AGB-SERR-001", "#" }, + { 12, "WindowHardware", 25.0, "Maniglia AGB tipo 001", "MAN-001", false, 5004, 0, 1, 0.20000000000000001, 0.0, 0.0, "AGB-MAN-001", "#" } + }); + + migrationBuilder.InsertData( + table: "item_selling_item", + columns: new[] { "SellingItemID", "Cost", "Description", "ExtItemCode", "IsService", "ItemCode", "ItemSteps", "JobID", "Margin", "SerStruct", "SupplCode", "UM" }, + values: new object[,] + { + { 1, 820.0, "Finestra anta Singola", "", false, 0, "", 2, 0.20000000000000001, "", "", "#" }, + { 2, 150.0, "Persiana anta singola", "", false, 0, "", 1, 0.10000000000000001, "", "", "#" }, + { 3, 200.0, "Installazione", "", true, 0, "", 1, 0.29999999999999999, "", "", "#" } + }); + + migrationBuilder.InsertData( + table: "sales_offer", + columns: new[] { "OfferID", "CustomerID", "DealerID", "Description", "Inserted", "Modified", "OffertState", "RefNum", "RefRev", "RefYear", "ValidUntil" }, + values: new object[] { 1, 2, 2, "Offerta per tre serramenti", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1216), new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1218), 0, 1, 1, 2024, new DateTime(2025, 10, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1213) }); + + migrationBuilder.InsertData( + table: "utils_gen_value", + columns: new[] { "GenValID", "ClassCod", "Ordinal", "ValString" }, + values: new object[,] + { + { 1, "WoodMat", 1, "Pine" }, + { 2, "WoodMat", 2, "Maple" }, + { 3, "WoodCol", 1, "Legno" }, + { 4, "WoodCol", 2, "Bianco" }, + { 5, "WoodCol", 3, "Rosso" }, + { 6, "WoodCol", 4, "Nero" } + }); + + migrationBuilder.InsertData( + table: "sales_offer_row", + columns: new[] { "OfferRowID", "BomCost", "BomOk", "BomPrice", "Environment", "Inserted", "ItemBOM", "ItemOk", "ItemSteps", "Modified", "Note", "OfferID", "OfferRowUID", "Qty", "RowNum", "SellingItemID", "SerStruct", "StepCost", "StepPrice" }, + values: new object[,] + { + { 1, 950.0, true, 0.0, "WINDOW", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1314), "", true, "{}", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1317), "Finestra anta singola 2025", 1, "OFF250000000001", 3.0, 1, 1, "{}", 0.0, 0.0 }, + { 2, 160.0, true, 0.0, "WINDOW", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1336), "", true, "{}", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1338), "Persiana per Finestra anta singola 2025", 1, "OFF250000000002", 3.0, 2, 2, "{}", 0.0, 0.0 }, + { 3, 200.0, true, 0.0, "WINDOW", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1350), "", true, "{}", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1352), "Installazione serramento", 1, "OFF250000000003", 3.0, 3, 3, "{}", 0.0, 0.0 } + }); + + migrationBuilder.InsertData( + table: "stock_status", + columns: new[] { "StockStatusId", "IsDeleted", "IsRemn", "ItemID", "Location", "QtyAvail" }, + values: new object[,] + { + { 1, false, false, 1, "B001-001-003", 5.0 }, + { 2, false, false, 2, "B001-001-002", 8.0 }, + { 3, false, false, 3, "B001-001-001", 5.0 }, + { 4, false, false, 4, "V002-001-001", 1.0 }, + { 5, false, false, 5, "V001-001-002", 10.0 }, + { 6, false, false, 6, "V001-001-003", 1.0 }, + { 7, false, false, 8, "V001-001-003", 50.0 }, + { 8, false, false, 11, "S001-002-001", 1.0 }, + { 9, false, false, 9, "S001-002-001", 1.0 }, + { 10, false, false, 10, "S001-001-001", 1.0 } + }); + + migrationBuilder.InsertData( + table: "task_job_step", + columns: new[] { "JobStepID", "CostDriverID", "Description", "Index", "JobID", "PhaseID", "ProductivityRate", "ResourceID" }, + values: new object[,] + { + { 1, 3, "", 1, 2, 1, 1m, 1 }, + { 2, 2, "", 2, 2, 2, 1m, 2 }, + { 3, 3, "", 3, 2, 3, 1m, 4 }, + { 4, 3, "", 4, 2, 4, 1m, 6 }, + { 5, 3, "", 5, 2, 6, 1m, 7 } + }); + + migrationBuilder.InsertData( + table: "stock_mov", + columns: new[] { "StockMovID", "CodDoc", "DtCreate", "MovCod", "Note", "QtyRec", "StockStatusId", "UnitVal", "UserId" }, + values: new object[,] + { + { 1, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(844), "CAR", "DEMO", 5.0, 1, 0.0, "samuele.locatelli@egalware.com" }, + { 2, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(892), "CAR", "DEMO", 8.0, 2, 0.0, "samuele.locatelli@egalware.com" }, + { 3, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(897), "CAR", "DEMO", 5.0, 3, 0.0, "samuele.locatelli@egalware.com" }, + { 4, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(901), "CAR", "DEMO", 1.0, 4, 0.0, "samuele.locatelli@egalware.com" }, + { 5, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(905), "CAR", "DEMO", 10.0, 5, 0.0, "samuele.locatelli@egalware.com" }, + { 6, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(909), "CAR", "DEMO", 1.0, 6, 0.0, "samuele.locatelli@egalware.com" }, + { 7, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(914), "CAR", "DEMO", 50.0, 7, 0.0, "samuele.locatelli@egalware.com" }, + { 8, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(918), "CAR", "DEMO", 1.0, 8, 0.0, "samuele.locatelli@egalware.com" }, + { 9, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(922), "CAR", "DEMO", 1.0, 9, 0.0, "samuele.locatelli@egalware.com" }, + { 10, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(927), "CAR", "DEMO", 1.0, 10, 0.0, "samuele.locatelli@egalware.com" } + }); + + migrationBuilder.InsertData( + table: "task_job_step_item", + columns: new[] { "JobStepItemID", "Description", "Index", "ItemID", "JobStepID", "Qty" }, + values: new object[,] + { + { 1, "Grezzo legno abete", 1, 1, 1, 1.0 }, + { 2, "Vernice trasparente standard 1L", 2, 8, 3, 0.10000000000000001 }, + { 3, "Ferramenta AGB - rif. AGFD.00000.00000", 3, 9, 4, 1.0 } + }); + + migrationBuilder.CreateIndex( + name: "IX_cost_resource_CostDriverID", + table: "cost_resource", + column: "CostDriverID"); + + migrationBuilder.CreateIndex( + name: "IX_item_item_CodGroup", + table: "item_item", + column: "CodGroup"); + + migrationBuilder.CreateIndex( + name: "IX_item_selling_item_JobID", + table: "item_selling_item", + column: "JobID"); + + migrationBuilder.CreateIndex( + name: "IX_production_item_OrderRowID", + table: "production_item", + column: "OrderRowID"); + + migrationBuilder.CreateIndex( + name: "IX_production_item_ProductionBatchID", + table: "production_item", + column: "ProductionBatchID"); + + migrationBuilder.CreateIndex( + name: "IX_production_item_step_PhaseID", + table: "production_item_step", + column: "PhaseID"); + + migrationBuilder.CreateIndex( + name: "IX_production_item_step_ProdItemID", + table: "production_item_step", + column: "ProdItemID"); + + migrationBuilder.CreateIndex( + name: "IX_production_item_step_ResourceID", + table: "production_item_step", + column: "ResourceID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_offer_CustomerID", + table: "sales_offer", + column: "CustomerID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_offer_DealerID", + table: "sales_offer", + column: "DealerID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_offer_row_OfferID", + table: "sales_offer_row", + column: "OfferID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_offer_row_SellingItemID", + table: "sales_offer_row", + column: "SellingItemID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_order_CustomerID", + table: "sales_order", + column: "CustomerID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_order_DealerID", + table: "sales_order", + column: "DealerID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_order_OfferID", + table: "sales_order", + column: "OfferID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_order_row_OrderID", + table: "sales_order_row", + column: "OrderID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_order_row_SellingItemID", + table: "sales_order_row", + column: "SellingItemID"); + + migrationBuilder.CreateIndex( + name: "IX_stock_mov_MovCod", + table: "stock_mov", + column: "MovCod"); + + migrationBuilder.CreateIndex( + name: "IX_stock_mov_StockStatusId", + table: "stock_mov", + column: "StockStatusId"); + + migrationBuilder.CreateIndex( + name: "IX_stock_status_ItemID", + table: "stock_status", + column: "ItemID"); + + migrationBuilder.CreateIndex( + name: "IX_task_job_step_CostDriverID", + table: "task_job_step", + column: "CostDriverID"); + + migrationBuilder.CreateIndex( + name: "IX_task_job_step_JobID", + table: "task_job_step", + column: "JobID"); + + migrationBuilder.CreateIndex( + name: "IX_task_job_step_PhaseID", + table: "task_job_step", + column: "PhaseID"); + + migrationBuilder.CreateIndex( + name: "IX_task_job_step_ResourceID", + table: "task_job_step", + column: "ResourceID"); + + migrationBuilder.CreateIndex( + name: "IX_task_job_step_item_ItemID", + table: "task_job_step_item", + column: "ItemID"); + + migrationBuilder.CreateIndex( + name: "IX_task_job_step_item_JobStepID", + table: "task_job_step_item", + column: "JobStepID"); + + migrationBuilder.CreateIndex( + name: "IX_utils_gen_value_ClassCod", + table: "utils_gen_value", + column: "ClassCod"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "item_supplier"); + + migrationBuilder.DropTable( + name: "production_item_step"); + + migrationBuilder.DropTable( + name: "sales_offer_row"); + + migrationBuilder.DropTable( + name: "stock_mov"); + + migrationBuilder.DropTable( + name: "task_job_step_item"); + + migrationBuilder.DropTable( + name: "utils_counter"); + + migrationBuilder.DropTable( + name: "utils_gen_value"); + + migrationBuilder.DropTable( + name: "utils_tags"); + + migrationBuilder.DropTable( + name: "production_item"); + + migrationBuilder.DropTable( + name: "stock_status"); + + migrationBuilder.DropTable( + name: "utils_mov_type"); + + migrationBuilder.DropTable( + name: "task_job_step"); + + migrationBuilder.DropTable( + name: "utils_gen_class"); + + migrationBuilder.DropTable( + name: "production_batch"); + + migrationBuilder.DropTable( + name: "sales_order_row"); + + migrationBuilder.DropTable( + name: "item_item"); + + migrationBuilder.DropTable( + name: "cost_resource"); + + migrationBuilder.DropTable( + name: "task_phase"); + + migrationBuilder.DropTable( + name: "item_selling_item"); + + migrationBuilder.DropTable( + name: "sales_order"); + + migrationBuilder.DropTable( + name: "item_group"); + + migrationBuilder.DropTable( + name: "cost_driver"); + + migrationBuilder.DropTable( + name: "task_job"); + + migrationBuilder.DropTable( + name: "sales_offer"); + + migrationBuilder.DropTable( + name: "sales_customer"); + + migrationBuilder.DropTable( + name: "sales_dealer"); + + migrationBuilder.CreateTable( + name: "Counter", + columns: table => new + { + RefYear = table.Column(type: "int", nullable: false), + CountName = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Counter = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Counter", x => new { x.RefYear, x.CountName }); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "GenClass", + columns: table => new + { + ClassCod = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_GenClass", x => x.ClassCod); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "JobList", + columns: table => new + { + JobID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_JobList", x => x.JobID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "ProductionBatch", + columns: table => new + { + ProductionBatchID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + DateEnd = table.Column(type: "datetime(6)", nullable: true), + DateStart = table.Column(type: "datetime(6)", nullable: true), + DueDate = table.Column(type: "datetime(6)", nullable: false), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_ProductionBatch", x => x.ProductionBatchID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "RegCustomer", + columns: table => new + { + CustomerID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + CompanyName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FirstName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + LastName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + VAT = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_RegCustomer", x => x.CustomerID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "RegDealer", + columns: table => new + { + DealerID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + CompanyName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FirstName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + LastName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + VAT = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_RegDealer", x => x.DealerID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "RegItemGroup", + columns: table => new + { + CodGroup = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_RegItemGroup", x => x.CodGroup); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "RegMovType", + columns: table => new + { + MovCod = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_RegMovType", x => x.MovCod); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "RegPhase", + columns: table => new + { + PhaseID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_RegPhase", x => x.PhaseID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "RegResource", + columns: table => new + { + ResourceID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + IsAsset = table.Column(type: "tinyint(1)", nullable: false), + IsHuman = table.Column(type: "tinyint(1)", nullable: false), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + UmFix = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + UmProp = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + UnitCostFix = table.Column(type: "double", nullable: false), + UnitCostProp = table.Column(type: "double", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_RegResource", x => x.ResourceID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "RegSupplier", + columns: table => new + { + SupplierID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + CompanyName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FirstName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + LastName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + VAT = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_RegSupplier", x => x.SupplierID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "RegTags", + columns: table => new + { + TagID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_RegTags", x => x.TagID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "GenValue", + columns: table => new + { + GenValID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + ClassCod = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Ordinal = table.Column(type: "int", nullable: false), + ValString = table.Column(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.CreateTable( + name: "SellingItem", + columns: table => new + { + SellingItemID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + JobID = table.Column(type: "int", nullable: false), + BomCost = table.Column(type: "double", nullable: false), + ExtItemCode = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + IsService = table.Column(type: "tinyint(1)", nullable: false), + ItemCode = table.Column(type: "int", nullable: false), + ItemSteps = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Margin = table.Column(type: "double", nullable: false), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SerStruct = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SupplCode = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + UM = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_SellingItem", x => x.SellingItemID); + table.ForeignKey( + name: "FK_SellingItem_JobList_JobID", + column: x => x.JobID, + principalTable: "JobList", + principalColumn: "JobID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "Offer", + columns: table => new + { + OfferID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + CustomerID = table.Column(type: "int", nullable: false), + DealerID = table.Column(type: "int", nullable: false), + Inserted = table.Column(type: "datetime(6)", nullable: false), + Modified = table.Column(type: "datetime(6)", nullable: false), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + OffertState = table.Column(type: "int", nullable: false), + RefNum = table.Column(type: "int", nullable: false), + RefRev = table.Column(type: "int", nullable: false), + RefYear = table.Column(type: "int", nullable: false), + ValidUntil = table.Column(type: "datetime(6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Offer", x => x.OfferID); + table.ForeignKey( + name: "FK_Offer_RegCustomer_CustomerID", + column: x => x.CustomerID, + principalTable: "RegCustomer", + principalColumn: "CustomerID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Offer_RegDealer_DealerID", + column: x => x.DealerID, + principalTable: "RegDealer", + principalColumn: "DealerID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "RegItem", + columns: table => new + { + ItemID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + CodGroup = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + BomCost = table.Column(type: "double", nullable: false), + ExtItemCode = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + IsService = table.Column(type: "tinyint(1)", nullable: false), + ItemCode = table.Column(type: "int", nullable: false), + ItemIDParent = table.Column(type: "int", nullable: false), + ItemType = table.Column(type: "int", nullable: false), + Margin = table.Column(type: "double", nullable: false), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + QtyMax = table.Column(type: "double", nullable: false), + QtyMin = table.Column(type: "double", nullable: false), + SupplCode = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + UM = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_RegItem", x => x.ItemID); + table.ForeignKey( + name: "FK_RegItem_RegItemGroup_CodGroup", + column: x => x.CodGroup, + principalTable: "RegItemGroup", + principalColumn: "CodGroup", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "JobRowList", + columns: table => new + { + JobStepID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + JobID = table.Column(type: "int", nullable: false), + PhaseID = table.Column(type: "int", nullable: false), + ResourceID = table.Column(type: "int", nullable: false), + Index = table.Column(type: "int", nullable: false), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProductivityRate = table.Column(type: "double", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_JobRowList", x => x.JobStepID); + table.ForeignKey( + name: "FK_JobRowList_JobList_JobID", + column: x => x.JobID, + principalTable: "JobList", + principalColumn: "JobID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_JobRowList_RegPhase_PhaseID", + column: x => x.PhaseID, + principalTable: "RegPhase", + principalColumn: "PhaseID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_JobRowList_RegResource_ResourceID", + column: x => x.ResourceID, + principalTable: "RegResource", + principalColumn: "ResourceID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "OfferRowList", + columns: table => new + { + OfferRowID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + OfferID = table.Column(type: "int", nullable: false), + SellingItemID = table.Column(type: "int", nullable: false), + BomCost = table.Column(type: "double", nullable: false), + BomOk = table.Column(type: "tinyint(1)", nullable: false), + Environment = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Inserted = table.Column(type: "datetime(6)", nullable: false), + ItemBOM = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ItemOk = table.Column(type: "tinyint(1)", nullable: false), + ItemSteps = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Modified = table.Column(type: "datetime(6)", nullable: false), + Note = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + OfferRowUID = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProductivityRate = table.Column(type: "double", nullable: false), + RowNum = table.Column(type: "int", nullable: false), + SerStruct = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_OfferRowList", x => x.OfferRowID); + table.ForeignKey( + name: "FK_OfferRowList_Offer_OfferID", + column: x => x.OfferID, + principalTable: "Offer", + principalColumn: "OfferID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_OfferRowList_SellingItem_SellingItemID", + column: x => x.SellingItemID, + principalTable: "SellingItem", + principalColumn: "SellingItemID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "Order", + columns: table => new + { + OrderID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + CustomerID = table.Column(type: "int", nullable: false), + DealerID = table.Column(type: "int", nullable: false), + OfferID = table.Column(type: "int", nullable: false), + Inserted = table.Column(type: "datetime(6)", nullable: false), + Modified = table.Column(type: "datetime(6)", nullable: false), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + OffertState = table.Column(type: "int", nullable: false), + RefNum = table.Column(type: "int", nullable: false), + RefRev = table.Column(type: "int", nullable: false), + RefYear = table.Column(type: "int", nullable: false), + ValidUntil = table.Column(type: "datetime(6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Order", x => x.OrderID); + table.ForeignKey( + name: "FK_Order_Offer_OfferID", + column: x => x.OfferID, + principalTable: "Offer", + principalColumn: "OfferID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Order_RegCustomer_CustomerID", + column: x => x.CustomerID, + principalTable: "RegCustomer", + principalColumn: "CustomerID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Order_RegDealer_DealerID", + column: x => x.DealerID, + principalTable: "RegDealer", + principalColumn: "DealerID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "StockStatus", + columns: table => new + { + StockStatusId = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + ItemID = table.Column(type: "int", nullable: false), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false), + IsRemn = table.Column(type: "tinyint(1)", nullable: false), + Location = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + QtyAvail = table.Column(type: "double", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_StockStatus", x => x.StockStatusId); + table.ForeignKey( + name: "FK_StockStatus_RegItem_ItemID", + column: x => x.ItemID, + principalTable: "RegItem", + principalColumn: "ItemID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "JobRowItemList", + columns: table => new + { + JobStepItemID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + ItemID = table.Column(type: "int", nullable: false), + JobStepID = table.Column(type: "int", nullable: false), + Index = table.Column(type: "int", nullable: false), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProductivityRate = table.Column(type: "double", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_JobRowItemList", x => x.JobStepItemID); + table.ForeignKey( + name: "FK_JobRowItemList_JobRowList_JobStepID", + column: x => x.JobStepID, + principalTable: "JobRowList", + principalColumn: "JobStepID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_JobRowItemList_RegItem_ItemID", + column: x => x.ItemID, + principalTable: "RegItem", + principalColumn: "ItemID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "OrderRowList", + columns: table => new + { + OrderRowID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + OrderID = table.Column(type: "int", nullable: false), + SellingItemID = table.Column(type: "int", nullable: false), + BomCost = table.Column(type: "double", nullable: false), + Inserted = table.Column(type: "datetime(6)", nullable: false), + ItemSteps = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Modified = table.Column(type: "datetime(6)", nullable: false), + Note = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProductivityRate = table.Column(type: "double", nullable: false), + RowNum = table.Column(type: "int", nullable: false), + SerStruct = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_OrderRowList", x => x.OrderRowID); + table.ForeignKey( + name: "FK_OrderRowList_Order_OrderID", + column: x => x.OrderID, + principalTable: "Order", + principalColumn: "OrderID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_OrderRowList_SellingItem_SellingItemID", + column: x => x.SellingItemID, + principalTable: "SellingItem", + principalColumn: "SellingItemID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "StockMov", + columns: table => new + { + StockMovID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + MovCod = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + StockStatusId = table.Column(type: "int", nullable: false), + CodDoc = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DtCreate = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), + DtMod = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn), + Note = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + QtyRec = table.Column(type: "double", nullable: false), + UnitVal = table.Column(type: "double", nullable: false), + UserId = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_StockMov", x => x.StockMovID); + table.ForeignKey( + name: "FK_StockMov_RegMovType_MovCod", + column: x => x.MovCod, + principalTable: "RegMovType", + principalColumn: "MovCod", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_StockMov_StockStatus_StockStatusId", + column: x => x.StockStatusId, + principalTable: "StockStatus", + principalColumn: "StockStatusId", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "ProductionItem", + columns: table => new + { + ProdItemID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + OrderRowID = table.Column(type: "int", nullable: false), + ProductionBatchID = table.Column(type: "int", nullable: false), + ExtItemCode = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ItemCode = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ProductionItem", x => x.ProdItemID); + table.ForeignKey( + name: "FK_ProductionItem_OrderRowList_OrderRowID", + column: x => x.OrderRowID, + principalTable: "OrderRowList", + principalColumn: "OrderRowID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_ProductionItem_ProductionBatch_ProductionBatchID", + column: x => x.ProductionBatchID, + principalTable: "ProductionBatch", + principalColumn: "ProductionBatchID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "ProductionItemRowList", + columns: table => new + { + ProdItemStepID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + PhaseID = table.Column(type: "int", nullable: false), + ProdItemID = table.Column(type: "int", nullable: false), + ResourceID = table.Column(type: "int", nullable: false), + DateEnd = table.Column(type: "datetime(6)", nullable: true), + DateStart = table.Column(type: "datetime(6)", nullable: true), + Index = table.Column(type: "int", nullable: false), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProductivityRate = table.Column(type: "double", nullable: false), + WorkTime = table.Column(type: "double", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ProductionItemRowList", x => x.ProdItemStepID); + table.ForeignKey( + name: "FK_ProductionItemRowList_ProductionItem_ProdItemID", + column: x => x.ProdItemID, + principalTable: "ProductionItem", + principalColumn: "ProdItemID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_ProductionItemRowList_RegPhase_PhaseID", + column: x => x.PhaseID, + principalTable: "RegPhase", + principalColumn: "PhaseID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_ProductionItemRowList_RegResource_ResourceID", + column: x => x.ResourceID, + principalTable: "RegResource", + principalColumn: "ResourceID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.InsertData( + table: "GenClass", + columns: new[] { "ClassCod", "Name" }, + values: new object[,] + { + { "WoodCol", null }, + { "WoodMat", null } + }); + + migrationBuilder.InsertData( + table: "JobList", + columns: new[] { "JobID", "Name" }, + values: new object[,] + { + { 1, null }, + { 2, null } + }); + + migrationBuilder.InsertData( + table: "RegCustomer", + columns: new[] { "CustomerID", "CompanyName", "FirstName", "LastName", "VAT" }, + values: new object[,] + { + { 1, "", "Customer A", "Egalware", "1234567890123456" }, + { 2, "", "Customer B", "User", "1234567890123456" }, + { 3, "", "Customer C", "User Test", "1234567890123456" } + }); + + migrationBuilder.InsertData( + table: "RegDealer", + columns: new[] { "DealerID", "CompanyName", "FirstName", "LastName", "VAT" }, + values: new object[,] + { + { 1, "Company First", "Dealer A", "Egalware", "9587362514671527" }, + { 2, "Company First", "Dealer B", "User", "9587362514671527" }, + { 3, "Company Second", "Dealer C", "User Test", "9587362514671527" } + }); + + migrationBuilder.InsertData( + table: "RegItemGroup", + columns: new[] { "CodGroup", "Name" }, + values: new object[,] + { + { "WindowGlass", null }, + { "WindowHardware", null }, + { "WindowTrunk", null }, + { "WindowVarnish", null } + }); + + migrationBuilder.InsertData( + table: "RegMovType", + columns: new[] { "MovCod", "Name" }, + values: new object[,] + { + { "CAR", null }, + { "MOV", null }, + { "ND", null }, + { "OFOR", null }, + { "RETT", null }, + { "SCAR", null } + }); + + migrationBuilder.InsertData( + table: "RegPhase", + columns: new[] { "PhaseID", "Name" }, + values: new object[,] + { + { 1, null }, + { 2, null }, + { 3, null }, + { 4, null }, + { 5, null }, + { 6, null } + }); + + migrationBuilder.InsertData( + table: "RegResource", + columns: new[] { "ResourceID", "IsAsset", "IsHuman", "Name", "UmFix", "UmProp", "UnitCostFix", "UnitCostProp" }, + values: new object[,] + { + { 1, true, false, null, "€/h", "", 15.0, 0.0 }, + { 2, true, false, null, "€/h", "€/m", 240.0, 1.8999999999999999 }, + { 3, true, false, null, "€/h", "€/m", 90.0, 5.9000000000000004 }, + { 4, true, false, null, "€/h", "€/m", 40.0, 1.8999999999999999 }, + { 5, false, true, null, "€/h", "€/m", 10.0, 1.8999999999999999 }, + { 6, false, true, null, "", "€/h", 0.0, 40.0 }, + { 7, false, true, null, "", "€/h", 0.0, 40.0 } + }); + + migrationBuilder.InsertData( + table: "RegSupplier", + columns: new[] { "SupplierID", "CompanyName", "FirstName", "LastName", "VAT" }, + values: new object[,] + { + { 1, "Company One", "Supplier A", "Egalware", "7294857103879254" }, + { 2, "Company Two", "Supplier B", "User", "7294857103879254" }, + { 3, "Company Two", "Supplier C", "User Test", "7294857103879254" } + }); + + migrationBuilder.InsertData( + table: "RegTags", + columns: new[] { "TagID", "Name" }, + values: new object[,] + { + { 1, null }, + { 2, null }, + { 3, null }, + { 4, null }, + { 5, null } + }); + + migrationBuilder.InsertData( + table: "GenValue", + columns: new[] { "GenValID", "ClassCod", "Ordinal", "ValString" }, + values: new object[,] + { + { 1, "WoodMat", 1, "Pine" }, + { 2, "WoodMat", 2, "Maple" }, + { 3, "WoodCol", 1, "Legno" }, + { 4, "WoodCol", 2, "Bianco" }, + { 5, "WoodCol", 3, "Rosso" }, + { 6, "WoodCol", 4, "Nero" } + }); + + migrationBuilder.InsertData( + table: "Offer", + columns: new[] { "OfferID", "CustomerID", "DealerID", "Inserted", "Modified", "Name", "OffertState", "RefNum", "RefRev", "RefYear", "ValidUntil" }, + values: new object[] { 1, 2, 2, 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), null, 0, 1, 1, 2024, new DateTime(2025, 10, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9080) }); + + migrationBuilder.InsertData( + table: "RegItem", + columns: new[] { "ItemID", "BomCost", "CodGroup", "ExtItemCode", "IsService", "ItemCode", "ItemIDParent", "ItemType", "Margin", "Name", "QtyMax", "QtyMin", "SupplCode", "UM" }, + values: new object[,] + { + { 1, 0.0, "WindowTrunk", "", false, 1001, 0, 1, 0.29999999999999999, null, 0.0, 0.0, "BARR.001", "#" }, + { 2, 0.0, "WindowTrunk", "BARRA-60x80x12000", false, 1002, 0, 1, 0.20999999999999999, null, 0.0, 0.0, "ABC.00123.12000", "#" }, + { 3, 0.0, "WindowTrunk", "BARRA-60x80x8000", false, 1003, 0, 1, 0.22, null, 0.0, 0.0, "ABC.00123.8000", "#" }, + { 4, 0.0, "WindowTrunk", "BARRA-60x80x16000", false, 1004, 0, 1, 0.20000000000000001, null, 0.0, 0.0, "ABC.00123.16000", "#" }, + { 5, 0.0, "WindowGlass", "VETRO-3L-THERMO-800x1000", false, 2001, 0, 1, 0.20000000000000001, null, 0.0, 0.0, "V3T.800.1000", "m2" }, + { 6, 0.0, "WindowGlass", "VETRO-2L-800x1000", false, 2002, 0, 1, 0.14999999999999999, null, 0.0, 0.0, "V2.800.1000", "m2" }, + { 7, 0.0, "WindowGlass", "VETRO-3L-800x1000", false, 2003, 0, 1, 0.17999999999999999, null, 0.0, 0.0, "V3.800.1000", "m2" }, + { 8, 0.0, "WindowVarnish", "VERN-TRASP", false, 3001, 0, 1, 0.20000000000000001, null, 0.0, 0.0, "VT.STD", "l" }, + { 9, 0.0, "WindowHardware", "KIT-001", false, 5001, 0, 1, 0.20000000000000001, null, 0.0, 0.0, "AGB-KIT-001", "#" }, + { 10, 0.0, "WindowHardware", "CERN-001", false, 5002, 0, 1, 0.20000000000000001, null, 0.0, 0.0, "AGB-CERN-001", "#" }, + { 11, 0.0, "WindowHardware", "SERR-001", false, 5003, 0, 1, 0.20000000000000001, null, 0.0, 0.0, "AGB-SERR-001", "#" }, + { 12, 0.0, "WindowHardware", "MAN-001", false, 5004, 0, 1, 0.20000000000000001, null, 0.0, 0.0, "AGB-MAN-001", "#" } + }); + + migrationBuilder.InsertData( + table: "SellingItem", + columns: new[] { "SellingItemID", "BomCost", "ExtItemCode", "IsService", "ItemCode", "ItemSteps", "JobID", "Margin", "Name", "SerStruct", "SupplCode", "UM" }, + values: new object[,] + { + { 1, 0.0, "", false, 0, null, 2, 0.20000000000000001, null, "", "", "#" }, + { 2, 0.0, "", false, 0, null, 1, 0.10000000000000001, null, "", "", "#" }, + { 3, 0.0, "", true, 0, null, 1, 0.29999999999999999, null, "", "", "#" } + }); + + migrationBuilder.InsertData( + table: "OfferRowList", + columns: new[] { "OfferRowID", "BomCost", "BomOk", "Environment", "Inserted", "ItemBOM", "ItemOk", "ItemSteps", "Modified", "Note", "OfferID", "OfferRowUID", "ProductivityRate", "RowNum", "SellingItemID", "SerStruct" }, + values: new object[,] + { + { 1, 0.0, true, "WINDOW", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9186), "", true, null, new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9188), "Finestra anta singola 2025", 1, "OFF250000000001", 0.0, 1, 1, "{}" }, + { 2, 0.0, true, "WINDOW", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9200), "", true, null, new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9202), "Persiana per Finestra anta singola 2025", 1, "OFF250000000002", 0.0, 2, 2, "{}" }, + { 3, 0.0, true, "WINDOW", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9211), "", true, null, new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9213), "Installazione serramento", 1, "OFF250000000003", 0.0, 3, 3, "{}" } + }); + + migrationBuilder.InsertData( + table: "StockStatus", + columns: new[] { "StockStatusId", "IsDeleted", "IsRemn", "ItemID", "Location", "QtyAvail" }, + values: new object[,] + { + { 1, false, false, 1, "B001-001-003", 5.0 }, + { 2, false, false, 2, "B001-001-002", 8.0 }, + { 3, false, false, 3, "B001-001-001", 5.0 }, + { 4, false, false, 4, "V002-001-001", 1.0 }, + { 5, false, false, 5, "V001-001-002", 10.0 }, + { 6, false, false, 6, "V001-001-003", 1.0 }, + { 7, false, false, 8, "V001-001-003", 50.0 }, + { 8, false, false, 11, "S001-002-001", 1.0 }, + { 9, false, false, 9, "S001-002-001", 1.0 }, + { 10, false, false, 10, "S001-001-001", 1.0 } + }); + + migrationBuilder.InsertData( + table: "StockMov", + columns: new[] { "StockMovID", "CodDoc", "DtCreate", "MovCod", "Note", "QtyRec", "StockStatusId", "UnitVal", "UserId" }, + values: new object[,] + { + { 1, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8832), "CAR", "DEMO", 5.0, 1, 0.0, "samuele.locatelli@egalware.com" }, + { 2, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8883), "CAR", "DEMO", 8.0, 2, 0.0, "samuele.locatelli@egalware.com" }, + { 3, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8886), "CAR", "DEMO", 5.0, 3, 0.0, "samuele.locatelli@egalware.com" }, + { 4, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8890), "CAR", "DEMO", 1.0, 4, 0.0, "samuele.locatelli@egalware.com" }, + { 5, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8893), "CAR", "DEMO", 10.0, 5, 0.0, "samuele.locatelli@egalware.com" }, + { 6, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8897), "CAR", "DEMO", 1.0, 6, 0.0, "samuele.locatelli@egalware.com" }, + { 7, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8900), "CAR", "DEMO", 50.0, 7, 0.0, "samuele.locatelli@egalware.com" }, + { 8, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8903), "CAR", "DEMO", 1.0, 8, 0.0, "samuele.locatelli@egalware.com" }, + { 9, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8907), "CAR", "DEMO", 1.0, 9, 0.0, "samuele.locatelli@egalware.com" }, + { 10, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8910), "CAR", "DEMO", 1.0, 10, 0.0, "samuele.locatelli@egalware.com" } + }); + + migrationBuilder.CreateIndex( + name: "IX_GenValue_ClassCod", + table: "GenValue", + column: "ClassCod"); + + migrationBuilder.CreateIndex( + name: "IX_JobRowItemList_ItemID", + table: "JobRowItemList", + column: "ItemID"); + + migrationBuilder.CreateIndex( + name: "IX_JobRowItemList_JobStepID", + table: "JobRowItemList", + column: "JobStepID"); + + migrationBuilder.CreateIndex( + name: "IX_JobRowList_JobID", + table: "JobRowList", + column: "JobID"); + + migrationBuilder.CreateIndex( + name: "IX_JobRowList_PhaseID", + table: "JobRowList", + column: "PhaseID"); + + migrationBuilder.CreateIndex( + name: "IX_JobRowList_ResourceID", + table: "JobRowList", + column: "ResourceID"); + + migrationBuilder.CreateIndex( + name: "IX_Offer_CustomerID", + table: "Offer", + column: "CustomerID"); + + migrationBuilder.CreateIndex( + name: "IX_Offer_DealerID", + table: "Offer", + column: "DealerID"); + + migrationBuilder.CreateIndex( + name: "IX_OfferRowList_OfferID", + table: "OfferRowList", + column: "OfferID"); + + migrationBuilder.CreateIndex( + name: "IX_OfferRowList_SellingItemID", + table: "OfferRowList", + column: "SellingItemID"); + + migrationBuilder.CreateIndex( + name: "IX_Order_CustomerID", + table: "Order", + column: "CustomerID"); + + migrationBuilder.CreateIndex( + name: "IX_Order_DealerID", + table: "Order", + column: "DealerID"); + + migrationBuilder.CreateIndex( + name: "IX_Order_OfferID", + table: "Order", + column: "OfferID"); + + migrationBuilder.CreateIndex( + name: "IX_OrderRowList_OrderID", + table: "OrderRowList", + column: "OrderID"); + + migrationBuilder.CreateIndex( + name: "IX_OrderRowList_SellingItemID", + table: "OrderRowList", + column: "SellingItemID"); + + migrationBuilder.CreateIndex( + name: "IX_ProductionItem_OrderRowID", + table: "ProductionItem", + column: "OrderRowID"); + + migrationBuilder.CreateIndex( + name: "IX_ProductionItem_ProductionBatchID", + table: "ProductionItem", + column: "ProductionBatchID"); + + migrationBuilder.CreateIndex( + name: "IX_ProductionItemRowList_PhaseID", + table: "ProductionItemRowList", + column: "PhaseID"); + + migrationBuilder.CreateIndex( + name: "IX_ProductionItemRowList_ProdItemID", + table: "ProductionItemRowList", + column: "ProdItemID"); + + migrationBuilder.CreateIndex( + name: "IX_ProductionItemRowList_ResourceID", + table: "ProductionItemRowList", + column: "ResourceID"); + + migrationBuilder.CreateIndex( + name: "IX_RegItem_CodGroup", + table: "RegItem", + column: "CodGroup"); + + migrationBuilder.CreateIndex( + name: "IX_SellingItem_JobID", + table: "SellingItem", + column: "JobID"); + + migrationBuilder.CreateIndex( + name: "IX_StockMov_MovCod", + table: "StockMov", + column: "MovCod"); + + migrationBuilder.CreateIndex( + name: "IX_StockMov_StockStatusId", + table: "StockMov", + column: "StockStatusId"); + + migrationBuilder.CreateIndex( + name: "IX_StockStatus_ItemID", + table: "StockStatus", + column: "ItemID"); + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs index 7491dab7..28654a89 100644 --- a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs +++ b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs @@ -22,229 +22,201 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.CounterModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", b => { - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("CountName") - .HasColumnType("varchar(255)"); - - b.Property("Counter") - .HasColumnType("int"); - - b.HasKey("RefYear", "CountName"); - - b.ToTable("Counter"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.CustomerModel", b => - { - b.Property("CustomerID") + b.Property("CostDriverID") .ValueGeneratedOnAdd() .HasColumnType("int"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CostDriverID")); - b.Property("CompanyName") + b.Property("Descript") .IsRequired() .HasColumnType("longtext"); - b.Property("FirstName") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); - b.Property("LastName") + b.Property("Unit") .IsRequired() .HasColumnType("longtext"); - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); + b.HasKey("CostDriverID"); - b.HasKey("CustomerID"); - - b.ToTable("RegCustomer"); + b.ToTable("cost_driver"); b.HasData( new { - CustomerID = 1, - CompanyName = "", - FirstName = "Customer A", - LastName = "Egalware", - VAT = "1234567890123456" + CostDriverID = 1, + Descript = "Ore lavorate per step/fase", + Name = "WorkHour", + Unit = "h" }, new { - CustomerID = 2, - CompanyName = "", - FirstName = "Customer B", - LastName = "User", - VAT = "1234567890123456" + CostDriverID = 2, + Descript = "Metri prodotti per step/fase", + Name = "Meter", + Unit = "m" }, new { - CustomerID = 3, - CompanyName = "", - FirstName = "Customer C", - LastName = "User Test", - VAT = "1234567890123456" + CostDriverID = 3, + Descript = "Numero unità prodotte (lavorate) per step/fase", + Name = "Unit", + Unit = "#" }); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.DealerModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => { - b.Property("DealerID") + b.Property("ResourceID") .ValueGeneratedOnAdd() .HasColumnType("int"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); + b.Property("CostDriverBudget") + .HasColumnType("decimal(65,30)"); - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("DealerID"); - - b.ToTable("RegDealer"); - - b.HasData( - new - { - DealerID = 1, - CompanyName = "Company First", - FirstName = "Dealer A", - LastName = "Egalware", - VAT = "9587362514671527" - }, - new - { - DealerID = 2, - CompanyName = "Company First", - FirstName = "Dealer B", - LastName = "User", - VAT = "9587362514671527" - }, - new - { - DealerID = 3, - CompanyName = "Company Second", - FirstName = "Dealer C", - LastName = "User Test", - VAT = "9587362514671527" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.GenClassModel", b => - { - b.Property("ClassCod") - .HasColumnType("varchar(255)"); - - b.Property("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("GenValID") - .ValueGeneratedOnAdd() + b.Property("CostDriverID") .HasColumnType("int"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); + b.Property("EBTPerc") + .HasColumnType("decimal(65,30)"); - b.Property("ClassCod") - .IsRequired() - .HasColumnType("varchar(255)"); + b.Property("FixedCost") + .HasColumnType("decimal(65,30)"); - b.Property("Ordinal") - .HasColumnType("int"); + b.Property("LaborCost") + .HasColumnType("decimal(65,30)"); - b.Property("ValString") + b.Property("Name") .IsRequired() .HasColumnType("longtext"); - b.HasKey("GenValID"); + b.Property("OverHeadCost") + .HasColumnType("decimal(65,30)"); - b.HasIndex("ClassCod"); + b.Property("OverHeadPerc") + .HasColumnType("decimal(65,30)"); - b.ToTable("GenValue"); + b.Property("PriceMargin") + .HasColumnType("decimal(65,30)"); + + b.Property("VariableCost") + .HasColumnType("decimal(65,30)"); + + b.HasKey("ResourceID"); + + b.HasIndex("CostDriverID"); + + b.ToTable("cost_resource"); b.HasData( new { - GenValID = 1, - ClassCod = "WoodMat", - Ordinal = 1, - ValString = "Pine" + ResourceID = 1, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 12000m, + LaborCost = 30m, + Name = "Sezionatrice", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m }, new { - GenValID = 2, - ClassCod = "WoodMat", - Ordinal = 2, - ValString = "Maple" + ResourceID = 2, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 100000m, + LaborCost = 40m, + Name = "Linea SAOMAD WoodPecker Just 3500", + OverHeadCost = 15000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 30000m }, new { - GenValID = 3, - ClassCod = "WoodCol", - Ordinal = 1, - ValString = "Legno" + ResourceID = 3, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 35m, + Name = "Linea Pantografo", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m }, new { - GenValID = 4, - ClassCod = "WoodCol", - Ordinal = 2, - ValString = "Bianco" + ResourceID = 4, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 30m, + Name = "Stazione Verniciatura", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m }, new { - GenValID = 5, - ClassCod = "WoodCol", - Ordinal = 3, - ValString = "Rosso" + ResourceID = 5, + CostDriverBudget = 220m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 6000m, + LaborCost = 30m, + Name = "Verniciatura Manuale", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 2000m }, new { - GenValID = 6, - ClassCod = "WoodCol", - Ordinal = 4, - ValString = "Nero" + ResourceID = 6, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 500m, + LaborCost = 30m, + Name = "Montaggio Manuale", + OverHeadCost = 500m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 500m + }, + new + { + ResourceID = 7, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 0m, + LaborCost = 40m, + Name = "Installatore", + OverHeadCost = 0m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 3000m }); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ItemGroupModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", b => { b.Property("CodGroup") .HasColumnType("varchar(255)"); @@ -255,7 +227,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.HasKey("CodGroup"); - b.ToTable("RegItemGroup"); + b.ToTable("item_group"); b.HasData( new @@ -280,7 +252,7 @@ namespace EgwCoreLib.Lux.Data.Migrations }); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ItemModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => { b.Property("ItemID") .ValueGeneratedOnAdd() @@ -336,7 +308,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.HasIndex("CodGroup"); - b.ToTable("RegItem"); + b.ToTable("item_item"); b.HasData( new @@ -545,104 +517,231 @@ namespace EgwCoreLib.Lux.Data.Migrations }); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => { - b.Property("JobID") + b.Property("SellingItemID") .ValueGeneratedOnAdd() .HasColumnType("int"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("JobID"); - - b.ToTable("JobList"); - - b.HasData( - new - { - JobID = 1, - Description = "Rivendita / servizi" - }, - new - { - JobID = 2, - Description = "Serramento Completo Legno su linea Saomad e installatore interno" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowItemModel", b => - { - b.Property("JobRowItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobRowItemID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("ItemID") - .HasColumnType("int"); - - b.Property("JobRowID") - .HasColumnType("int"); - - b.Property("Qty") + b.Property("Cost") .HasColumnType("double"); - b.HasKey("JobRowItemID"); + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); - b.HasIndex("ItemID"); + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); - b.HasIndex("JobRowID"); + b.Property("IsService") + .HasColumnType("tinyint(1)"); - b.ToTable("JobRowItemList"); + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SellingItemID"); + + b.HasIndex("JobID"); + + b.ToTable("item_selling_item"); b.HasData( new { - JobRowItemID = 1, - Description = "Grezzo legno abete", - Index = 1, - ItemID = 1, - JobRowID = 1, - Qty = 1.0 + SellingItemID = 1, + Cost = 820.0, + Description = "Finestra anta Singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 2, + Margin = 0.20000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" }, new { - JobRowItemID = 2, - Description = "Vernice trasparente standard 1L", - Index = 2, - ItemID = 8, - JobRowID = 3, - Qty = 0.10000000000000001 + SellingItemID = 2, + Cost = 150.0, + Description = "Persiana anta singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.10000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" }, new { - JobRowItemID = 3, - Description = "Ferramenta AGB - rif. AGFD.00000.00000", - Index = 3, - ItemID = 9, - JobRowID = 4, - Qty = 1.0 + SellingItemID = 3, + Cost = 200.0, + Description = "Installazione", + ExtItemCode = "", + IsService = true, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" }); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SupplierModel", b => { - b.Property("JobRowID") + b.Property("SupplierID") .ValueGeneratedOnAdd() .HasColumnType("int"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobRowID")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SupplierID"); + + b.ToTable("item_supplier"); + + b.HasData( + new + { + SupplierID = 1, + CompanyName = "Company One", + FirstName = "Supplier A", + LastName = "Egalware", + VAT = "7294857103879254" + }, + new + { + SupplierID = 2, + CompanyName = "Company Two", + FirstName = "Supplier B", + LastName = "User", + VAT = "7294857103879254" + }, + new + { + SupplierID = 3, + CompanyName = "Company Two", + FirstName = "Supplier C", + LastName = "User Test", + VAT = "7294857103879254" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", b => + { + b.Property("ProductionBatchID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DueDate") + .HasColumnType("datetime(6)"); + + b.HasKey("ProductionBatchID"); + + b.ToTable("production_batch"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.Property("ProdItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("OrderRowID") + .HasColumnType("int"); + + b.Property("ProductionBatchID") + .HasColumnType("int"); + + b.HasKey("ProdItemID"); + + b.HasIndex("OrderRowID"); + + b.HasIndex("ProductionBatchID"); + + b.ToTable("production_item"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.Property("ProdItemStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); b.Property("Description") .IsRequired() @@ -651,128 +750,143 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("Index") .HasColumnType("int"); - b.Property("JobID") - .HasColumnType("int"); - b.Property("PhaseID") .HasColumnType("int"); + b.Property("ProdItemID") + .HasColumnType("int"); + b.Property("Qty") .HasColumnType("double"); b.Property("ResourceID") .HasColumnType("int"); - b.HasKey("JobRowID"); + b.Property("WorkTime") + .HasColumnType("double"); - b.HasIndex("JobID"); + b.HasKey("ProdItemStepID"); b.HasIndex("PhaseID"); + b.HasIndex("ProdItemID"); + b.HasIndex("ResourceID"); - b.ToTable("JobRowList"); - - b.HasData( - new - { - JobRowID = 1, - Description = "", - Index = 1, - JobID = 2, - PhaseID = 1, - Qty = 1.0, - ResourceID = 1 - }, - new - { - JobRowID = 2, - Description = "", - Index = 2, - JobID = 2, - PhaseID = 2, - Qty = 1.0, - ResourceID = 2 - }, - new - { - JobRowID = 3, - Description = "", - Index = 3, - JobID = 2, - PhaseID = 3, - Qty = 1.0, - ResourceID = 4 - }, - new - { - JobRowID = 4, - Description = "", - Index = 4, - JobID = 2, - PhaseID = 4, - Qty = 1.0, - ResourceID = 6 - }, - new - { - JobRowID = 5, - Description = "", - Index = 5, - JobID = 2, - PhaseID = 6, - Qty = 1.0, - ResourceID = 7 - }); + b.ToTable("production_item_step"); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.MovTypeModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", b => { - b.Property("MovCod") - .HasColumnType("varchar(255)"); + b.Property("CustomerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); - b.Property("Description") + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); + + b.Property("CompanyName") .IsRequired() .HasColumnType("longtext"); - b.HasKey("MovCod"); + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); - b.ToTable("RegMovType"); + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CustomerID"); + + b.ToTable("sales_customer"); b.HasData( new { - MovCod = "CAR", - Description = "Carico a magazzino" + CustomerID = 1, + CompanyName = "", + FirstName = "Customer A", + LastName = "Egalware", + VAT = "1234567890123456" }, new { - MovCod = "MOV", - Description = "Movimento interno (spostamento)" + CustomerID = 2, + CompanyName = "", + FirstName = "Customer B", + LastName = "User", + VAT = "1234567890123456" }, new { - MovCod = "ND", - Description = "Non Definito" - }, - new - { - MovCod = "OFOR", - Description = "Ordine Fornitore" - }, - new - { - MovCod = "RETT", - Description = "Rettifica magazzino" - }, - new - { - MovCod = "SCAR", - Description = "Scarico da magazzino" + CustomerID = 3, + CompanyName = "", + FirstName = "Customer C", + LastName = "User Test", + VAT = "1234567890123456" }); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", b => + { + b.Property("DealerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("DealerID"); + + b.ToTable("sales_dealer"); + + b.HasData( + new + { + DealerID = 1, + CompanyName = "Company First", + FirstName = "Dealer A", + LastName = "Egalware", + VAT = "9587362514671527" + }, + new + { + DealerID = 2, + CompanyName = "Company First", + FirstName = "Dealer B", + LastName = "User", + VAT = "9587362514671527" + }, + new + { + DealerID = 3, + CompanyName = "Company Second", + FirstName = "Dealer C", + LastName = "User Test", + VAT = "9587362514671527" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => { b.Property("OfferID") .ValueGeneratedOnAdd() @@ -817,7 +931,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.HasIndex("DealerID"); - b.ToTable("Offer"); + b.ToTable("sales_offer"); b.HasData( new @@ -826,17 +940,17 @@ namespace EgwCoreLib.Lux.Data.Migrations CustomerID = 2, DealerID = 2, Description = "Offerta per tre serramenti", - 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), + Inserted = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1216), + Modified = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1218), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 10, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9080) + ValidUntil = new DateTime(2025, 10, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1213) }); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferRowModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferRowModel", b => { b.Property("OfferRowID") .ValueGeneratedOnAdd() @@ -844,10 +958,13 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); + b.Property("BomCost") + .HasColumnType("double"); + b.Property("BomOk") .HasColumnType("tinyint(1)"); - b.Property("Cost") + b.Property("BomPrice") .HasColumnType("double"); b.Property("Environment") @@ -864,7 +981,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("ItemOk") .HasColumnType("tinyint(1)"); - b.Property("ItemSPP") + b.Property("ItemSteps") .IsRequired() .HasColumnType("longtext"); @@ -895,75 +1012,90 @@ namespace EgwCoreLib.Lux.Data.Migrations .IsRequired() .HasColumnType("longtext"); + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + b.HasKey("OfferRowID"); b.HasIndex("OfferID"); b.HasIndex("SellingItemID"); - b.ToTable("OfferRowList"); + b.ToTable("sales_offer_row"); b.HasData( new { OfferRowID = 1, + BomCost = 950.0, BomOk = true, - Cost = 950.0, + BomPrice = 0.0, Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9186), + Inserted = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1314), ItemBOM = "", ItemOk = true, - ItemSPP = "{}", - Modified = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9188), + ItemSteps = "{}", + Modified = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1317), Note = "Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000001", Qty = 3.0, RowNum = 1, SellingItemID = 1, - SerStruct = "{}" + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 }, new { OfferRowID = 2, + BomCost = 160.0, BomOk = true, - Cost = 160.0, + BomPrice = 0.0, Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9200), + Inserted = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1336), ItemBOM = "", ItemOk = true, - ItemSPP = "{}", - Modified = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9202), + ItemSteps = "{}", + Modified = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1338), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000002", Qty = 3.0, RowNum = 2, SellingItemID = 2, - SerStruct = "{}" + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 }, new { OfferRowID = 3, + BomCost = 200.0, BomOk = true, - Cost = 200.0, + BomPrice = 0.0, Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9211), + Inserted = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1350), ItemBOM = "", ItemOk = true, - ItemSPP = "{}", - Modified = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9213), + ItemSteps = "{}", + Modified = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1352), Note = "Installazione serramento", OfferID = 1, OfferRowUID = "OFF250000000003", Qty = 3.0, RowNum = 3, SellingItemID = 3, - SerStruct = "{}" + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 }); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", b => { b.Property("OrderID") .ValueGeneratedOnAdd() @@ -1013,10 +1145,10 @@ namespace EgwCoreLib.Lux.Data.Migrations b.HasIndex("OfferID"); - b.ToTable("Order"); + b.ToTable("sales_order"); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderRowModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => { b.Property("OrderRowID") .ValueGeneratedOnAdd() @@ -1024,13 +1156,16 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); - b.Property("Cost") + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomPrice") .HasColumnType("double"); b.Property("Inserted") .HasColumnType("datetime(6)"); - b.Property("ItemSPP") + b.Property("ItemSteps") .IsRequired() .HasColumnType("longtext"); @@ -1057,385 +1192,22 @@ namespace EgwCoreLib.Lux.Data.Migrations .IsRequired() .HasColumnType("longtext"); + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + b.HasKey("OrderRowID"); b.HasIndex("OrderID"); b.HasIndex("SellingItemID"); - b.ToTable("OrderRowList"); + b.ToTable("sales_order_row"); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.PhaseModel", b => - { - b.Property("PhaseID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("PhaseID"); - - b.ToTable("RegPhase"); - - b.HasData( - new - { - PhaseID = 1, - Description = "Taglio tronchetti" - }, - new - { - PhaseID = 2, - Description = "Lavorazione pezzi serramento" - }, - new - { - PhaseID = 3, - Description = "Verniciatura" - }, - new - { - PhaseID = 4, - Description = "Assemblaggio completo" - }, - new - { - PhaseID = 5, - Description = "Assemblaggio Ferramenta" - }, - new - { - PhaseID = 6, - Description = "Installazione e posa in opera" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionBatchModel", b => - { - b.Property("ProductionBatchID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("DueDate") - .HasColumnType("datetime(6)"); - - b.HasKey("ProductionBatchID"); - - b.ToTable("ProductionBatch"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemModel", b => - { - b.Property("ProdItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("OrderRowID") - .HasColumnType("int"); - - b.Property("ProductionBatchID") - .HasColumnType("int"); - - b.HasKey("ProdItemID"); - - b.HasIndex("OrderRowID"); - - b.HasIndex("ProductionBatchID"); - - b.ToTable("ProductionItem"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemRowModel", b => - { - b.Property("ProdItemRowID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemRowID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("PhaseID") - .HasColumnType("int"); - - b.Property("ProdItemID") - .HasColumnType("int"); - - b.Property("Qty") - .HasColumnType("double"); - - b.Property("ResourceID") - .HasColumnType("int"); - - b.Property("WorkTime") - .HasColumnType("double"); - - b.HasKey("ProdItemRowID"); - - b.HasIndex("PhaseID"); - - b.HasIndex("ProdItemID"); - - b.HasIndex("ResourceID"); - - b.ToTable("ProductionItemRowList"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ResourceModel", b => - { - b.Property("ResourceID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsAsset") - .HasColumnType("tinyint(1)"); - - b.Property("IsHuman") - .HasColumnType("tinyint(1)"); - - b.Property("UmFix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UmProp") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UnitCostFix") - .HasColumnType("double"); - - b.Property("UnitCostProp") - .HasColumnType("double"); - - b.HasKey("ResourceID"); - - b.ToTable("RegResource"); - - b.HasData( - new - { - ResourceID = 1, - Description = "Sezionatrice", - IsAsset = true, - IsHuman = false, - UmFix = "€/h", - UmProp = "", - UnitCostFix = 15.0, - UnitCostProp = 0.0 - }, - new - { - ResourceID = 2, - Description = "Linea SAOMAD WoodPecker Just 3500", - IsAsset = true, - IsHuman = false, - UmFix = "€/h", - UmProp = "€/m", - UnitCostFix = 240.0, - UnitCostProp = 1.8999999999999999 - }, - new - { - ResourceID = 3, - Description = "Linea Pantografo", - IsAsset = true, - IsHuman = false, - UmFix = "€/h", - UmProp = "€/m", - UnitCostFix = 90.0, - UnitCostProp = 5.9000000000000004 - }, - new - { - ResourceID = 4, - Description = "Stazione Verniciatura", - IsAsset = true, - IsHuman = false, - UmFix = "€/h", - UmProp = "€/m", - UnitCostFix = 40.0, - UnitCostProp = 1.8999999999999999 - }, - new - { - ResourceID = 5, - Description = "Verniciatura Manuale", - IsAsset = false, - IsHuman = true, - UmFix = "€/h", - UmProp = "€/m", - UnitCostFix = 10.0, - UnitCostProp = 1.8999999999999999 - }, - new - { - ResourceID = 6, - Description = "Montaggio Manuale", - IsAsset = false, - IsHuman = true, - UmFix = "", - UmProp = "€/h", - UnitCostFix = 0.0, - UnitCostProp = 40.0 - }, - new - { - ResourceID = 7, - Description = "Installatore", - IsAsset = false, - IsHuman = true, - UmFix = "", - UmProp = "€/h", - UnitCostFix = 0.0, - UnitCostProp = 40.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", b => - { - b.Property("SellingItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); - - b.Property("Cost") - .HasColumnType("double"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsService") - .HasColumnType("tinyint(1)"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("ItemSPP") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("JobID") - .HasColumnType("int"); - - b.Property("Margin") - .HasColumnType("double"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UM") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SellingItemID"); - - b.HasIndex("JobID"); - - b.ToTable("SellingItem"); - - b.HasData( - new - { - SellingItemID = 1, - Cost = 820.0, - Description = "Finestra anta Singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSPP = "", - JobID = 2, - Margin = 0.20000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 2, - Cost = 150.0, - Description = "Persiana anta singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSPP = "", - JobID = 1, - Margin = 0.10000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 3, - Cost = 200.0, - Description = "Installazione", - ExtItemCode = "", - IsService = true, - ItemCode = 0, - ItemSPP = "", - JobID = 1, - Margin = 0.29999999999999999, - SerStruct = "", - SupplCode = "", - UM = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockMovModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => { b.Property("StockMovID") .ValueGeneratedOnAdd() @@ -1486,15 +1258,15 @@ namespace EgwCoreLib.Lux.Data.Migrations b.HasIndex("StockStatusId"); - b.ToTable("StockMov"); + b.ToTable("stock_mov"); b.HasData( new { StockMovID = 1, CodDoc = "", - 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), + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(844), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(889), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1506,8 +1278,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - 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), + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(892), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(894), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -1519,8 +1291,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - 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), + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(897), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(898), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1532,8 +1304,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - 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), + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(901), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(903), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1545,8 +1317,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - 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), + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(905), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(907), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -1558,8 +1330,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - 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), + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(909), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(911), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1571,8 +1343,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - 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), + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(914), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(915), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -1584,8 +1356,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - 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), + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(918), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(920), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1597,8 +1369,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - 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), + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(922), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(924), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1610,8 +1382,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - 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), + DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(927), + DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(928), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1621,7 +1393,7 @@ namespace EgwCoreLib.Lux.Data.Migrations }); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockStatusModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => { b.Property("StockStatusId") .ValueGeneratedOnAdd() @@ -1649,7 +1421,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.HasIndex("ItemID"); - b.ToTable("StockStatus"); + b.ToTable("stock_status"); b.HasData( new @@ -1744,62 +1516,405 @@ namespace EgwCoreLib.Lux.Data.Migrations }); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.SupplierModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => { - b.Property("SupplierID") + b.Property("JobID") .ValueGeneratedOnAdd() .HasColumnType("int"); - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); - b.Property("CompanyName") + b.Property("Description") .IsRequired() .HasColumnType("longtext"); - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); + b.HasKey("JobID"); - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SupplierID"); - - b.ToTable("RegSupplier"); + b.ToTable("task_job"); b.HasData( new { - SupplierID = 1, - CompanyName = "Company One", - FirstName = "Supplier A", - LastName = "Egalware", - VAT = "7294857103879254" + JobID = 1, + Description = "Rivendita / servizi" }, new { - SupplierID = 2, - CompanyName = "Company Two", - FirstName = "Supplier B", - LastName = "User", - VAT = "7294857103879254" - }, - new - { - SupplierID = 3, - CompanyName = "Company Two", - FirstName = "Supplier C", - LastName = "User Test", - VAT = "7294857103879254" + JobID = 2, + Description = "Serramento Completo Legno su linea Saomad e installatore interno" }); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.TagsModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.Property("JobStepItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("JobStepID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.HasKey("JobStepItemID"); + + b.HasIndex("ItemID"); + + b.HasIndex("JobStepID"); + + b.ToTable("task_job_step_item"); + + b.HasData( + new + { + JobStepItemID = 1, + Description = "Grezzo legno abete", + Index = 1, + ItemID = 1, + JobStepID = 1, + Qty = 1.0 + }, + new + { + JobStepItemID = 2, + Description = "Vernice trasparente standard 1L", + Index = 2, + ItemID = 8, + JobStepID = 3, + Qty = 0.10000000000000001 + }, + new + { + JobStepItemID = 3, + Description = "Ferramenta AGB - rif. AGFD.00000.00000", + Index = 3, + ItemID = 9, + JobStepID = 4, + Qty = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.Property("JobStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProductivityRate") + .HasColumnType("decimal(65,30)"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.HasKey("JobStepID"); + + b.HasIndex("CostDriverID"); + + b.HasIndex("JobID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ResourceID"); + + b.ToTable("task_job_step"); + + b.HasData( + new + { + JobStepID = 1, + CostDriverID = 3, + Description = "", + Index = 1, + JobID = 2, + PhaseID = 1, + ProductivityRate = 1m, + ResourceID = 1 + }, + new + { + JobStepID = 2, + CostDriverID = 2, + Description = "", + Index = 2, + JobID = 2, + PhaseID = 2, + ProductivityRate = 1m, + ResourceID = 2 + }, + new + { + JobStepID = 3, + CostDriverID = 3, + Description = "", + Index = 3, + JobID = 2, + PhaseID = 3, + ProductivityRate = 1m, + ResourceID = 4 + }, + new + { + JobStepID = 4, + CostDriverID = 3, + Description = "", + Index = 4, + JobID = 2, + PhaseID = 4, + ProductivityRate = 1m, + ResourceID = 6 + }, + new + { + JobStepID = 5, + CostDriverID = 3, + Description = "", + Index = 5, + JobID = 2, + PhaseID = 6, + ProductivityRate = 1m, + ResourceID = 7 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", b => + { + b.Property("PhaseID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("PhaseID"); + + b.ToTable("task_phase"); + + b.HasData( + new + { + PhaseID = 1, + Description = "Taglio tronchetti" + }, + new + { + PhaseID = 2, + Description = "Lavorazione pezzi serramento" + }, + new + { + PhaseID = 3, + Description = "Verniciatura" + }, + new + { + PhaseID = 4, + Description = "Assemblaggio completo" + }, + new + { + PhaseID = 5, + Description = "Assemblaggio Ferramenta" + }, + new + { + PhaseID = 6, + Description = "Installazione e posa in opera" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.CounterModel", b => + { + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("CountName") + .HasColumnType("varchar(255)"); + + b.Property("Counter") + .HasColumnType("int"); + + b.HasKey("RefYear", "CountName"); + + b.ToTable("utils_counter"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Property("ClassCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ClassCod"); + + b.ToTable("utils_gen_class"); + + b.HasData( + new + { + ClassCod = "WoodMat", + Description = "Elenco Materiali Legno" + }, + new + { + ClassCod = "WoodCol", + Description = "Elenco Colori Legno" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.Property("GenValID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); + + b.Property("ClassCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Ordinal") + .HasColumnType("int"); + + b.Property("ValString") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("GenValID"); + + b.HasIndex("ClassCod"); + + b.ToTable("utils_gen_value"); + + 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 = "Legno" + }, + 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.Utils.MovTypeModel", b => + { + b.Property("MovCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("MovCod"); + + b.ToTable("utils_mov_type"); + + b.HasData( + new + { + MovCod = "CAR", + Description = "Carico a magazzino" + }, + new + { + MovCod = "MOV", + Description = "Movimento interno (spostamento)" + }, + new + { + MovCod = "ND", + Description = "Non Definito" + }, + new + { + MovCod = "OFOR", + Description = "Ordine Fornitore" + }, + new + { + MovCod = "RETT", + Description = "Rettifica magazzino" + }, + new + { + MovCod = "SCAR", + Description = "Scarico da magazzino" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", b => { b.Property("TagID") .ValueGeneratedOnAdd() @@ -1813,7 +1928,7 @@ namespace EgwCoreLib.Lux.Data.Migrations b.HasKey("TagID"); - b.ToTable("RegTags"); + b.ToTable("utils_tags"); b.HasData( new @@ -1843,20 +1958,20 @@ namespace EgwCoreLib.Lux.Data.Migrations }); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.GenValueModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.GenClassModel", "GenClassNav") + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") .WithMany() - .HasForeignKey("ClassCod") + .HasForeignKey("CostDriverID") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.Navigation("GenClassNav"); + b.Navigation("DriverNav"); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ItemModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ItemGroupModel", "ItemGroupNav") + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", "ItemGroupNav") .WithMany() .HasForeignKey("CodGroup") .OnDelete(DeleteBehavior.Restrict) @@ -1865,145 +1980,26 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Navigation("ItemGroupNav"); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowItemModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ItemModel", "ItemNav") - .WithMany() - .HasForeignKey("ItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobRowModel", "JobRowNav") - .WithMany() - .HasForeignKey("JobRowID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemNav"); - - b.Navigation("JobRowNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobModel", "JobNav") + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") .WithMany() .HasForeignKey("JobID") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.HasOne("EgwCoreLib.Lux.Data.DbModel.PhaseModel", "PhaseNav") - .WithMany() - .HasForeignKey("PhaseID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ResourceModel", "ResourceNav") - .WithMany() - .HasForeignKey("ResourceID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - b.Navigation("JobNav"); - - b.Navigation("PhaseNav"); - - b.Navigation("ResourceNav"); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.CustomerModel", "CustomerNav") - .WithMany() - .HasForeignKey("CustomerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.DealerModel", "DealerNav") - .WithMany() - .HasForeignKey("DealerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CustomerNav"); - - b.Navigation("DealerNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.OfferModel", "OfferNav") - .WithMany("OfferRowNav") - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OfferNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.CustomerModel", "CustomerNav") - .WithMany() - .HasForeignKey("CustomerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.DealerModel", "DealerNav") - .WithMany() - .HasForeignKey("DealerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.OfferModel", "OfferNav") - .WithMany() - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CustomerNav"); - - b.Navigation("DealerNav"); - - b.Navigation("OfferNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.OrderModel", "OrderNav") - .WithMany() - .HasForeignKey("OrderID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OrderNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.OrderRowModel", "OrderRowNav") + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", "OrderRowNav") .WithMany() .HasForeignKey("OrderRowID") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ProductionBatchModel", "ProductionBatchNav") + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", "ProductionBatchNav") .WithMany() .HasForeignKey("ProductionBatchID") .OnDelete(DeleteBehavior.Restrict) @@ -2014,21 +2010,21 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Navigation("ProductionBatchNav"); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemRowModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.PhaseModel", "PhaseNav") + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") .WithMany() .HasForeignKey("PhaseID") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ProductionItemModel", "ProdItemNav") + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", "ProdItemNav") .WithMany() .HasForeignKey("ProdItemID") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ResourceModel", "ResourceNav") + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") .WithMany() .HasForeignKey("ResourceID") .OnDelete(DeleteBehavior.Restrict) @@ -2041,26 +2037,99 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Navigation("ResourceNav"); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobModel", "JobNav") + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", "CustomerNav") .WithMany() - .HasForeignKey("JobID") + .HasForeignKey("CustomerID") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.Navigation("JobNav"); + 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.StockMovModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferRowModel", b => { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.MovTypeModel", "MovTypeNav") + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany("OfferRowNav") + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OfferNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", 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.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany() + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CustomerNav"); + + b.Navigation("DealerNav"); + + b.Navigation("OfferNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", "OrderNav") + .WithMany() + .HasForeignKey("OrderID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", "MovTypeNav") .WithMany() .HasForeignKey("MovCod") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); - b.HasOne("EgwCoreLib.Lux.Data.DbModel.StockStatusModel", "StockStatusNav") + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", "StockStatusNav") .WithMany() .HasForeignKey("StockStatusId") .OnDelete(DeleteBehavior.Restrict) @@ -2071,9 +2140,9 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Navigation("StockStatusNav"); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockStatusModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ItemModel", "ItemNav") + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") .WithMany() .HasForeignKey("ItemID") .OnDelete(DeleteBehavior.Restrict) @@ -2082,10 +2151,85 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Navigation("ItemNav"); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferModel", b => + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", "JobStepNav") + .WithMany() + .HasForeignKey("JobStepID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") + .WithMany("JobStepNav") + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + + b.Navigation("JobNav"); + + b.Navigation("PhaseNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", "GenClassNav") + .WithMany("GenValNav") + .HasForeignKey("ClassCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GenClassNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => { b.Navigation("OfferRowNav"); }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => + { + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Navigation("GenValNav"); + }); #pragma warning restore 612, 618 } } diff --git a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs index 58e2d2f0..cc450523 100644 --- a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs +++ b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs @@ -1,14 +1,15 @@ -using EgwCoreLib.Lux.Data.DbModel; -using EgwCoreLib.Lux.Data.DbModel.General; -using EgwCoreLib.Lux.Data.DbModel.Identity; -using EgwCoreLib.Lux.Data.DbModel.Production; +using EgwCoreLib.Lux.Data.DbModel.Cost; +using EgwCoreLib.Lux.Data.DbModel.Utils; using EgwCoreLib.Lux.Data.DbModel.Sales; +using EgwCoreLib.Lux.Data.DbModel.Task; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using EgwCoreLib.Lux.Data.DbModel.Stock; +using EgwCoreLib.Lux.Data.DbModel.Items; namespace EgwCoreLib.Lux.Data { @@ -153,15 +154,23 @@ namespace EgwCoreLib.Lux.Data new StockMovModel { StockMovID = 10, StockStatusId = 10, QtyRec = 1, MovCod = "CAR", UserId = "samuele.locatelli@egalware.com", Note = "DEMO" } ); + // init cost drivers + modelBuilder.Entity().HasData( + // Risorsa principale di calcolo produttività/costi + new CostDriverModel() { CostDriverID = 1, Name = "WorkHour", Unit = "h", Descript = "Ore lavorate per step/fase"}, + new CostDriverModel() { CostDriverID = 2, Name = "Meter", Unit = "m", Descript = "Metri prodotti per step/fase" }, + new CostDriverModel() { CostDriverID = 3, Name = "Unit", Unit = "#", Descript = "Numero unità prodotte (lavorate) per step/fase" } + ); + // inizializzazione risorse modelBuilder.Entity().HasData( - new ResourceModel { ResourceID = 1, Description = "Sezionatrice", IsAsset = true, IsHuman = false, UnitCostFix = 15, UmFix = "€/h" }, - new ResourceModel { ResourceID = 2, Description = "Linea SAOMAD WoodPecker Just 3500", IsAsset = true, IsHuman = false, UnitCostFix = 240, UmFix = "€/h", UnitCostProp = 1.9, UmProp = "€/m" }, - new ResourceModel { ResourceID = 3, Description = "Linea Pantografo", IsAsset = true, IsHuman = false, UnitCostFix = 90, UmFix = "€/h", UnitCostProp = 5.9, UmProp = "€/m" }, - new ResourceModel { ResourceID = 4, Description = "Stazione Verniciatura", IsAsset = true, IsHuman = false, UnitCostFix = 40, UmFix = "€/h", UnitCostProp = 1.9, UmProp = "€/m" }, - new ResourceModel { ResourceID = 5, Description = "Verniciatura Manuale", IsAsset = false, IsHuman = true, UnitCostFix = 10, UmFix = "€/h", UnitCostProp = 1.9, UmProp = "€/m" }, - new ResourceModel { ResourceID = 6, Description = "Montaggio Manuale", IsAsset = false, IsHuman = true, UnitCostProp = 40, UmProp = "€/h" }, - new ResourceModel { ResourceID = 7, Description = "Installatore", IsAsset = false, IsHuman = true, UnitCostProp = 40, UmProp = "€/h" } + new ResourceModel { ResourceID = 1, Name = "Sezionatrice", FixedCost = 12000, VariableCost=6000 , OverHeadCost= 5000, CostDriverID = 1 , CostDriverBudget= 220*4, LaborCost=30, OverHeadPerc=0.15M, EBTPerc=0.15M }, + new ResourceModel { ResourceID = 2, Name = "Linea SAOMAD WoodPecker Just 3500", FixedCost = 100000, VariableCost = 30000, OverHeadCost = 15000, CostDriverID = 1, CostDriverBudget = 220 * 8, LaborCost = 40, OverHeadPerc = 0.15M, EBTPerc = 0.15M }, + new ResourceModel { ResourceID = 3, Name = "Linea Pantografo", FixedCost = 24000, VariableCost = 6000, OverHeadCost = 5000, CostDriverID = 1, CostDriverBudget = 220 * 8, LaborCost = 35, OverHeadPerc = 0.15M, EBTPerc = 0.15M }, + new ResourceModel { ResourceID = 4, Name = "Stazione Verniciatura", FixedCost = 24000, VariableCost = 6000, OverHeadCost = 3000, CostDriverID = 1, CostDriverBudget = 220 * 4, LaborCost = 30, OverHeadPerc = 0.15M, EBTPerc = 0.15M }, + new ResourceModel { ResourceID = 5, Name = "Verniciatura Manuale", FixedCost = 6000, VariableCost = 2000, OverHeadCost = 3000, CostDriverID = 1, CostDriverBudget = 220 * 1, LaborCost = 30, OverHeadPerc = 0.15M, EBTPerc = 0.15M }, + new ResourceModel { ResourceID = 6, Name = "Montaggio Manuale", FixedCost = 500, VariableCost = 500, OverHeadCost = 500, CostDriverID = 1, CostDriverBudget = 220 * 8 * 2, LaborCost = 30, OverHeadPerc = 0.15M, EBTPerc = 0.15M }, + new ResourceModel { ResourceID = 7, Name = "Installatore", FixedCost = 0, VariableCost = 3000, OverHeadCost = 0, CostDriverID = 1, CostDriverBudget = 220 * 8 * 2, LaborCost = 40, OverHeadPerc = 0.15M, EBTPerc = 0.15M } ); // inizializzazione fasi @@ -179,33 +188,33 @@ namespace EgwCoreLib.Lux.Data modelBuilder.Entity().HasData( new JobModel { JobID = 1, Description = "Rivendita / servizi" }, new JobModel { JobID = 2, Description = "Serramento Completo Legno su linea Saomad e installatore interno" }//, - //new JobModel { JobID = 2, Description = "Serramento Completo Legno/Alluminio" }, - //new JobModel { JobID = 3, Description = "Persiana Legno" }, - //new JobModel { JobID = 4, Description = "restauro Persiana Esistente" } + //new JobModel { JobID = 2, Name = "Serramento Completo Legno/Alluminio" }, + //new JobModel { JobID = 3, Name = "Persiana Legno" }, + //new JobModel { JobID = 4, Name = "restauro Persiana Esistente" } ); // init righe ciclo (fasi di ciclo) - modelBuilder.Entity().HasData( + modelBuilder.Entity().HasData( // per fare 1 finestra singola/semplice taglio 4 tronchetti telaio + 4 tronchetti finestra, considero 1 perché mi arriva dal sistema preventivo/motore - new JobRowModel { JobRowID = 1, JobID = 2, Index = 1, PhaseID = 1, Qty = 1, ResourceID = 1 }, + new JobStepModel { JobStepID = 1, JobID = 2, Index = 1, CostDriverID = 3, PhaseID = 1, ProductivityRate = 1, ResourceID = 1 }, // taglio profilo su linea saomad, considero 1 perché mi arriva dal sistema preventivo/motore - new JobRowModel { JobRowID = 2, JobID = 2, Index = 2, PhaseID = 2, Qty = 1, ResourceID = 2 }, + new JobStepModel { JobStepID = 2, JobID = 2, Index = 2, CostDriverID = 2, PhaseID = 2, ProductivityRate = 1, ResourceID = 2 }, // verniciatura automatica, considero 1 perché mi arriva dal sistema preventivo/motore - new JobRowModel { JobRowID = 3, JobID = 2, Index = 3, PhaseID = 3, Qty = 1, ResourceID = 4 }, + new JobStepModel { JobStepID = 3, JobID = 2, Index = 3, CostDriverID = 3, PhaseID = 3, ProductivityRate = 1, ResourceID = 4 }, // assemblaggio - new JobRowModel { JobRowID = 4, JobID = 2, Index = 4, PhaseID = 4, Qty = 1, ResourceID = 6 }, + new JobStepModel { JobStepID = 4, JobID = 2, Index = 4, CostDriverID = 3, PhaseID = 4, ProductivityRate = 1, ResourceID = 6 }, // installazione - new JobRowModel { JobRowID = 5, JobID = 2, Index = 5, PhaseID = 6, Qty = 1, ResourceID = 7 } + new JobStepModel { JobStepID = 5, JobID = 2, Index = 5, CostDriverID = 3, PhaseID = 6, ProductivityRate = 1, ResourceID = 7 } ); // init item righe ciclo (articoli + prodotti delle fasi del ciclo) - modelBuilder.Entity().HasData( + modelBuilder.Entity().HasData( // eventuale scarto del materiale tra grezzo e finito--> porta ad un numero >1 (QUI NON USATO, ho il valore calcolato dal motore) - new JobRowItemModel { JobRowItemID = 1, JobRowID = 1, Index = 1, ItemID = 1, Qty = 1, Description = "Grezzo legno abete" }, + new JobStepItemModel { JobStepItemID = 1, JobStepID = 1, Index = 1, ItemID = 1, Qty = 1, Description = "Grezzo legno abete" }, // 1/10 litro di vernice per metro lineare prodotto - new JobRowItemModel { JobRowItemID = 2, JobRowID = 3, Index = 2, ItemID = 8, Qty = 0.1, Description = "Vernice trasparente standard 1L" }, + new JobStepItemModel { JobStepItemID = 2, JobStepID = 3, Index = 2, ItemID = 8, Qty = 0.1, Description = "Vernice trasparente standard 1L" }, // uso un KIT intero (vs specifico n prodotti singoli) x questo modello; se dal preventivo arrivano n pezzi spcifici, qui li esplodiamo - new JobRowItemModel { JobRowItemID = 3, JobRowID = 4, Index = 3, ItemID = 9, Qty = 1, Description = "Ferramenta AGB - rif. AGFD.00000.00000" } + new JobStepItemModel { JobStepItemID = 3, JobStepID = 4, Index = 3, ItemID = 9, Qty = 1, Description = "Ferramenta AGB - rif. AGFD.00000.00000" } ); // inizializzazione dei valori di default x SellingItem @@ -218,16 +227,16 @@ namespace EgwCoreLib.Lux.Data // inizializzazione dei valori di default x Offer modelBuilder.Entity().HasData( new OfferModel { OfferID = 1, RefYear = 2024, RefNum = 1, RefRev = 1, Description = "Offerta per tre serramenti", CustomerID = 2, DealerID = 2 } - //new OfferModel { OfferID = 2, RefYear = 2025, RefNum = 2, RefRev = 1, Description = "Offerta per un serramento + installazione", CustomerID = 1, DealerID = 1 }, - //new OfferModel { OfferID = 3, RefYear = 2025, RefNum = 3, RefRev = 1, Description = "Offerta per tre serramenti", CustomerID = 2, DealerID = 1 }, - //new OfferModel { OfferID = 5, RefYear = 2025, RefNum = 4, RefRev = 2, Description = "Offerta per cinque serramenti + installazione", CustomerID = 3, DealerID = 2 } + //new OfferModel { OfferID = 2, RefYear = 2025, RefNum = 2, RefRev = 1, Name = "Offerta per un serramento + installazione", CustomerID = 1, DealerID = 1 }, + //new OfferModel { OfferID = 3, RefYear = 2025, RefNum = 3, RefRev = 1, Name = "Offerta per tre serramenti", CustomerID = 2, DealerID = 1 }, + //new OfferModel { OfferID = 5, RefYear = 2025, RefNum = 4, RefRev = 2, Name = "Offerta per cinque serramenti + installazione", CustomerID = 3, DealerID = 2 } ); // inizializzazione dei valori di default x OfferRow modelBuilder.Entity().HasData( - 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 } + new OfferRowModel { OfferRowID = 1, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}0000000001", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 950, SellingItemID = 1, Qty = 3, RowNum = 1, SerStruct = "{}", Note = "Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true }, + new OfferRowModel { OfferRowID = 2, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}0000000002", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 160, SellingItemID = 2, Qty = 3, RowNum = 2, SerStruct = "{}", Note = "Persiana per Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true }, + new OfferRowModel { OfferRowID = 3, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}0000000003", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 200, SellingItemID = 3, Qty = 3, RowNum = 3, SerStruct = "{}", Note = "Installazione serramento", ItemSteps = "{}", BomOk = true, ItemOk = true } ); diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index 9039ce53..f720d25b 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -1,7 +1,6 @@ using EgwCoreLib.Lux.Core.RestPayload; using EgwCoreLib.Lux.Data.Controllers; -using EgwCoreLib.Lux.Data.DbModel; -using EgwCoreLib.Lux.Data.DbModel.General; +using EgwCoreLib.Lux.Data.DbModel.Utils; using EgwCoreLib.Lux.Data.DbModel.Sales; using EgwMultiEngineManager.Data; using Microsoft.Extensions.Configuration; @@ -17,6 +16,7 @@ using System.Text; using System.Threading.Tasks; using static EgwCoreLib.Lux.Core.Enums; using static System.Runtime.InteropServices.JavaScript.JSType; +using EgwCoreLib.Lux.Data.DbModel.Items; namespace EgwCoreLib.Lux.Data.Services { From d8ce1153724c5b25df37d1efe7605bf5354ed1b6 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 19 Sep 2025 18:54:25 +0200 Subject: [PATCH 11/65] Update applicazioni x nuovi datamodels creati --- Lux.API/Lux.API.csproj | 2 +- Lux.API/appsettings.json | 1 - Lux.All.sln | 6 ------ Lux.UI/Components/Compo/EditBom.razor.cs | 2 +- Lux.UI/Components/Compo/GenClassMan.razor.cs | 2 +- Lux.UI/Components/Compo/GenValMan.razor.cs | 2 +- Lux.UI/Components/Compo/ItemEdit.razor.cs | 2 +- Lux.UI/Components/Compo/ItemMan.razor.cs | 2 +- Lux.UI/Components/Compo/OfferMan.razor.cs | 1 - Lux.UI/Components/Compo/OfferRowMan.razor | 2 +- Lux.UI/Components/Pages/GenList.razor.cs | 4 ++-- Lux.UI/Components/Pages/Items.razor.cs | 2 +- Lux.UI/Lux.UI.csproj | 2 +- Lux.UI/appsettings.json | 1 - Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 17 files changed, 14 insertions(+), 23 deletions(-) diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 89ec2f41..4c9d0ced 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2509.1910 + 0.9.2509.1918 diff --git a/Lux.API/appsettings.json b/Lux.API/appsettings.json index 35681f79..67e5f677 100644 --- a/Lux.API/appsettings.json +++ b/Lux.API/appsettings.json @@ -50,7 +50,6 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - //"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50;Trusted_Connection=True;MultipleActiveResultSets=true", "DefaultConnection": "Server=mdb.ufficio;port=3306;database=Lux_000;uid=lux_user;pwd=Egal_pwd!;sslmode=None;", "Lux.All": "Server=SQL2016DEV;Database=MoonPro_STATS; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.Land;", "Redis": "redis.ufficio:26379, serviceName=devel, DefaultDatabase=6, keepAlive=180, connectTimeout=15000, syncTimeout=15000, asyncTimeout=15000, abortConnect=false, ssl=false, allowAdmin=true" diff --git a/Lux.All.sln b/Lux.All.sln index 63b485cb..0e401e85 100644 --- a/Lux.All.sln +++ b/Lux.All.sln @@ -7,8 +7,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EgwCoreLib.Lux.Core", "EgwC EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EgwCoreLib.Lux.Data", "EgwCoreLib.Lux.Data\EgwCoreLib.Lux.Data.csproj", "{9BA9FBAC-0D76-41CA-9970-A8DB982CC5F0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApp", "TestApp\TestApp.csproj", "{E94496AD-22BB-4443-9A81-11D19AFBE0A3}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lux.UI", "Lux.UI\Lux.UI.csproj", "{A3B8FAE0-3BAD-4402-B4D9-26DD9CB777E5}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lux.UI.Client", "Lux.UI.Client\Lux.UI.Client.csproj", "{ECA4B6A4-692B-41EB-8238-C33C5FB71942}" @@ -29,10 +27,6 @@ Global {9BA9FBAC-0D76-41CA-9970-A8DB982CC5F0}.Debug|Any CPU.Build.0 = Debug|Any CPU {9BA9FBAC-0D76-41CA-9970-A8DB982CC5F0}.Release|Any CPU.ActiveCfg = Release|Any CPU {9BA9FBAC-0D76-41CA-9970-A8DB982CC5F0}.Release|Any CPU.Build.0 = Release|Any CPU - {E94496AD-22BB-4443-9A81-11D19AFBE0A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E94496AD-22BB-4443-9A81-11D19AFBE0A3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E94496AD-22BB-4443-9A81-11D19AFBE0A3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E94496AD-22BB-4443-9A81-11D19AFBE0A3}.Release|Any CPU.Build.0 = Release|Any CPU {A3B8FAE0-3BAD-4402-B4D9-26DD9CB777E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A3B8FAE0-3BAD-4402-B4D9-26DD9CB777E5}.Debug|Any CPU.Build.0 = Debug|Any CPU {A3B8FAE0-3BAD-4402-B4D9-26DD9CB777E5}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/Lux.UI/Components/Compo/EditBom.razor.cs b/Lux.UI/Components/Compo/EditBom.razor.cs index 136bb7b4..d85213bc 100644 --- a/Lux.UI/Components/Compo/EditBom.razor.cs +++ b/Lux.UI/Components/Compo/EditBom.razor.cs @@ -1,5 +1,5 @@ using EgwCoreLib.Lux.Core.RestPayload; -using EgwCoreLib.Lux.Data.DbModel; +using EgwCoreLib.Lux.Data.DbModel.Items; using EgwCoreLib.Lux.Data.Services; using EgwMultiEngineManager.Data; using Microsoft.AspNetCore.Components; diff --git a/Lux.UI/Components/Compo/GenClassMan.razor.cs b/Lux.UI/Components/Compo/GenClassMan.razor.cs index 2c54a581..5d21d892 100644 --- a/Lux.UI/Components/Compo/GenClassMan.razor.cs +++ b/Lux.UI/Components/Compo/GenClassMan.razor.cs @@ -1,4 +1,4 @@ -using EgwCoreLib.Lux.Data.DbModel.General; +using EgwCoreLib.Lux.Data.DbModel.Utils; using EgwCoreLib.Lux.Data.Services; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.DataProtection; diff --git a/Lux.UI/Components/Compo/GenValMan.razor.cs b/Lux.UI/Components/Compo/GenValMan.razor.cs index aa925973..30b11520 100644 --- a/Lux.UI/Components/Compo/GenValMan.razor.cs +++ b/Lux.UI/Components/Compo/GenValMan.razor.cs @@ -1,5 +1,5 @@ using EgwCoreLib.Lux.Core; -using EgwCoreLib.Lux.Data.DbModel.General; +using EgwCoreLib.Lux.Data.DbModel.Utils; using EgwCoreLib.Lux.Data.Services; using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; diff --git a/Lux.UI/Components/Compo/ItemEdit.razor.cs b/Lux.UI/Components/Compo/ItemEdit.razor.cs index adcfafa8..9d884891 100644 --- a/Lux.UI/Components/Compo/ItemEdit.razor.cs +++ b/Lux.UI/Components/Compo/ItemEdit.razor.cs @@ -1,4 +1,4 @@ -using EgwCoreLib.Lux.Data.DbModel; +using EgwCoreLib.Lux.Data.DbModel.Items; using Microsoft.AspNetCore.Components; namespace Lux.UI.Components.Compo diff --git a/Lux.UI/Components/Compo/ItemMan.razor.cs b/Lux.UI/Components/Compo/ItemMan.razor.cs index b924b374..7b469e54 100644 --- a/Lux.UI/Components/Compo/ItemMan.razor.cs +++ b/Lux.UI/Components/Compo/ItemMan.razor.cs @@ -1,5 +1,5 @@ using EgwCoreLib.Lux.Core; -using EgwCoreLib.Lux.Data.DbModel; +using EgwCoreLib.Lux.Data.DbModel.Items; using EgwCoreLib.Lux.Data.Services; using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; diff --git a/Lux.UI/Components/Compo/OfferMan.razor.cs b/Lux.UI/Components/Compo/OfferMan.razor.cs index 2a07e7e9..8abedaef 100644 --- a/Lux.UI/Components/Compo/OfferMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferMan.razor.cs @@ -1,4 +1,3 @@ -using EgwCoreLib.Lux.Data.DbModel; using EgwCoreLib.Lux.Data.DbModel.Sales; using EgwCoreLib.Lux.Data.Services; using Microsoft.AspNetCore.Components; diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index a0064d43..87ad4483 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -81,7 +81,7 @@ else { } - @($"{item.Cost:C2}") + @($"{item.BomCost:C2}") @($"{item.TotalCost:C2}") @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit) diff --git a/Lux.UI/Components/Pages/GenList.razor.cs b/Lux.UI/Components/Pages/GenList.razor.cs index ac10128b..50a2d1bc 100644 --- a/Lux.UI/Components/Pages/GenList.razor.cs +++ b/Lux.UI/Components/Pages/GenList.razor.cs @@ -1,5 +1,5 @@ -using EgwCoreLib.Lux.Data.DbModel; -using EgwCoreLib.Lux.Data.DbModel.General; +using EgwCoreLib.Lux.Data.DbModel.Items; +using EgwCoreLib.Lux.Data.DbModel.Utils; using EgwCoreLib.Lux.Data.Services; using Lux.UI.Components.Compo; using Microsoft.AspNetCore.Components; diff --git a/Lux.UI/Components/Pages/Items.razor.cs b/Lux.UI/Components/Pages/Items.razor.cs index d161ee51..15b2916f 100644 --- a/Lux.UI/Components/Pages/Items.razor.cs +++ b/Lux.UI/Components/Pages/Items.razor.cs @@ -1,4 +1,4 @@ -using EgwCoreLib.Lux.Data.DbModel; +using EgwCoreLib.Lux.Data.DbModel.Items; using EgwCoreLib.Lux.Data.Services; using Lux.UI.Components.Compo; using Microsoft.AspNetCore.Components; diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 3acbf6c8..ea085f24 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2509.1910 + 0.9.2509.1918 diff --git a/Lux.UI/appsettings.json b/Lux.UI/appsettings.json index d2631687..835855d0 100644 --- a/Lux.UI/appsettings.json +++ b/Lux.UI/appsettings.json @@ -51,7 +51,6 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - //"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50;Trusted_Connection=True;MultipleActiveResultSets=true", "DefaultConnection": "Server=mdb.ufficio;port=3306;database=Lux_000;uid=lux_user;pwd=Egal_pwd!;sslmode=None;", "Lux.All": "Server=SQL2016DEV;Database=MoonPro_STATS; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.Land;", "Redis": "redis.ufficio:26379, serviceName=devel, DefaultDatabase=6, keepAlive=180, connectTimeout=15000, syncTimeout=15000, asyncTimeout=15000, abortConnect=false, ssl=false, allowAdmin=true" diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 869bc31f..e2cd982d 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

      Versione: 0.9.2509.1910

      +

      Versione: 0.9.2509.1918


      Note di rilascio:
      • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index e1a2a911..4d667643 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2509.1910 +0.9.2509.1918 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 530ec369..96b3155a 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2509.1910 + 0.9.2509.1918 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 7fbefbe9866efa1eb8e1bd1356a822b87268d0a7 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 19 Sep 2025 18:59:05 +0200 Subject: [PATCH 12/65] Rifatta initi DB, versione 000_dev (da testare, poi si riporta in prod...) --- .../20250808143628_InitDb.Designer.cs | 1973 -------------- ...0250916152301_AddItemParentRel.Designer.cs | 1988 --------------- .../20250916152301_AddItemParentRel.cs | 310 --- ...0918100936_AggiuntaGenClassVal.Designer.cs | 2095 --------------- .../20250918100936_AggiuntaGenClassVal.cs | 290 --- .../20250919164620_GlobalModelUpdate.cs | 2256 ----------------- ...r.cs => 20250919165643_InitDb.Designer.cs} | 62 +- ...628_InitDb.cs => 20250919165643_InitDb.cs} | 1303 +++++----- .../DataLayerContextModelSnapshot.cs | 58 +- 9 files changed, 779 insertions(+), 9556 deletions(-) delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20250808143628_InitDb.Designer.cs delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20250916152301_AddItemParentRel.Designer.cs delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20250916152301_AddItemParentRel.cs delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.Designer.cs delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.cs delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20250919164620_GlobalModelUpdate.cs rename EgwCoreLib.Lux.Data/Migrations/{20250919164620_GlobalModelUpdate.Designer.cs => 20250919165643_InitDb.Designer.cs} (98%) rename EgwCoreLib.Lux.Data/Migrations/{20250808143628_InitDb.cs => 20250919165643_InitDb.cs} (61%) diff --git a/EgwCoreLib.Lux.Data/Migrations/20250808143628_InitDb.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20250808143628_InitDb.Designer.cs deleted file mode 100644 index 52f903ff..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20250808143628_InitDb.Designer.cs +++ /dev/null @@ -1,1973 +0,0 @@ -// -using System; -using EgwCoreLib.Lux.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace EgwCoreLib.Lux.Data.Migrations -{ - [DbContext(typeof(DataLayerContext))] - [Migration("20250808143628_InitDb")] - partial class InitDb - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.17") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.CounterModel", b => - { - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("CountName") - .HasColumnType("varchar(255)"); - - b.Property("Counter") - .HasColumnType("int"); - - b.HasKey("RefYear", "CountName"); - - b.ToTable("Counter"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.CustomerModel", b => - { - b.Property("CustomerID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CustomerID"); - - b.ToTable("RegCustomer"); - - b.HasData( - new - { - CustomerID = 1, - CompanyName = "", - FirstName = "Customer A", - LastName = "Egalware", - VAT = "1234567890123456" - }, - new - { - CustomerID = 2, - CompanyName = "", - FirstName = "Customer B", - LastName = "User", - VAT = "1234567890123456" - }, - new - { - CustomerID = 3, - CompanyName = "", - FirstName = "Customer C", - LastName = "User Test", - VAT = "1234567890123456" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.DealerModel", b => - { - b.Property("DealerID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("DealerID"); - - b.ToTable("RegDealer"); - - b.HasData( - new - { - DealerID = 1, - CompanyName = "Company First", - FirstName = "Dealer A", - LastName = "Egalware", - VAT = "9587362514671527" - }, - new - { - DealerID = 2, - CompanyName = "Company First", - FirstName = "Dealer B", - LastName = "User", - VAT = "9587362514671527" - }, - new - { - DealerID = 3, - CompanyName = "Company Second", - FirstName = "Dealer C", - LastName = "User Test", - VAT = "9587362514671527" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ItemGroupModel", b => - { - b.Property("CodGroup") - .HasColumnType("varchar(255)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CodGroup"); - - b.ToTable("RegItemGroup"); - - b.HasData( - new - { - CodGroup = "WindowTrunk", - Description = "Barre legno per lavorazione" - }, - new - { - CodGroup = "WindowGlass", - Description = "Vetri serramento" - }, - new - { - CodGroup = "WindowVarnish", - Description = "Vernici per legno" - }, - new - { - CodGroup = "WindowHardware", - Description = "Ferramenta serramento" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ItemModel", b => - { - b.Property("ItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); - - b.Property("CodGroup") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsService") - .HasColumnType("tinyint(1)"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("ItemType") - .HasColumnType("int"); - - b.Property("Margin") - .HasColumnType("double"); - - b.Property("QtyMax") - .HasColumnType("double"); - - b.Property("QtyMin") - .HasColumnType("double"); - - b.Property("SupplCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UM") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("ItemID"); - - b.HasIndex("CodGroup"); - - b.ToTable("RegItem"); - - b.HasData( - new - { - ItemID = 1, - CodGroup = "WindowTrunk", - Cost = 20.0, - Description = "BARRA-60x80 generica", - ExtItemCode = "", - IsService = false, - ItemCode = 1001, - ItemType = 1, - Margin = 0.29999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "BARR.001", - UM = "#" - }, - new - { - ItemID = 2, - CodGroup = "WindowTrunk", - Cost = 16.5, - Description = "Barra 60x80, lunghezza 12m", - ExtItemCode = "BARRA-60x80x12000", - IsService = false, - ItemCode = 1002, - ItemType = 1, - Margin = 0.20999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.12000", - UM = "#" - }, - new - { - ItemID = 3, - CodGroup = "WindowTrunk", - Cost = 17.5, - Description = "Barra 60x80, lunghezza 8m", - ExtItemCode = "BARRA-60x80x8000", - IsService = false, - ItemCode = 1003, - ItemType = 1, - Margin = 0.22, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.8000", - UM = "#" - }, - new - { - ItemID = 4, - CodGroup = "WindowTrunk", - Cost = 15.5, - Description = "Barra 60x80, lunghezza 16m", - ExtItemCode = "BARRA-60x80x16000", - IsService = false, - ItemCode = 1004, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.16000", - UM = "#" - }, - new - { - ItemID = 5, - CodGroup = "WindowGlass", - Cost = 300.0, - Description = "Vetro triplo, basso indice termico, 800x1000", - ExtItemCode = "VETRO-3L-THERMO-800x1000", - IsService = false, - ItemCode = 2001, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V3T.800.1000", - UM = "m2" - }, - new - { - ItemID = 6, - CodGroup = "WindowGlass", - Cost = 200.0, - Description = "Vetro doppio, 800x1000", - ExtItemCode = "VETRO-2L-800x1000", - IsService = false, - ItemCode = 2002, - ItemType = 1, - Margin = 0.14999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V2.800.1000", - UM = "m2" - }, - new - { - ItemID = 7, - CodGroup = "WindowGlass", - Cost = 250.0, - Description = "Vetro triplo, 800x1000", - ExtItemCode = "VETRO-3L-800x1000", - IsService = false, - ItemCode = 2003, - ItemType = 1, - Margin = 0.17999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V3.800.1000", - UM = "m2" - }, - new - { - ItemID = 8, - CodGroup = "WindowVarnish", - Cost = 20.0, - Description = "Vernice trasparente", - ExtItemCode = "VERN-TRASP", - IsService = false, - ItemCode = 3001, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "VT.STD", - UM = "l" - }, - new - { - ItemID = 9, - CodGroup = "WindowHardware", - Cost = 65.0, - Description = "Kit standard completo AGB tipo 001", - ExtItemCode = "KIT-001", - IsService = false, - ItemCode = 5001, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-KIT-001", - UM = "#" - }, - new - { - ItemID = 10, - CodGroup = "WindowHardware", - Cost = 10.0, - Description = "Cerniera AGB tipo 001", - ExtItemCode = "CERN-001", - IsService = false, - ItemCode = 5002, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-CERN-001", - UM = "#" - }, - new - { - ItemID = 11, - CodGroup = "WindowHardware", - Cost = 15.0, - Description = "Serratura AGB tipo 001", - ExtItemCode = "SERR-001", - IsService = false, - ItemCode = 5003, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-SERR-001", - UM = "#" - }, - new - { - ItemID = 12, - CodGroup = "WindowHardware", - Cost = 25.0, - Description = "Maniglia AGB tipo 001", - ExtItemCode = "MAN-001", - IsService = false, - ItemCode = 5004, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-MAN-001", - UM = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobModel", b => - { - b.Property("JobID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("JobID"); - - b.ToTable("JobList"); - - b.HasData( - new - { - JobID = 1, - Description = "Rivendita / servizi" - }, - new - { - JobID = 2, - Description = "Serramento Completo Legno su linea Saomad e installatore interno" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowItemModel", b => - { - b.Property("JobStepItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("ItemID") - .HasColumnType("int"); - - b.Property("JobStepID") - .HasColumnType("int"); - - b.Property("ProductivityRate") - .HasColumnType("double"); - - b.HasKey("JobStepItemID"); - - b.HasIndex("ItemID"); - - b.HasIndex("JobStepID"); - - b.ToTable("JobRowItemList"); - - b.HasData( - new - { - JobRowItemID = 1, - Description = "Grezzo legno abete", - Index = 1, - ItemID = 1, - JobRowID = 1, - Qty = 1.0 - }, - new - { - JobRowItemID = 2, - Description = "Vernice trasparente standard 1L", - Index = 2, - ItemID = 8, - JobRowID = 3, - Qty = 0.10000000000000001 - }, - new - { - JobRowItemID = 3, - Description = "Ferramenta AGB - rif. AGFD.00000.00000", - Index = 3, - ItemID = 9, - JobRowID = 4, - Qty = 1.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowModel", b => - { - b.Property("JobStepID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("JobID") - .HasColumnType("int"); - - b.Property("PhaseID") - .HasColumnType("int"); - - b.Property("ProductivityRate") - .HasColumnType("double"); - - b.Property("ResourceID") - .HasColumnType("int"); - - b.HasKey("JobStepID"); - - b.HasIndex("JobID"); - - b.HasIndex("PhaseID"); - - b.HasIndex("ResourceID"); - - b.ToTable("JobRowList"); - - b.HasData( - new - { - JobRowID = 1, - Description = "", - Index = 1, - JobID = 2, - PhaseID = 1, - Qty = 1.0, - ResourceID = 1 - }, - new - { - JobRowID = 2, - Description = "", - Index = 2, - JobID = 2, - PhaseID = 2, - Qty = 1.0, - ResourceID = 2 - }, - new - { - JobRowID = 3, - Description = "", - Index = 3, - JobID = 2, - PhaseID = 3, - Qty = 1.0, - ResourceID = 4 - }, - new - { - JobRowID = 4, - Description = "", - Index = 4, - JobID = 2, - PhaseID = 4, - Qty = 1.0, - ResourceID = 6 - }, - new - { - JobRowID = 5, - Description = "", - Index = 5, - JobID = 2, - PhaseID = 6, - Qty = 1.0, - ResourceID = 7 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.MovTypeModel", b => - { - b.Property("MovCod") - .HasColumnType("varchar(255)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("MovCod"); - - b.ToTable("RegMovType"); - - b.HasData( - new - { - MovCod = "CAR", - Description = "Carico a magazzino" - }, - new - { - MovCod = "MOV", - Description = "Movimento interno (spostamento)" - }, - new - { - MovCod = "ND", - Description = "Non Definito" - }, - new - { - MovCod = "OFOR", - Description = "Ordine Fornitore" - }, - new - { - MovCod = "RETT", - Description = "Rettifica magazzino" - }, - new - { - MovCod = "SCAR", - Description = "Scarico da magazzino" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferModel", b => - { - b.Property("OfferID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); - - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("OffertState") - .HasColumnType("int"); - - b.Property("RefNum") - .HasColumnType("int"); - - b.Property("RefRev") - .HasColumnType("int"); - - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("ValidUntil") - .HasColumnType("datetime(6)"); - - b.HasKey("OfferID"); - - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - - b.ToTable("Offer"); - - b.HasData( - new - { - OfferID = 1, - CustomerID = 2, - DealerID = 2, - Description = "Offerta per tre serramenti", - Inserted = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4215), - Modified = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4216), - OffertState = 0, - RefNum = 1, - RefRev = 1, - RefYear = 2024, - ValidUntil = new DateTime(2025, 9, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4212) - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferRowModel", b => - { - b.Property("OfferRowID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); - - b.Property("BomOk") - .HasColumnType("tinyint(1)"); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("Environment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("ItemBOM") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ItemOk") - .HasColumnType("tinyint(1)"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OfferID") - .HasColumnType("int"); - - b.Property("OfferRowUID") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProductivityRate") - .HasColumnType("double"); - - b.Property("RowNum") - .HasColumnType("int"); - - b.Property("SellingItemID") - .HasColumnType("int"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("OfferRowID"); - - b.HasIndex("OfferID"); - - b.HasIndex("SellingItemID"); - - b.ToTable("OfferRowList"); - - b.HasData( - new - { - OfferRowID = 1, - BomOk = true, - Cost = 950.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4243), - ItemBOM = "", - ItemOk = true, - ItemSPP = "{}", - Modified = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4245), - Note = "Finestra anta singola 2025", - OfferID = 1, - OfferRowUID = "OFF0000000001", - Qty = 3.0, - RowNum = 1, - SellingItemID = 1, - SerStruct = "{}" - }, - new - { - OfferRowID = 2, - BomOk = true, - Cost = 160.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4252), - ItemBOM = "", - ItemOk = true, - ItemSPP = "{}", - Modified = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4253), - Note = "Persiana per Finestra anta singola 2025", - OfferID = 1, - OfferRowUID = "OFF0000000002", - Qty = 3.0, - RowNum = 2, - SellingItemID = 2, - SerStruct = "{}" - }, - new - { - OfferRowID = 3, - BomOk = true, - Cost = 200.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4259), - ItemBOM = "", - ItemOk = true, - ItemSPP = "{}", - Modified = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4261), - Note = "Installazione serramento", - OfferID = 1, - OfferRowUID = "OFF0000000003", - Qty = 3.0, - RowNum = 3, - SellingItemID = 3, - SerStruct = "{}" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderModel", b => - { - b.Property("OrderID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); - - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("OfferID") - .HasColumnType("int"); - - b.Property("OffertState") - .HasColumnType("int"); - - b.Property("RefNum") - .HasColumnType("int"); - - b.Property("RefRev") - .HasColumnType("int"); - - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("ValidUntil") - .HasColumnType("datetime(6)"); - - b.HasKey("OrderID"); - - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - - b.HasIndex("OfferID"); - - b.ToTable("Order"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderRowModel", b => - { - b.Property("OrderRowID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrderID") - .HasColumnType("int"); - - b.Property("ProductivityRate") - .HasColumnType("double"); - - b.Property("RowNum") - .HasColumnType("int"); - - b.Property("SellingItemID") - .HasColumnType("int"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("OrderRowID"); - - b.HasIndex("OrderID"); - - b.HasIndex("SellingItemID"); - - b.ToTable("OrderRowList"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.PhaseModel", b => - { - b.Property("PhaseID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("PhaseID"); - - b.ToTable("RegPhase"); - - b.HasData( - new - { - PhaseID = 1, - Description = "Taglio tronchetti" - }, - new - { - PhaseID = 2, - Description = "Lavorazione pezzi serramento" - }, - new - { - PhaseID = 3, - Description = "Verniciatura" - }, - new - { - PhaseID = 4, - Description = "Assemblaggio completo" - }, - new - { - PhaseID = 5, - Description = "Assemblaggio Ferramenta" - }, - new - { - PhaseID = 6, - Description = "Installazione e posa in opera" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionBatchModel", b => - { - b.Property("ProductionBatchID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("DueDate") - .HasColumnType("datetime(6)"); - - b.HasKey("ProductionBatchID"); - - b.ToTable("ProductionBatch"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemModel", b => - { - b.Property("ProdItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("OrderRowID") - .HasColumnType("int"); - - b.Property("ProductionBatchID") - .HasColumnType("int"); - - b.HasKey("ProdItemID"); - - b.HasIndex("OrderRowID"); - - b.HasIndex("ProductionBatchID"); - - b.ToTable("ProductionItem"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemRowModel", b => - { - b.Property("ProdItemStepID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("PhaseID") - .HasColumnType("int"); - - b.Property("ProdItemID") - .HasColumnType("int"); - - b.Property("ProductivityRate") - .HasColumnType("double"); - - b.Property("ResourceID") - .HasColumnType("int"); - - b.Property("WorkTime") - .HasColumnType("double"); - - b.HasKey("ProdItemStepID"); - - b.HasIndex("PhaseID"); - - b.HasIndex("ProdItemID"); - - b.HasIndex("ResourceID"); - - b.ToTable("ProductionItemRowList"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ResourceModel", b => - { - b.Property("ResourceID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsAsset") - .HasColumnType("tinyint(1)"); - - b.Property("IsHuman") - .HasColumnType("tinyint(1)"); - - b.Property("UmFix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UmProp") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UnitCostFix") - .HasColumnType("double"); - - b.Property("UnitCostProp") - .HasColumnType("double"); - - b.HasKey("ResourceID"); - - b.ToTable("RegResource"); - - b.HasData( - new - { - ResourceID = 1, - Description = "Sezionatrice", - IsAsset = true, - IsHuman = false, - UmFix = "€/h", - UmProp = "", - UnitCostFix = 15.0, - UnitCostProp = 0.0 - }, - new - { - ResourceID = 2, - Description = "Linea SAOMAD WoodPecker Just 3500", - IsAsset = true, - IsHuman = false, - UmFix = "€/h", - UmProp = "€/m", - UnitCostFix = 240.0, - UnitCostProp = 1.8999999999999999 - }, - new - { - ResourceID = 3, - Description = "Linea Pantografo", - IsAsset = true, - IsHuman = false, - UmFix = "€/h", - UmProp = "€/m", - UnitCostFix = 90.0, - UnitCostProp = 5.9000000000000004 - }, - new - { - ResourceID = 4, - Description = "Stazione Verniciatura", - IsAsset = true, - IsHuman = false, - UmFix = "€/h", - UmProp = "€/m", - UnitCostFix = 40.0, - UnitCostProp = 1.8999999999999999 - }, - new - { - ResourceID = 5, - Description = "Verniciatura Manuale", - IsAsset = false, - IsHuman = true, - UmFix = "€/h", - UmProp = "€/m", - UnitCostFix = 10.0, - UnitCostProp = 1.8999999999999999 - }, - new - { - ResourceID = 6, - Description = "Montaggio Manuale", - IsAsset = false, - IsHuman = true, - UmFix = "", - UmProp = "€/h", - UnitCostFix = 0.0, - UnitCostProp = 40.0 - }, - new - { - ResourceID = 7, - Description = "Installatore", - IsAsset = false, - IsHuman = true, - UmFix = "", - UmProp = "€/h", - UnitCostFix = 0.0, - UnitCostProp = 40.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", b => - { - b.Property("SellingItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsService") - .HasColumnType("tinyint(1)"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("JobID") - .HasColumnType("int"); - - b.Property("Margin") - .HasColumnType("double"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UM") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SellingItemID"); - - b.HasIndex("JobID"); - - b.ToTable("SellingItem"); - - b.HasData( - new - { - SellingItemID = 1, - Cost = 820.0, - Description = "Finestra anta Singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSPP = "", - JobID = 2, - Margin = 0.20000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 2, - Cost = 150.0, - Description = "Persiana anta singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSPP = "", - JobID = 1, - Margin = 0.10000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 3, - Cost = 200.0, - Description = "Installazione", - ExtItemCode = "", - IsService = true, - ItemCode = 0, - ItemSPP = "", - JobID = 1, - Margin = 0.29999999999999999, - SerStruct = "", - SupplCode = "", - UM = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockMovModel", b => - { - b.Property("StockMovID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); - - b.Property("CodDoc") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("DtCreate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DtMod") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); - - b.Property("MovCod") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QtyRec") - .HasColumnType("double"); - - b.Property("StockStatusId") - .HasColumnType("int"); - - b.Property("UnitVal") - .HasColumnType("double"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("StockMovID"); - - b.HasIndex("MovCod"); - - b.HasIndex("StockStatusId"); - - b.ToTable("StockMov"); - - b.HasData( - new - { - StockMovID = 1, - CodDoc = "", - DtCreate = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(3939), - DtMod = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(3987), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 5.0, - StockStatusId = 1, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 2, - CodDoc = "", - DtCreate = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(3989), - DtMod = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(3991), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 8.0, - StockStatusId = 2, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 3, - CodDoc = "", - DtCreate = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(3993), - DtMod = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(3995), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 5.0, - StockStatusId = 3, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 4, - CodDoc = "", - DtCreate = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(3997), - DtMod = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(3998), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 4, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 5, - CodDoc = "", - DtCreate = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4000), - DtMod = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4002), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 10.0, - StockStatusId = 5, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 6, - CodDoc = "", - DtCreate = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4004), - DtMod = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4006), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 6, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 7, - CodDoc = "", - DtCreate = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4008), - DtMod = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4009), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 50.0, - StockStatusId = 7, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 8, - CodDoc = "", - DtCreate = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4011), - DtMod = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4013), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 8, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 9, - CodDoc = "", - DtCreate = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4015), - DtMod = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4017), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 9, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 10, - CodDoc = "", - DtCreate = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4019), - DtMod = new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4020), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 10, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockStatusModel", b => - { - b.Property("StockStatusId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); - - b.Property("IsDeleted") - .HasColumnType("tinyint(1)"); - - b.Property("IsRemn") - .HasColumnType("tinyint(1)"); - - b.Property("ItemID") - .HasColumnType("int"); - - b.Property("Location") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QtyAvail") - .HasColumnType("double"); - - b.HasKey("StockStatusId"); - - b.HasIndex("ItemID"); - - b.ToTable("StockStatus"); - - b.HasData( - new - { - StockStatusId = 1, - IsDeleted = false, - IsRemn = false, - ItemID = 1, - Location = "B001-001-003", - QtyAvail = 5.0 - }, - new - { - StockStatusId = 2, - IsDeleted = false, - IsRemn = false, - ItemID = 2, - Location = "B001-001-002", - QtyAvail = 8.0 - }, - new - { - StockStatusId = 3, - IsDeleted = false, - IsRemn = false, - ItemID = 3, - Location = "B001-001-001", - QtyAvail = 5.0 - }, - new - { - StockStatusId = 4, - IsDeleted = false, - IsRemn = false, - ItemID = 4, - Location = "V002-001-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 5, - IsDeleted = false, - IsRemn = false, - ItemID = 5, - Location = "V001-001-002", - QtyAvail = 10.0 - }, - new - { - StockStatusId = 6, - IsDeleted = false, - IsRemn = false, - ItemID = 6, - Location = "V001-001-003", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 7, - IsDeleted = false, - IsRemn = false, - ItemID = 8, - Location = "V001-001-003", - QtyAvail = 50.0 - }, - new - { - StockStatusId = 8, - IsDeleted = false, - IsRemn = false, - ItemID = 11, - Location = "S001-002-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 9, - IsDeleted = false, - IsRemn = false, - ItemID = 9, - Location = "S001-002-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 10, - IsDeleted = false, - IsRemn = false, - ItemID = 10, - Location = "S001-001-001", - QtyAvail = 1.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.SupplierModel", b => - { - b.Property("SupplierID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SupplierID"); - - b.ToTable("RegSupplier"); - - b.HasData( - new - { - SupplierID = 1, - CompanyName = "Company One", - FirstName = "Supplier A", - LastName = "Egalware", - VAT = "7294857103879254" - }, - new - { - SupplierID = 2, - CompanyName = "Company Two", - FirstName = "Supplier B", - LastName = "User", - VAT = "7294857103879254" - }, - new - { - SupplierID = 3, - CompanyName = "Company Two", - FirstName = "Supplier C", - LastName = "User Test", - VAT = "7294857103879254" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.TagsModel", b => - { - b.Property("TagID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("TagID"); - - b.ToTable("RegTags"); - - b.HasData( - new - { - TagID = 1, - Description = "Tag 01" - }, - new - { - TagID = 2, - Description = "Tag 02" - }, - new - { - TagID = 3, - Description = "Tag 03" - }, - new - { - TagID = 4, - Description = "Tag 04" - }, - new - { - TagID = 5, - Description = "Tag 05" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ItemGroupModel", "ItemGroupNav") - .WithMany() - .HasForeignKey("CodGroup") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemGroupNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ItemModel", "ItemNav") - .WithMany() - .HasForeignKey("ItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobRowModel", "JobStepNav") - .WithMany() - .HasForeignKey("JobStepID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemNav"); - - b.Navigation("JobStepNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobModel", "JobNav") - .WithMany() - .HasForeignKey("JobID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.PhaseModel", "PhaseNav") - .WithMany() - .HasForeignKey("PhaseID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ResourceModel", "ResourceNav") - .WithMany() - .HasForeignKey("ResourceID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("JobNav"); - - b.Navigation("PhaseNav"); - - b.Navigation("ResourceNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.CustomerModel", "CustomerNav") - .WithMany() - .HasForeignKey("CustomerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.DealerModel", "DealerNav") - .WithMany() - .HasForeignKey("DealerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CustomerNav"); - - b.Navigation("DealerNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.OfferModel", "OfferNav") - .WithMany("OfferRowNav") - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OfferNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.CustomerModel", "CustomerNav") - .WithMany() - .HasForeignKey("CustomerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.DealerModel", "DealerNav") - .WithMany() - .HasForeignKey("DealerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.OfferModel", "OfferNav") - .WithMany() - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CustomerNav"); - - b.Navigation("DealerNav"); - - b.Navigation("OfferNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.OrderModel", "OrderNav") - .WithMany() - .HasForeignKey("OrderID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OrderNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.OrderRowModel", "OrderRowNav") - .WithMany() - .HasForeignKey("OrderRowID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ProductionBatchModel", "ProductionBatchNav") - .WithMany() - .HasForeignKey("ProductionBatchID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OrderRowNav"); - - b.Navigation("ProductionBatchNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.PhaseModel", "PhaseNav") - .WithMany() - .HasForeignKey("PhaseID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ProductionItemModel", "ProdItemNav") - .WithMany() - .HasForeignKey("ProdItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ResourceModel", "ResourceNav") - .WithMany() - .HasForeignKey("ResourceID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("PhaseNav"); - - b.Navigation("ProdItemNav"); - - b.Navigation("ResourceNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobModel", "JobNav") - .WithMany() - .HasForeignKey("JobID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("JobNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockMovModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.MovTypeModel", "MovTypeNav") - .WithMany() - .HasForeignKey("MovCod") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.StockStatusModel", "StockStatusNav") - .WithMany() - .HasForeignKey("StockStatusId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("MovTypeNav"); - - b.Navigation("StockStatusNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockStatusModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ItemModel", "ItemNav") - .WithMany() - .HasForeignKey("ItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferModel", b => - { - b.Navigation("OfferRowNav"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20250916152301_AddItemParentRel.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20250916152301_AddItemParentRel.Designer.cs deleted file mode 100644 index 3ee1980b..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20250916152301_AddItemParentRel.Designer.cs +++ /dev/null @@ -1,1988 +0,0 @@ -// -using System; -using EgwCoreLib.Lux.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace EgwCoreLib.Lux.Data.Migrations -{ - [DbContext(typeof(DataLayerContext))] - [Migration("20250916152301_AddItemParentRel")] - partial class AddItemParentRel - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.17") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.CounterModel", b => - { - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("CountName") - .HasColumnType("varchar(255)"); - - b.Property("Counter") - .HasColumnType("int"); - - b.HasKey("RefYear", "CountName"); - - b.ToTable("Counter"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.CustomerModel", b => - { - b.Property("CustomerID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CustomerID"); - - b.ToTable("RegCustomer"); - - b.HasData( - new - { - CustomerID = 1, - CompanyName = "", - FirstName = "Customer A", - LastName = "Egalware", - VAT = "1234567890123456" - }, - new - { - CustomerID = 2, - CompanyName = "", - FirstName = "Customer B", - LastName = "User", - VAT = "1234567890123456" - }, - new - { - CustomerID = 3, - CompanyName = "", - FirstName = "Customer C", - LastName = "User Test", - VAT = "1234567890123456" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.DealerModel", b => - { - b.Property("DealerID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("DealerID"); - - b.ToTable("RegDealer"); - - b.HasData( - new - { - DealerID = 1, - CompanyName = "Company First", - FirstName = "Dealer A", - LastName = "Egalware", - VAT = "9587362514671527" - }, - new - { - DealerID = 2, - CompanyName = "Company First", - FirstName = "Dealer B", - LastName = "User", - VAT = "9587362514671527" - }, - new - { - DealerID = 3, - CompanyName = "Company Second", - FirstName = "Dealer C", - LastName = "User Test", - VAT = "9587362514671527" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ItemGroupModel", b => - { - b.Property("CodGroup") - .HasColumnType("varchar(255)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CodGroup"); - - b.ToTable("RegItemGroup"); - - b.HasData( - new - { - CodGroup = "WindowTrunk", - Description = "Barre legno per lavorazione" - }, - new - { - CodGroup = "WindowGlass", - Description = "Vetri serramento" - }, - new - { - CodGroup = "WindowVarnish", - Description = "Vernici per legno" - }, - new - { - CodGroup = "WindowHardware", - Description = "Ferramenta serramento" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ItemModel", b => - { - b.Property("ItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); - - b.Property("CodGroup") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsService") - .HasColumnType("tinyint(1)"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("ItemIDParent") - .HasColumnType("int"); - - b.Property("ItemType") - .HasColumnType("int"); - - b.Property("Margin") - .HasColumnType("double"); - - b.Property("QtyMax") - .HasColumnType("double"); - - b.Property("QtyMin") - .HasColumnType("double"); - - b.Property("SupplCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UM") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("ItemID"); - - b.HasIndex("CodGroup"); - - b.ToTable("RegItem"); - - b.HasData( - new - { - ItemID = 1, - CodGroup = "WindowTrunk", - Cost = 20.0, - Description = "BARRA-60x80 generica", - ExtItemCode = "", - IsService = false, - ItemCode = 1001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.29999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "BARR.001", - UM = "#" - }, - new - { - ItemID = 2, - CodGroup = "WindowTrunk", - Cost = 16.5, - Description = "Barra 60x80, lunghezza 12m", - ExtItemCode = "BARRA-60x80x12000", - IsService = false, - ItemCode = 1002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.12000", - UM = "#" - }, - new - { - ItemID = 3, - CodGroup = "WindowTrunk", - Cost = 17.5, - Description = "Barra 60x80, lunghezza 8m", - ExtItemCode = "BARRA-60x80x8000", - IsService = false, - ItemCode = 1003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.22, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.8000", - UM = "#" - }, - new - { - ItemID = 4, - CodGroup = "WindowTrunk", - Cost = 15.5, - Description = "Barra 60x80, lunghezza 16m", - ExtItemCode = "BARRA-60x80x16000", - IsService = false, - ItemCode = 1004, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.16000", - UM = "#" - }, - new - { - ItemID = 5, - CodGroup = "WindowGlass", - Cost = 300.0, - Description = "Vetro triplo, basso indice termico, 800x1000", - ExtItemCode = "VETRO-3L-THERMO-800x1000", - IsService = false, - ItemCode = 2001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V3T.800.1000", - UM = "m2" - }, - new - { - ItemID = 6, - CodGroup = "WindowGlass", - Cost = 200.0, - Description = "Vetro doppio, 800x1000", - ExtItemCode = "VETRO-2L-800x1000", - IsService = false, - ItemCode = 2002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.14999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V2.800.1000", - UM = "m2" - }, - new - { - ItemID = 7, - CodGroup = "WindowGlass", - Cost = 250.0, - Description = "Vetro triplo, 800x1000", - ExtItemCode = "VETRO-3L-800x1000", - IsService = false, - ItemCode = 2003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.17999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V3.800.1000", - UM = "m2" - }, - new - { - ItemID = 8, - CodGroup = "WindowVarnish", - Cost = 20.0, - Description = "Vernice trasparente", - ExtItemCode = "VERN-TRASP", - IsService = false, - ItemCode = 3001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "VT.STD", - UM = "l" - }, - new - { - ItemID = 9, - CodGroup = "WindowHardware", - Cost = 65.0, - Description = "Kit standard completo AGB tipo 001", - ExtItemCode = "KIT-001", - IsService = false, - ItemCode = 5001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-KIT-001", - UM = "#" - }, - new - { - ItemID = 10, - CodGroup = "WindowHardware", - Cost = 10.0, - Description = "Cerniera AGB tipo 001", - ExtItemCode = "CERN-001", - IsService = false, - ItemCode = 5002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-CERN-001", - UM = "#" - }, - new - { - ItemID = 11, - CodGroup = "WindowHardware", - Cost = 15.0, - Description = "Serratura AGB tipo 001", - ExtItemCode = "SERR-001", - IsService = false, - ItemCode = 5003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-SERR-001", - UM = "#" - }, - new - { - ItemID = 12, - CodGroup = "WindowHardware", - Cost = 25.0, - Description = "Maniglia AGB tipo 001", - ExtItemCode = "MAN-001", - IsService = false, - ItemCode = 5004, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-MAN-001", - UM = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobModel", b => - { - b.Property("JobID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("JobID"); - - b.ToTable("JobList"); - - b.HasData( - new - { - JobID = 1, - Description = "Rivendita / servizi" - }, - new - { - JobID = 2, - Description = "Serramento Completo Legno su linea Saomad e installatore interno" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowItemModel", b => - { - b.Property("JobStepItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("ItemID") - .HasColumnType("int"); - - b.Property("JobStepID") - .HasColumnType("int"); - - b.Property("ProductivityRate") - .HasColumnType("double"); - - b.HasKey("JobStepItemID"); - - b.HasIndex("ItemID"); - - b.HasIndex("JobStepID"); - - b.ToTable("JobRowItemList"); - - b.HasData( - new - { - JobRowItemID = 1, - Description = "Grezzo legno abete", - Index = 1, - ItemID = 1, - JobRowID = 1, - Qty = 1.0 - }, - new - { - JobRowItemID = 2, - Description = "Vernice trasparente standard 1L", - Index = 2, - ItemID = 8, - JobRowID = 3, - Qty = 0.10000000000000001 - }, - new - { - JobRowItemID = 3, - Description = "Ferramenta AGB - rif. AGFD.00000.00000", - Index = 3, - ItemID = 9, - JobRowID = 4, - Qty = 1.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowModel", b => - { - b.Property("JobStepID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("JobID") - .HasColumnType("int"); - - b.Property("PhaseID") - .HasColumnType("int"); - - b.Property("ProductivityRate") - .HasColumnType("double"); - - b.Property("ResourceID") - .HasColumnType("int"); - - b.HasKey("JobStepID"); - - b.HasIndex("JobID"); - - b.HasIndex("PhaseID"); - - b.HasIndex("ResourceID"); - - b.ToTable("JobRowList"); - - b.HasData( - new - { - JobRowID = 1, - Description = "", - Index = 1, - JobID = 2, - PhaseID = 1, - Qty = 1.0, - ResourceID = 1 - }, - new - { - JobRowID = 2, - Description = "", - Index = 2, - JobID = 2, - PhaseID = 2, - Qty = 1.0, - ResourceID = 2 - }, - new - { - JobRowID = 3, - Description = "", - Index = 3, - JobID = 2, - PhaseID = 3, - Qty = 1.0, - ResourceID = 4 - }, - new - { - JobRowID = 4, - Description = "", - Index = 4, - JobID = 2, - PhaseID = 4, - Qty = 1.0, - ResourceID = 6 - }, - new - { - JobRowID = 5, - Description = "", - Index = 5, - JobID = 2, - PhaseID = 6, - Qty = 1.0, - ResourceID = 7 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.MovTypeModel", b => - { - b.Property("MovCod") - .HasColumnType("varchar(255)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("MovCod"); - - b.ToTable("RegMovType"); - - b.HasData( - new - { - MovCod = "CAR", - Description = "Carico a magazzino" - }, - new - { - MovCod = "MOV", - Description = "Movimento interno (spostamento)" - }, - new - { - MovCod = "ND", - Description = "Non Definito" - }, - new - { - MovCod = "OFOR", - Description = "Ordine Fornitore" - }, - new - { - MovCod = "RETT", - Description = "Rettifica magazzino" - }, - new - { - MovCod = "SCAR", - Description = "Scarico da magazzino" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferModel", b => - { - b.Property("OfferID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); - - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("OffertState") - .HasColumnType("int"); - - b.Property("RefNum") - .HasColumnType("int"); - - b.Property("RefRev") - .HasColumnType("int"); - - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("ValidUntil") - .HasColumnType("datetime(6)"); - - b.HasKey("OfferID"); - - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - - b.ToTable("Offer"); - - b.HasData( - new - { - OfferID = 1, - 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), - OffertState = 0, - RefNum = 1, - RefRev = 1, - RefYear = 2024, - ValidUntil = new DateTime(2025, 10, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9064) - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferRowModel", b => - { - b.Property("OfferRowID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); - - b.Property("BomOk") - .HasColumnType("tinyint(1)"); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("Environment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("ItemBOM") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ItemOk") - .HasColumnType("tinyint(1)"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OfferID") - .HasColumnType("int"); - - b.Property("OfferRowUID") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProductivityRate") - .HasColumnType("double"); - - b.Property("RowNum") - .HasColumnType("int"); - - b.Property("SellingItemID") - .HasColumnType("int"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("OfferRowID"); - - b.HasIndex("OfferID"); - - b.HasIndex("SellingItemID"); - - b.ToTable("OfferRowList"); - - b.HasData( - new - { - OfferRowID = 1, - BomOk = true, - Cost = 950.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9104), - ItemBOM = "", - ItemOk = true, - ItemSPP = "{}", - Modified = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9106), - Note = "Finestra anta singola 2025", - OfferID = 1, - OfferRowUID = "OFF0000000001", - Qty = 3.0, - RowNum = 1, - SellingItemID = 1, - SerStruct = "{}" - }, - new - { - OfferRowID = 2, - BomOk = true, - Cost = 160.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9114), - ItemBOM = "", - ItemOk = true, - ItemSPP = "{}", - Modified = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9116), - Note = "Persiana per Finestra anta singola 2025", - OfferID = 1, - OfferRowUID = "OFF0000000002", - Qty = 3.0, - RowNum = 2, - SellingItemID = 2, - SerStruct = "{}" - }, - new - { - OfferRowID = 3, - BomOk = true, - Cost = 200.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9123), - ItemBOM = "", - ItemOk = true, - ItemSPP = "{}", - Modified = new DateTime(2025, 9, 16, 17, 23, 0, 861, DateTimeKind.Local).AddTicks(9125), - Note = "Installazione serramento", - OfferID = 1, - OfferRowUID = "OFF0000000003", - Qty = 3.0, - RowNum = 3, - SellingItemID = 3, - SerStruct = "{}" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderModel", b => - { - b.Property("OrderID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); - - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("OfferID") - .HasColumnType("int"); - - b.Property("OffertState") - .HasColumnType("int"); - - b.Property("RefNum") - .HasColumnType("int"); - - b.Property("RefRev") - .HasColumnType("int"); - - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("ValidUntil") - .HasColumnType("datetime(6)"); - - b.HasKey("OrderID"); - - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - - b.HasIndex("OfferID"); - - b.ToTable("Order"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderRowModel", b => - { - b.Property("OrderRowID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrderID") - .HasColumnType("int"); - - b.Property("ProductivityRate") - .HasColumnType("double"); - - b.Property("RowNum") - .HasColumnType("int"); - - b.Property("SellingItemID") - .HasColumnType("int"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("OrderRowID"); - - b.HasIndex("OrderID"); - - b.HasIndex("SellingItemID"); - - b.ToTable("OrderRowList"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.PhaseModel", b => - { - b.Property("PhaseID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("PhaseID"); - - b.ToTable("RegPhase"); - - b.HasData( - new - { - PhaseID = 1, - Description = "Taglio tronchetti" - }, - new - { - PhaseID = 2, - Description = "Lavorazione pezzi serramento" - }, - new - { - PhaseID = 3, - Description = "Verniciatura" - }, - new - { - PhaseID = 4, - Description = "Assemblaggio completo" - }, - new - { - PhaseID = 5, - Description = "Assemblaggio Ferramenta" - }, - new - { - PhaseID = 6, - Description = "Installazione e posa in opera" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionBatchModel", b => - { - b.Property("ProductionBatchID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("DueDate") - .HasColumnType("datetime(6)"); - - b.HasKey("ProductionBatchID"); - - b.ToTable("ProductionBatch"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemModel", b => - { - b.Property("ProdItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("OrderRowID") - .HasColumnType("int"); - - b.Property("ProductionBatchID") - .HasColumnType("int"); - - b.HasKey("ProdItemID"); - - b.HasIndex("OrderRowID"); - - b.HasIndex("ProductionBatchID"); - - b.ToTable("ProductionItem"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemRowModel", b => - { - b.Property("ProdItemStepID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("PhaseID") - .HasColumnType("int"); - - b.Property("ProdItemID") - .HasColumnType("int"); - - b.Property("ProductivityRate") - .HasColumnType("double"); - - b.Property("ResourceID") - .HasColumnType("int"); - - b.Property("WorkTime") - .HasColumnType("double"); - - b.HasKey("ProdItemStepID"); - - b.HasIndex("PhaseID"); - - b.HasIndex("ProdItemID"); - - b.HasIndex("ResourceID"); - - b.ToTable("ProductionItemRowList"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ResourceModel", b => - { - b.Property("ResourceID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsAsset") - .HasColumnType("tinyint(1)"); - - b.Property("IsHuman") - .HasColumnType("tinyint(1)"); - - b.Property("UmFix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UmProp") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UnitCostFix") - .HasColumnType("double"); - - b.Property("UnitCostProp") - .HasColumnType("double"); - - b.HasKey("ResourceID"); - - b.ToTable("RegResource"); - - b.HasData( - new - { - ResourceID = 1, - Description = "Sezionatrice", - IsAsset = true, - IsHuman = false, - UmFix = "€/h", - UmProp = "", - UnitCostFix = 15.0, - UnitCostProp = 0.0 - }, - new - { - ResourceID = 2, - Description = "Linea SAOMAD WoodPecker Just 3500", - IsAsset = true, - IsHuman = false, - UmFix = "€/h", - UmProp = "€/m", - UnitCostFix = 240.0, - UnitCostProp = 1.8999999999999999 - }, - new - { - ResourceID = 3, - Description = "Linea Pantografo", - IsAsset = true, - IsHuman = false, - UmFix = "€/h", - UmProp = "€/m", - UnitCostFix = 90.0, - UnitCostProp = 5.9000000000000004 - }, - new - { - ResourceID = 4, - Description = "Stazione Verniciatura", - IsAsset = true, - IsHuman = false, - UmFix = "€/h", - UmProp = "€/m", - UnitCostFix = 40.0, - UnitCostProp = 1.8999999999999999 - }, - new - { - ResourceID = 5, - Description = "Verniciatura Manuale", - IsAsset = false, - IsHuman = true, - UmFix = "€/h", - UmProp = "€/m", - UnitCostFix = 10.0, - UnitCostProp = 1.8999999999999999 - }, - new - { - ResourceID = 6, - Description = "Montaggio Manuale", - IsAsset = false, - IsHuman = true, - UmFix = "", - UmProp = "€/h", - UnitCostFix = 0.0, - UnitCostProp = 40.0 - }, - new - { - ResourceID = 7, - Description = "Installatore", - IsAsset = false, - IsHuman = true, - UmFix = "", - UmProp = "€/h", - UnitCostFix = 0.0, - UnitCostProp = 40.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", b => - { - b.Property("SellingItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsService") - .HasColumnType("tinyint(1)"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("JobID") - .HasColumnType("int"); - - b.Property("Margin") - .HasColumnType("double"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UM") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SellingItemID"); - - b.HasIndex("JobID"); - - b.ToTable("SellingItem"); - - b.HasData( - new - { - SellingItemID = 1, - Cost = 820.0, - Description = "Finestra anta Singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSPP = "", - JobID = 2, - Margin = 0.20000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 2, - Cost = 150.0, - Description = "Persiana anta singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSPP = "", - JobID = 1, - Margin = 0.10000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 3, - Cost = 200.0, - Description = "Installazione", - ExtItemCode = "", - IsService = true, - ItemCode = 0, - ItemSPP = "", - JobID = 1, - Margin = 0.29999999999999999, - SerStruct = "", - SupplCode = "", - UM = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockMovModel", b => - { - b.Property("StockMovID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); - - b.Property("CodDoc") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("DtCreate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DtMod") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); - - b.Property("MovCod") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QtyRec") - .HasColumnType("double"); - - b.Property("StockStatusId") - .HasColumnType("int"); - - b.Property("UnitVal") - .HasColumnType("double"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("StockMovID"); - - b.HasIndex("MovCod"); - - b.HasIndex("StockStatusId"); - - b.ToTable("StockMov"); - - b.HasData( - new - { - 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), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 5.0, - StockStatusId = 1, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - 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), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 8.0, - StockStatusId = 2, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - 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), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 5.0, - StockStatusId = 3, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - 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), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 4, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - 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), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 10.0, - StockStatusId = 5, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - 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), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 6, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - 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), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 50.0, - StockStatusId = 7, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - 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), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 8, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - 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), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 9, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - 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), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 10, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockStatusModel", b => - { - b.Property("StockStatusId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); - - b.Property("IsDeleted") - .HasColumnType("tinyint(1)"); - - b.Property("IsRemn") - .HasColumnType("tinyint(1)"); - - b.Property("ItemID") - .HasColumnType("int"); - - b.Property("Location") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QtyAvail") - .HasColumnType("double"); - - b.HasKey("StockStatusId"); - - b.HasIndex("ItemID"); - - b.ToTable("StockStatus"); - - b.HasData( - new - { - StockStatusId = 1, - IsDeleted = false, - IsRemn = false, - ItemID = 1, - Location = "B001-001-003", - QtyAvail = 5.0 - }, - new - { - StockStatusId = 2, - IsDeleted = false, - IsRemn = false, - ItemID = 2, - Location = "B001-001-002", - QtyAvail = 8.0 - }, - new - { - StockStatusId = 3, - IsDeleted = false, - IsRemn = false, - ItemID = 3, - Location = "B001-001-001", - QtyAvail = 5.0 - }, - new - { - StockStatusId = 4, - IsDeleted = false, - IsRemn = false, - ItemID = 4, - Location = "V002-001-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 5, - IsDeleted = false, - IsRemn = false, - ItemID = 5, - Location = "V001-001-002", - QtyAvail = 10.0 - }, - new - { - StockStatusId = 6, - IsDeleted = false, - IsRemn = false, - ItemID = 6, - Location = "V001-001-003", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 7, - IsDeleted = false, - IsRemn = false, - ItemID = 8, - Location = "V001-001-003", - QtyAvail = 50.0 - }, - new - { - StockStatusId = 8, - IsDeleted = false, - IsRemn = false, - ItemID = 11, - Location = "S001-002-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 9, - IsDeleted = false, - IsRemn = false, - ItemID = 9, - Location = "S001-002-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 10, - IsDeleted = false, - IsRemn = false, - ItemID = 10, - Location = "S001-001-001", - QtyAvail = 1.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.SupplierModel", b => - { - b.Property("SupplierID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SupplierID"); - - b.ToTable("RegSupplier"); - - b.HasData( - new - { - SupplierID = 1, - CompanyName = "Company One", - FirstName = "Supplier A", - LastName = "Egalware", - VAT = "7294857103879254" - }, - new - { - SupplierID = 2, - CompanyName = "Company Two", - FirstName = "Supplier B", - LastName = "User", - VAT = "7294857103879254" - }, - new - { - SupplierID = 3, - CompanyName = "Company Two", - FirstName = "Supplier C", - LastName = "User Test", - VAT = "7294857103879254" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.TagsModel", b => - { - b.Property("TagID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("TagID"); - - b.ToTable("RegTags"); - - b.HasData( - new - { - TagID = 1, - Description = "Tag 01" - }, - new - { - TagID = 2, - Description = "Tag 02" - }, - new - { - TagID = 3, - Description = "Tag 03" - }, - new - { - TagID = 4, - Description = "Tag 04" - }, - new - { - TagID = 5, - Description = "Tag 05" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ItemGroupModel", "ItemGroupNav") - .WithMany() - .HasForeignKey("CodGroup") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemGroupNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ItemModel", "ItemNav") - .WithMany() - .HasForeignKey("ItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobRowModel", "JobStepNav") - .WithMany() - .HasForeignKey("JobStepID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemNav"); - - b.Navigation("JobStepNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobModel", "JobNav") - .WithMany() - .HasForeignKey("JobID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.PhaseModel", "PhaseNav") - .WithMany() - .HasForeignKey("PhaseID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ResourceModel", "ResourceNav") - .WithMany() - .HasForeignKey("ResourceID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("JobNav"); - - b.Navigation("PhaseNav"); - - b.Navigation("ResourceNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.CustomerModel", "CustomerNav") - .WithMany() - .HasForeignKey("CustomerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.DealerModel", "DealerNav") - .WithMany() - .HasForeignKey("DealerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CustomerNav"); - - b.Navigation("DealerNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.OfferModel", "OfferNav") - .WithMany("OfferRowNav") - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OfferNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.CustomerModel", "CustomerNav") - .WithMany() - .HasForeignKey("CustomerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.DealerModel", "DealerNav") - .WithMany() - .HasForeignKey("DealerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.OfferModel", "OfferNav") - .WithMany() - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CustomerNav"); - - b.Navigation("DealerNav"); - - b.Navigation("OfferNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.OrderModel", "OrderNav") - .WithMany() - .HasForeignKey("OrderID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OrderNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.OrderRowModel", "OrderRowNav") - .WithMany() - .HasForeignKey("OrderRowID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ProductionBatchModel", "ProductionBatchNav") - .WithMany() - .HasForeignKey("ProductionBatchID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OrderRowNav"); - - b.Navigation("ProductionBatchNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.PhaseModel", "PhaseNav") - .WithMany() - .HasForeignKey("PhaseID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ProductionItemModel", "ProdItemNav") - .WithMany() - .HasForeignKey("ProdItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ResourceModel", "ResourceNav") - .WithMany() - .HasForeignKey("ResourceID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("PhaseNav"); - - b.Navigation("ProdItemNav"); - - b.Navigation("ResourceNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobModel", "JobNav") - .WithMany() - .HasForeignKey("JobID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("JobNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockMovModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.MovTypeModel", "MovTypeNav") - .WithMany() - .HasForeignKey("MovCod") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.StockStatusModel", "StockStatusNav") - .WithMany() - .HasForeignKey("StockStatusId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("MovTypeNav"); - - b.Navigation("StockStatusNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockStatusModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ItemModel", "ItemNav") - .WithMany() - .HasForeignKey("ItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferModel", b => - { - b.Navigation("OfferRowNav"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20250916152301_AddItemParentRel.cs b/EgwCoreLib.Lux.Data/Migrations/20250916152301_AddItemParentRel.cs deleted file mode 100644 index 6b5a3c3b..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20250916152301_AddItemParentRel.cs +++ /dev/null @@ -1,310 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EgwCoreLib.Lux.Data.Migrations -{ - /// - public partial class AddItemParentRel : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "ItemIDParent", - table: "RegItem", - type: "int", - nullable: false, - defaultValue: 0); - - 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" }, - 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) }); - - migrationBuilder.UpdateData( - table: "OfferRowList", - keyColumn: "OfferRowID", - keyValue: 2, - columns: new[] { "Inserted", "Modified" }, - 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) }); - - migrationBuilder.UpdateData( - table: "OfferRowList", - keyColumn: "OfferRowID", - keyValue: 3, - columns: new[] { "Inserted", "Modified" }, - 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) }); - - migrationBuilder.UpdateData( - table: "RegItem", - keyColumn: "ItemID", - keyValue: 1, - column: "ItemIDParent", - value: 0); - - migrationBuilder.UpdateData( - table: "RegItem", - keyColumn: "ItemID", - keyValue: 2, - column: "ItemIDParent", - value: 0); - - migrationBuilder.UpdateData( - table: "RegItem", - keyColumn: "ItemID", - keyValue: 3, - column: "ItemIDParent", - value: 0); - - migrationBuilder.UpdateData( - table: "RegItem", - keyColumn: "ItemID", - keyValue: 4, - column: "ItemIDParent", - value: 0); - - migrationBuilder.UpdateData( - table: "RegItem", - keyColumn: "ItemID", - keyValue: 5, - column: "ItemIDParent", - value: 0); - - migrationBuilder.UpdateData( - table: "RegItem", - keyColumn: "ItemID", - keyValue: 6, - column: "ItemIDParent", - value: 0); - - migrationBuilder.UpdateData( - table: "RegItem", - keyColumn: "ItemID", - keyValue: 7, - column: "ItemIDParent", - value: 0); - - migrationBuilder.UpdateData( - table: "RegItem", - keyColumn: "ItemID", - keyValue: 8, - column: "ItemIDParent", - value: 0); - - migrationBuilder.UpdateData( - table: "RegItem", - keyColumn: "ItemID", - keyValue: 9, - column: "ItemIDParent", - value: 0); - - migrationBuilder.UpdateData( - table: "RegItem", - keyColumn: "ItemID", - keyValue: 10, - column: "ItemIDParent", - value: 0); - - migrationBuilder.UpdateData( - table: "RegItem", - keyColumn: "ItemID", - keyValue: 11, - column: "ItemIDParent", - value: 0); - - migrationBuilder.UpdateData( - table: "RegItem", - keyColumn: "ItemID", - keyValue: 12, - column: "ItemIDParent", - value: 0); - - 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)); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "ItemIDParent", - table: "RegItem"); - - migrationBuilder.UpdateData( - table: "Offer", - keyColumn: "OfferID", - keyValue: 1, - columns: new[] { "Inserted", "Modified", "ValidUntil" }, - values: new object[] { new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4215), new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4216), new DateTime(2025, 9, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4212) }); - - migrationBuilder.UpdateData( - table: "OfferRowList", - keyColumn: "OfferRowID", - keyValue: 1, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4243), new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4245) }); - - migrationBuilder.UpdateData( - table: "OfferRowList", - keyColumn: "OfferRowID", - keyValue: 2, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4252), new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4253) }); - - migrationBuilder.UpdateData( - table: "OfferRowList", - keyColumn: "OfferRowID", - keyValue: 3, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4259), new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4261) }); - - migrationBuilder.UpdateData( - table: "StockMov", - keyColumn: "StockMovID", - keyValue: 1, - column: "DtCreate", - value: new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(3939)); - - migrationBuilder.UpdateData( - table: "StockMov", - keyColumn: "StockMovID", - keyValue: 2, - column: "DtCreate", - value: new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(3989)); - - migrationBuilder.UpdateData( - table: "StockMov", - keyColumn: "StockMovID", - keyValue: 3, - column: "DtCreate", - value: new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(3993)); - - migrationBuilder.UpdateData( - table: "StockMov", - keyColumn: "StockMovID", - keyValue: 4, - column: "DtCreate", - value: new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(3997)); - - migrationBuilder.UpdateData( - table: "StockMov", - keyColumn: "StockMovID", - keyValue: 5, - column: "DtCreate", - value: new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4000)); - - migrationBuilder.UpdateData( - table: "StockMov", - keyColumn: "StockMovID", - keyValue: 6, - column: "DtCreate", - value: new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4004)); - - migrationBuilder.UpdateData( - table: "StockMov", - keyColumn: "StockMovID", - keyValue: 7, - column: "DtCreate", - value: new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4008)); - - migrationBuilder.UpdateData( - table: "StockMov", - keyColumn: "StockMovID", - keyValue: 8, - column: "DtCreate", - value: new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4011)); - - migrationBuilder.UpdateData( - table: "StockMov", - keyColumn: "StockMovID", - keyValue: 9, - column: "DtCreate", - value: new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4015)); - - migrationBuilder.UpdateData( - table: "StockMov", - keyColumn: "StockMovID", - keyValue: 10, - column: "DtCreate", - value: new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4019)); - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.Designer.cs deleted file mode 100644 index 383e977c..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.Designer.cs +++ /dev/null @@ -1,2095 +0,0 @@ -// -using System; -using EgwCoreLib.Lux.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace EgwCoreLib.Lux.Data.Migrations -{ - [DbContext(typeof(DataLayerContext))] - [Migration("20250918100936_AggiuntaGenClassVal")] - partial class AggiuntaGenClassVal - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.17") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.CounterModel", b => - { - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("CountName") - .HasColumnType("varchar(255)"); - - b.Property("Counter") - .HasColumnType("int"); - - b.HasKey("RefYear", "CountName"); - - b.ToTable("Counter"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.CustomerModel", b => - { - b.Property("CustomerID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CustomerID"); - - b.ToTable("RegCustomer"); - - b.HasData( - new - { - CustomerID = 1, - CompanyName = "", - FirstName = "Customer A", - LastName = "Egalware", - VAT = "1234567890123456" - }, - new - { - CustomerID = 2, - CompanyName = "", - FirstName = "Customer B", - LastName = "User", - VAT = "1234567890123456" - }, - new - { - CustomerID = 3, - CompanyName = "", - FirstName = "Customer C", - LastName = "User Test", - VAT = "1234567890123456" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.DealerModel", b => - { - b.Property("DealerID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("DealerID"); - - b.ToTable("RegDealer"); - - b.HasData( - new - { - DealerID = 1, - CompanyName = "Company First", - FirstName = "Dealer A", - LastName = "Egalware", - VAT = "9587362514671527" - }, - new - { - DealerID = 2, - CompanyName = "Company First", - FirstName = "Dealer B", - LastName = "User", - VAT = "9587362514671527" - }, - new - { - DealerID = 3, - CompanyName = "Company Second", - FirstName = "Dealer C", - LastName = "User Test", - VAT = "9587362514671527" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.GenClassModel", b => - { - b.Property("ClassCod") - .HasColumnType("varchar(255)"); - - b.Property("Name") - .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("GenValID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); - - b.Property("ClassCod") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Ordinal") - .HasColumnType("int"); - - b.Property("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 = "Legno" - }, - 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("CodGroup") - .HasColumnType("varchar(255)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CodGroup"); - - b.ToTable("RegItemGroup"); - - b.HasData( - new - { - CodGroup = "WindowTrunk", - Description = "Barre legno per lavorazione" - }, - new - { - CodGroup = "WindowGlass", - Description = "Vetri serramento" - }, - new - { - CodGroup = "WindowVarnish", - Description = "Vernici per legno" - }, - new - { - CodGroup = "WindowHardware", - Description = "Ferramenta serramento" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ItemModel", b => - { - b.Property("ItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); - - b.Property("CodGroup") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsService") - .HasColumnType("tinyint(1)"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("ItemIDParent") - .HasColumnType("int"); - - b.Property("ItemType") - .HasColumnType("int"); - - b.Property("Margin") - .HasColumnType("double"); - - b.Property("QtyMax") - .HasColumnType("double"); - - b.Property("QtyMin") - .HasColumnType("double"); - - b.Property("SupplCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UM") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("ItemID"); - - b.HasIndex("CodGroup"); - - b.ToTable("RegItem"); - - b.HasData( - new - { - ItemID = 1, - CodGroup = "WindowTrunk", - Cost = 20.0, - Description = "BARRA-60x80 generica", - ExtItemCode = "", - IsService = false, - ItemCode = 1001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.29999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "BARR.001", - UM = "#" - }, - new - { - ItemID = 2, - CodGroup = "WindowTrunk", - Cost = 16.5, - Description = "Barra 60x80, lunghezza 12m", - ExtItemCode = "BARRA-60x80x12000", - IsService = false, - ItemCode = 1002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.12000", - UM = "#" - }, - new - { - ItemID = 3, - CodGroup = "WindowTrunk", - Cost = 17.5, - Description = "Barra 60x80, lunghezza 8m", - ExtItemCode = "BARRA-60x80x8000", - IsService = false, - ItemCode = 1003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.22, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.8000", - UM = "#" - }, - new - { - ItemID = 4, - CodGroup = "WindowTrunk", - Cost = 15.5, - Description = "Barra 60x80, lunghezza 16m", - ExtItemCode = "BARRA-60x80x16000", - IsService = false, - ItemCode = 1004, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.16000", - UM = "#" - }, - new - { - ItemID = 5, - CodGroup = "WindowGlass", - Cost = 300.0, - Description = "Vetro triplo, basso indice termico, 800x1000", - ExtItemCode = "VETRO-3L-THERMO-800x1000", - IsService = false, - ItemCode = 2001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V3T.800.1000", - UM = "m2" - }, - new - { - ItemID = 6, - CodGroup = "WindowGlass", - Cost = 200.0, - Description = "Vetro doppio, 800x1000", - ExtItemCode = "VETRO-2L-800x1000", - IsService = false, - ItemCode = 2002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.14999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V2.800.1000", - UM = "m2" - }, - new - { - ItemID = 7, - CodGroup = "WindowGlass", - Cost = 250.0, - Description = "Vetro triplo, 800x1000", - ExtItemCode = "VETRO-3L-800x1000", - IsService = false, - ItemCode = 2003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.17999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V3.800.1000", - UM = "m2" - }, - new - { - ItemID = 8, - CodGroup = "WindowVarnish", - Cost = 20.0, - Description = "Vernice trasparente", - ExtItemCode = "VERN-TRASP", - IsService = false, - ItemCode = 3001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "VT.STD", - UM = "l" - }, - new - { - ItemID = 9, - CodGroup = "WindowHardware", - Cost = 65.0, - Description = "Kit standard completo AGB tipo 001", - ExtItemCode = "KIT-001", - IsService = false, - ItemCode = 5001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-KIT-001", - UM = "#" - }, - new - { - ItemID = 10, - CodGroup = "WindowHardware", - Cost = 10.0, - Description = "Cerniera AGB tipo 001", - ExtItemCode = "CERN-001", - IsService = false, - ItemCode = 5002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-CERN-001", - UM = "#" - }, - new - { - ItemID = 11, - CodGroup = "WindowHardware", - Cost = 15.0, - Description = "Serratura AGB tipo 001", - ExtItemCode = "SERR-001", - IsService = false, - ItemCode = 5003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-SERR-001", - UM = "#" - }, - new - { - ItemID = 12, - CodGroup = "WindowHardware", - Cost = 25.0, - Description = "Maniglia AGB tipo 001", - ExtItemCode = "MAN-001", - IsService = false, - ItemCode = 5004, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-MAN-001", - UM = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobModel", b => - { - b.Property("JobID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("JobID"); - - b.ToTable("JobList"); - - b.HasData( - new - { - JobID = 1, - Description = "Rivendita / servizi" - }, - new - { - JobID = 2, - Description = "Serramento Completo Legno su linea Saomad e installatore interno" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowItemModel", b => - { - b.Property("JobStepItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("ItemID") - .HasColumnType("int"); - - b.Property("JobStepID") - .HasColumnType("int"); - - b.Property("ProductivityRate") - .HasColumnType("double"); - - b.HasKey("JobStepItemID"); - - b.HasIndex("ItemID"); - - b.HasIndex("JobStepID"); - - b.ToTable("JobRowItemList"); - - b.HasData( - new - { - JobRowItemID = 1, - Description = "Grezzo legno abete", - Index = 1, - ItemID = 1, - JobRowID = 1, - Qty = 1.0 - }, - new - { - JobRowItemID = 2, - Description = "Vernice trasparente standard 1L", - Index = 2, - ItemID = 8, - JobRowID = 3, - Qty = 0.10000000000000001 - }, - new - { - JobRowItemID = 3, - Description = "Ferramenta AGB - rif. AGFD.00000.00000", - Index = 3, - ItemID = 9, - JobRowID = 4, - Qty = 1.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowModel", b => - { - b.Property("JobStepID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("JobID") - .HasColumnType("int"); - - b.Property("PhaseID") - .HasColumnType("int"); - - b.Property("ProductivityRate") - .HasColumnType("double"); - - b.Property("ResourceID") - .HasColumnType("int"); - - b.HasKey("JobStepID"); - - b.HasIndex("JobID"); - - b.HasIndex("PhaseID"); - - b.HasIndex("ResourceID"); - - b.ToTable("JobRowList"); - - b.HasData( - new - { - JobRowID = 1, - Description = "", - Index = 1, - JobID = 2, - PhaseID = 1, - Qty = 1.0, - ResourceID = 1 - }, - new - { - JobRowID = 2, - Description = "", - Index = 2, - JobID = 2, - PhaseID = 2, - Qty = 1.0, - ResourceID = 2 - }, - new - { - JobRowID = 3, - Description = "", - Index = 3, - JobID = 2, - PhaseID = 3, - Qty = 1.0, - ResourceID = 4 - }, - new - { - JobRowID = 4, - Description = "", - Index = 4, - JobID = 2, - PhaseID = 4, - Qty = 1.0, - ResourceID = 6 - }, - new - { - JobRowID = 5, - Description = "", - Index = 5, - JobID = 2, - PhaseID = 6, - Qty = 1.0, - ResourceID = 7 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.MovTypeModel", b => - { - b.Property("MovCod") - .HasColumnType("varchar(255)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("MovCod"); - - b.ToTable("RegMovType"); - - b.HasData( - new - { - MovCod = "CAR", - Description = "Carico a magazzino" - }, - new - { - MovCod = "MOV", - Description = "Movimento interno (spostamento)" - }, - new - { - MovCod = "ND", - Description = "Non Definito" - }, - new - { - MovCod = "OFOR", - Description = "Ordine Fornitore" - }, - new - { - MovCod = "RETT", - Description = "Rettifica magazzino" - }, - new - { - MovCod = "SCAR", - Description = "Scarico da magazzino" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferModel", b => - { - b.Property("OfferID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); - - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("OffertState") - .HasColumnType("int"); - - b.Property("RefNum") - .HasColumnType("int"); - - b.Property("RefRev") - .HasColumnType("int"); - - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("ValidUntil") - .HasColumnType("datetime(6)"); - - b.HasKey("OfferID"); - - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - - b.ToTable("Offer"); - - b.HasData( - new - { - OfferID = 1, - CustomerID = 2, - DealerID = 2, - Description = "Offerta per tre serramenti", - 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, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9080) - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferRowModel", b => - { - b.Property("OfferRowID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); - - b.Property("BomOk") - .HasColumnType("tinyint(1)"); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("Environment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("ItemBOM") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ItemOk") - .HasColumnType("tinyint(1)"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OfferID") - .HasColumnType("int"); - - b.Property("OfferRowUID") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ProductivityRate") - .HasColumnType("double"); - - b.Property("RowNum") - .HasColumnType("int"); - - b.Property("SellingItemID") - .HasColumnType("int"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("OfferRowID"); - - b.HasIndex("OfferID"); - - b.HasIndex("SellingItemID"); - - b.ToTable("OfferRowList"); - - b.HasData( - new - { - OfferRowID = 1, - BomOk = true, - Cost = 950.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9186), - ItemBOM = "", - ItemOk = true, - ItemSPP = "{}", - Modified = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9188), - Note = "Finestra anta singola 2025", - OfferID = 1, - OfferRowUID = "OFF250000000001", - Qty = 3.0, - RowNum = 1, - SellingItemID = 1, - SerStruct = "{}" - }, - new - { - OfferRowID = 2, - BomOk = true, - Cost = 160.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9200), - ItemBOM = "", - ItemOk = true, - ItemSPP = "{}", - Modified = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9202), - Note = "Persiana per Finestra anta singola 2025", - OfferID = 1, - OfferRowUID = "OFF250000000002", - Qty = 3.0, - RowNum = 2, - SellingItemID = 2, - SerStruct = "{}" - }, - new - { - OfferRowID = 3, - BomOk = true, - Cost = 200.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9211), - ItemBOM = "", - ItemOk = true, - ItemSPP = "{}", - Modified = new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9213), - Note = "Installazione serramento", - OfferID = 1, - OfferRowUID = "OFF250000000003", - Qty = 3.0, - RowNum = 3, - SellingItemID = 3, - SerStruct = "{}" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderModel", b => - { - b.Property("OrderID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); - - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("OfferID") - .HasColumnType("int"); - - b.Property("OffertState") - .HasColumnType("int"); - - b.Property("RefNum") - .HasColumnType("int"); - - b.Property("RefRev") - .HasColumnType("int"); - - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("ValidUntil") - .HasColumnType("datetime(6)"); - - b.HasKey("OrderID"); - - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - - b.HasIndex("OfferID"); - - b.ToTable("Order"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderRowModel", b => - { - b.Property("OrderRowID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrderID") - .HasColumnType("int"); - - b.Property("ProductivityRate") - .HasColumnType("double"); - - b.Property("RowNum") - .HasColumnType("int"); - - b.Property("SellingItemID") - .HasColumnType("int"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("OrderRowID"); - - b.HasIndex("OrderID"); - - b.HasIndex("SellingItemID"); - - b.ToTable("OrderRowList"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.PhaseModel", b => - { - b.Property("PhaseID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("PhaseID"); - - b.ToTable("RegPhase"); - - b.HasData( - new - { - PhaseID = 1, - Description = "Taglio tronchetti" - }, - new - { - PhaseID = 2, - Description = "Lavorazione pezzi serramento" - }, - new - { - PhaseID = 3, - Description = "Verniciatura" - }, - new - { - PhaseID = 4, - Description = "Assemblaggio completo" - }, - new - { - PhaseID = 5, - Description = "Assemblaggio Ferramenta" - }, - new - { - PhaseID = 6, - Description = "Installazione e posa in opera" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionBatchModel", b => - { - b.Property("ProductionBatchID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("DueDate") - .HasColumnType("datetime(6)"); - - b.HasKey("ProductionBatchID"); - - b.ToTable("ProductionBatch"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemModel", b => - { - b.Property("ProdItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("OrderRowID") - .HasColumnType("int"); - - b.Property("ProductionBatchID") - .HasColumnType("int"); - - b.HasKey("ProdItemID"); - - b.HasIndex("OrderRowID"); - - b.HasIndex("ProductionBatchID"); - - b.ToTable("ProductionItem"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemRowModel", b => - { - b.Property("ProdItemStepID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("PhaseID") - .HasColumnType("int"); - - b.Property("ProdItemID") - .HasColumnType("int"); - - b.Property("ProductivityRate") - .HasColumnType("double"); - - b.Property("ResourceID") - .HasColumnType("int"); - - b.Property("WorkTime") - .HasColumnType("double"); - - b.HasKey("ProdItemStepID"); - - b.HasIndex("PhaseID"); - - b.HasIndex("ProdItemID"); - - b.HasIndex("ResourceID"); - - b.ToTable("ProductionItemRowList"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ResourceModel", b => - { - b.Property("ResourceID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsAsset") - .HasColumnType("tinyint(1)"); - - b.Property("IsHuman") - .HasColumnType("tinyint(1)"); - - b.Property("UmFix") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UmProp") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UnitCostFix") - .HasColumnType("double"); - - b.Property("UnitCostProp") - .HasColumnType("double"); - - b.HasKey("ResourceID"); - - b.ToTable("RegResource"); - - b.HasData( - new - { - ResourceID = 1, - Description = "Sezionatrice", - IsAsset = true, - IsHuman = false, - UmFix = "€/h", - UmProp = "", - UnitCostFix = 15.0, - UnitCostProp = 0.0 - }, - new - { - ResourceID = 2, - Description = "Linea SAOMAD WoodPecker Just 3500", - IsAsset = true, - IsHuman = false, - UmFix = "€/h", - UmProp = "€/m", - UnitCostFix = 240.0, - UnitCostProp = 1.8999999999999999 - }, - new - { - ResourceID = 3, - Description = "Linea Pantografo", - IsAsset = true, - IsHuman = false, - UmFix = "€/h", - UmProp = "€/m", - UnitCostFix = 90.0, - UnitCostProp = 5.9000000000000004 - }, - new - { - ResourceID = 4, - Description = "Stazione Verniciatura", - IsAsset = true, - IsHuman = false, - UmFix = "€/h", - UmProp = "€/m", - UnitCostFix = 40.0, - UnitCostProp = 1.8999999999999999 - }, - new - { - ResourceID = 5, - Description = "Verniciatura Manuale", - IsAsset = false, - IsHuman = true, - UmFix = "€/h", - UmProp = "€/m", - UnitCostFix = 10.0, - UnitCostProp = 1.8999999999999999 - }, - new - { - ResourceID = 6, - Description = "Montaggio Manuale", - IsAsset = false, - IsHuman = true, - UmFix = "", - UmProp = "€/h", - UnitCostFix = 0.0, - UnitCostProp = 40.0 - }, - new - { - ResourceID = 7, - Description = "Installatore", - IsAsset = false, - IsHuman = true, - UmFix = "", - UmProp = "€/h", - UnitCostFix = 0.0, - UnitCostProp = 40.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", b => - { - b.Property("SellingItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsService") - .HasColumnType("tinyint(1)"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("JobID") - .HasColumnType("int"); - - b.Property("Margin") - .HasColumnType("double"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UM") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SellingItemID"); - - b.HasIndex("JobID"); - - b.ToTable("SellingItem"); - - b.HasData( - new - { - SellingItemID = 1, - Cost = 820.0, - Description = "Finestra anta Singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSPP = "", - JobID = 2, - Margin = 0.20000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 2, - Cost = 150.0, - Description = "Persiana anta singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSPP = "", - JobID = 1, - Margin = 0.10000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 3, - Cost = 200.0, - Description = "Installazione", - ExtItemCode = "", - IsService = true, - ItemCode = 0, - ItemSPP = "", - JobID = 1, - Margin = 0.29999999999999999, - SerStruct = "", - SupplCode = "", - UM = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockMovModel", b => - { - b.Property("StockMovID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); - - b.Property("CodDoc") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("DtCreate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DtMod") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); - - b.Property("MovCod") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QtyRec") - .HasColumnType("double"); - - b.Property("StockStatusId") - .HasColumnType("int"); - - b.Property("UnitVal") - .HasColumnType("double"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("StockMovID"); - - b.HasIndex("MovCod"); - - b.HasIndex("StockStatusId"); - - b.ToTable("StockMov"); - - b.HasData( - new - { - StockMovID = 1, - CodDoc = "", - 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, - StockStatusId = 1, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 2, - CodDoc = "", - 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, - StockStatusId = 2, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 3, - CodDoc = "", - 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, - StockStatusId = 3, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 4, - CodDoc = "", - 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, - StockStatusId = 4, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 5, - CodDoc = "", - 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, - StockStatusId = 5, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 6, - CodDoc = "", - 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, - StockStatusId = 6, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 7, - CodDoc = "", - 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, - StockStatusId = 7, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 8, - CodDoc = "", - 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, - StockStatusId = 8, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 9, - CodDoc = "", - 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, - StockStatusId = 9, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 10, - CodDoc = "", - 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, - StockStatusId = 10, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockStatusModel", b => - { - b.Property("StockStatusId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); - - b.Property("IsDeleted") - .HasColumnType("tinyint(1)"); - - b.Property("IsRemn") - .HasColumnType("tinyint(1)"); - - b.Property("ItemID") - .HasColumnType("int"); - - b.Property("Location") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QtyAvail") - .HasColumnType("double"); - - b.HasKey("StockStatusId"); - - b.HasIndex("ItemID"); - - b.ToTable("StockStatus"); - - b.HasData( - new - { - StockStatusId = 1, - IsDeleted = false, - IsRemn = false, - ItemID = 1, - Location = "B001-001-003", - QtyAvail = 5.0 - }, - new - { - StockStatusId = 2, - IsDeleted = false, - IsRemn = false, - ItemID = 2, - Location = "B001-001-002", - QtyAvail = 8.0 - }, - new - { - StockStatusId = 3, - IsDeleted = false, - IsRemn = false, - ItemID = 3, - Location = "B001-001-001", - QtyAvail = 5.0 - }, - new - { - StockStatusId = 4, - IsDeleted = false, - IsRemn = false, - ItemID = 4, - Location = "V002-001-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 5, - IsDeleted = false, - IsRemn = false, - ItemID = 5, - Location = "V001-001-002", - QtyAvail = 10.0 - }, - new - { - StockStatusId = 6, - IsDeleted = false, - IsRemn = false, - ItemID = 6, - Location = "V001-001-003", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 7, - IsDeleted = false, - IsRemn = false, - ItemID = 8, - Location = "V001-001-003", - QtyAvail = 50.0 - }, - new - { - StockStatusId = 8, - IsDeleted = false, - IsRemn = false, - ItemID = 11, - Location = "S001-002-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 9, - IsDeleted = false, - IsRemn = false, - ItemID = 9, - Location = "S001-002-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 10, - IsDeleted = false, - IsRemn = false, - ItemID = 10, - Location = "S001-001-001", - QtyAvail = 1.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.SupplierModel", b => - { - b.Property("SupplierID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SupplierID"); - - b.ToTable("RegSupplier"); - - b.HasData( - new - { - SupplierID = 1, - CompanyName = "Company One", - FirstName = "Supplier A", - LastName = "Egalware", - VAT = "7294857103879254" - }, - new - { - SupplierID = 2, - CompanyName = "Company Two", - FirstName = "Supplier B", - LastName = "User", - VAT = "7294857103879254" - }, - new - { - SupplierID = 3, - CompanyName = "Company Two", - FirstName = "Supplier C", - LastName = "User Test", - VAT = "7294857103879254" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.TagsModel", b => - { - b.Property("TagID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("TagID"); - - b.ToTable("RegTags"); - - b.HasData( - new - { - TagID = 1, - Description = "Tag 01" - }, - new - { - TagID = 2, - Description = "Tag 02" - }, - new - { - TagID = 3, - Description = "Tag 03" - }, - new - { - TagID = 4, - Description = "Tag 04" - }, - new - { - TagID = 5, - Description = "Tag 05" - }); - }); - - 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") - .WithMany() - .HasForeignKey("CodGroup") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemGroupNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ItemModel", "ItemNav") - .WithMany() - .HasForeignKey("ItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobRowModel", "JobStepNav") - .WithMany() - .HasForeignKey("JobStepID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemNav"); - - b.Navigation("JobStepNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.JobRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobModel", "JobNav") - .WithMany() - .HasForeignKey("JobID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.PhaseModel", "PhaseNav") - .WithMany() - .HasForeignKey("PhaseID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ResourceModel", "ResourceNav") - .WithMany() - .HasForeignKey("ResourceID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("JobNav"); - - b.Navigation("PhaseNav"); - - b.Navigation("ResourceNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.CustomerModel", "CustomerNav") - .WithMany() - .HasForeignKey("CustomerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.DealerModel", "DealerNav") - .WithMany() - .HasForeignKey("DealerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CustomerNav"); - - b.Navigation("DealerNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.OfferModel", "OfferNav") - .WithMany("OfferRowNav") - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OfferNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.CustomerModel", "CustomerNav") - .WithMany() - .HasForeignKey("CustomerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.DealerModel", "DealerNav") - .WithMany() - .HasForeignKey("DealerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.OfferModel", "OfferNav") - .WithMany() - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CustomerNav"); - - b.Navigation("DealerNav"); - - b.Navigation("OfferNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OrderRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.OrderModel", "OrderNav") - .WithMany() - .HasForeignKey("OrderID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OrderNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.OrderRowModel", "OrderRowNav") - .WithMany() - .HasForeignKey("OrderRowID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ProductionBatchModel", "ProductionBatchNav") - .WithMany() - .HasForeignKey("ProductionBatchID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OrderRowNav"); - - b.Navigation("ProductionBatchNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.ProductionItemRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.PhaseModel", "PhaseNav") - .WithMany() - .HasForeignKey("PhaseID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ProductionItemModel", "ProdItemNav") - .WithMany() - .HasForeignKey("ProdItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ResourceModel", "ResourceNav") - .WithMany() - .HasForeignKey("ResourceID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("PhaseNav"); - - b.Navigation("ProdItemNav"); - - b.Navigation("ResourceNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.SellingItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.JobModel", "JobNav") - .WithMany() - .HasForeignKey("JobID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("JobNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockMovModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.MovTypeModel", "MovTypeNav") - .WithMany() - .HasForeignKey("MovCod") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.StockStatusModel", "StockStatusNav") - .WithMany() - .HasForeignKey("StockStatusId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("MovTypeNav"); - - b.Navigation("StockStatusNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.StockStatusModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.ItemModel", "ItemNav") - .WithMany() - .HasForeignKey("ItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.OfferModel", b => - { - b.Navigation("OfferRowNav"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.cs b/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.cs deleted file mode 100644 index 52c20bf6..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20250918100936_AggiuntaGenClassVal.cs +++ /dev/null @@ -1,290 +0,0 @@ -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 -{ - /// - public partial class AggiuntaGenClassVal : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "GenClass", - columns: table => new - { - ClassCod = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(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(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - ClassCod = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Ordinal = table.Column(type: "int", nullable: false), - ValString = table.Column(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", "Name" }, - 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, "Legno" }, - { 4, "WoodCol", 2, "Bianco" }, - { 5, "WoodCol", 3, "Rosso" }, - { 6, "WoodCol", 4, "Nero" } - }); - - migrationBuilder.CreateIndex( - name: "IX_GenValue_ClassCod", - table: "GenValue", - column: "ClassCod"); - } - - /// - 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)); - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20250919164620_GlobalModelUpdate.cs b/EgwCoreLib.Lux.Data/Migrations/20250919164620_GlobalModelUpdate.cs deleted file mode 100644 index 6a3211cd..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20250919164620_GlobalModelUpdate.cs +++ /dev/null @@ -1,2256 +0,0 @@ -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 -{ - /// - public partial class GlobalModelUpdate : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Counter"); - - migrationBuilder.DropTable( - name: "GenValue"); - - migrationBuilder.DropTable( - name: "JobRowItemList"); - - migrationBuilder.DropTable( - name: "OfferRowList"); - - migrationBuilder.DropTable( - name: "ProductionItemRowList"); - - migrationBuilder.DropTable( - name: "RegSupplier"); - - migrationBuilder.DropTable( - name: "RegTags"); - - migrationBuilder.DropTable( - name: "StockMov"); - - migrationBuilder.DropTable( - name: "GenClass"); - - migrationBuilder.DropTable( - name: "JobRowList"); - - migrationBuilder.DropTable( - name: "ProductionItem"); - - migrationBuilder.DropTable( - name: "RegMovType"); - - migrationBuilder.DropTable( - name: "StockStatus"); - - migrationBuilder.DropTable( - name: "RegPhase"); - - migrationBuilder.DropTable( - name: "RegResource"); - - migrationBuilder.DropTable( - name: "OrderRowList"); - - migrationBuilder.DropTable( - name: "ProductionBatch"); - - migrationBuilder.DropTable( - name: "RegItem"); - - migrationBuilder.DropTable( - name: "Order"); - - migrationBuilder.DropTable( - name: "SellingItem"); - - migrationBuilder.DropTable( - name: "RegItemGroup"); - - migrationBuilder.DropTable( - name: "Offer"); - - migrationBuilder.DropTable( - name: "JobList"); - - migrationBuilder.DropTable( - name: "RegCustomer"); - - migrationBuilder.DropTable( - name: "RegDealer"); - - migrationBuilder.CreateTable( - name: "cost_driver", - columns: table => new - { - CostDriverID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Unit = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Descript = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_cost_driver", x => x.CostDriverID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "item_group", - columns: table => new - { - CodGroup = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_item_group", x => x.CodGroup); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "item_supplier", - columns: table => new - { - SupplierID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CompanyName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FirstName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - LastName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - VAT = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_item_supplier", x => x.SupplierID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "production_batch", - columns: table => new - { - ProductionBatchID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DueDate = table.Column(type: "datetime(6)", nullable: false), - DateStart = table.Column(type: "datetime(6)", nullable: true), - DateEnd = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_production_batch", x => x.ProductionBatchID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "sales_customer", - columns: table => new - { - CustomerID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CompanyName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FirstName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - LastName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - VAT = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_sales_customer", x => x.CustomerID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "sales_dealer", - columns: table => new - { - DealerID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CompanyName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FirstName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - LastName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - VAT = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_sales_dealer", x => x.DealerID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "task_job", - columns: table => new - { - JobID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_task_job", x => x.JobID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "task_phase", - columns: table => new - { - PhaseID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_task_phase", x => x.PhaseID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "utils_counter", - columns: table => new - { - RefYear = table.Column(type: "int", nullable: false), - CountName = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Counter = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_utils_counter", x => new { x.RefYear, x.CountName }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "utils_gen_class", - columns: table => new - { - ClassCod = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_utils_gen_class", x => x.ClassCod); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "utils_mov_type", - columns: table => new - { - MovCod = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_utils_mov_type", x => x.MovCod); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "utils_tags", - columns: table => new - { - TagID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_utils_tags", x => x.TagID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "cost_resource", - columns: table => new - { - ResourceID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CostDriverID = table.Column(type: "int", nullable: false), - CostDriverBudget = table.Column(type: "decimal(65,30)", nullable: false), - FixedCost = table.Column(type: "decimal(65,30)", nullable: false), - VariableCost = table.Column(type: "decimal(65,30)", nullable: false), - LaborCost = table.Column(type: "decimal(65,30)", nullable: false), - OverHeadCost = table.Column(type: "decimal(65,30)", nullable: false), - OverHeadPerc = table.Column(type: "decimal(65,30)", nullable: false), - EBTPerc = table.Column(type: "decimal(65,30)", nullable: false), - PriceMargin = table.Column(type: "decimal(65,30)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_cost_resource", x => x.ResourceID); - table.ForeignKey( - name: "FK_cost_resource_cost_driver_CostDriverID", - column: x => x.CostDriverID, - principalTable: "cost_driver", - principalColumn: "CostDriverID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "item_item", - columns: table => new - { - ItemID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CodGroup = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ItemType = table.Column(type: "int", nullable: false), - IsService = table.Column(type: "tinyint(1)", nullable: false), - ItemCode = table.Column(type: "int", nullable: false), - ExtItemCode = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SupplCode = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Cost = table.Column(type: "double", nullable: false), - Margin = table.Column(type: "double", nullable: false), - QtyMin = table.Column(type: "double", nullable: false), - QtyMax = table.Column(type: "double", nullable: false), - UM = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ItemIDParent = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_item_item", x => x.ItemID); - table.ForeignKey( - name: "FK_item_item_item_group_CodGroup", - column: x => x.CodGroup, - principalTable: "item_group", - principalColumn: "CodGroup", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "sales_offer", - columns: table => new - { - OfferID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - RefYear = table.Column(type: "int", nullable: false), - RefNum = table.Column(type: "int", nullable: false), - RefRev = table.Column(type: "int", nullable: false), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CustomerID = table.Column(type: "int", nullable: false), - DealerID = table.Column(type: "int", nullable: false), - ValidUntil = table.Column(type: "datetime(6)", nullable: false), - Inserted = table.Column(type: "datetime(6)", nullable: false), - Modified = table.Column(type: "datetime(6)", nullable: false), - OffertState = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_sales_offer", x => x.OfferID); - table.ForeignKey( - name: "FK_sales_offer_sales_customer_CustomerID", - column: x => x.CustomerID, - principalTable: "sales_customer", - principalColumn: "CustomerID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_sales_offer_sales_dealer_DealerID", - column: x => x.DealerID, - principalTable: "sales_dealer", - principalColumn: "DealerID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "item_selling_item", - columns: table => new - { - SellingItemID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - IsService = table.Column(type: "tinyint(1)", nullable: false), - JobID = table.Column(type: "int", nullable: false), - ItemCode = table.Column(type: "int", nullable: false), - ExtItemCode = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SupplCode = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Cost = table.Column(type: "double", nullable: false), - Margin = table.Column(type: "double", nullable: false), - UM = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SerStruct = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ItemSteps = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_item_selling_item", x => x.SellingItemID); - table.ForeignKey( - name: "FK_item_selling_item_task_job_JobID", - column: x => x.JobID, - principalTable: "task_job", - principalColumn: "JobID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "utils_gen_value", - columns: table => new - { - GenValID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - ClassCod = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Ordinal = table.Column(type: "int", nullable: false), - ValString = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_utils_gen_value", x => x.GenValID); - table.ForeignKey( - name: "FK_utils_gen_value_utils_gen_class_ClassCod", - column: x => x.ClassCod, - principalTable: "utils_gen_class", - principalColumn: "ClassCod", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "task_job_step", - columns: table => new - { - JobStepID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - JobID = table.Column(type: "int", nullable: false), - Index = table.Column(type: "int", nullable: false), - CostDriverID = table.Column(type: "int", nullable: false), - PhaseID = table.Column(type: "int", nullable: false), - ResourceID = table.Column(type: "int", nullable: false), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProductivityRate = table.Column(type: "decimal(65,30)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_task_job_step", x => x.JobStepID); - table.ForeignKey( - name: "FK_task_job_step_cost_driver_CostDriverID", - column: x => x.CostDriverID, - principalTable: "cost_driver", - principalColumn: "CostDriverID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_task_job_step_cost_resource_ResourceID", - column: x => x.ResourceID, - principalTable: "cost_resource", - principalColumn: "ResourceID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_task_job_step_task_job_JobID", - column: x => x.JobID, - principalTable: "task_job", - principalColumn: "JobID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_task_job_step_task_phase_PhaseID", - column: x => x.PhaseID, - principalTable: "task_phase", - principalColumn: "PhaseID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "stock_status", - columns: table => new - { - StockStatusId = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - ItemID = table.Column(type: "int", nullable: false), - QtyAvail = table.Column(type: "double", nullable: false), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false), - IsRemn = table.Column(type: "tinyint(1)", nullable: false), - Location = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_stock_status", x => x.StockStatusId); - table.ForeignKey( - name: "FK_stock_status_item_item_ItemID", - column: x => x.ItemID, - principalTable: "item_item", - principalColumn: "ItemID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "sales_order", - columns: table => new - { - OrderID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - OfferID = table.Column(type: "int", nullable: false), - RefYear = table.Column(type: "int", nullable: false), - RefNum = table.Column(type: "int", nullable: false), - RefRev = table.Column(type: "int", nullable: false), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CustomerID = table.Column(type: "int", nullable: false), - DealerID = table.Column(type: "int", nullable: false), - ValidUntil = table.Column(type: "datetime(6)", nullable: false), - Inserted = table.Column(type: "datetime(6)", nullable: false), - Modified = table.Column(type: "datetime(6)", nullable: false), - OffertState = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_sales_order", x => x.OrderID); - table.ForeignKey( - name: "FK_sales_order_sales_customer_CustomerID", - column: x => x.CustomerID, - principalTable: "sales_customer", - principalColumn: "CustomerID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_sales_order_sales_dealer_DealerID", - column: x => x.DealerID, - principalTable: "sales_dealer", - principalColumn: "DealerID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_sales_order_sales_offer_OfferID", - column: x => x.OfferID, - principalTable: "sales_offer", - principalColumn: "OfferID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "sales_offer_row", - columns: table => new - { - OfferRowID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - OfferID = table.Column(type: "int", nullable: false), - RowNum = table.Column(type: "int", nullable: false), - Environment = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - OfferRowUID = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SellingItemID = table.Column(type: "int", nullable: false), - Qty = table.Column(type: "double", nullable: false), - BomCost = table.Column(type: "double", nullable: false), - BomPrice = table.Column(type: "double", nullable: false), - StepCost = table.Column(type: "double", nullable: false), - StepPrice = table.Column(type: "double", nullable: false), - SerStruct = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ItemSteps = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ItemBOM = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - BomOk = table.Column(type: "tinyint(1)", nullable: false), - ItemOk = table.Column(type: "tinyint(1)", nullable: false), - Note = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Inserted = table.Column(type: "datetime(6)", nullable: false), - Modified = table.Column(type: "datetime(6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_sales_offer_row", x => x.OfferRowID); - table.ForeignKey( - name: "FK_sales_offer_row_item_selling_item_SellingItemID", - column: x => x.SellingItemID, - principalTable: "item_selling_item", - principalColumn: "SellingItemID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_sales_offer_row_sales_offer_OfferID", - column: x => x.OfferID, - principalTable: "sales_offer", - principalColumn: "OfferID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "task_job_step_item", - columns: table => new - { - JobStepItemID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - JobStepID = table.Column(type: "int", nullable: false), - Index = table.Column(type: "int", nullable: false), - ItemID = table.Column(type: "int", nullable: false), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Qty = table.Column(type: "double", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_task_job_step_item", x => x.JobStepItemID); - table.ForeignKey( - name: "FK_task_job_step_item_item_item_ItemID", - column: x => x.ItemID, - principalTable: "item_item", - principalColumn: "ItemID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_task_job_step_item_task_job_step_JobStepID", - column: x => x.JobStepID, - principalTable: "task_job_step", - principalColumn: "JobStepID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "stock_mov", - columns: table => new - { - StockMovID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - StockStatusId = table.Column(type: "int", nullable: false), - DtCreate = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), - DtMod = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn), - QtyRec = table.Column(type: "double", nullable: false), - UnitVal = table.Column(type: "double", nullable: false), - UserId = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - MovCod = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CodDoc = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Note = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_stock_mov", x => x.StockMovID); - table.ForeignKey( - name: "FK_stock_mov_stock_status_StockStatusId", - column: x => x.StockStatusId, - principalTable: "stock_status", - principalColumn: "StockStatusId", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_stock_mov_utils_mov_type_MovCod", - column: x => x.MovCod, - principalTable: "utils_mov_type", - principalColumn: "MovCod", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "sales_order_row", - columns: table => new - { - OrderRowID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - OrderID = table.Column(type: "int", nullable: false), - RowNum = table.Column(type: "int", nullable: false), - SellingItemID = table.Column(type: "int", nullable: false), - BomCost = table.Column(type: "double", nullable: false), - Qty = table.Column(type: "double", nullable: false), - BomPrice = table.Column(type: "double", nullable: false), - StepCost = table.Column(type: "double", nullable: false), - StepPrice = table.Column(type: "double", nullable: false), - SerStruct = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ItemSteps = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Note = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Inserted = table.Column(type: "datetime(6)", nullable: false), - Modified = table.Column(type: "datetime(6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_sales_order_row", x => x.OrderRowID); - table.ForeignKey( - name: "FK_sales_order_row_item_selling_item_SellingItemID", - column: x => x.SellingItemID, - principalTable: "item_selling_item", - principalColumn: "SellingItemID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_sales_order_row_sales_order_OrderID", - column: x => x.OrderID, - principalTable: "sales_order", - principalColumn: "OrderID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "production_item", - columns: table => new - { - ProdItemID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - OrderRowID = table.Column(type: "int", nullable: false), - ItemCode = table.Column(type: "int", nullable: false), - ExtItemCode = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProductionBatchID = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_production_item", x => x.ProdItemID); - table.ForeignKey( - name: "FK_production_item_production_batch_ProductionBatchID", - column: x => x.ProductionBatchID, - principalTable: "production_batch", - principalColumn: "ProductionBatchID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_production_item_sales_order_row_OrderRowID", - column: x => x.OrderRowID, - principalTable: "sales_order_row", - principalColumn: "OrderRowID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "production_item_step", - columns: table => new - { - ProdItemStepID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - ProdItemID = table.Column(type: "int", nullable: false), - Index = table.Column(type: "int", nullable: false), - PhaseID = table.Column(type: "int", nullable: false), - ResourceID = table.Column(type: "int", nullable: false), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Qty = table.Column(type: "double", nullable: false), - DateStart = table.Column(type: "datetime(6)", nullable: true), - DateEnd = table.Column(type: "datetime(6)", nullable: true), - WorkTime = table.Column(type: "double", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_production_item_step", x => x.ProdItemStepID); - table.ForeignKey( - name: "FK_production_item_step_cost_resource_ResourceID", - column: x => x.ResourceID, - principalTable: "cost_resource", - principalColumn: "ResourceID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_production_item_step_production_item_ProdItemID", - column: x => x.ProdItemID, - principalTable: "production_item", - principalColumn: "ProdItemID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_production_item_step_task_phase_PhaseID", - column: x => x.PhaseID, - principalTable: "task_phase", - principalColumn: "PhaseID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.InsertData( - table: "cost_driver", - columns: new[] { "CostDriverID", "Descript", "Name", "Unit" }, - values: new object[,] - { - { 1, "Ore lavorate per step/fase", "WorkHour", "h" }, - { 2, "Metri prodotti per step/fase", "Meter", "m" }, - { 3, "Numero unità prodotte (lavorate) per step/fase", "Unit", "#" } - }); - - migrationBuilder.InsertData( - table: "item_group", - columns: new[] { "CodGroup", "Description" }, - values: new object[,] - { - { "WindowGlass", "Vetri serramento" }, - { "WindowHardware", "Ferramenta serramento" }, - { "WindowTrunk", "Barre legno per lavorazione" }, - { "WindowVarnish", "Vernici per legno" } - }); - - migrationBuilder.InsertData( - table: "item_supplier", - columns: new[] { "SupplierID", "CompanyName", "FirstName", "LastName", "VAT" }, - values: new object[,] - { - { 1, "Company One", "Supplier A", "Egalware", "7294857103879254" }, - { 2, "Company Two", "Supplier B", "User", "7294857103879254" }, - { 3, "Company Two", "Supplier C", "User Test", "7294857103879254" } - }); - - migrationBuilder.InsertData( - table: "sales_customer", - columns: new[] { "CustomerID", "CompanyName", "FirstName", "LastName", "VAT" }, - values: new object[,] - { - { 1, "", "Customer A", "Egalware", "1234567890123456" }, - { 2, "", "Customer B", "User", "1234567890123456" }, - { 3, "", "Customer C", "User Test", "1234567890123456" } - }); - - migrationBuilder.InsertData( - table: "sales_dealer", - columns: new[] { "DealerID", "CompanyName", "FirstName", "LastName", "VAT" }, - values: new object[,] - { - { 1, "Company First", "Dealer A", "Egalware", "9587362514671527" }, - { 2, "Company First", "Dealer B", "User", "9587362514671527" }, - { 3, "Company Second", "Dealer C", "User Test", "9587362514671527" } - }); - - migrationBuilder.InsertData( - table: "task_job", - columns: new[] { "JobID", "Description" }, - values: new object[,] - { - { 1, "Rivendita / servizi" }, - { 2, "Serramento Completo Legno su linea Saomad e installatore interno" } - }); - - migrationBuilder.InsertData( - table: "task_phase", - columns: new[] { "PhaseID", "Description" }, - values: new object[,] - { - { 1, "Taglio tronchetti" }, - { 2, "Lavorazione pezzi serramento" }, - { 3, "Verniciatura" }, - { 4, "Assemblaggio completo" }, - { 5, "Assemblaggio Ferramenta" }, - { 6, "Installazione e posa in opera" } - }); - - migrationBuilder.InsertData( - table: "utils_gen_class", - columns: new[] { "ClassCod", "Description" }, - values: new object[,] - { - { "WoodCol", "Elenco Colori Legno" }, - { "WoodMat", "Elenco Materiali Legno" } - }); - - migrationBuilder.InsertData( - table: "utils_mov_type", - columns: new[] { "MovCod", "Description" }, - values: new object[,] - { - { "CAR", "Carico a magazzino" }, - { "MOV", "Movimento interno (spostamento)" }, - { "ND", "Non Definito" }, - { "OFOR", "Ordine Fornitore" }, - { "RETT", "Rettifica magazzino" }, - { "SCAR", "Scarico da magazzino" } - }); - - migrationBuilder.InsertData( - table: "utils_tags", - columns: new[] { "TagID", "Description" }, - values: new object[,] - { - { 1, "Tag 01" }, - { 2, "Tag 02" }, - { 3, "Tag 03" }, - { 4, "Tag 04" }, - { 5, "Tag 05" } - }); - - migrationBuilder.InsertData( - table: "cost_resource", - columns: new[] { "ResourceID", "CostDriverBudget", "CostDriverID", "EBTPerc", "FixedCost", "LaborCost", "Name", "OverHeadCost", "OverHeadPerc", "PriceMargin", "VariableCost" }, - values: new object[,] - { - { 1, 880m, 1, 0.15m, 12000m, 30m, "Sezionatrice", 5000m, 0.15m, 0.2m, 6000m }, - { 2, 1760m, 1, 0.15m, 100000m, 40m, "Linea SAOMAD WoodPecker Just 3500", 15000m, 0.15m, 0.2m, 30000m }, - { 3, 1760m, 1, 0.15m, 24000m, 35m, "Linea Pantografo", 5000m, 0.15m, 0.2m, 6000m }, - { 4, 880m, 1, 0.15m, 24000m, 30m, "Stazione Verniciatura", 3000m, 0.15m, 0.2m, 6000m }, - { 5, 220m, 1, 0.15m, 6000m, 30m, "Verniciatura Manuale", 3000m, 0.15m, 0.2m, 2000m }, - { 6, 3520m, 1, 0.15m, 500m, 30m, "Montaggio Manuale", 500m, 0.15m, 0.2m, 500m }, - { 7, 3520m, 1, 0.15m, 0m, 40m, "Installatore", 0m, 0.15m, 0.2m, 3000m } - }); - - migrationBuilder.InsertData( - table: "item_item", - columns: new[] { "ItemID", "CodGroup", "Cost", "Description", "ExtItemCode", "IsService", "ItemCode", "ItemIDParent", "ItemType", "Margin", "QtyMax", "QtyMin", "SupplCode", "UM" }, - values: new object[,] - { - { 1, "WindowTrunk", 20.0, "BARRA-60x80 generica", "", false, 1001, 0, 1, 0.29999999999999999, 0.0, 0.0, "BARR.001", "#" }, - { 2, "WindowTrunk", 16.5, "Barra 60x80, lunghezza 12m", "BARRA-60x80x12000", false, 1002, 0, 1, 0.20999999999999999, 0.0, 0.0, "ABC.00123.12000", "#" }, - { 3, "WindowTrunk", 17.5, "Barra 60x80, lunghezza 8m", "BARRA-60x80x8000", false, 1003, 0, 1, 0.22, 0.0, 0.0, "ABC.00123.8000", "#" }, - { 4, "WindowTrunk", 15.5, "Barra 60x80, lunghezza 16m", "BARRA-60x80x16000", false, 1004, 0, 1, 0.20000000000000001, 0.0, 0.0, "ABC.00123.16000", "#" }, - { 5, "WindowGlass", 300.0, "Vetro triplo, basso indice termico, 800x1000", "VETRO-3L-THERMO-800x1000", false, 2001, 0, 1, 0.20000000000000001, 0.0, 0.0, "V3T.800.1000", "m2" }, - { 6, "WindowGlass", 200.0, "Vetro doppio, 800x1000", "VETRO-2L-800x1000", false, 2002, 0, 1, 0.14999999999999999, 0.0, 0.0, "V2.800.1000", "m2" }, - { 7, "WindowGlass", 250.0, "Vetro triplo, 800x1000", "VETRO-3L-800x1000", false, 2003, 0, 1, 0.17999999999999999, 0.0, 0.0, "V3.800.1000", "m2" }, - { 8, "WindowVarnish", 20.0, "Vernice trasparente", "VERN-TRASP", false, 3001, 0, 1, 0.20000000000000001, 0.0, 0.0, "VT.STD", "l" }, - { 9, "WindowHardware", 65.0, "Kit standard completo AGB tipo 001", "KIT-001", false, 5001, 0, 1, 0.20000000000000001, 0.0, 0.0, "AGB-KIT-001", "#" }, - { 10, "WindowHardware", 10.0, "Cerniera AGB tipo 001", "CERN-001", false, 5002, 0, 1, 0.20000000000000001, 0.0, 0.0, "AGB-CERN-001", "#" }, - { 11, "WindowHardware", 15.0, "Serratura AGB tipo 001", "SERR-001", false, 5003, 0, 1, 0.20000000000000001, 0.0, 0.0, "AGB-SERR-001", "#" }, - { 12, "WindowHardware", 25.0, "Maniglia AGB tipo 001", "MAN-001", false, 5004, 0, 1, 0.20000000000000001, 0.0, 0.0, "AGB-MAN-001", "#" } - }); - - migrationBuilder.InsertData( - table: "item_selling_item", - columns: new[] { "SellingItemID", "Cost", "Description", "ExtItemCode", "IsService", "ItemCode", "ItemSteps", "JobID", "Margin", "SerStruct", "SupplCode", "UM" }, - values: new object[,] - { - { 1, 820.0, "Finestra anta Singola", "", false, 0, "", 2, 0.20000000000000001, "", "", "#" }, - { 2, 150.0, "Persiana anta singola", "", false, 0, "", 1, 0.10000000000000001, "", "", "#" }, - { 3, 200.0, "Installazione", "", true, 0, "", 1, 0.29999999999999999, "", "", "#" } - }); - - migrationBuilder.InsertData( - table: "sales_offer", - columns: new[] { "OfferID", "CustomerID", "DealerID", "Description", "Inserted", "Modified", "OffertState", "RefNum", "RefRev", "RefYear", "ValidUntil" }, - values: new object[] { 1, 2, 2, "Offerta per tre serramenti", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1216), new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1218), 0, 1, 1, 2024, new DateTime(2025, 10, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1213) }); - - migrationBuilder.InsertData( - table: "utils_gen_value", - columns: new[] { "GenValID", "ClassCod", "Ordinal", "ValString" }, - values: new object[,] - { - { 1, "WoodMat", 1, "Pine" }, - { 2, "WoodMat", 2, "Maple" }, - { 3, "WoodCol", 1, "Legno" }, - { 4, "WoodCol", 2, "Bianco" }, - { 5, "WoodCol", 3, "Rosso" }, - { 6, "WoodCol", 4, "Nero" } - }); - - migrationBuilder.InsertData( - table: "sales_offer_row", - columns: new[] { "OfferRowID", "BomCost", "BomOk", "BomPrice", "Environment", "Inserted", "ItemBOM", "ItemOk", "ItemSteps", "Modified", "Note", "OfferID", "OfferRowUID", "Qty", "RowNum", "SellingItemID", "SerStruct", "StepCost", "StepPrice" }, - values: new object[,] - { - { 1, 950.0, true, 0.0, "WINDOW", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1314), "", true, "{}", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1317), "Finestra anta singola 2025", 1, "OFF250000000001", 3.0, 1, 1, "{}", 0.0, 0.0 }, - { 2, 160.0, true, 0.0, "WINDOW", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1336), "", true, "{}", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1338), "Persiana per Finestra anta singola 2025", 1, "OFF250000000002", 3.0, 2, 2, "{}", 0.0, 0.0 }, - { 3, 200.0, true, 0.0, "WINDOW", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1350), "", true, "{}", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1352), "Installazione serramento", 1, "OFF250000000003", 3.0, 3, 3, "{}", 0.0, 0.0 } - }); - - migrationBuilder.InsertData( - table: "stock_status", - columns: new[] { "StockStatusId", "IsDeleted", "IsRemn", "ItemID", "Location", "QtyAvail" }, - values: new object[,] - { - { 1, false, false, 1, "B001-001-003", 5.0 }, - { 2, false, false, 2, "B001-001-002", 8.0 }, - { 3, false, false, 3, "B001-001-001", 5.0 }, - { 4, false, false, 4, "V002-001-001", 1.0 }, - { 5, false, false, 5, "V001-001-002", 10.0 }, - { 6, false, false, 6, "V001-001-003", 1.0 }, - { 7, false, false, 8, "V001-001-003", 50.0 }, - { 8, false, false, 11, "S001-002-001", 1.0 }, - { 9, false, false, 9, "S001-002-001", 1.0 }, - { 10, false, false, 10, "S001-001-001", 1.0 } - }); - - migrationBuilder.InsertData( - table: "task_job_step", - columns: new[] { "JobStepID", "CostDriverID", "Description", "Index", "JobID", "PhaseID", "ProductivityRate", "ResourceID" }, - values: new object[,] - { - { 1, 3, "", 1, 2, 1, 1m, 1 }, - { 2, 2, "", 2, 2, 2, 1m, 2 }, - { 3, 3, "", 3, 2, 3, 1m, 4 }, - { 4, 3, "", 4, 2, 4, 1m, 6 }, - { 5, 3, "", 5, 2, 6, 1m, 7 } - }); - - migrationBuilder.InsertData( - table: "stock_mov", - columns: new[] { "StockMovID", "CodDoc", "DtCreate", "MovCod", "Note", "QtyRec", "StockStatusId", "UnitVal", "UserId" }, - values: new object[,] - { - { 1, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(844), "CAR", "DEMO", 5.0, 1, 0.0, "samuele.locatelli@egalware.com" }, - { 2, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(892), "CAR", "DEMO", 8.0, 2, 0.0, "samuele.locatelli@egalware.com" }, - { 3, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(897), "CAR", "DEMO", 5.0, 3, 0.0, "samuele.locatelli@egalware.com" }, - { 4, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(901), "CAR", "DEMO", 1.0, 4, 0.0, "samuele.locatelli@egalware.com" }, - { 5, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(905), "CAR", "DEMO", 10.0, 5, 0.0, "samuele.locatelli@egalware.com" }, - { 6, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(909), "CAR", "DEMO", 1.0, 6, 0.0, "samuele.locatelli@egalware.com" }, - { 7, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(914), "CAR", "DEMO", 50.0, 7, 0.0, "samuele.locatelli@egalware.com" }, - { 8, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(918), "CAR", "DEMO", 1.0, 8, 0.0, "samuele.locatelli@egalware.com" }, - { 9, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(922), "CAR", "DEMO", 1.0, 9, 0.0, "samuele.locatelli@egalware.com" }, - { 10, "", new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(927), "CAR", "DEMO", 1.0, 10, 0.0, "samuele.locatelli@egalware.com" } - }); - - migrationBuilder.InsertData( - table: "task_job_step_item", - columns: new[] { "JobStepItemID", "Description", "Index", "ItemID", "JobStepID", "Qty" }, - values: new object[,] - { - { 1, "Grezzo legno abete", 1, 1, 1, 1.0 }, - { 2, "Vernice trasparente standard 1L", 2, 8, 3, 0.10000000000000001 }, - { 3, "Ferramenta AGB - rif. AGFD.00000.00000", 3, 9, 4, 1.0 } - }); - - migrationBuilder.CreateIndex( - name: "IX_cost_resource_CostDriverID", - table: "cost_resource", - column: "CostDriverID"); - - migrationBuilder.CreateIndex( - name: "IX_item_item_CodGroup", - table: "item_item", - column: "CodGroup"); - - migrationBuilder.CreateIndex( - name: "IX_item_selling_item_JobID", - table: "item_selling_item", - column: "JobID"); - - migrationBuilder.CreateIndex( - name: "IX_production_item_OrderRowID", - table: "production_item", - column: "OrderRowID"); - - migrationBuilder.CreateIndex( - name: "IX_production_item_ProductionBatchID", - table: "production_item", - column: "ProductionBatchID"); - - migrationBuilder.CreateIndex( - name: "IX_production_item_step_PhaseID", - table: "production_item_step", - column: "PhaseID"); - - migrationBuilder.CreateIndex( - name: "IX_production_item_step_ProdItemID", - table: "production_item_step", - column: "ProdItemID"); - - migrationBuilder.CreateIndex( - name: "IX_production_item_step_ResourceID", - table: "production_item_step", - column: "ResourceID"); - - migrationBuilder.CreateIndex( - name: "IX_sales_offer_CustomerID", - table: "sales_offer", - column: "CustomerID"); - - migrationBuilder.CreateIndex( - name: "IX_sales_offer_DealerID", - table: "sales_offer", - column: "DealerID"); - - migrationBuilder.CreateIndex( - name: "IX_sales_offer_row_OfferID", - table: "sales_offer_row", - column: "OfferID"); - - migrationBuilder.CreateIndex( - name: "IX_sales_offer_row_SellingItemID", - table: "sales_offer_row", - column: "SellingItemID"); - - migrationBuilder.CreateIndex( - name: "IX_sales_order_CustomerID", - table: "sales_order", - column: "CustomerID"); - - migrationBuilder.CreateIndex( - name: "IX_sales_order_DealerID", - table: "sales_order", - column: "DealerID"); - - migrationBuilder.CreateIndex( - name: "IX_sales_order_OfferID", - table: "sales_order", - column: "OfferID"); - - migrationBuilder.CreateIndex( - name: "IX_sales_order_row_OrderID", - table: "sales_order_row", - column: "OrderID"); - - migrationBuilder.CreateIndex( - name: "IX_sales_order_row_SellingItemID", - table: "sales_order_row", - column: "SellingItemID"); - - migrationBuilder.CreateIndex( - name: "IX_stock_mov_MovCod", - table: "stock_mov", - column: "MovCod"); - - migrationBuilder.CreateIndex( - name: "IX_stock_mov_StockStatusId", - table: "stock_mov", - column: "StockStatusId"); - - migrationBuilder.CreateIndex( - name: "IX_stock_status_ItemID", - table: "stock_status", - column: "ItemID"); - - migrationBuilder.CreateIndex( - name: "IX_task_job_step_CostDriverID", - table: "task_job_step", - column: "CostDriverID"); - - migrationBuilder.CreateIndex( - name: "IX_task_job_step_JobID", - table: "task_job_step", - column: "JobID"); - - migrationBuilder.CreateIndex( - name: "IX_task_job_step_PhaseID", - table: "task_job_step", - column: "PhaseID"); - - migrationBuilder.CreateIndex( - name: "IX_task_job_step_ResourceID", - table: "task_job_step", - column: "ResourceID"); - - migrationBuilder.CreateIndex( - name: "IX_task_job_step_item_ItemID", - table: "task_job_step_item", - column: "ItemID"); - - migrationBuilder.CreateIndex( - name: "IX_task_job_step_item_JobStepID", - table: "task_job_step_item", - column: "JobStepID"); - - migrationBuilder.CreateIndex( - name: "IX_utils_gen_value_ClassCod", - table: "utils_gen_value", - column: "ClassCod"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "item_supplier"); - - migrationBuilder.DropTable( - name: "production_item_step"); - - migrationBuilder.DropTable( - name: "sales_offer_row"); - - migrationBuilder.DropTable( - name: "stock_mov"); - - migrationBuilder.DropTable( - name: "task_job_step_item"); - - migrationBuilder.DropTable( - name: "utils_counter"); - - migrationBuilder.DropTable( - name: "utils_gen_value"); - - migrationBuilder.DropTable( - name: "utils_tags"); - - migrationBuilder.DropTable( - name: "production_item"); - - migrationBuilder.DropTable( - name: "stock_status"); - - migrationBuilder.DropTable( - name: "utils_mov_type"); - - migrationBuilder.DropTable( - name: "task_job_step"); - - migrationBuilder.DropTable( - name: "utils_gen_class"); - - migrationBuilder.DropTable( - name: "production_batch"); - - migrationBuilder.DropTable( - name: "sales_order_row"); - - migrationBuilder.DropTable( - name: "item_item"); - - migrationBuilder.DropTable( - name: "cost_resource"); - - migrationBuilder.DropTable( - name: "task_phase"); - - migrationBuilder.DropTable( - name: "item_selling_item"); - - migrationBuilder.DropTable( - name: "sales_order"); - - migrationBuilder.DropTable( - name: "item_group"); - - migrationBuilder.DropTable( - name: "cost_driver"); - - migrationBuilder.DropTable( - name: "task_job"); - - migrationBuilder.DropTable( - name: "sales_offer"); - - migrationBuilder.DropTable( - name: "sales_customer"); - - migrationBuilder.DropTable( - name: "sales_dealer"); - - migrationBuilder.CreateTable( - name: "Counter", - columns: table => new - { - RefYear = table.Column(type: "int", nullable: false), - CountName = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Counter = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Counter", x => new { x.RefYear, x.CountName }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "GenClass", - columns: table => new - { - ClassCod = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_GenClass", x => x.ClassCod); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "JobList", - columns: table => new - { - JobID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_JobList", x => x.JobID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ProductionBatch", - columns: table => new - { - ProductionBatchID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - DateEnd = table.Column(type: "datetime(6)", nullable: true), - DateStart = table.Column(type: "datetime(6)", nullable: true), - DueDate = table.Column(type: "datetime(6)", nullable: false), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_ProductionBatch", x => x.ProductionBatchID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RegCustomer", - columns: table => new - { - CustomerID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CompanyName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FirstName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - LastName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - VAT = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RegCustomer", x => x.CustomerID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RegDealer", - columns: table => new - { - DealerID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CompanyName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FirstName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - LastName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - VAT = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RegDealer", x => x.DealerID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RegItemGroup", - columns: table => new - { - CodGroup = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RegItemGroup", x => x.CodGroup); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RegMovType", - columns: table => new - { - MovCod = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RegMovType", x => x.MovCod); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RegPhase", - columns: table => new - { - PhaseID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RegPhase", x => x.PhaseID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RegResource", - columns: table => new - { - ResourceID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - IsAsset = table.Column(type: "tinyint(1)", nullable: false), - IsHuman = table.Column(type: "tinyint(1)", nullable: false), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - UmFix = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - UmProp = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - UnitCostFix = table.Column(type: "double", nullable: false), - UnitCostProp = table.Column(type: "double", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_RegResource", x => x.ResourceID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RegSupplier", - columns: table => new - { - SupplierID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CompanyName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FirstName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - LastName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - VAT = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RegSupplier", x => x.SupplierID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RegTags", - columns: table => new - { - TagID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RegTags", x => x.TagID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "GenValue", - columns: table => new - { - GenValID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - ClassCod = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Ordinal = table.Column(type: "int", nullable: false), - ValString = table.Column(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.CreateTable( - name: "SellingItem", - columns: table => new - { - SellingItemID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - JobID = table.Column(type: "int", nullable: false), - BomCost = table.Column(type: "double", nullable: false), - ExtItemCode = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - IsService = table.Column(type: "tinyint(1)", nullable: false), - ItemCode = table.Column(type: "int", nullable: false), - ItemSteps = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Margin = table.Column(type: "double", nullable: false), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SerStruct = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SupplCode = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - UM = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_SellingItem", x => x.SellingItemID); - table.ForeignKey( - name: "FK_SellingItem_JobList_JobID", - column: x => x.JobID, - principalTable: "JobList", - principalColumn: "JobID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "Offer", - columns: table => new - { - OfferID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CustomerID = table.Column(type: "int", nullable: false), - DealerID = table.Column(type: "int", nullable: false), - Inserted = table.Column(type: "datetime(6)", nullable: false), - Modified = table.Column(type: "datetime(6)", nullable: false), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - OffertState = table.Column(type: "int", nullable: false), - RefNum = table.Column(type: "int", nullable: false), - RefRev = table.Column(type: "int", nullable: false), - RefYear = table.Column(type: "int", nullable: false), - ValidUntil = table.Column(type: "datetime(6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Offer", x => x.OfferID); - table.ForeignKey( - name: "FK_Offer_RegCustomer_CustomerID", - column: x => x.CustomerID, - principalTable: "RegCustomer", - principalColumn: "CustomerID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Offer_RegDealer_DealerID", - column: x => x.DealerID, - principalTable: "RegDealer", - principalColumn: "DealerID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RegItem", - columns: table => new - { - ItemID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CodGroup = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - BomCost = table.Column(type: "double", nullable: false), - ExtItemCode = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - IsService = table.Column(type: "tinyint(1)", nullable: false), - ItemCode = table.Column(type: "int", nullable: false), - ItemIDParent = table.Column(type: "int", nullable: false), - ItemType = table.Column(type: "int", nullable: false), - Margin = table.Column(type: "double", nullable: false), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - QtyMax = table.Column(type: "double", nullable: false), - QtyMin = table.Column(type: "double", nullable: false), - SupplCode = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - UM = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RegItem", x => x.ItemID); - table.ForeignKey( - name: "FK_RegItem_RegItemGroup_CodGroup", - column: x => x.CodGroup, - principalTable: "RegItemGroup", - principalColumn: "CodGroup", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "JobRowList", - columns: table => new - { - JobStepID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - JobID = table.Column(type: "int", nullable: false), - PhaseID = table.Column(type: "int", nullable: false), - ResourceID = table.Column(type: "int", nullable: false), - Index = table.Column(type: "int", nullable: false), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProductivityRate = table.Column(type: "double", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_JobRowList", x => x.JobStepID); - table.ForeignKey( - name: "FK_JobRowList_JobList_JobID", - column: x => x.JobID, - principalTable: "JobList", - principalColumn: "JobID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_JobRowList_RegPhase_PhaseID", - column: x => x.PhaseID, - principalTable: "RegPhase", - principalColumn: "PhaseID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_JobRowList_RegResource_ResourceID", - column: x => x.ResourceID, - principalTable: "RegResource", - principalColumn: "ResourceID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "OfferRowList", - columns: table => new - { - OfferRowID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - OfferID = table.Column(type: "int", nullable: false), - SellingItemID = table.Column(type: "int", nullable: false), - BomCost = table.Column(type: "double", nullable: false), - BomOk = table.Column(type: "tinyint(1)", nullable: false), - Environment = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Inserted = table.Column(type: "datetime(6)", nullable: false), - ItemBOM = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ItemOk = table.Column(type: "tinyint(1)", nullable: false), - ItemSteps = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Modified = table.Column(type: "datetime(6)", nullable: false), - Note = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - OfferRowUID = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProductivityRate = table.Column(type: "double", nullable: false), - RowNum = table.Column(type: "int", nullable: false), - SerStruct = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_OfferRowList", x => x.OfferRowID); - table.ForeignKey( - name: "FK_OfferRowList_Offer_OfferID", - column: x => x.OfferID, - principalTable: "Offer", - principalColumn: "OfferID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_OfferRowList_SellingItem_SellingItemID", - column: x => x.SellingItemID, - principalTable: "SellingItem", - principalColumn: "SellingItemID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "Order", - columns: table => new - { - OrderID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CustomerID = table.Column(type: "int", nullable: false), - DealerID = table.Column(type: "int", nullable: false), - OfferID = table.Column(type: "int", nullable: false), - Inserted = table.Column(type: "datetime(6)", nullable: false), - Modified = table.Column(type: "datetime(6)", nullable: false), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - OffertState = table.Column(type: "int", nullable: false), - RefNum = table.Column(type: "int", nullable: false), - RefRev = table.Column(type: "int", nullable: false), - RefYear = table.Column(type: "int", nullable: false), - ValidUntil = table.Column(type: "datetime(6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Order", x => x.OrderID); - table.ForeignKey( - name: "FK_Order_Offer_OfferID", - column: x => x.OfferID, - principalTable: "Offer", - principalColumn: "OfferID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Order_RegCustomer_CustomerID", - column: x => x.CustomerID, - principalTable: "RegCustomer", - principalColumn: "CustomerID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Order_RegDealer_DealerID", - column: x => x.DealerID, - principalTable: "RegDealer", - principalColumn: "DealerID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "StockStatus", - columns: table => new - { - StockStatusId = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - ItemID = table.Column(type: "int", nullable: false), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false), - IsRemn = table.Column(type: "tinyint(1)", nullable: false), - Location = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - QtyAvail = table.Column(type: "double", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_StockStatus", x => x.StockStatusId); - table.ForeignKey( - name: "FK_StockStatus_RegItem_ItemID", - column: x => x.ItemID, - principalTable: "RegItem", - principalColumn: "ItemID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "JobRowItemList", - columns: table => new - { - JobStepItemID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - ItemID = table.Column(type: "int", nullable: false), - JobStepID = table.Column(type: "int", nullable: false), - Index = table.Column(type: "int", nullable: false), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProductivityRate = table.Column(type: "double", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_JobRowItemList", x => x.JobStepItemID); - table.ForeignKey( - name: "FK_JobRowItemList_JobRowList_JobStepID", - column: x => x.JobStepID, - principalTable: "JobRowList", - principalColumn: "JobStepID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_JobRowItemList_RegItem_ItemID", - column: x => x.ItemID, - principalTable: "RegItem", - principalColumn: "ItemID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "OrderRowList", - columns: table => new - { - OrderRowID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - OrderID = table.Column(type: "int", nullable: false), - SellingItemID = table.Column(type: "int", nullable: false), - BomCost = table.Column(type: "double", nullable: false), - Inserted = table.Column(type: "datetime(6)", nullable: false), - ItemSteps = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Modified = table.Column(type: "datetime(6)", nullable: false), - Note = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProductivityRate = table.Column(type: "double", nullable: false), - RowNum = table.Column(type: "int", nullable: false), - SerStruct = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_OrderRowList", x => x.OrderRowID); - table.ForeignKey( - name: "FK_OrderRowList_Order_OrderID", - column: x => x.OrderID, - principalTable: "Order", - principalColumn: "OrderID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_OrderRowList_SellingItem_SellingItemID", - column: x => x.SellingItemID, - principalTable: "SellingItem", - principalColumn: "SellingItemID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "StockMov", - columns: table => new - { - StockMovID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - MovCod = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - StockStatusId = table.Column(type: "int", nullable: false), - CodDoc = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DtCreate = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP"), - DtMod = table.Column(type: "timestamp", nullable: false, defaultValueSql: "CURRENT_TIMESTAMP") - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn), - Note = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - QtyRec = table.Column(type: "double", nullable: false), - UnitVal = table.Column(type: "double", nullable: false), - UserId = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_StockMov", x => x.StockMovID); - table.ForeignKey( - name: "FK_StockMov_RegMovType_MovCod", - column: x => x.MovCod, - principalTable: "RegMovType", - principalColumn: "MovCod", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_StockMov_StockStatus_StockStatusId", - column: x => x.StockStatusId, - principalTable: "StockStatus", - principalColumn: "StockStatusId", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ProductionItem", - columns: table => new - { - ProdItemID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - OrderRowID = table.Column(type: "int", nullable: false), - ProductionBatchID = table.Column(type: "int", nullable: false), - ExtItemCode = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ItemCode = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_ProductionItem", x => x.ProdItemID); - table.ForeignKey( - name: "FK_ProductionItem_OrderRowList_OrderRowID", - column: x => x.OrderRowID, - principalTable: "OrderRowList", - principalColumn: "OrderRowID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_ProductionItem_ProductionBatch_ProductionBatchID", - column: x => x.ProductionBatchID, - principalTable: "ProductionBatch", - principalColumn: "ProductionBatchID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "ProductionItemRowList", - columns: table => new - { - ProdItemStepID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - PhaseID = table.Column(type: "int", nullable: false), - ProdItemID = table.Column(type: "int", nullable: false), - ResourceID = table.Column(type: "int", nullable: false), - DateEnd = table.Column(type: "datetime(6)", nullable: true), - DateStart = table.Column(type: "datetime(6)", nullable: true), - Index = table.Column(type: "int", nullable: false), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProductivityRate = table.Column(type: "double", nullable: false), - WorkTime = table.Column(type: "double", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_ProductionItemRowList", x => x.ProdItemStepID); - table.ForeignKey( - name: "FK_ProductionItemRowList_ProductionItem_ProdItemID", - column: x => x.ProdItemID, - principalTable: "ProductionItem", - principalColumn: "ProdItemID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_ProductionItemRowList_RegPhase_PhaseID", - column: x => x.PhaseID, - principalTable: "RegPhase", - principalColumn: "PhaseID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_ProductionItemRowList_RegResource_ResourceID", - column: x => x.ResourceID, - principalTable: "RegResource", - principalColumn: "ResourceID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.InsertData( - table: "GenClass", - columns: new[] { "ClassCod", "Name" }, - values: new object[,] - { - { "WoodCol", null }, - { "WoodMat", null } - }); - - migrationBuilder.InsertData( - table: "JobList", - columns: new[] { "JobID", "Name" }, - values: new object[,] - { - { 1, null }, - { 2, null } - }); - - migrationBuilder.InsertData( - table: "RegCustomer", - columns: new[] { "CustomerID", "CompanyName", "FirstName", "LastName", "VAT" }, - values: new object[,] - { - { 1, "", "Customer A", "Egalware", "1234567890123456" }, - { 2, "", "Customer B", "User", "1234567890123456" }, - { 3, "", "Customer C", "User Test", "1234567890123456" } - }); - - migrationBuilder.InsertData( - table: "RegDealer", - columns: new[] { "DealerID", "CompanyName", "FirstName", "LastName", "VAT" }, - values: new object[,] - { - { 1, "Company First", "Dealer A", "Egalware", "9587362514671527" }, - { 2, "Company First", "Dealer B", "User", "9587362514671527" }, - { 3, "Company Second", "Dealer C", "User Test", "9587362514671527" } - }); - - migrationBuilder.InsertData( - table: "RegItemGroup", - columns: new[] { "CodGroup", "Name" }, - values: new object[,] - { - { "WindowGlass", null }, - { "WindowHardware", null }, - { "WindowTrunk", null }, - { "WindowVarnish", null } - }); - - migrationBuilder.InsertData( - table: "RegMovType", - columns: new[] { "MovCod", "Name" }, - values: new object[,] - { - { "CAR", null }, - { "MOV", null }, - { "ND", null }, - { "OFOR", null }, - { "RETT", null }, - { "SCAR", null } - }); - - migrationBuilder.InsertData( - table: "RegPhase", - columns: new[] { "PhaseID", "Name" }, - values: new object[,] - { - { 1, null }, - { 2, null }, - { 3, null }, - { 4, null }, - { 5, null }, - { 6, null } - }); - - migrationBuilder.InsertData( - table: "RegResource", - columns: new[] { "ResourceID", "IsAsset", "IsHuman", "Name", "UmFix", "UmProp", "UnitCostFix", "UnitCostProp" }, - values: new object[,] - { - { 1, true, false, null, "€/h", "", 15.0, 0.0 }, - { 2, true, false, null, "€/h", "€/m", 240.0, 1.8999999999999999 }, - { 3, true, false, null, "€/h", "€/m", 90.0, 5.9000000000000004 }, - { 4, true, false, null, "€/h", "€/m", 40.0, 1.8999999999999999 }, - { 5, false, true, null, "€/h", "€/m", 10.0, 1.8999999999999999 }, - { 6, false, true, null, "", "€/h", 0.0, 40.0 }, - { 7, false, true, null, "", "€/h", 0.0, 40.0 } - }); - - migrationBuilder.InsertData( - table: "RegSupplier", - columns: new[] { "SupplierID", "CompanyName", "FirstName", "LastName", "VAT" }, - values: new object[,] - { - { 1, "Company One", "Supplier A", "Egalware", "7294857103879254" }, - { 2, "Company Two", "Supplier B", "User", "7294857103879254" }, - { 3, "Company Two", "Supplier C", "User Test", "7294857103879254" } - }); - - migrationBuilder.InsertData( - table: "RegTags", - columns: new[] { "TagID", "Name" }, - values: new object[,] - { - { 1, null }, - { 2, null }, - { 3, null }, - { 4, null }, - { 5, null } - }); - - migrationBuilder.InsertData( - table: "GenValue", - columns: new[] { "GenValID", "ClassCod", "Ordinal", "ValString" }, - values: new object[,] - { - { 1, "WoodMat", 1, "Pine" }, - { 2, "WoodMat", 2, "Maple" }, - { 3, "WoodCol", 1, "Legno" }, - { 4, "WoodCol", 2, "Bianco" }, - { 5, "WoodCol", 3, "Rosso" }, - { 6, "WoodCol", 4, "Nero" } - }); - - migrationBuilder.InsertData( - table: "Offer", - columns: new[] { "OfferID", "CustomerID", "DealerID", "Inserted", "Modified", "Name", "OffertState", "RefNum", "RefRev", "RefYear", "ValidUntil" }, - values: new object[] { 1, 2, 2, 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), null, 0, 1, 1, 2024, new DateTime(2025, 10, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9080) }); - - migrationBuilder.InsertData( - table: "RegItem", - columns: new[] { "ItemID", "BomCost", "CodGroup", "ExtItemCode", "IsService", "ItemCode", "ItemIDParent", "ItemType", "Margin", "Name", "QtyMax", "QtyMin", "SupplCode", "UM" }, - values: new object[,] - { - { 1, 0.0, "WindowTrunk", "", false, 1001, 0, 1, 0.29999999999999999, null, 0.0, 0.0, "BARR.001", "#" }, - { 2, 0.0, "WindowTrunk", "BARRA-60x80x12000", false, 1002, 0, 1, 0.20999999999999999, null, 0.0, 0.0, "ABC.00123.12000", "#" }, - { 3, 0.0, "WindowTrunk", "BARRA-60x80x8000", false, 1003, 0, 1, 0.22, null, 0.0, 0.0, "ABC.00123.8000", "#" }, - { 4, 0.0, "WindowTrunk", "BARRA-60x80x16000", false, 1004, 0, 1, 0.20000000000000001, null, 0.0, 0.0, "ABC.00123.16000", "#" }, - { 5, 0.0, "WindowGlass", "VETRO-3L-THERMO-800x1000", false, 2001, 0, 1, 0.20000000000000001, null, 0.0, 0.0, "V3T.800.1000", "m2" }, - { 6, 0.0, "WindowGlass", "VETRO-2L-800x1000", false, 2002, 0, 1, 0.14999999999999999, null, 0.0, 0.0, "V2.800.1000", "m2" }, - { 7, 0.0, "WindowGlass", "VETRO-3L-800x1000", false, 2003, 0, 1, 0.17999999999999999, null, 0.0, 0.0, "V3.800.1000", "m2" }, - { 8, 0.0, "WindowVarnish", "VERN-TRASP", false, 3001, 0, 1, 0.20000000000000001, null, 0.0, 0.0, "VT.STD", "l" }, - { 9, 0.0, "WindowHardware", "KIT-001", false, 5001, 0, 1, 0.20000000000000001, null, 0.0, 0.0, "AGB-KIT-001", "#" }, - { 10, 0.0, "WindowHardware", "CERN-001", false, 5002, 0, 1, 0.20000000000000001, null, 0.0, 0.0, "AGB-CERN-001", "#" }, - { 11, 0.0, "WindowHardware", "SERR-001", false, 5003, 0, 1, 0.20000000000000001, null, 0.0, 0.0, "AGB-SERR-001", "#" }, - { 12, 0.0, "WindowHardware", "MAN-001", false, 5004, 0, 1, 0.20000000000000001, null, 0.0, 0.0, "AGB-MAN-001", "#" } - }); - - migrationBuilder.InsertData( - table: "SellingItem", - columns: new[] { "SellingItemID", "BomCost", "ExtItemCode", "IsService", "ItemCode", "ItemSteps", "JobID", "Margin", "Name", "SerStruct", "SupplCode", "UM" }, - values: new object[,] - { - { 1, 0.0, "", false, 0, null, 2, 0.20000000000000001, null, "", "", "#" }, - { 2, 0.0, "", false, 0, null, 1, 0.10000000000000001, null, "", "", "#" }, - { 3, 0.0, "", true, 0, null, 1, 0.29999999999999999, null, "", "", "#" } - }); - - migrationBuilder.InsertData( - table: "OfferRowList", - columns: new[] { "OfferRowID", "BomCost", "BomOk", "Environment", "Inserted", "ItemBOM", "ItemOk", "ItemSteps", "Modified", "Note", "OfferID", "OfferRowUID", "ProductivityRate", "RowNum", "SellingItemID", "SerStruct" }, - values: new object[,] - { - { 1, 0.0, true, "WINDOW", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9186), "", true, null, new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9188), "Finestra anta singola 2025", 1, "OFF250000000001", 0.0, 1, 1, "{}" }, - { 2, 0.0, true, "WINDOW", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9200), "", true, null, new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9202), "Persiana per Finestra anta singola 2025", 1, "OFF250000000002", 0.0, 2, 2, "{}" }, - { 3, 0.0, true, "WINDOW", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9211), "", true, null, new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(9213), "Installazione serramento", 1, "OFF250000000003", 0.0, 3, 3, "{}" } - }); - - migrationBuilder.InsertData( - table: "StockStatus", - columns: new[] { "StockStatusId", "IsDeleted", "IsRemn", "ItemID", "Location", "QtyAvail" }, - values: new object[,] - { - { 1, false, false, 1, "B001-001-003", 5.0 }, - { 2, false, false, 2, "B001-001-002", 8.0 }, - { 3, false, false, 3, "B001-001-001", 5.0 }, - { 4, false, false, 4, "V002-001-001", 1.0 }, - { 5, false, false, 5, "V001-001-002", 10.0 }, - { 6, false, false, 6, "V001-001-003", 1.0 }, - { 7, false, false, 8, "V001-001-003", 50.0 }, - { 8, false, false, 11, "S001-002-001", 1.0 }, - { 9, false, false, 9, "S001-002-001", 1.0 }, - { 10, false, false, 10, "S001-001-001", 1.0 } - }); - - migrationBuilder.InsertData( - table: "StockMov", - columns: new[] { "StockMovID", "CodDoc", "DtCreate", "MovCod", "Note", "QtyRec", "StockStatusId", "UnitVal", "UserId" }, - values: new object[,] - { - { 1, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8832), "CAR", "DEMO", 5.0, 1, 0.0, "samuele.locatelli@egalware.com" }, - { 2, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8883), "CAR", "DEMO", 8.0, 2, 0.0, "samuele.locatelli@egalware.com" }, - { 3, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8886), "CAR", "DEMO", 5.0, 3, 0.0, "samuele.locatelli@egalware.com" }, - { 4, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8890), "CAR", "DEMO", 1.0, 4, 0.0, "samuele.locatelli@egalware.com" }, - { 5, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8893), "CAR", "DEMO", 10.0, 5, 0.0, "samuele.locatelli@egalware.com" }, - { 6, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8897), "CAR", "DEMO", 1.0, 6, 0.0, "samuele.locatelli@egalware.com" }, - { 7, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8900), "CAR", "DEMO", 50.0, 7, 0.0, "samuele.locatelli@egalware.com" }, - { 8, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8903), "CAR", "DEMO", 1.0, 8, 0.0, "samuele.locatelli@egalware.com" }, - { 9, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8907), "CAR", "DEMO", 1.0, 9, 0.0, "samuele.locatelli@egalware.com" }, - { 10, "", new DateTime(2025, 9, 18, 12, 9, 36, 279, DateTimeKind.Local).AddTicks(8910), "CAR", "DEMO", 1.0, 10, 0.0, "samuele.locatelli@egalware.com" } - }); - - migrationBuilder.CreateIndex( - name: "IX_GenValue_ClassCod", - table: "GenValue", - column: "ClassCod"); - - migrationBuilder.CreateIndex( - name: "IX_JobRowItemList_ItemID", - table: "JobRowItemList", - column: "ItemID"); - - migrationBuilder.CreateIndex( - name: "IX_JobRowItemList_JobStepID", - table: "JobRowItemList", - column: "JobStepID"); - - migrationBuilder.CreateIndex( - name: "IX_JobRowList_JobID", - table: "JobRowList", - column: "JobID"); - - migrationBuilder.CreateIndex( - name: "IX_JobRowList_PhaseID", - table: "JobRowList", - column: "PhaseID"); - - migrationBuilder.CreateIndex( - name: "IX_JobRowList_ResourceID", - table: "JobRowList", - column: "ResourceID"); - - migrationBuilder.CreateIndex( - name: "IX_Offer_CustomerID", - table: "Offer", - column: "CustomerID"); - - migrationBuilder.CreateIndex( - name: "IX_Offer_DealerID", - table: "Offer", - column: "DealerID"); - - migrationBuilder.CreateIndex( - name: "IX_OfferRowList_OfferID", - table: "OfferRowList", - column: "OfferID"); - - migrationBuilder.CreateIndex( - name: "IX_OfferRowList_SellingItemID", - table: "OfferRowList", - column: "SellingItemID"); - - migrationBuilder.CreateIndex( - name: "IX_Order_CustomerID", - table: "Order", - column: "CustomerID"); - - migrationBuilder.CreateIndex( - name: "IX_Order_DealerID", - table: "Order", - column: "DealerID"); - - migrationBuilder.CreateIndex( - name: "IX_Order_OfferID", - table: "Order", - column: "OfferID"); - - migrationBuilder.CreateIndex( - name: "IX_OrderRowList_OrderID", - table: "OrderRowList", - column: "OrderID"); - - migrationBuilder.CreateIndex( - name: "IX_OrderRowList_SellingItemID", - table: "OrderRowList", - column: "SellingItemID"); - - migrationBuilder.CreateIndex( - name: "IX_ProductionItem_OrderRowID", - table: "ProductionItem", - column: "OrderRowID"); - - migrationBuilder.CreateIndex( - name: "IX_ProductionItem_ProductionBatchID", - table: "ProductionItem", - column: "ProductionBatchID"); - - migrationBuilder.CreateIndex( - name: "IX_ProductionItemRowList_PhaseID", - table: "ProductionItemRowList", - column: "PhaseID"); - - migrationBuilder.CreateIndex( - name: "IX_ProductionItemRowList_ProdItemID", - table: "ProductionItemRowList", - column: "ProdItemID"); - - migrationBuilder.CreateIndex( - name: "IX_ProductionItemRowList_ResourceID", - table: "ProductionItemRowList", - column: "ResourceID"); - - migrationBuilder.CreateIndex( - name: "IX_RegItem_CodGroup", - table: "RegItem", - column: "CodGroup"); - - migrationBuilder.CreateIndex( - name: "IX_SellingItem_JobID", - table: "SellingItem", - column: "JobID"); - - migrationBuilder.CreateIndex( - name: "IX_StockMov_MovCod", - table: "StockMov", - column: "MovCod"); - - migrationBuilder.CreateIndex( - name: "IX_StockMov_StockStatusId", - table: "StockMov", - column: "StockStatusId"); - - migrationBuilder.CreateIndex( - name: "IX_StockStatus_ItemID", - table: "StockStatus", - column: "ItemID"); - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20250919164620_GlobalModelUpdate.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20250919165643_InitDb.Designer.cs similarity index 98% rename from EgwCoreLib.Lux.Data/Migrations/20250919164620_GlobalModelUpdate.Designer.cs rename to EgwCoreLib.Lux.Data/Migrations/20250919165643_InitDb.Designer.cs index 45cba103..30fc0703 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20250919164620_GlobalModelUpdate.Designer.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20250919165643_InitDb.Designer.cs @@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace EgwCoreLib.Lux.Data.Migrations { [DbContext(typeof(DataLayerContext))] - [Migration("20250919164620_GlobalModelUpdate")] - partial class GlobalModelUpdate + [Migration("20250919165643_InitDb")] + partial class InitDb { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -943,13 +943,13 @@ namespace EgwCoreLib.Lux.Data.Migrations CustomerID = 2, DealerID = 2, Description = "Offerta per tre serramenti", - Inserted = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1216), - Modified = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1218), + Inserted = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5787), + Modified = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5789), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 10, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1213) + ValidUntil = new DateTime(2025, 10, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5785) }); }); @@ -1037,11 +1037,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 0.0, Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1314), + Inserted = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5885), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1317), + Modified = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5887), Note = "Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000001", @@ -1059,11 +1059,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 0.0, Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1336), + Inserted = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5906), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1338), + Modified = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5908), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000002", @@ -1081,11 +1081,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 0.0, Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1350), + Inserted = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5920), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1352), + Modified = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5922), Note = "Installazione serramento", OfferID = 1, OfferRowUID = "OFF250000000003", @@ -1268,8 +1268,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 1, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(844), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(889), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5439), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5482), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1281,8 +1281,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(892), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(894), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5485), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5487), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -1294,8 +1294,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(897), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(898), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5489), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5491), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1307,8 +1307,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(901), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(903), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5493), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5495), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1320,8 +1320,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(905), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(907), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5497), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5499), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -1333,8 +1333,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(909), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(911), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5501), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5503), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1346,8 +1346,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(914), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(915), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5505), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5507), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -1359,8 +1359,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(918), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(920), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5509), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5511), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1372,8 +1372,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(922), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(924), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5514), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5515), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1385,8 +1385,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(927), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(928), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5518), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5519), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, diff --git a/EgwCoreLib.Lux.Data/Migrations/20250808143628_InitDb.cs b/EgwCoreLib.Lux.Data/Migrations/20250919165643_InitDb.cs similarity index 61% rename from EgwCoreLib.Lux.Data/Migrations/20250808143628_InitDb.cs rename to EgwCoreLib.Lux.Data/Migrations/20250919165643_InitDb.cs index 14ce1989..3709126f 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20250808143628_InitDb.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20250919165643_InitDb.cs @@ -18,97 +18,26 @@ namespace EgwCoreLib.Lux.Data.Migrations .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "Counter", + name: "cost_driver", columns: table => new { - RefYear = table.Column(type: "int", nullable: false), - CountName = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Counter = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Counter", x => new { x.RefYear, x.CountName }); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "JobList", - columns: table => new - { - JobID = table.Column(type: "int", nullable: false) + CostDriverID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Description = table.Column(type: "longtext", nullable: false) + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Unit = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Descript = table.Column(type: "longtext", nullable: false) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { - table.PrimaryKey("PK_JobList", x => x.JobID); + table.PrimaryKey("PK_cost_driver", x => x.CostDriverID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "ProductionBatch", - columns: table => new - { - ProductionBatchID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - DueDate = table.Column(type: "datetime(6)", nullable: false), - DateStart = table.Column(type: "datetime(6)", nullable: true), - DateEnd = table.Column(type: "datetime(6)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_ProductionBatch", x => x.ProductionBatchID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RegCustomer", - columns: table => new - { - CustomerID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CompanyName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FirstName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - LastName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - VAT = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RegCustomer", x => x.CustomerID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RegDealer", - columns: table => new - { - DealerID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - CompanyName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FirstName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - LastName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - VAT = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RegDealer", x => x.DealerID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RegItemGroup", + name: "item_group", columns: table => new { CodGroup = table.Column(type: "varchar(255)", nullable: false) @@ -118,65 +47,12 @@ namespace EgwCoreLib.Lux.Data.Migrations }, constraints: table => { - table.PrimaryKey("PK_RegItemGroup", x => x.CodGroup); + table.PrimaryKey("PK_item_group", x => x.CodGroup); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "RegMovType", - columns: table => new - { - MovCod = table.Column(type: "varchar(255)", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RegMovType", x => x.MovCod); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RegPhase", - columns: table => new - { - PhaseID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RegPhase", x => x.PhaseID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RegResource", - columns: table => new - { - ResourceID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - IsAsset = table.Column(type: "tinyint(1)", nullable: false), - IsHuman = table.Column(type: "tinyint(1)", nullable: false), - UnitCostFix = table.Column(type: "double", nullable: false), - UmFix = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - UnitCostProp = table.Column(type: "double", nullable: false), - UmProp = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_RegResource", x => x.ResourceID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RegSupplier", + name: "item_supplier", columns: table => new { SupplierID = table.Column(type: "int", nullable: false) @@ -192,12 +68,147 @@ namespace EgwCoreLib.Lux.Data.Migrations }, constraints: table => { - table.PrimaryKey("PK_RegSupplier", x => x.SupplierID); + table.PrimaryKey("PK_item_supplier", x => x.SupplierID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "RegTags", + name: "production_batch", + columns: table => new + { + ProductionBatchID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + DueDate = table.Column(type: "datetime(6)", nullable: false), + DateStart = table.Column(type: "datetime(6)", nullable: true), + DateEnd = table.Column(type: "datetime(6)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_production_batch", x => x.ProductionBatchID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "sales_customer", + columns: table => new + { + CustomerID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + CompanyName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FirstName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + LastName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + VAT = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_sales_customer", x => x.CustomerID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "sales_dealer", + columns: table => new + { + DealerID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + CompanyName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FirstName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + LastName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + VAT = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_sales_dealer", x => x.DealerID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "task_job", + columns: table => new + { + JobID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_task_job", x => x.JobID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "task_phase", + columns: table => new + { + PhaseID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_task_phase", x => x.PhaseID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "utils_counter", + columns: table => new + { + RefYear = table.Column(type: "int", nullable: false), + CountName = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Counter = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_utils_counter", x => new { x.RefYear, x.CountName }); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "utils_gen_class", + columns: table => new + { + ClassCod = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_utils_gen_class", x => x.ClassCod); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "utils_mov_type", + columns: table => new + { + MovCod = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_utils_mov_type", x => x.MovCod); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "utils_tags", columns: table => new { TagID = table.Column(type: "int", nullable: false) @@ -207,84 +218,42 @@ namespace EgwCoreLib.Lux.Data.Migrations }, constraints: table => { - table.PrimaryKey("PK_RegTags", x => x.TagID); + table.PrimaryKey("PK_utils_tags", x => x.TagID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "SellingItem", + name: "cost_resource", columns: table => new { - SellingItemID = table.Column(type: "int", nullable: false) + ResourceID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - IsService = table.Column(type: "tinyint(1)", nullable: false), - JobID = table.Column(type: "int", nullable: false), - ItemCode = table.Column(type: "int", nullable: false), - ExtItemCode = table.Column(type: "longtext", nullable: false) + Name = table.Column(type: "longtext", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), - SupplCode = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Cost = table.Column(type: "double", nullable: false), - Margin = table.Column(type: "double", nullable: false), - UM = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SerStruct = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ItemSPP = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") + CostDriverID = table.Column(type: "int", nullable: false), + CostDriverBudget = table.Column(type: "decimal(65,30)", nullable: false), + FixedCost = table.Column(type: "decimal(65,30)", nullable: false), + VariableCost = table.Column(type: "decimal(65,30)", nullable: false), + LaborCost = table.Column(type: "decimal(65,30)", nullable: false), + OverHeadCost = table.Column(type: "decimal(65,30)", nullable: false), + OverHeadPerc = table.Column(type: "decimal(65,30)", nullable: false), + EBTPerc = table.Column(type: "decimal(65,30)", nullable: false), + PriceMargin = table.Column(type: "decimal(65,30)", nullable: false) }, constraints: table => { - table.PrimaryKey("PK_SellingItem", x => x.SellingItemID); + table.PrimaryKey("PK_cost_resource", x => x.ResourceID); table.ForeignKey( - name: "FK_SellingItem_JobList_JobID", - column: x => x.JobID, - principalTable: "JobList", - principalColumn: "JobID", + name: "FK_cost_resource_cost_driver_CostDriverID", + column: x => x.CostDriverID, + principalTable: "cost_driver", + principalColumn: "CostDriverID", onDelete: ReferentialAction.Restrict); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "Offer", - columns: table => new - { - OfferID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - RefYear = table.Column(type: "int", nullable: false), - RefNum = table.Column(type: "int", nullable: false), - RefRev = table.Column(type: "int", nullable: false), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CustomerID = table.Column(type: "int", nullable: false), - DealerID = table.Column(type: "int", nullable: false), - ValidUntil = table.Column(type: "datetime(6)", nullable: false), - Inserted = table.Column(type: "datetime(6)", nullable: false), - Modified = table.Column(type: "datetime(6)", nullable: false), - OffertState = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_Offer", x => x.OfferID); - table.ForeignKey( - name: "FK_Offer_RegCustomer_CustomerID", - column: x => x.CustomerID, - principalTable: "RegCustomer", - principalColumn: "CustomerID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Offer_RegDealer_DealerID", - column: x => x.DealerID, - principalTable: "RegDealer", - principalColumn: "DealerID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "RegItem", + name: "item_item", columns: table => new { ItemID = table.Column(type: "int", nullable: false) @@ -305,106 +274,189 @@ namespace EgwCoreLib.Lux.Data.Migrations QtyMin = table.Column(type: "double", nullable: false), QtyMax = table.Column(type: "double", nullable: false), UM = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") + .Annotation("MySql:CharSet", "utf8mb4"), + ItemIDParent = table.Column(type: "int", nullable: false) }, constraints: table => { - table.PrimaryKey("PK_RegItem", x => x.ItemID); + table.PrimaryKey("PK_item_item", x => x.ItemID); table.ForeignKey( - name: "FK_RegItem_RegItemGroup_CodGroup", + name: "FK_item_item_item_group_CodGroup", column: x => x.CodGroup, - principalTable: "RegItemGroup", + principalTable: "item_group", principalColumn: "CodGroup", onDelete: ReferentialAction.Restrict); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "JobRowList", + name: "sales_offer", columns: table => new { - JobRowID = table.Column(type: "int", nullable: false) + OfferID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + RefYear = table.Column(type: "int", nullable: false), + RefNum = table.Column(type: "int", nullable: false), + RefRev = table.Column(type: "int", nullable: false), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + CustomerID = table.Column(type: "int", nullable: false), + DealerID = table.Column(type: "int", nullable: false), + ValidUntil = table.Column(type: "datetime(6)", nullable: false), + Inserted = table.Column(type: "datetime(6)", nullable: false), + Modified = table.Column(type: "datetime(6)", nullable: false), + OffertState = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_sales_offer", x => x.OfferID); + table.ForeignKey( + name: "FK_sales_offer_sales_customer_CustomerID", + column: x => x.CustomerID, + principalTable: "sales_customer", + principalColumn: "CustomerID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_sales_offer_sales_dealer_DealerID", + column: x => x.DealerID, + principalTable: "sales_dealer", + principalColumn: "DealerID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "item_selling_item", + columns: table => new + { + SellingItemID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + IsService = table.Column(type: "tinyint(1)", nullable: false), + JobID = table.Column(type: "int", nullable: false), + ItemCode = table.Column(type: "int", nullable: false), + ExtItemCode = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SupplCode = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Cost = table.Column(type: "double", nullable: false), + Margin = table.Column(type: "double", nullable: false), + UM = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SerStruct = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ItemSteps = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_item_selling_item", x => x.SellingItemID); + table.ForeignKey( + name: "FK_item_selling_item_task_job_JobID", + column: x => x.JobID, + principalTable: "task_job", + principalColumn: "JobID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "utils_gen_value", + columns: table => new + { + GenValID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + ClassCod = table.Column(type: "varchar(255)", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Ordinal = table.Column(type: "int", nullable: false), + ValString = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_utils_gen_value", x => x.GenValID); + table.ForeignKey( + name: "FK_utils_gen_value_utils_gen_class_ClassCod", + column: x => x.ClassCod, + principalTable: "utils_gen_class", + principalColumn: "ClassCod", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "task_job_step", + columns: table => new + { + JobStepID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), JobID = table.Column(type: "int", nullable: false), Index = table.Column(type: "int", nullable: false), + CostDriverID = table.Column(type: "int", nullable: false), PhaseID = table.Column(type: "int", nullable: false), ResourceID = table.Column(type: "int", nullable: false), Description = table.Column(type: "longtext", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), - Qty = table.Column(type: "double", nullable: false) + ProductivityRate = table.Column(type: "decimal(65,30)", nullable: false) }, constraints: table => { - table.PrimaryKey("PK_JobRowList", x => x.JobRowID); + table.PrimaryKey("PK_task_job_step", x => x.JobStepID); table.ForeignKey( - name: "FK_JobRowList_JobList_JobID", + name: "FK_task_job_step_cost_driver_CostDriverID", + column: x => x.CostDriverID, + principalTable: "cost_driver", + principalColumn: "CostDriverID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_task_job_step_cost_resource_ResourceID", + column: x => x.ResourceID, + principalTable: "cost_resource", + principalColumn: "ResourceID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_task_job_step_task_job_JobID", column: x => x.JobID, - principalTable: "JobList", + principalTable: "task_job", principalColumn: "JobID", onDelete: ReferentialAction.Restrict); table.ForeignKey( - name: "FK_JobRowList_RegPhase_PhaseID", + name: "FK_task_job_step_task_phase_PhaseID", column: x => x.PhaseID, - principalTable: "RegPhase", + principalTable: "task_phase", principalColumn: "PhaseID", onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_JobRowList_RegResource_ResourceID", - column: x => x.ResourceID, - principalTable: "RegResource", - principalColumn: "ResourceID", - onDelete: ReferentialAction.Restrict); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "OfferRowList", + name: "stock_status", columns: table => new { - OfferRowID = table.Column(type: "int", nullable: false) + StockStatusId = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - OfferID = table.Column(type: "int", nullable: false), - RowNum = table.Column(type: "int", nullable: false), - Environment = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - OfferRowUID = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SellingItemID = table.Column(type: "int", nullable: false), - Cost = table.Column(type: "double", nullable: false), - Qty = table.Column(type: "double", nullable: false), - SerStruct = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ItemSPP = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ItemBOM = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - BomOk = table.Column(type: "tinyint(1)", nullable: false), - ItemOk = table.Column(type: "tinyint(1)", nullable: false), - Note = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Inserted = table.Column(type: "datetime(6)", nullable: false), - Modified = table.Column(type: "datetime(6)", nullable: false) + ItemID = table.Column(type: "int", nullable: false), + QtyAvail = table.Column(type: "double", nullable: false), + IsDeleted = table.Column(type: "tinyint(1)", nullable: false), + IsRemn = table.Column(type: "tinyint(1)", nullable: false), + Location = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { - table.PrimaryKey("PK_OfferRowList", x => x.OfferRowID); + table.PrimaryKey("PK_stock_status", x => x.StockStatusId); table.ForeignKey( - name: "FK_OfferRowList_Offer_OfferID", - column: x => x.OfferID, - principalTable: "Offer", - principalColumn: "OfferID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_OfferRowList_SellingItem_SellingItemID", - column: x => x.SellingItemID, - principalTable: "SellingItem", - principalColumn: "SellingItemID", + name: "FK_stock_status_item_item_ItemID", + column: x => x.ItemID, + principalTable: "item_item", + principalColumn: "ItemID", onDelete: ReferentialAction.Restrict); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "Order", + name: "sales_order", columns: table => new { OrderID = table.Column(type: "int", nullable: false) @@ -424,60 +476,84 @@ namespace EgwCoreLib.Lux.Data.Migrations }, constraints: table => { - table.PrimaryKey("PK_Order", x => x.OrderID); + table.PrimaryKey("PK_sales_order", x => x.OrderID); table.ForeignKey( - name: "FK_Order_Offer_OfferID", - column: x => x.OfferID, - principalTable: "Offer", - principalColumn: "OfferID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_Order_RegCustomer_CustomerID", + name: "FK_sales_order_sales_customer_CustomerID", column: x => x.CustomerID, - principalTable: "RegCustomer", + principalTable: "sales_customer", principalColumn: "CustomerID", onDelete: ReferentialAction.Restrict); table.ForeignKey( - name: "FK_Order_RegDealer_DealerID", + name: "FK_sales_order_sales_dealer_DealerID", column: x => x.DealerID, - principalTable: "RegDealer", + principalTable: "sales_dealer", principalColumn: "DealerID", onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_sales_order_sales_offer_OfferID", + column: x => x.OfferID, + principalTable: "sales_offer", + principalColumn: "OfferID", + onDelete: ReferentialAction.Restrict); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "StockStatus", + name: "sales_offer_row", columns: table => new { - StockStatusId = table.Column(type: "int", nullable: false) + OfferRowID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - ItemID = table.Column(type: "int", nullable: false), - QtyAvail = table.Column(type: "double", nullable: false), - IsDeleted = table.Column(type: "tinyint(1)", nullable: false), - IsRemn = table.Column(type: "tinyint(1)", nullable: false), - Location = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") + OfferID = table.Column(type: "int", nullable: false), + RowNum = table.Column(type: "int", nullable: false), + Environment = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + OfferRowUID = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SellingItemID = table.Column(type: "int", nullable: false), + Qty = table.Column(type: "double", nullable: false), + BomCost = table.Column(type: "double", nullable: false), + BomPrice = table.Column(type: "double", nullable: false), + StepCost = table.Column(type: "double", nullable: false), + StepPrice = table.Column(type: "double", nullable: false), + SerStruct = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ItemSteps = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ItemBOM = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + BomOk = table.Column(type: "tinyint(1)", nullable: false), + ItemOk = table.Column(type: "tinyint(1)", nullable: false), + Note = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Inserted = table.Column(type: "datetime(6)", nullable: false), + Modified = table.Column(type: "datetime(6)", nullable: false) }, constraints: table => { - table.PrimaryKey("PK_StockStatus", x => x.StockStatusId); + table.PrimaryKey("PK_sales_offer_row", x => x.OfferRowID); table.ForeignKey( - name: "FK_StockStatus_RegItem_ItemID", - column: x => x.ItemID, - principalTable: "RegItem", - principalColumn: "ItemID", + name: "FK_sales_offer_row_item_selling_item_SellingItemID", + column: x => x.SellingItemID, + principalTable: "item_selling_item", + principalColumn: "SellingItemID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_sales_offer_row_sales_offer_OfferID", + column: x => x.OfferID, + principalTable: "sales_offer", + principalColumn: "OfferID", onDelete: ReferentialAction.Restrict); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "JobRowItemList", + name: "task_job_step_item", columns: table => new { - JobRowItemID = table.Column(type: "int", nullable: false) + JobStepItemID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - JobRowID = table.Column(type: "int", nullable: false), + JobStepID = table.Column(type: "int", nullable: false), Index = table.Column(type: "int", nullable: false), ItemID = table.Column(type: "int", nullable: false), Description = table.Column(type: "longtext", nullable: false) @@ -486,62 +562,24 @@ namespace EgwCoreLib.Lux.Data.Migrations }, constraints: table => { - table.PrimaryKey("PK_JobRowItemList", x => x.JobRowItemID); + table.PrimaryKey("PK_task_job_step_item", x => x.JobStepItemID); table.ForeignKey( - name: "FK_JobRowItemList_JobRowList_JobRowID", - column: x => x.JobRowID, - principalTable: "JobRowList", - principalColumn: "JobStepID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_JobRowItemList_RegItem_ItemID", + name: "FK_task_job_step_item_item_item_ItemID", column: x => x.ItemID, - principalTable: "RegItem", + principalTable: "item_item", principalColumn: "ItemID", onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "OrderRowList", - columns: table => new - { - OrderRowID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - OrderID = table.Column(type: "int", nullable: false), - RowNum = table.Column(type: "int", nullable: false), - SellingItemID = table.Column(type: "int", nullable: false), - Cost = table.Column(type: "double", nullable: false), - Qty = table.Column(type: "double", nullable: false), - SerStruct = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ItemSPP = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Note = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Inserted = table.Column(type: "datetime(6)", nullable: false), - Modified = table.Column(type: "datetime(6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_OrderRowList", x => x.OrderRowID); table.ForeignKey( - name: "FK_OrderRowList_Order_OrderID", - column: x => x.OrderID, - principalTable: "Order", - principalColumn: "OrderID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_OrderRowList_SellingItem_SellingItemID", - column: x => x.SellingItemID, - principalTable: "SellingItem", - principalColumn: "SellingItemID", + name: "FK_task_job_step_item_task_job_step_JobStepID", + column: x => x.JobStepID, + principalTable: "task_job_step", + principalColumn: "JobStepID", onDelete: ReferentialAction.Restrict); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "StockMov", + name: "stock_mov", columns: table => new { StockMovID = table.Column(type: "int", nullable: false) @@ -563,24 +601,65 @@ namespace EgwCoreLib.Lux.Data.Migrations }, constraints: table => { - table.PrimaryKey("PK_StockMov", x => x.StockMovID); + table.PrimaryKey("PK_stock_mov", x => x.StockMovID); table.ForeignKey( - name: "FK_StockMov_RegMovType_MovCod", - column: x => x.MovCod, - principalTable: "RegMovType", - principalColumn: "MovCod", + name: "FK_stock_mov_stock_status_StockStatusId", + column: x => x.StockStatusId, + principalTable: "stock_status", + principalColumn: "StockStatusId", onDelete: ReferentialAction.Restrict); table.ForeignKey( - name: "FK_StockMov_StockStatus_StockStatusId", - column: x => x.StockStatusId, - principalTable: "StockStatus", - principalColumn: "StockStatusId", + name: "FK_stock_mov_utils_mov_type_MovCod", + column: x => x.MovCod, + principalTable: "utils_mov_type", + principalColumn: "MovCod", onDelete: ReferentialAction.Restrict); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "ProductionItem", + name: "sales_order_row", + columns: table => new + { + OrderRowID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + OrderID = table.Column(type: "int", nullable: false), + RowNum = table.Column(type: "int", nullable: false), + SellingItemID = table.Column(type: "int", nullable: false), + BomCost = table.Column(type: "double", nullable: false), + Qty = table.Column(type: "double", nullable: false), + BomPrice = table.Column(type: "double", nullable: false), + StepCost = table.Column(type: "double", nullable: false), + StepPrice = table.Column(type: "double", nullable: false), + SerStruct = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ItemSteps = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Note = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Inserted = table.Column(type: "datetime(6)", nullable: false), + Modified = table.Column(type: "datetime(6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_sales_order_row", x => x.OrderRowID); + table.ForeignKey( + name: "FK_sales_order_row_item_selling_item_SellingItemID", + column: x => x.SellingItemID, + principalTable: "item_selling_item", + principalColumn: "SellingItemID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_sales_order_row_sales_order_OrderID", + column: x => x.OrderID, + principalTable: "sales_order", + principalColumn: "OrderID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "production_item", columns: table => new { ProdItemID = table.Column(type: "int", nullable: false) @@ -593,27 +672,27 @@ namespace EgwCoreLib.Lux.Data.Migrations }, constraints: table => { - table.PrimaryKey("PK_ProductionItem", x => x.ProdItemID); + table.PrimaryKey("PK_production_item", x => x.ProdItemID); table.ForeignKey( - name: "FK_ProductionItem_OrderRowList_OrderRowID", - column: x => x.OrderRowID, - principalTable: "OrderRowList", - principalColumn: "OrderRowID", + name: "FK_production_item_production_batch_ProductionBatchID", + column: x => x.ProductionBatchID, + principalTable: "production_batch", + principalColumn: "ProductionBatchID", onDelete: ReferentialAction.Restrict); table.ForeignKey( - name: "FK_ProductionItem_ProductionBatch_ProductionBatchID", - column: x => x.ProductionBatchID, - principalTable: "ProductionBatch", - principalColumn: "ProductionBatchID", + name: "FK_production_item_sales_order_row_OrderRowID", + column: x => x.OrderRowID, + principalTable: "sales_order_row", + principalColumn: "OrderRowID", onDelete: ReferentialAction.Restrict); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( - name: "ProductionItemRowList", + name: "production_item_step", columns: table => new { - ProdItemRowID = table.Column(type: "int", nullable: false) + ProdItemStepID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), ProdItemID = table.Column(type: "int", nullable: false), Index = table.Column(type: "int", nullable: false), @@ -628,60 +707,41 @@ namespace EgwCoreLib.Lux.Data.Migrations }, constraints: table => { - table.PrimaryKey("PK_ProductionItemRowList", x => x.ProdItemRowID); + table.PrimaryKey("PK_production_item_step", x => x.ProdItemStepID); table.ForeignKey( - name: "FK_ProductionItemRowList_ProductionItem_ProdItemID", + name: "FK_production_item_step_cost_resource_ResourceID", + column: x => x.ResourceID, + principalTable: "cost_resource", + principalColumn: "ResourceID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_production_item_step_production_item_ProdItemID", column: x => x.ProdItemID, - principalTable: "ProductionItem", + principalTable: "production_item", principalColumn: "ProdItemID", onDelete: ReferentialAction.Restrict); table.ForeignKey( - name: "FK_ProductionItemRowList_RegPhase_PhaseID", + name: "FK_production_item_step_task_phase_PhaseID", column: x => x.PhaseID, - principalTable: "RegPhase", + principalTable: "task_phase", principalColumn: "PhaseID", onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_ProductionItemRowList_RegResource_ResourceID", - column: x => x.ResourceID, - principalTable: "RegResource", - principalColumn: "ResourceID", - onDelete: ReferentialAction.Restrict); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.InsertData( - table: "JobList", - columns: new[] { "JobID", "Name" }, + table: "cost_driver", + columns: new[] { "CostDriverID", "Descript", "Name", "Unit" }, values: new object[,] { - { 1, "Rivendita / servizi" }, - { 2, "Serramento Completo Legno su linea Saomad e installatore interno" } + { 1, "Ore lavorate per step/fase", "WorkHour", "h" }, + { 2, "Metri prodotti per step/fase", "Meter", "m" }, + { 3, "Numero unità prodotte (lavorate) per step/fase", "Unit", "#" } }); migrationBuilder.InsertData( - table: "RegCustomer", - columns: new[] { "CustomerID", "CompanyName", "FirstName", "LastName", "VAT" }, - values: new object[,] - { - { 1, "", "Customer A", "Egalware", "1234567890123456" }, - { 2, "", "Customer B", "User", "1234567890123456" }, - { 3, "", "Customer C", "User Test", "1234567890123456" } - }); - - migrationBuilder.InsertData( - table: "RegDealer", - columns: new[] { "DealerID", "CompanyName", "FirstName", "LastName", "VAT" }, - values: new object[,] - { - { 1, "Company First", "Dealer A", "Egalware", "9587362514671527" }, - { 2, "Company First", "Dealer B", "User", "9587362514671527" }, - { 3, "Company Second", "Dealer C", "User Test", "9587362514671527" } - }); - - migrationBuilder.InsertData( - table: "RegItemGroup", - columns: new[] { "CodGroup", "Name" }, + table: "item_group", + columns: new[] { "CodGroup", "Description" }, values: new object[,] { { "WindowGlass", "Vetri serramento" }, @@ -691,21 +751,47 @@ namespace EgwCoreLib.Lux.Data.Migrations }); migrationBuilder.InsertData( - table: "RegMovType", - columns: new[] { "MovCod", "Name" }, + table: "item_supplier", + columns: new[] { "SupplierID", "CompanyName", "FirstName", "LastName", "VAT" }, values: new object[,] { - { "CAR", "Carico a magazzino" }, - { "MOV", "Movimento interno (spostamento)" }, - { "ND", "Non Definito" }, - { "OFOR", "Ordine Fornitore" }, - { "RETT", "Rettifica magazzino" }, - { "SCAR", "Scarico da magazzino" } + { 1, "Company One", "Supplier A", "Egalware", "7294857103879254" }, + { 2, "Company Two", "Supplier B", "User", "7294857103879254" }, + { 3, "Company Two", "Supplier C", "User Test", "7294857103879254" } }); migrationBuilder.InsertData( - table: "RegPhase", - columns: new[] { "PhaseID", "Name" }, + table: "sales_customer", + columns: new[] { "CustomerID", "CompanyName", "FirstName", "LastName", "VAT" }, + values: new object[,] + { + { 1, "", "Customer A", "Egalware", "1234567890123456" }, + { 2, "", "Customer B", "User", "1234567890123456" }, + { 3, "", "Customer C", "User Test", "1234567890123456" } + }); + + migrationBuilder.InsertData( + table: "sales_dealer", + columns: new[] { "DealerID", "CompanyName", "FirstName", "LastName", "VAT" }, + values: new object[,] + { + { 1, "Company First", "Dealer A", "Egalware", "9587362514671527" }, + { 2, "Company First", "Dealer B", "User", "9587362514671527" }, + { 3, "Company Second", "Dealer C", "User Test", "9587362514671527" } + }); + + migrationBuilder.InsertData( + table: "task_job", + columns: new[] { "JobID", "Description" }, + values: new object[,] + { + { 1, "Rivendita / servizi" }, + { 2, "Serramento Completo Legno su linea Saomad e installatore interno" } + }); + + migrationBuilder.InsertData( + table: "task_phase", + columns: new[] { "PhaseID", "Description" }, values: new object[,] { { 1, "Taglio tronchetti" }, @@ -717,32 +803,30 @@ namespace EgwCoreLib.Lux.Data.Migrations }); migrationBuilder.InsertData( - table: "RegResource", - columns: new[] { "ResourceID", "Name", "IsAsset", "IsHuman", "UmFix", "UmProp", "UnitCostFix", "UnitCostProp" }, + table: "utils_gen_class", + columns: new[] { "ClassCod", "Description" }, values: new object[,] { - { 1, "Sezionatrice", true, false, "€/h", "", 15.0, 0.0 }, - { 2, "Linea SAOMAD WoodPecker Just 3500", true, false, "€/h", "€/m", 240.0, 1.8999999999999999 }, - { 3, "Linea Pantografo", true, false, "€/h", "€/m", 90.0, 5.9000000000000004 }, - { 4, "Stazione Verniciatura", true, false, "€/h", "€/m", 40.0, 1.8999999999999999 }, - { 5, "Verniciatura Manuale", false, true, "€/h", "€/m", 10.0, 1.8999999999999999 }, - { 6, "Montaggio Manuale", false, true, "", "€/h", 0.0, 40.0 }, - { 7, "Installatore", false, true, "", "€/h", 0.0, 40.0 } + { "WoodCol", "Elenco Colori Legno" }, + { "WoodMat", "Elenco Materiali Legno" } }); migrationBuilder.InsertData( - table: "RegSupplier", - columns: new[] { "SupplierID", "CompanyName", "FirstName", "LastName", "VAT" }, + table: "utils_mov_type", + columns: new[] { "MovCod", "Description" }, values: new object[,] { - { 1, "Company One", "Supplier A", "Egalware", "7294857103879254" }, - { 2, "Company Two", "Supplier B", "User", "7294857103879254" }, - { 3, "Company Two", "Supplier C", "User Test", "7294857103879254" } + { "CAR", "Carico a magazzino" }, + { "MOV", "Movimento interno (spostamento)" }, + { "ND", "Non Definito" }, + { "OFOR", "Ordine Fornitore" }, + { "RETT", "Rettifica magazzino" }, + { "SCAR", "Scarico da magazzino" } }); migrationBuilder.InsertData( - table: "RegTags", - columns: new[] { "TagID", "Name" }, + table: "utils_tags", + columns: new[] { "TagID", "Description" }, values: new object[,] { { 1, "Tag 01" }, @@ -753,44 +837,41 @@ namespace EgwCoreLib.Lux.Data.Migrations }); migrationBuilder.InsertData( - table: "JobRowList", - columns: new[] { "JobStepID", "Name", "Index", "JobID", "PhaseID", "ProductivityRate", "ResourceID" }, + table: "cost_resource", + columns: new[] { "ResourceID", "CostDriverBudget", "CostDriverID", "EBTPerc", "FixedCost", "LaborCost", "Name", "OverHeadCost", "OverHeadPerc", "PriceMargin", "VariableCost" }, values: new object[,] { - { 1, "", 1, 2, 1, 1.0, 1 }, - { 2, "", 2, 2, 2, 1.0, 2 }, - { 3, "", 3, 2, 3, 1.0, 4 }, - { 4, "", 4, 2, 4, 1.0, 6 }, - { 5, "", 5, 2, 6, 1.0, 7 } + { 1, 880m, 1, 0.15m, 12000m, 30m, "Sezionatrice", 5000m, 0.15m, 0.2m, 6000m }, + { 2, 1760m, 1, 0.15m, 100000m, 40m, "Linea SAOMAD WoodPecker Just 3500", 15000m, 0.15m, 0.2m, 30000m }, + { 3, 1760m, 1, 0.15m, 24000m, 35m, "Linea Pantografo", 5000m, 0.15m, 0.2m, 6000m }, + { 4, 880m, 1, 0.15m, 24000m, 30m, "Stazione Verniciatura", 3000m, 0.15m, 0.2m, 6000m }, + { 5, 220m, 1, 0.15m, 6000m, 30m, "Verniciatura Manuale", 3000m, 0.15m, 0.2m, 2000m }, + { 6, 3520m, 1, 0.15m, 500m, 30m, "Montaggio Manuale", 500m, 0.15m, 0.2m, 500m }, + { 7, 3520m, 1, 0.15m, 0m, 40m, "Installatore", 0m, 0.15m, 0.2m, 3000m } }); migrationBuilder.InsertData( - table: "Offer", - columns: new[] { "OfferID", "CustomerID", "DealerID", "Name", "Inserted", "Modified", "OffertState", "RefNum", "RefRev", "RefYear", "ValidUntil" }, - values: new object[] { 1, 2, 2, "Offerta per tre serramenti", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4215), new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4216), 0, 1, 1, 2024, new DateTime(2025, 9, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4212) }); - - migrationBuilder.InsertData( - table: "RegItem", - columns: new[] { "ItemID", "CodGroup", "BomCost", "Name", "ExtItemCode", "IsService", "ItemCode", "ItemType", "Margin", "QtyMax", "QtyMin", "SupplCode", "UM" }, + table: "item_item", + columns: new[] { "ItemID", "CodGroup", "Cost", "Description", "ExtItemCode", "IsService", "ItemCode", "ItemIDParent", "ItemType", "Margin", "QtyMax", "QtyMin", "SupplCode", "UM" }, values: new object[,] { - { 1, "WindowTrunk", 20.0, "BARRA-60x80 generica", "", false, 1001, 1, 0.29999999999999999, 0.0, 0.0, "BARR.001", "#" }, - { 2, "WindowTrunk", 16.5, "Barra 60x80, lunghezza 12m", "BARRA-60x80x12000", false, 1002, 1, 0.20999999999999999, 0.0, 0.0, "ABC.00123.12000", "#" }, - { 3, "WindowTrunk", 17.5, "Barra 60x80, lunghezza 8m", "BARRA-60x80x8000", false, 1003, 1, 0.22, 0.0, 0.0, "ABC.00123.8000", "#" }, - { 4, "WindowTrunk", 15.5, "Barra 60x80, lunghezza 16m", "BARRA-60x80x16000", false, 1004, 1, 0.20000000000000001, 0.0, 0.0, "ABC.00123.16000", "#" }, - { 5, "WindowGlass", 300.0, "Vetro triplo, basso indice termico, 800x1000", "VETRO-3L-THERMO-800x1000", false, 2001, 1, 0.20000000000000001, 0.0, 0.0, "V3T.800.1000", "m2" }, - { 6, "WindowGlass", 200.0, "Vetro doppio, 800x1000", "VETRO-2L-800x1000", false, 2002, 1, 0.14999999999999999, 0.0, 0.0, "V2.800.1000", "m2" }, - { 7, "WindowGlass", 250.0, "Vetro triplo, 800x1000", "VETRO-3L-800x1000", false, 2003, 1, 0.17999999999999999, 0.0, 0.0, "V3.800.1000", "m2" }, - { 8, "WindowVarnish", 20.0, "Vernice trasparente", "VERN-TRASP", false, 3001, 1, 0.20000000000000001, 0.0, 0.0, "VT.STD", "l" }, - { 9, "WindowHardware", 65.0, "Kit standard completo AGB tipo 001", "KIT-001", false, 5001, 1, 0.20000000000000001, 0.0, 0.0, "AGB-KIT-001", "#" }, - { 10, "WindowHardware", 10.0, "Cerniera AGB tipo 001", "CERN-001", false, 5002, 1, 0.20000000000000001, 0.0, 0.0, "AGB-CERN-001", "#" }, - { 11, "WindowHardware", 15.0, "Serratura AGB tipo 001", "SERR-001", false, 5003, 1, 0.20000000000000001, 0.0, 0.0, "AGB-SERR-001", "#" }, - { 12, "WindowHardware", 25.0, "Maniglia AGB tipo 001", "MAN-001", false, 5004, 1, 0.20000000000000001, 0.0, 0.0, "AGB-MAN-001", "#" } + { 1, "WindowTrunk", 20.0, "BARRA-60x80 generica", "", false, 1001, 0, 1, 0.29999999999999999, 0.0, 0.0, "BARR.001", "#" }, + { 2, "WindowTrunk", 16.5, "Barra 60x80, lunghezza 12m", "BARRA-60x80x12000", false, 1002, 0, 1, 0.20999999999999999, 0.0, 0.0, "ABC.00123.12000", "#" }, + { 3, "WindowTrunk", 17.5, "Barra 60x80, lunghezza 8m", "BARRA-60x80x8000", false, 1003, 0, 1, 0.22, 0.0, 0.0, "ABC.00123.8000", "#" }, + { 4, "WindowTrunk", 15.5, "Barra 60x80, lunghezza 16m", "BARRA-60x80x16000", false, 1004, 0, 1, 0.20000000000000001, 0.0, 0.0, "ABC.00123.16000", "#" }, + { 5, "WindowGlass", 300.0, "Vetro triplo, basso indice termico, 800x1000", "VETRO-3L-THERMO-800x1000", false, 2001, 0, 1, 0.20000000000000001, 0.0, 0.0, "V3T.800.1000", "m2" }, + { 6, "WindowGlass", 200.0, "Vetro doppio, 800x1000", "VETRO-2L-800x1000", false, 2002, 0, 1, 0.14999999999999999, 0.0, 0.0, "V2.800.1000", "m2" }, + { 7, "WindowGlass", 250.0, "Vetro triplo, 800x1000", "VETRO-3L-800x1000", false, 2003, 0, 1, 0.17999999999999999, 0.0, 0.0, "V3.800.1000", "m2" }, + { 8, "WindowVarnish", 20.0, "Vernice trasparente", "VERN-TRASP", false, 3001, 0, 1, 0.20000000000000001, 0.0, 0.0, "VT.STD", "l" }, + { 9, "WindowHardware", 65.0, "Kit standard completo AGB tipo 001", "KIT-001", false, 5001, 0, 1, 0.20000000000000001, 0.0, 0.0, "AGB-KIT-001", "#" }, + { 10, "WindowHardware", 10.0, "Cerniera AGB tipo 001", "CERN-001", false, 5002, 0, 1, 0.20000000000000001, 0.0, 0.0, "AGB-CERN-001", "#" }, + { 11, "WindowHardware", 15.0, "Serratura AGB tipo 001", "SERR-001", false, 5003, 0, 1, 0.20000000000000001, 0.0, 0.0, "AGB-SERR-001", "#" }, + { 12, "WindowHardware", 25.0, "Maniglia AGB tipo 001", "MAN-001", false, 5004, 0, 1, 0.20000000000000001, 0.0, 0.0, "AGB-MAN-001", "#" } }); migrationBuilder.InsertData( - table: "SellingItem", - columns: new[] { "SellingItemID", "BomCost", "Name", "ExtItemCode", "IsService", "ItemCode", "ItemSteps", "JobID", "Margin", "SerStruct", "SupplCode", "UM" }, + table: "item_selling_item", + columns: new[] { "SellingItemID", "Cost", "Description", "ExtItemCode", "IsService", "ItemCode", "ItemSteps", "JobID", "Margin", "SerStruct", "SupplCode", "UM" }, values: new object[,] { { 1, 820.0, "Finestra anta Singola", "", false, 0, "", 2, 0.20000000000000001, "", "", "#" }, @@ -799,27 +880,35 @@ namespace EgwCoreLib.Lux.Data.Migrations }); migrationBuilder.InsertData( - table: "JobRowItemList", - columns: new[] { "JobStepItemID", "Name", "Index", "ItemID", "JobStepID", "ProductivityRate" }, + table: "sales_offer", + columns: new[] { "OfferID", "CustomerID", "DealerID", "Description", "Inserted", "Modified", "OffertState", "RefNum", "RefRev", "RefYear", "ValidUntil" }, + values: new object[] { 1, 2, 2, "Offerta per tre serramenti", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5787), new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5789), 0, 1, 1, 2024, new DateTime(2025, 10, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5785) }); + + migrationBuilder.InsertData( + table: "utils_gen_value", + columns: new[] { "GenValID", "ClassCod", "Ordinal", "ValString" }, values: new object[,] { - { 1, "Grezzo legno abete", 1, 1, 1, 1.0 }, - { 2, "Vernice trasparente standard 1L", 2, 8, 3, 0.10000000000000001 }, - { 3, "Ferramenta AGB - rif. AGFD.00000.00000", 3, 9, 4, 1.0 } + { 1, "WoodMat", 1, "Pine" }, + { 2, "WoodMat", 2, "Maple" }, + { 3, "WoodCol", 1, "Legno" }, + { 4, "WoodCol", 2, "Bianco" }, + { 5, "WoodCol", 3, "Rosso" }, + { 6, "WoodCol", 4, "Nero" } }); migrationBuilder.InsertData( - table: "OfferRowList", - columns: new[] { "OfferRowID", "BomOk", "BomCost", "Environment", "Inserted", "ItemBOM", "ItemOk", "ItemSteps", "Modified", "Note", "OfferID", "OfferRowUID", "ProductivityRate", "RowNum", "SellingItemID", "SerStruct" }, + table: "sales_offer_row", + columns: new[] { "OfferRowID", "BomCost", "BomOk", "BomPrice", "Environment", "Inserted", "ItemBOM", "ItemOk", "ItemSteps", "Modified", "Note", "OfferID", "OfferRowUID", "Qty", "RowNum", "SellingItemID", "SerStruct", "StepCost", "StepPrice" }, values: new object[,] { - { 1, true, 950.0, "WINDOW", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4243), "", true, "{}", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4245), "Finestra anta singola 2025", 1, "OFF0000000001", 3.0, 1, 1, "{}" }, - { 2, true, 160.0, "WINDOW", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4252), "", true, "{}", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4253), "Persiana per Finestra anta singola 2025", 1, "OFF0000000002", 3.0, 2, 2, "{}" }, - { 3, true, 200.0, "WINDOW", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4259), "", true, "{}", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4261), "Installazione serramento", 1, "OFF0000000003", 3.0, 3, 3, "{}" } + { 1, 950.0, true, 0.0, "WINDOW", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5885), "", true, "{}", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5887), "Finestra anta singola 2025", 1, "OFF250000000001", 3.0, 1, 1, "{}", 0.0, 0.0 }, + { 2, 160.0, true, 0.0, "WINDOW", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5906), "", true, "{}", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5908), "Persiana per Finestra anta singola 2025", 1, "OFF250000000002", 3.0, 2, 2, "{}", 0.0, 0.0 }, + { 3, 200.0, true, 0.0, "WINDOW", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5920), "", true, "{}", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5922), "Installazione serramento", 1, "OFF250000000003", 3.0, 3, 3, "{}", 0.0, 0.0 } }); migrationBuilder.InsertData( - table: "StockStatus", + table: "stock_status", columns: new[] { "StockStatusId", "IsDeleted", "IsRemn", "ItemID", "Location", "QtyAvail" }, values: new object[,] { @@ -836,214 +925,260 @@ namespace EgwCoreLib.Lux.Data.Migrations }); migrationBuilder.InsertData( - table: "StockMov", + table: "task_job_step", + columns: new[] { "JobStepID", "CostDriverID", "Description", "Index", "JobID", "PhaseID", "ProductivityRate", "ResourceID" }, + values: new object[,] + { + { 1, 3, "", 1, 2, 1, 1m, 1 }, + { 2, 2, "", 2, 2, 2, 1m, 2 }, + { 3, 3, "", 3, 2, 3, 1m, 4 }, + { 4, 3, "", 4, 2, 4, 1m, 6 }, + { 5, 3, "", 5, 2, 6, 1m, 7 } + }); + + migrationBuilder.InsertData( + table: "stock_mov", columns: new[] { "StockMovID", "CodDoc", "DtCreate", "MovCod", "Note", "QtyRec", "StockStatusId", "UnitVal", "UserId" }, values: new object[,] { - { 1, "", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(3939), "CAR", "DEMO", 5.0, 1, 0.0, "samuele.locatelli@egalware.com" }, - { 2, "", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(3989), "CAR", "DEMO", 8.0, 2, 0.0, "samuele.locatelli@egalware.com" }, - { 3, "", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(3993), "CAR", "DEMO", 5.0, 3, 0.0, "samuele.locatelli@egalware.com" }, - { 4, "", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(3997), "CAR", "DEMO", 1.0, 4, 0.0, "samuele.locatelli@egalware.com" }, - { 5, "", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4000), "CAR", "DEMO", 10.0, 5, 0.0, "samuele.locatelli@egalware.com" }, - { 6, "", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4004), "CAR", "DEMO", 1.0, 6, 0.0, "samuele.locatelli@egalware.com" }, - { 7, "", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4008), "CAR", "DEMO", 50.0, 7, 0.0, "samuele.locatelli@egalware.com" }, - { 8, "", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4011), "CAR", "DEMO", 1.0, 8, 0.0, "samuele.locatelli@egalware.com" }, - { 9, "", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4015), "CAR", "DEMO", 1.0, 9, 0.0, "samuele.locatelli@egalware.com" }, - { 10, "", new DateTime(2025, 8, 8, 16, 36, 28, 420, DateTimeKind.Local).AddTicks(4019), "CAR", "DEMO", 1.0, 10, 0.0, "samuele.locatelli@egalware.com" } + { 1, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5439), "CAR", "DEMO", 5.0, 1, 0.0, "samuele.locatelli@egalware.com" }, + { 2, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5485), "CAR", "DEMO", 8.0, 2, 0.0, "samuele.locatelli@egalware.com" }, + { 3, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5489), "CAR", "DEMO", 5.0, 3, 0.0, "samuele.locatelli@egalware.com" }, + { 4, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5493), "CAR", "DEMO", 1.0, 4, 0.0, "samuele.locatelli@egalware.com" }, + { 5, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5497), "CAR", "DEMO", 10.0, 5, 0.0, "samuele.locatelli@egalware.com" }, + { 6, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5501), "CAR", "DEMO", 1.0, 6, 0.0, "samuele.locatelli@egalware.com" }, + { 7, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5505), "CAR", "DEMO", 50.0, 7, 0.0, "samuele.locatelli@egalware.com" }, + { 8, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5509), "CAR", "DEMO", 1.0, 8, 0.0, "samuele.locatelli@egalware.com" }, + { 9, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5514), "CAR", "DEMO", 1.0, 9, 0.0, "samuele.locatelli@egalware.com" }, + { 10, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5518), "CAR", "DEMO", 1.0, 10, 0.0, "samuele.locatelli@egalware.com" } + }); + + migrationBuilder.InsertData( + table: "task_job_step_item", + columns: new[] { "JobStepItemID", "Description", "Index", "ItemID", "JobStepID", "Qty" }, + values: new object[,] + { + { 1, "Grezzo legno abete", 1, 1, 1, 1.0 }, + { 2, "Vernice trasparente standard 1L", 2, 8, 3, 0.10000000000000001 }, + { 3, "Ferramenta AGB - rif. AGFD.00000.00000", 3, 9, 4, 1.0 } }); migrationBuilder.CreateIndex( - name: "IX_JobRowItemList_ItemID", - table: "JobRowItemList", - column: "ItemID"); + name: "IX_cost_resource_CostDriverID", + table: "cost_resource", + column: "CostDriverID"); migrationBuilder.CreateIndex( - name: "IX_JobRowItemList_JobRowID", - table: "JobRowItemList", - column: "JobStepID"); - - migrationBuilder.CreateIndex( - name: "IX_JobRowList_JobID", - table: "JobRowList", - column: "JobID"); - - migrationBuilder.CreateIndex( - name: "IX_JobRowList_PhaseID", - table: "JobRowList", - column: "PhaseID"); - - migrationBuilder.CreateIndex( - name: "IX_JobRowList_ResourceID", - table: "JobRowList", - column: "ResourceID"); - - migrationBuilder.CreateIndex( - name: "IX_Offer_CustomerID", - table: "Offer", - column: "CustomerID"); - - migrationBuilder.CreateIndex( - name: "IX_Offer_DealerID", - table: "Offer", - column: "DealerID"); - - migrationBuilder.CreateIndex( - name: "IX_OfferRowList_OfferID", - table: "OfferRowList", - column: "OfferID"); - - migrationBuilder.CreateIndex( - name: "IX_OfferRowList_SellingItemID", - table: "OfferRowList", - column: "SellingItemID"); - - migrationBuilder.CreateIndex( - name: "IX_Order_CustomerID", - table: "Order", - column: "CustomerID"); - - migrationBuilder.CreateIndex( - name: "IX_Order_DealerID", - table: "Order", - column: "DealerID"); - - migrationBuilder.CreateIndex( - name: "IX_Order_OfferID", - table: "Order", - column: "OfferID"); - - migrationBuilder.CreateIndex( - name: "IX_OrderRowList_OrderID", - table: "OrderRowList", - column: "OrderID"); - - migrationBuilder.CreateIndex( - name: "IX_OrderRowList_SellingItemID", - table: "OrderRowList", - column: "SellingItemID"); - - migrationBuilder.CreateIndex( - name: "IX_ProductionItem_OrderRowID", - table: "ProductionItem", - column: "OrderRowID"); - - migrationBuilder.CreateIndex( - name: "IX_ProductionItem_ProductionBatchID", - table: "ProductionItem", - column: "ProductionBatchID"); - - migrationBuilder.CreateIndex( - name: "IX_ProductionItemRowList_PhaseID", - table: "ProductionItemRowList", - column: "PhaseID"); - - migrationBuilder.CreateIndex( - name: "IX_ProductionItemRowList_ProdItemID", - table: "ProductionItemRowList", - column: "ProdItemID"); - - migrationBuilder.CreateIndex( - name: "IX_ProductionItemRowList_ResourceID", - table: "ProductionItemRowList", - column: "ResourceID"); - - migrationBuilder.CreateIndex( - name: "IX_RegItem_CodGroup", - table: "RegItem", + name: "IX_item_item_CodGroup", + table: "item_item", column: "CodGroup"); migrationBuilder.CreateIndex( - name: "IX_SellingItem_JobID", - table: "SellingItem", + name: "IX_item_selling_item_JobID", + table: "item_selling_item", column: "JobID"); migrationBuilder.CreateIndex( - name: "IX_StockMov_MovCod", - table: "StockMov", + name: "IX_production_item_OrderRowID", + table: "production_item", + column: "OrderRowID"); + + migrationBuilder.CreateIndex( + name: "IX_production_item_ProductionBatchID", + table: "production_item", + column: "ProductionBatchID"); + + migrationBuilder.CreateIndex( + name: "IX_production_item_step_PhaseID", + table: "production_item_step", + column: "PhaseID"); + + migrationBuilder.CreateIndex( + name: "IX_production_item_step_ProdItemID", + table: "production_item_step", + column: "ProdItemID"); + + migrationBuilder.CreateIndex( + name: "IX_production_item_step_ResourceID", + table: "production_item_step", + column: "ResourceID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_offer_CustomerID", + table: "sales_offer", + column: "CustomerID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_offer_DealerID", + table: "sales_offer", + column: "DealerID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_offer_row_OfferID", + table: "sales_offer_row", + column: "OfferID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_offer_row_SellingItemID", + table: "sales_offer_row", + column: "SellingItemID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_order_CustomerID", + table: "sales_order", + column: "CustomerID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_order_DealerID", + table: "sales_order", + column: "DealerID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_order_OfferID", + table: "sales_order", + column: "OfferID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_order_row_OrderID", + table: "sales_order_row", + column: "OrderID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_order_row_SellingItemID", + table: "sales_order_row", + column: "SellingItemID"); + + migrationBuilder.CreateIndex( + name: "IX_stock_mov_MovCod", + table: "stock_mov", column: "MovCod"); migrationBuilder.CreateIndex( - name: "IX_StockMov_StockStatusId", - table: "StockMov", + name: "IX_stock_mov_StockStatusId", + table: "stock_mov", column: "StockStatusId"); migrationBuilder.CreateIndex( - name: "IX_StockStatus_ItemID", - table: "StockStatus", + name: "IX_stock_status_ItemID", + table: "stock_status", column: "ItemID"); + + migrationBuilder.CreateIndex( + name: "IX_task_job_step_CostDriverID", + table: "task_job_step", + column: "CostDriverID"); + + migrationBuilder.CreateIndex( + name: "IX_task_job_step_JobID", + table: "task_job_step", + column: "JobID"); + + migrationBuilder.CreateIndex( + name: "IX_task_job_step_PhaseID", + table: "task_job_step", + column: "PhaseID"); + + migrationBuilder.CreateIndex( + name: "IX_task_job_step_ResourceID", + table: "task_job_step", + column: "ResourceID"); + + migrationBuilder.CreateIndex( + name: "IX_task_job_step_item_ItemID", + table: "task_job_step_item", + column: "ItemID"); + + migrationBuilder.CreateIndex( + name: "IX_task_job_step_item_JobStepID", + table: "task_job_step_item", + column: "JobStepID"); + + migrationBuilder.CreateIndex( + name: "IX_utils_gen_value_ClassCod", + table: "utils_gen_value", + column: "ClassCod"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( - name: "Counter"); + name: "item_supplier"); migrationBuilder.DropTable( - name: "JobRowItemList"); + name: "production_item_step"); migrationBuilder.DropTable( - name: "OfferRowList"); + name: "sales_offer_row"); migrationBuilder.DropTable( - name: "ProductionItemRowList"); + name: "stock_mov"); migrationBuilder.DropTable( - name: "RegSupplier"); + name: "task_job_step_item"); migrationBuilder.DropTable( - name: "RegTags"); + name: "utils_counter"); migrationBuilder.DropTable( - name: "StockMov"); + name: "utils_gen_value"); migrationBuilder.DropTable( - name: "JobRowList"); + name: "utils_tags"); migrationBuilder.DropTable( - name: "ProductionItem"); + name: "production_item"); migrationBuilder.DropTable( - name: "RegMovType"); + name: "stock_status"); migrationBuilder.DropTable( - name: "StockStatus"); + name: "utils_mov_type"); migrationBuilder.DropTable( - name: "RegPhase"); + name: "task_job_step"); migrationBuilder.DropTable( - name: "RegResource"); + name: "utils_gen_class"); migrationBuilder.DropTable( - name: "OrderRowList"); + name: "production_batch"); migrationBuilder.DropTable( - name: "ProductionBatch"); + name: "sales_order_row"); migrationBuilder.DropTable( - name: "RegItem"); + name: "item_item"); migrationBuilder.DropTable( - name: "Order"); + name: "cost_resource"); migrationBuilder.DropTable( - name: "SellingItem"); + name: "task_phase"); migrationBuilder.DropTable( - name: "RegItemGroup"); + name: "item_selling_item"); migrationBuilder.DropTable( - name: "Offer"); + name: "sales_order"); migrationBuilder.DropTable( - name: "JobList"); + name: "item_group"); migrationBuilder.DropTable( - name: "RegCustomer"); + name: "cost_driver"); migrationBuilder.DropTable( - name: "RegDealer"); + name: "task_job"); + + migrationBuilder.DropTable( + name: "sales_offer"); + + migrationBuilder.DropTable( + name: "sales_customer"); + + migrationBuilder.DropTable( + name: "sales_dealer"); } } } diff --git a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs index 28654a89..4a3c0ccf 100644 --- a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs +++ b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs @@ -940,13 +940,13 @@ namespace EgwCoreLib.Lux.Data.Migrations CustomerID = 2, DealerID = 2, Description = "Offerta per tre serramenti", - Inserted = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1216), - Modified = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1218), + Inserted = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5787), + Modified = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5789), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 10, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1213) + ValidUntil = new DateTime(2025, 10, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5785) }); }); @@ -1034,11 +1034,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 0.0, Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1314), + Inserted = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5885), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1317), + Modified = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5887), Note = "Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000001", @@ -1056,11 +1056,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 0.0, Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1336), + Inserted = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5906), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1338), + Modified = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5908), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000002", @@ -1078,11 +1078,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 0.0, Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1350), + Inserted = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5920), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(1352), + Modified = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5922), Note = "Installazione serramento", OfferID = 1, OfferRowUID = "OFF250000000003", @@ -1265,8 +1265,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 1, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(844), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(889), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5439), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5482), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1278,8 +1278,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(892), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(894), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5485), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5487), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -1291,8 +1291,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(897), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(898), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5489), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5491), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1304,8 +1304,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(901), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(903), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5493), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5495), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1317,8 +1317,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(905), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(907), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5497), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5499), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -1330,8 +1330,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(909), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(911), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5501), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5503), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1343,8 +1343,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(914), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(915), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5505), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5507), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -1356,8 +1356,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(918), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(920), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5509), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5511), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1369,8 +1369,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(922), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(924), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5514), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5515), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1382,8 +1382,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(927), - DtMod = new DateTime(2025, 9, 19, 18, 46, 19, 890, DateTimeKind.Local).AddTicks(928), + DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5518), + DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5519), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, From 901aaddc7b342cef0cb19a72b1b982ec039c51de Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 19 Sep 2025 19:22:12 +0200 Subject: [PATCH 13/65] Inizio bozza pagina cicli --- Lux.UI/Components/Layout/NavMenu.razor | 7 +- Lux.UI/Components/Pages/JobRoute.razor | 43 ++++++++++ Lux.UI/Components/Pages/JobRoute.razor.cs | 94 ++++++++++++++++++++++ Lux.UI/Lux.UI.csproj | 2 +- README.md | 47 +++++------ README.pdf | Bin 80343 -> 80405 bytes Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 9 files changed, 171 insertions(+), 28 deletions(-) create mode 100644 Lux.UI/Components/Pages/JobRoute.razor create mode 100644 Lux.UI/Components/Pages/JobRoute.razor.cs diff --git a/Lux.UI/Components/Layout/NavMenu.razor b/Lux.UI/Components/Layout/NavMenu.razor index 196b251a..e0e65482 100644 --- a/Lux.UI/Components/Layout/NavMenu.razor +++ b/Lux.UI/Components/Layout/NavMenu.razor @@ -43,7 +43,12 @@ Articoli -
    +
+
- /// - /// - /// - /// - /// - /// - private static void validateBom(List itemGroupList, List bomGenList, ref List bomList, ref double totCost, ref int numGroupOk, ref int numItemOk) + /// Elenco ItemGroup da considerare + /// Item di tipo BOM/BomAlt + /// Lista BOM ricevuta da validare + /// Costo netto componenti BOM calcolato + /// Prezzo complessivo calcolato (con aggiunta marginalità) + /// Controllo coerenza calcoli sui gruppi items + /// Controllo coerenza calcoli su num items + private static void validateBom(List itemGroupList, List bomGenList, ref List bomList, ref double totCost, ref double totPrice, ref int numGroupOk, ref int numItemOk) { + double margin = 0; // ciclo x ogni elemento della BOM, cercando x gruppo e ExtItemCode foreach (var item in bomList) { + // init del margine + margin = 0; // verifico item group esistente... if (itemGroupList.Where(x => x.CodGroup == item.ClassCode).Count() > 0) { @@ -1182,6 +1195,8 @@ namespace EgwCoreLib.Lux.Data.Controllers // conto l'item numItemOk++; item.PriceEff = item.Price; + // dovrei recuperare margine da BOM... da rivedere, x ora cablato 20%... + margin = 0.2; } else { @@ -1219,6 +1234,7 @@ namespace EgwCoreLib.Lux.Data.Controllers item.ItemCode = recCost.ExtItemCode; //item.DescriptionCode = recCost.Name; } + margin = recCost.Margin; } else { @@ -1228,6 +1244,8 @@ namespace EgwCoreLib.Lux.Data.Controllers } // ...e aggiorno totale totCost += item.TotalCost; + // e prezzo totale compreso margine + totPrice += item.TotalCost * (1 + margin); } } diff --git a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs index 39ccd0c0..cb72b191 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs @@ -83,6 +83,11 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales ///
public OfferStates OffertState { get; set; } = OfferStates.Open; + /// + /// Sconto applicato (deve essere < del MAX) + /// + public double Discount { get; set; } = 0; + /// /// Numero Item compresi /// @@ -93,14 +98,33 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales } /// - /// Imposto totale offerta + /// Costo totale offerta (rock bottom) /// [NotMapped] public double TotalCost { - get => OfferRowNav?.Sum(x => x.BomCost) ?? 0; + get => OfferRowNav?.Sum(x => x.TotalCost) ?? 0; } + /// + /// Prezzo totale offerta (compreso di amrginalità) + /// + [NotMapped] + public double TotalPrice + { + get => OfferRowNav?.Sum(x => x.TotalPrice) ?? 0; + } + + /// + /// Sconto massimo applicabile + /// + [NotMapped] + public double MaxDiscount + { + get => (TotalCost > 0 && TotalPrice > TotalCost) ? (TotalPrice - TotalCost) / TotalPrice : 0; + } + + #if false /// /// ID Ordine (nullo se non c'è ordine) diff --git a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs index cc450523..75befcf7 100644 --- a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs +++ b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs @@ -39,7 +39,7 @@ namespace EgwCoreLib.Lux.Data ); modelBuilder.Entity().HasData( - new GenValueModel { GenValID=1, Ordinal=1, ClassCod = "WoodMat", ValString = "Pine" }, + 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 = "Legno" }, new GenValueModel { GenValID = 4, Ordinal = 2, ClassCod = "WoodCol", ValString = "Bianco" }, @@ -157,14 +157,14 @@ namespace EgwCoreLib.Lux.Data // init cost drivers modelBuilder.Entity().HasData( // Risorsa principale di calcolo produttività/costi - new CostDriverModel() { CostDriverID = 1, Name = "WorkHour", Unit = "h", Descript = "Ore lavorate per step/fase"}, + new CostDriverModel() { CostDriverID = 1, Name = "WorkHour", Unit = "h", Descript = "Ore lavorate per step/fase" }, new CostDriverModel() { CostDriverID = 2, Name = "Meter", Unit = "m", Descript = "Metri prodotti per step/fase" }, new CostDriverModel() { CostDriverID = 3, Name = "Unit", Unit = "#", Descript = "Numero unità prodotte (lavorate) per step/fase" } ); // inizializzazione risorse modelBuilder.Entity().HasData( - new ResourceModel { ResourceID = 1, Name = "Sezionatrice", FixedCost = 12000, VariableCost=6000 , OverHeadCost= 5000, CostDriverID = 1 , CostDriverBudget= 220*4, LaborCost=30, OverHeadPerc=0.15M, EBTPerc=0.15M }, + new ResourceModel { ResourceID = 1, Name = "Sezionatrice", FixedCost = 12000, VariableCost = 6000, OverHeadCost = 5000, CostDriverID = 1, CostDriverBudget = 220 * 4, LaborCost = 30, OverHeadPerc = 0.15M, EBTPerc = 0.15M }, new ResourceModel { ResourceID = 2, Name = "Linea SAOMAD WoodPecker Just 3500", FixedCost = 100000, VariableCost = 30000, OverHeadCost = 15000, CostDriverID = 1, CostDriverBudget = 220 * 8, LaborCost = 40, OverHeadPerc = 0.15M, EBTPerc = 0.15M }, new ResourceModel { ResourceID = 3, Name = "Linea Pantografo", FixedCost = 24000, VariableCost = 6000, OverHeadCost = 5000, CostDriverID = 1, CostDriverBudget = 220 * 8, LaborCost = 35, OverHeadPerc = 0.15M, EBTPerc = 0.15M }, new ResourceModel { ResourceID = 4, Name = "Stazione Verniciatura", FixedCost = 24000, VariableCost = 6000, OverHeadCost = 3000, CostDriverID = 1, CostDriverBudget = 220 * 4, LaborCost = 30, OverHeadPerc = 0.15M, EBTPerc = 0.15M }, @@ -234,9 +234,9 @@ namespace EgwCoreLib.Lux.Data // inizializzazione dei valori di default x OfferRow modelBuilder.Entity().HasData( - new OfferRowModel { OfferRowID = 1, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}0000000001", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 950, SellingItemID = 1, Qty = 3, RowNum = 1, SerStruct = "{}", Note = "Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true }, - new OfferRowModel { OfferRowID = 2, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}0000000002", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 160, SellingItemID = 2, Qty = 3, RowNum = 2, SerStruct = "{}", Note = "Persiana per Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true }, - new OfferRowModel { OfferRowID = 3, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}0000000003", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 200, SellingItemID = 3, Qty = 3, RowNum = 3, SerStruct = "{}", Note = "Installazione serramento", ItemSteps = "{}", BomOk = true, ItemOk = true } + new OfferRowModel { OfferRowID = 1, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}0000000001", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 900, BomPrice = 950, SellingItemID = 1, Qty = 3, RowNum = 1, SerStruct = "{}", Note = "Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true }, + new OfferRowModel { OfferRowID = 2, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}0000000002", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 160, BomPrice = 200, SellingItemID = 2, Qty = 3, RowNum = 2, SerStruct = "{}", Note = "Persiana per Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true }, + new OfferRowModel { OfferRowID = 3, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}0000000003", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 200, BomPrice = 250, SellingItemID = 3, Qty = 3, RowNum = 3, SerStruct = "{}", Note = "Installazione serramento", ItemSteps = "{}", BomOk = true, ItemOk = true } ); diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index c066d191..e69de29b 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -1,88 +0,0 @@ - - - - net8.0 - enable - enable - 0.9.2509.2311 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - - - - - - - - - - - - - - - - - PreserveNewest - - - - - - diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index 87ad4483..a7e498f8 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -45,8 +45,9 @@ else Codice Descrizione Qty - Importo - Tot + Importo + Totale + Marg. @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit) { Mat. @@ -76,18 +77,29 @@ else @item.OfferRowUID @item.Note @item.Qty - - @if (!(item.BomOk && item.ItemOk)) - { - - } - @($"{item.BomCost:C2}") + +
+ @if (!(item.BomOk && item.ItemOk)) + { + + } + @($"{item.UnitPrice:C2}") +
+
(@item.UnitCost.ToString("C2"))
+ + +
+ @($"{item.TotalPrice:C2}") +
+
(@item.TotalCost.ToString("C2"))
+ + + @item.MaxDiscount.ToString("P2") - @($"{item.TotalCost:C2}") @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit) { - @if(!string.IsNullOrEmpty(item.ItemBOM)) + @if (!string.IsNullOrEmpty(item.ItemBOM)) { } diff --git a/Lux.UI/Components/Pages/Offers.razor b/Lux.UI/Components/Pages/Offers.razor index 2bf9bc64..e9453da6 100644 --- a/Lux.UI/Components/Pages/Offers.razor +++ b/Lux.UI/Components/Pages/Offers.razor @@ -130,6 +130,7 @@ else } # articoli Importo + Marg. @@ -165,7 +166,11 @@ else @item.NumItems - @item.TotalCost.ToString("C2") +
@item.TotalPrice.ToString("C2")
+
(@item.TotalCost.ToString("C2"))
+ + + @item.MaxDiscount.ToString("P2") } From bca89f0ae2208be0189d726485a8718e81972659 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 23 Sep 2025 12:17:09 +0200 Subject: [PATCH 18/65] Restore proj api auto-cancellatosi --- Lux.API/Lux.API.csproj | 88 ++++++++++++++++++++ Lux.UI/Components/Compo/OfferRowMan.razor.cs | 4 + Lux.UI/Components/Pages/Offers.razor | 2 +- Lux.UI/Components/Pages/Offers.razor.cs | 9 ++ Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 8 files changed, 106 insertions(+), 5 deletions(-) diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index e69de29b..47763ac3 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -0,0 +1,88 @@ + + + + net8.0 + enable + enable + 0.9.2509.2312 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + + + + + + + + + + + + + + + + PreserveNewest + + + + + + diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index c936dad0..d9b02de4 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -18,6 +18,9 @@ namespace Lux.UI.Components.Compo [Parameter] public int OfferID { get; set; } = 0; + [Parameter] + public EventCallback EC_Updated { get; set; } + #endregion Public Properties #region Protected Properties @@ -123,6 +126,7 @@ namespace Lux.UI.Components.Compo await Task.Delay(50); await ReloadData(); UpdateTable(); + await EC_Updated.InvokeAsync(true); isLoading = false; } diff --git a/Lux.UI/Components/Pages/Offers.razor b/Lux.UI/Components/Pages/Offers.razor index e9453da6..3b871159 100644 --- a/Lux.UI/Components/Pages/Offers.razor +++ b/Lux.UI/Components/Pages/Offers.razor @@ -181,7 +181,7 @@ else @if (SelRecord != null) {
- +
} diff --git a/Lux.UI/Components/Pages/Offers.razor.cs b/Lux.UI/Components/Pages/Offers.razor.cs index 79978a77..eaeade55 100644 --- a/Lux.UI/Components/Pages/Offers.razor.cs +++ b/Lux.UI/Components/Pages/Offers.razor.cs @@ -175,6 +175,15 @@ namespace Lux.UI.Components.Pages .ToList(); } + /// + /// Rilegge tabella + /// + private async void ForceReload() + { + await ReloadData(); + UpdateTable(); + } + #endregion Private Methods #if false diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 41ab93c1..44a1394d 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2509.2311 + 0.9.2509.2312 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index e809294a..39fc89ec 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 0.9.2509.2311

+

Versione: 0.9.2509.2312


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 91ca6fba..9d1aeb92 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2509.2311 +0.9.2509.2312 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index b93a5b96..2f7d9c89 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2509.2311 + 0.9.2509.2312 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 4fbc7426f01efbf078ec05c90ecd816e4ae565f3 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 23 Sep 2025 12:19:49 +0200 Subject: [PATCH 19/65] Fix migration con sconto x offerta --- ...250923101803_AddOffertDiscount.Designer.cs | 2243 +++++++++++++++++ .../20250923101803_AddOffertDiscount.cs | 226 ++ .../DataLayerContextModelSnapshot.cs | 70 +- 3 files changed, 2506 insertions(+), 33 deletions(-) create mode 100644 EgwCoreLib.Lux.Data/Migrations/20250923101803_AddOffertDiscount.Designer.cs create mode 100644 EgwCoreLib.Lux.Data/Migrations/20250923101803_AddOffertDiscount.cs diff --git a/EgwCoreLib.Lux.Data/Migrations/20250923101803_AddOffertDiscount.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20250923101803_AddOffertDiscount.Designer.cs new file mode 100644 index 00000000..3cb595ae --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20250923101803_AddOffertDiscount.Designer.cs @@ -0,0 +1,2243 @@ +// +using System; +using EgwCoreLib.Lux.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace EgwCoreLib.Lux.Data.Migrations +{ + [DbContext(typeof(DataLayerContext))] + [Migration("20250923101803_AddOffertDiscount")] + partial class AddOffertDiscount + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.17") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", b => + { + b.Property("CostDriverID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CostDriverID")); + + b.Property("Descript") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Unit") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CostDriverID"); + + b.ToTable("cost_driver"); + + b.HasData( + new + { + CostDriverID = 1, + Descript = "Ore lavorate per step/fase", + Name = "WorkHour", + Unit = "h" + }, + new + { + CostDriverID = 2, + Descript = "Metri prodotti per step/fase", + Name = "Meter", + Unit = "m" + }, + new + { + CostDriverID = 3, + Descript = "Numero unità prodotte (lavorate) per step/fase", + Name = "Unit", + Unit = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.Property("ResourceID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); + + b.Property("CostDriverBudget") + .HasColumnType("decimal(65,30)"); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("EBTPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("FixedCost") + .HasColumnType("decimal(65,30)"); + + b.Property("LaborCost") + .HasColumnType("decimal(65,30)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OverHeadCost") + .HasColumnType("decimal(65,30)"); + + b.Property("OverHeadPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("PriceMargin") + .HasColumnType("decimal(65,30)"); + + b.Property("VariableCost") + .HasColumnType("decimal(65,30)"); + + b.HasKey("ResourceID"); + + b.HasIndex("CostDriverID"); + + b.ToTable("cost_resource"); + + b.HasData( + new + { + ResourceID = 1, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 12000m, + LaborCost = 30m, + Name = "Sezionatrice", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 2, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 100000m, + LaborCost = 40m, + Name = "Linea SAOMAD WoodPecker Just 3500", + OverHeadCost = 15000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 30000m + }, + new + { + ResourceID = 3, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 35m, + Name = "Linea Pantografo", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 4, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 30m, + Name = "Stazione Verniciatura", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 5, + CostDriverBudget = 220m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 6000m, + LaborCost = 30m, + Name = "Verniciatura Manuale", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 2000m + }, + new + { + ResourceID = 6, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 500m, + LaborCost = 30m, + Name = "Montaggio Manuale", + OverHeadCost = 500m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 500m + }, + new + { + ResourceID = 7, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 0m, + LaborCost = 40m, + Name = "Installatore", + OverHeadCost = 0m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 3000m + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", b => + { + b.Property("CodGroup") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CodGroup"); + + b.ToTable("item_group"); + + b.HasData( + new + { + CodGroup = "WindowTrunk", + Description = "Barre legno per lavorazione" + }, + new + { + CodGroup = "WindowGlass", + Description = "Vetri serramento" + }, + new + { + CodGroup = "WindowVarnish", + Description = "Vernici per legno" + }, + new + { + CodGroup = "WindowHardware", + Description = "Ferramenta serramento" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.Property("ItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); + + b.Property("CodGroup") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemIDParent") + .HasColumnType("int"); + + b.Property("ItemType") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("QtyMax") + .HasColumnType("double"); + + b.Property("QtyMin") + .HasColumnType("double"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ItemID"); + + b.HasIndex("CodGroup"); + + b.ToTable("item_item"); + + b.HasData( + new + { + ItemID = 1, + CodGroup = "WindowTrunk", + Cost = 20.0, + Description = "BARRA-60x80 generica", + ExtItemCode = "", + IsService = false, + ItemCode = 1001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.29999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "BARR.001", + UM = "#" + }, + new + { + ItemID = 2, + CodGroup = "WindowTrunk", + Cost = 16.5, + Description = "Barra 60x80, lunghezza 12m", + ExtItemCode = "BARRA-60x80x12000", + IsService = false, + ItemCode = 1002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.12000", + UM = "#" + }, + new + { + ItemID = 3, + CodGroup = "WindowTrunk", + Cost = 17.5, + Description = "Barra 60x80, lunghezza 8m", + ExtItemCode = "BARRA-60x80x8000", + IsService = false, + ItemCode = 1003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.22, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.8000", + UM = "#" + }, + new + { + ItemID = 4, + CodGroup = "WindowTrunk", + Cost = 15.5, + Description = "Barra 60x80, lunghezza 16m", + ExtItemCode = "BARRA-60x80x16000", + IsService = false, + ItemCode = 1004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.16000", + UM = "#" + }, + new + { + ItemID = 5, + CodGroup = "WindowGlass", + Cost = 300.0, + Description = "Vetro triplo, basso indice termico, 800x1000", + ExtItemCode = "VETRO-3L-THERMO-800x1000", + IsService = false, + ItemCode = 2001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3T.800.1000", + UM = "m2" + }, + new + { + ItemID = 6, + CodGroup = "WindowGlass", + Cost = 200.0, + Description = "Vetro doppio, 800x1000", + ExtItemCode = "VETRO-2L-800x1000", + IsService = false, + ItemCode = 2002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.14999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V2.800.1000", + UM = "m2" + }, + new + { + ItemID = 7, + CodGroup = "WindowGlass", + Cost = 250.0, + Description = "Vetro triplo, 800x1000", + ExtItemCode = "VETRO-3L-800x1000", + IsService = false, + ItemCode = 2003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.17999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3.800.1000", + UM = "m2" + }, + new + { + ItemID = 8, + CodGroup = "WindowVarnish", + Cost = 20.0, + Description = "Vernice trasparente", + ExtItemCode = "VERN-TRASP", + IsService = false, + ItemCode = 3001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "VT.STD", + UM = "l" + }, + new + { + ItemID = 9, + CodGroup = "WindowHardware", + Cost = 65.0, + Description = "Kit standard completo AGB tipo 001", + ExtItemCode = "KIT-001", + IsService = false, + ItemCode = 5001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-KIT-001", + UM = "#" + }, + new + { + ItemID = 10, + CodGroup = "WindowHardware", + Cost = 10.0, + Description = "Cerniera AGB tipo 001", + ExtItemCode = "CERN-001", + IsService = false, + ItemCode = 5002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-CERN-001", + UM = "#" + }, + new + { + ItemID = 11, + CodGroup = "WindowHardware", + Cost = 15.0, + Description = "Serratura AGB tipo 001", + ExtItemCode = "SERR-001", + IsService = false, + ItemCode = 5003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-SERR-001", + UM = "#" + }, + new + { + ItemID = 12, + CodGroup = "WindowHardware", + Cost = 25.0, + Description = "Maniglia AGB tipo 001", + ExtItemCode = "MAN-001", + IsService = false, + ItemCode = 5004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-MAN-001", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.Property("SellingItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SellingItemID"); + + b.HasIndex("JobID"); + + b.ToTable("item_selling_item"); + + b.HasData( + new + { + SellingItemID = 1, + Cost = 820.0, + Description = "Finestra anta Singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 2, + Margin = 0.20000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 2, + Cost = 150.0, + Description = "Persiana anta singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.10000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 3, + Cost = 200.0, + Description = "Installazione", + ExtItemCode = "", + IsService = true, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SupplierModel", b => + { + b.Property("SupplierID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SupplierID"); + + b.ToTable("item_supplier"); + + b.HasData( + new + { + SupplierID = 1, + CompanyName = "Company One", + FirstName = "Supplier A", + LastName = "Egalware", + VAT = "7294857103879254" + }, + new + { + SupplierID = 2, + CompanyName = "Company Two", + FirstName = "Supplier B", + LastName = "User", + VAT = "7294857103879254" + }, + new + { + SupplierID = 3, + CompanyName = "Company Two", + FirstName = "Supplier C", + LastName = "User Test", + VAT = "7294857103879254" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", b => + { + b.Property("ProductionBatchID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DueDate") + .HasColumnType("datetime(6)"); + + b.HasKey("ProductionBatchID"); + + b.ToTable("production_batch"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.Property("ProdItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("OrderRowID") + .HasColumnType("int"); + + b.Property("ProductionBatchID") + .HasColumnType("int"); + + b.HasKey("ProdItemID"); + + b.HasIndex("OrderRowID"); + + b.HasIndex("ProductionBatchID"); + + b.ToTable("production_item"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.Property("ProdItemStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProdItemID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.Property("WorkTime") + .HasColumnType("double"); + + b.HasKey("ProdItemStepID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ProdItemID"); + + b.HasIndex("ResourceID"); + + b.ToTable("production_item_step"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", b => + { + b.Property("CustomerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CustomerID"); + + b.ToTable("sales_customer"); + + b.HasData( + new + { + CustomerID = 1, + CompanyName = "", + FirstName = "Customer A", + LastName = "Egalware", + VAT = "1234567890123456" + }, + new + { + CustomerID = 2, + CompanyName = "", + FirstName = "Customer B", + LastName = "User", + VAT = "1234567890123456" + }, + new + { + CustomerID = 3, + CompanyName = "", + FirstName = "Customer C", + LastName = "User Test", + VAT = "1234567890123456" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", b => + { + b.Property("DealerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("DealerID"); + + b.ToTable("sales_dealer"); + + b.HasData( + new + { + DealerID = 1, + CompanyName = "Company First", + FirstName = "Dealer A", + LastName = "Egalware", + VAT = "9587362514671527" + }, + new + { + DealerID = 2, + CompanyName = "Company First", + FirstName = "Dealer B", + LastName = "User", + VAT = "9587362514671527" + }, + new + { + DealerID = 3, + CompanyName = "Company Second", + FirstName = "Dealer C", + LastName = "User Test", + VAT = "9587362514671527" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Property("OfferID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Discount") + .HasColumnType("double"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OfferID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.ToTable("sales_offer"); + + b.HasData( + new + { + OfferID = 1, + CustomerID = 2, + DealerID = 2, + Description = "Offerta per tre serramenti", + Discount = 0.0, + Inserted = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3122), + Modified = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3124), + OffertState = 0, + RefNum = 1, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 10, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3117) + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferRowModel", b => + { + b.Property("OfferRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomOk") + .HasColumnType("tinyint(1)"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Environment") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemBOM") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemOk") + .HasColumnType("tinyint(1)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OfferRowUID") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OfferRowID"); + + b.HasIndex("OfferID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_offer_row"); + + b.HasData( + new + { + OfferRowID = 1, + BomCost = 900.0, + BomOk = true, + BomPrice = 950.0, + Environment = "WINDOW", + Inserted = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3264), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3266), + Note = "Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000000001", + Qty = 3.0, + RowNum = 1, + SellingItemID = 1, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 2, + BomCost = 160.0, + BomOk = true, + BomPrice = 200.0, + Environment = "WINDOW", + Inserted = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3279), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3280), + Note = "Persiana per Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000000002", + Qty = 3.0, + RowNum = 2, + SellingItemID = 2, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 3, + BomCost = 200.0, + BomOk = true, + BomPrice = 250.0, + Environment = "WINDOW", + Inserted = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3291), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3292), + Note = "Installazione serramento", + OfferID = 1, + OfferRowUID = "OFF250000000003", + Qty = 3.0, + RowNum = 3, + SellingItemID = 3, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", b => + { + b.Property("OrderID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OrderID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.HasIndex("OfferID"); + + b.ToTable("sales_order"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.Property("OrderRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OrderID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OrderRowID"); + + b.HasIndex("OrderID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_order_row"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.Property("StockMovID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); + + b.Property("CodDoc") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DtCreate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("DtMod") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); + + b.Property("MovCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyRec") + .HasColumnType("double"); + + b.Property("StockStatusId") + .HasColumnType("int"); + + b.Property("UnitVal") + .HasColumnType("double"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("StockMovID"); + + b.HasIndex("MovCod"); + + b.HasIndex("StockStatusId"); + + b.ToTable("stock_mov"); + + b.HasData( + new + { + StockMovID = 1, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2709), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2786), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 1, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 2, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2790), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2791), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 8.0, + StockStatusId = 2, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 3, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2793), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2795), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 3, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 4, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2797), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2798), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 4, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 5, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2801), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2802), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 10.0, + StockStatusId = 5, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 6, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2804), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2806), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 6, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 7, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2808), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2809), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 50.0, + StockStatusId = 7, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 8, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2811), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2813), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 8, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 9, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2815), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2817), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 9, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 10, + CodDoc = "", + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2819), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2820), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 10, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.Property("StockStatusId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("IsRemn") + .HasColumnType("tinyint(1)"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("Location") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyAvail") + .HasColumnType("double"); + + b.HasKey("StockStatusId"); + + b.HasIndex("ItemID"); + + b.ToTable("stock_status"); + + b.HasData( + new + { + StockStatusId = 1, + IsDeleted = false, + IsRemn = false, + ItemID = 1, + Location = "B001-001-003", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 2, + IsDeleted = false, + IsRemn = false, + ItemID = 2, + Location = "B001-001-002", + QtyAvail = 8.0 + }, + new + { + StockStatusId = 3, + IsDeleted = false, + IsRemn = false, + ItemID = 3, + Location = "B001-001-001", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 4, + IsDeleted = false, + IsRemn = false, + ItemID = 4, + Location = "V002-001-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 5, + IsDeleted = false, + IsRemn = false, + ItemID = 5, + Location = "V001-001-002", + QtyAvail = 10.0 + }, + new + { + StockStatusId = 6, + IsDeleted = false, + IsRemn = false, + ItemID = 6, + Location = "V001-001-003", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 7, + IsDeleted = false, + IsRemn = false, + ItemID = 8, + Location = "V001-001-003", + QtyAvail = 50.0 + }, + new + { + StockStatusId = 8, + IsDeleted = false, + IsRemn = false, + ItemID = 11, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 9, + IsDeleted = false, + IsRemn = false, + ItemID = 9, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 10, + IsDeleted = false, + IsRemn = false, + ItemID = 10, + Location = "S001-001-001", + QtyAvail = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => + { + b.Property("JobID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("JobID"); + + b.ToTable("task_job"); + + b.HasData( + new + { + JobID = 1, + Description = "Rivendita / servizi" + }, + new + { + JobID = 2, + Description = "Serramento Completo Legno su linea Saomad e installatore interno" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.Property("JobStepItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("JobStepID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.HasKey("JobStepItemID"); + + b.HasIndex("ItemID"); + + b.HasIndex("JobStepID"); + + b.ToTable("task_job_step_item"); + + b.HasData( + new + { + JobStepItemID = 1, + Description = "Grezzo legno abete", + Index = 1, + ItemID = 1, + JobStepID = 1, + Qty = 1.0 + }, + new + { + JobStepItemID = 2, + Description = "Vernice trasparente standard 1L", + Index = 2, + ItemID = 8, + JobStepID = 3, + Qty = 0.10000000000000001 + }, + new + { + JobStepItemID = 3, + Description = "Ferramenta AGB - rif. AGFD.00000.00000", + Index = 3, + ItemID = 9, + JobStepID = 4, + Qty = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.Property("JobStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProductivityRate") + .HasColumnType("decimal(65,30)"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.HasKey("JobStepID"); + + b.HasIndex("CostDriverID"); + + b.HasIndex("JobID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ResourceID"); + + b.ToTable("task_job_step"); + + b.HasData( + new + { + JobStepID = 1, + CostDriverID = 3, + Description = "", + Index = 1, + JobID = 2, + PhaseID = 1, + ProductivityRate = 1m, + ResourceID = 1 + }, + new + { + JobStepID = 2, + CostDriverID = 2, + Description = "", + Index = 2, + JobID = 2, + PhaseID = 2, + ProductivityRate = 1m, + ResourceID = 2 + }, + new + { + JobStepID = 3, + CostDriverID = 3, + Description = "", + Index = 3, + JobID = 2, + PhaseID = 3, + ProductivityRate = 1m, + ResourceID = 4 + }, + new + { + JobStepID = 4, + CostDriverID = 3, + Description = "", + Index = 4, + JobID = 2, + PhaseID = 4, + ProductivityRate = 1m, + ResourceID = 6 + }, + new + { + JobStepID = 5, + CostDriverID = 3, + Description = "", + Index = 5, + JobID = 2, + PhaseID = 6, + ProductivityRate = 1m, + ResourceID = 7 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", b => + { + b.Property("PhaseID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("PhaseID"); + + b.ToTable("task_phase"); + + b.HasData( + new + { + PhaseID = 1, + Description = "Taglio tronchetti" + }, + new + { + PhaseID = 2, + Description = "Lavorazione pezzi serramento" + }, + new + { + PhaseID = 3, + Description = "Verniciatura" + }, + new + { + PhaseID = 4, + Description = "Assemblaggio completo" + }, + new + { + PhaseID = 5, + Description = "Assemblaggio Ferramenta" + }, + new + { + PhaseID = 6, + Description = "Installazione e posa in opera" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.CounterModel", b => + { + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("CountName") + .HasColumnType("varchar(255)"); + + b.Property("Counter") + .HasColumnType("int"); + + b.HasKey("RefYear", "CountName"); + + b.ToTable("utils_counter"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Property("ClassCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ClassCod"); + + b.ToTable("utils_gen_class"); + + b.HasData( + new + { + ClassCod = "WoodMat", + Description = "Elenco Materiali Legno" + }, + new + { + ClassCod = "WoodCol", + Description = "Elenco Colori Legno" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.Property("GenValID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); + + b.Property("ClassCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Ordinal") + .HasColumnType("int"); + + b.Property("ValString") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("GenValID"); + + b.HasIndex("ClassCod"); + + b.ToTable("utils_gen_value"); + + 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 = "Legno" + }, + 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.Utils.MovTypeModel", b => + { + b.Property("MovCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("MovCod"); + + b.ToTable("utils_mov_type"); + + b.HasData( + new + { + MovCod = "CAR", + Description = "Carico a magazzino" + }, + new + { + MovCod = "MOV", + Description = "Movimento interno (spostamento)" + }, + new + { + MovCod = "ND", + Description = "Non Definito" + }, + new + { + MovCod = "OFOR", + Description = "Ordine Fornitore" + }, + new + { + MovCod = "RETT", + Description = "Rettifica magazzino" + }, + new + { + MovCod = "SCAR", + Description = "Scarico da magazzino" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", b => + { + b.Property("TagID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("TagID"); + + b.ToTable("utils_tags"); + + b.HasData( + new + { + TagID = 1, + Description = "Tag 01" + }, + new + { + TagID = 2, + Description = "Tag 02" + }, + new + { + TagID = 3, + Description = "Tag 03" + }, + new + { + TagID = 4, + Description = "Tag 04" + }, + new + { + TagID = 5, + Description = "Tag 05" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", "ItemGroupNav") + .WithMany() + .HasForeignKey("CodGroup") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemGroupNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") + .WithMany() + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("JobNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", "OrderRowNav") + .WithMany() + .HasForeignKey("OrderRowID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", "ProductionBatchNav") + .WithMany() + .HasForeignKey("ProductionBatchID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderRowNav"); + + b.Navigation("ProductionBatchNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", "ProdItemNav") + .WithMany() + .HasForeignKey("ProdItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("PhaseNav"); + + b.Navigation("ProdItemNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", 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.OfferRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany("OfferRowNav") + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OfferNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", 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.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany() + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CustomerNav"); + + b.Navigation("DealerNav"); + + b.Navigation("OfferNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", "OrderNav") + .WithMany() + .HasForeignKey("OrderID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", "MovTypeNav") + .WithMany() + .HasForeignKey("MovCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", "StockStatusNav") + .WithMany() + .HasForeignKey("StockStatusId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("MovTypeNav"); + + b.Navigation("StockStatusNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", "JobStepNav") + .WithMany() + .HasForeignKey("JobStepID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") + .WithMany("JobStepNav") + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + + b.Navigation("JobNav"); + + b.Navigation("PhaseNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", "GenClassNav") + .WithMany("GenValNav") + .HasForeignKey("ClassCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GenClassNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Navigation("OfferRowNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => + { + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Navigation("GenValNav"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/20250923101803_AddOffertDiscount.cs b/EgwCoreLib.Lux.Data/Migrations/20250923101803_AddOffertDiscount.cs new file mode 100644 index 00000000..7941f9c6 --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20250923101803_AddOffertDiscount.cs @@ -0,0 +1,226 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EgwCoreLib.Lux.Data.Migrations +{ + /// + public partial class AddOffertDiscount : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "Discount", + table: "sales_offer", + type: "double", + nullable: false, + defaultValue: 0.0); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "Discount", "Inserted", "Modified", "ValidUntil" }, + values: new object[] { 0.0, new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3122), new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3124), new DateTime(2025, 10, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3117) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "BomCost", "BomPrice", "Inserted", "Modified" }, + values: new object[] { 900.0, 950.0, new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3264), new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3266) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "BomPrice", "Inserted", "Modified" }, + values: new object[] { 200.0, new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3279), new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3280) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "BomPrice", "Inserted", "Modified" }, + values: new object[] { 250.0, new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3291), new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3292) }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2709)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2790)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2793)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2797)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2801)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2804)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2808)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2811)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2815)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2819)); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Discount", + table: "sales_offer"); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5787), new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5789), new DateTime(2025, 10, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5785) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "BomCost", "BomPrice", "Inserted", "Modified" }, + values: new object[] { 950.0, 0.0, new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5885), new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5887) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "BomPrice", "Inserted", "Modified" }, + values: new object[] { 0.0, new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5906), new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5908) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "BomPrice", "Inserted", "Modified" }, + values: new object[] { 0.0, new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5920), new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5922) }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5439)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5485)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5489)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5493)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5497)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5501)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5505)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5509)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5514)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5518)); + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs index 4a3c0ccf..498f6293 100644 --- a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs +++ b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs @@ -904,6 +904,9 @@ namespace EgwCoreLib.Lux.Data.Migrations .IsRequired() .HasColumnType("longtext"); + b.Property("Discount") + .HasColumnType("double"); + b.Property("Inserted") .HasColumnType("datetime(6)"); @@ -940,13 +943,14 @@ namespace EgwCoreLib.Lux.Data.Migrations CustomerID = 2, DealerID = 2, Description = "Offerta per tre serramenti", - Inserted = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5787), - Modified = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5789), + Discount = 0.0, + Inserted = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3122), + Modified = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3124), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 10, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5785) + ValidUntil = new DateTime(2025, 10, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3117) }); }); @@ -1030,15 +1034,15 @@ namespace EgwCoreLib.Lux.Data.Migrations new { OfferRowID = 1, - BomCost = 950.0, + BomCost = 900.0, BomOk = true, - BomPrice = 0.0, + BomPrice = 950.0, Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5885), + Inserted = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3264), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5887), + Modified = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3266), Note = "Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000001", @@ -1054,13 +1058,13 @@ namespace EgwCoreLib.Lux.Data.Migrations OfferRowID = 2, BomCost = 160.0, BomOk = true, - BomPrice = 0.0, + BomPrice = 200.0, Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5906), + Inserted = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3279), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5908), + Modified = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3280), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000002", @@ -1076,13 +1080,13 @@ namespace EgwCoreLib.Lux.Data.Migrations OfferRowID = 3, BomCost = 200.0, BomOk = true, - BomPrice = 0.0, + BomPrice = 250.0, Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5920), + Inserted = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3291), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5922), + Modified = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3292), Note = "Installazione serramento", OfferID = 1, OfferRowUID = "OFF250000000003", @@ -1265,8 +1269,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 1, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5439), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5482), + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2709), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2786), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1278,8 +1282,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5485), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5487), + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2790), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2791), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -1291,8 +1295,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5489), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5491), + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2793), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2795), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1304,8 +1308,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5493), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5495), + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2797), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2798), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1317,8 +1321,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5497), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5499), + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2801), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2802), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -1330,8 +1334,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5501), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5503), + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2804), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2806), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1343,8 +1347,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5505), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5507), + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2808), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2809), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -1356,8 +1360,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5509), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5511), + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2811), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2813), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1369,8 +1373,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5514), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5515), + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2815), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2817), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1382,8 +1386,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5518), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5519), + DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2819), + DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2820), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, From cac5ea878d27f7826642c176e8e0e85e8606b8f6 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 23 Sep 2025 12:32:10 +0200 Subject: [PATCH 20/65] Fix update offerte con ricalcolo --- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 2 +- Lux.UI/Components/Pages/Offers.razor | 4 ++-- Lux.UI/Components/Pages/Offers.razor.cs | 24 ++++++++++++-------- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index d9b02de4..ec9a6bc4 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -126,8 +126,8 @@ namespace Lux.UI.Components.Compo await Task.Delay(50); await ReloadData(); UpdateTable(); - await EC_Updated.InvokeAsync(true); isLoading = false; + await EC_Updated.InvokeAsync(true); } /// diff --git a/Lux.UI/Components/Pages/Offers.razor b/Lux.UI/Components/Pages/Offers.razor index 3b871159..1cd28348 100644 --- a/Lux.UI/Components/Pages/Offers.razor +++ b/Lux.UI/Components/Pages/Offers.razor @@ -102,7 +102,7 @@ else
    - @if (isLoading || ListRecords == null) + @if (isLoading) { } @@ -181,7 +181,7 @@ else @if (SelRecord != null) {
    - +
    }
    diff --git a/Lux.UI/Components/Pages/Offers.razor.cs b/Lux.UI/Components/Pages/Offers.razor.cs index eaeade55..215312e1 100644 --- a/Lux.UI/Components/Pages/Offers.razor.cs +++ b/Lux.UI/Components/Pages/Offers.razor.cs @@ -145,6 +145,21 @@ namespace Lux.UI.Components.Pages EditRecord = null; } + /// + /// Rilegge tabella + /// + private async Task ForceReload() + { + isLoading = true; + await Task.Delay(50); + await ReloadData(); + await Task.Delay(50); + UpdateTable(); + await Task.Delay(50); + isLoading = false; + await Task.Delay(50); + } + /// /// Legge i dati dei record completi /// @@ -175,15 +190,6 @@ namespace Lux.UI.Components.Pages .ToList(); } - /// - /// Rilegge tabella - /// - private async void ForceReload() - { - await ReloadData(); - UpdateTable(); - } - #endregion Private Methods #if false From 28c2bc8cc80a14291d1646458e016a1bc3d31ae3 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 23 Sep 2025 19:29:43 +0200 Subject: [PATCH 21/65] Update x richeista ricalco,oBOM --- .../Services/CalcRequestService.cs | 83 +++++++++++++++++++ Lux.API/Controllers/GenericController.cs | 49 +++++++++-- Lux.API/Lux.API.csproj | 2 +- Lux.API/appsettings.Staging.json | 4 +- Lux.UI/Components/Compo/OfferRowMan.razor | 5 +- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 36 +++++++- Lux.UI/Lux.UI.csproj | 4 +- Lux.UI/Program.cs | 1 + Lux.UI/appsettings.json | 2 + Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 12 files changed, 173 insertions(+), 19 deletions(-) create mode 100644 EgwCoreLib.Lux.Data/Services/CalcRequestService.cs diff --git a/EgwCoreLib.Lux.Data/Services/CalcRequestService.cs b/EgwCoreLib.Lux.Data/Services/CalcRequestService.cs new file mode 100644 index 00000000..e74fb77f --- /dev/null +++ b/EgwCoreLib.Lux.Data/Services/CalcRequestService.cs @@ -0,0 +1,83 @@ +using Microsoft.Extensions.Configuration; +using Newtonsoft.Json; +using NLog; +using RestSharp; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EgwCoreLib.Lux.Data.Services +{ + public class CalcRequestService + { + #region Public Constructors + + public CalcRequestService(IConfiguration config, IRedisService redisService) + { + _config = config; + _redisService = redisService; + bomChannel = _config.GetValue("ServerConf:BomChannel") ?? "bom"; + // verifico la url base + apiUrl = _config.GetValue("ServerConf:Prog.ApiUrl") ?? "https://iis01.egalware.com/lux/srv/api"; + routeBasePath = _config.GetValue("ServerConf:RouteBaseUrl") ?? "window"; + // fix opzioni base del RestClient + restOptStd = new RestClientOptions + { + Timeout = TimeSpan.FromSeconds(60), + BaseUrl = new Uri($"{apiUrl}/{routeBasePath}") + }; + Log.Info("ImageCache Service Started"); + } + + #endregion Public Constructors + + #region Public Methods + + /// + /// Effettua una generica chiamata ApiRest + /// + /// URL Api di base + /// Richiesta completa + /// Corpo Json trasmesso con richiesta + /// + public async Task CallRestPost(string ApiUrl, string ApiRequest, object rawBody) + { + RestResponse response; + // cerco online + using (RestClient client = new RestClient(ApiUrl)) + { + var request = new RestRequest(ApiRequest, Method.Post); + string rawData = JsonConvert.SerializeObject(rawBody); + request.AddJsonBody(rawData); + response = await client.ExecutePostAsync(request); + } + return response; + } + + #endregion Public Methods + + #region Private Fields + + private static Logger Log = LogManager.GetCurrentClassLogger(); + private readonly IRedisService _redisService; + private readonly string apiUrl = ""; + private readonly string bomChannel = "bomdev"; + private readonly string routeBasePath = ""; + private IConfiguration _config; + + #endregion Private Fields + + #region Private Properties + + /// + /// Conf client RestSharp standard: + /// - base URI al sito + /// - timeout 1 min + /// + private RestClientOptions restOptStd { get; set; } = new RestClientOptions(); + + #endregion Private Properties + } +} \ No newline at end of file diff --git a/Lux.API/Controllers/GenericController.cs b/Lux.API/Controllers/GenericController.cs index 2ea38ffa..9ff26c35 100644 --- a/Lux.API/Controllers/GenericController.cs +++ b/Lux.API/Controllers/GenericController.cs @@ -36,13 +36,7 @@ namespace Lux.API.Controllers { Stopwatch sw = new Stopwatch(); sw.Start(); - string svgContent = ""; - - // se contiene ".svg" lo levo... - if (id.EndsWith(".svg")) - { - id = id.Replace(".svg", ""); - } + string retVal = ""; // ...se ricevo percorso --> leggo jwd/svg cablato if (currReq != null) @@ -62,11 +56,48 @@ namespace Lux.API.Controllers QuestionDTO currArgs = new QuestionDTO(nId, currReq.EnvType, DictExec); await _redisService.PublishAsync(pubChannel, currArgs.sProcessArgs); - svgContent = "DONE"; + retVal = "DONE"; } sw.Stop(); Log.Info($"calcSvg | {sw.Elapsed.TotalMilliseconds:N3} ms"); - return Ok(svgContent); + return Ok(retVal); + } + + /// + /// Chiamata POST: riceve Json in formato JWD serializzato, invia richiesta calcolo modo 2 (BOM) + /// PUT: api/window/bom/00000000-0000-0000-0000-000000000000 + /// + /// id oggetto + /// + [HttpPost("bom/{id}")] + public async Task> getBom(string id, [FromBody] string currSer) + { + Stopwatch sw = new Stopwatch(); + sw.Start(); + string retVal = ""; + + // se messaggio vuoto --> uso default! + currSer = string.IsNullOrEmpty(currSer) ? "" : currSer; + + // ...se ricevo percorso --> leggo jwd/svg cablato + if (!string.IsNullOrEmpty(currSer)) + { + Dictionary DictExec = new Dictionary(); + // cablata la BOM + DictExec.Add("Mode", "2"); + // UID cablato x ora... + DictExec.Add("UID", id); + DictExec.Add("Jwd", currSer); + int nId = 1; + // da modificare con tipo richiesta... + QuestionDTO currArgs = new QuestionDTO(nId, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, DictExec); + + await _redisService.PublishAsync(pubChannel, currArgs.sProcessArgs); + retVal = "DONE"; + } + sw.Stop(); + Log.Info($"getBom | {sw.Elapsed.TotalMilliseconds:N3} ms"); + return Ok(retVal); } #endregion Public Methods diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 47763ac3..ec598b55 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2509.2312 + 0.9.2509.2319 diff --git a/Lux.API/appsettings.Staging.json b/Lux.API/appsettings.Staging.json index 02f2251b..c294297e 100644 --- a/Lux.API/appsettings.Staging.json +++ b/Lux.API/appsettings.Staging.json @@ -7,7 +7,7 @@ }, "ServerConf": { "BaseUrl": "/lux/srv/", - "PubChannel": "EgwDevEngineInput", - "SubChannel": "EgwDevEngineOutput" + "PubChannel": "EgwEngineInput", + "SubChannel": "EgwEngineOutput" } } diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index a7e498f8..d1768cf1 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -74,7 +74,10 @@ else } - @item.OfferRowUID + + @item.OfferRowUID + + @item.Note @item.Qty diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index ec9a6bc4..64135f95 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -2,6 +2,7 @@ using EgwCoreLib.Lux.Core.RestPayload; using EgwCoreLib.Lux.Data; using EgwCoreLib.Lux.Data.DbModel.Sales; using EgwCoreLib.Lux.Data.Services; +using EgwMultiEngineManager.Data; using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; using static EgwCoreLib.Lux.Core.Enums; @@ -87,6 +88,38 @@ namespace Lux.UI.Components.Compo await DoRecalcOffer(); } + /// + /// Lancia la richiesta di ricaolo della BOM dal JWD (o equivalente) + /// + /// + protected async Task RequestBom(OfferRowModel currRec) + { + if (!await JSRuntime.InvokeAsync("confirm", $"Confermi di voler ricalcolare la BOM?")) + return; + + // devo recuperare da ofgferta environment corrente, roa cablato + EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS currEnv = Constants.EXECENVIRONMENTS.WINDOW; + // preparo la domanda serializzata + Dictionary DictExec = new Dictionary(); + // cablata la BOM + DictExec.Add("Mode", "2"); + // UID cablato x ora... + DictExec.Add("UID", currRec.OfferRowUID); + DictExec.Add("Jwd", currRec.SerStruct); + + CalcRequestDTO req = new CalcRequestDTO() + { + EnvType = currEnv, + DictExec = DictExec + }; + + // chiamo la chiamata POST alla API, che manda la richiesta via REDIS + await CService.CallRestPost($"{apiUrl}/{genBasePath}", $"{calcTag}/{currRec.OfferRowUID}", req); + } + + [Inject] + protected CalcRequestService CService { get; set; } = null!; + #endregion Protected Methods #region Private Fields @@ -104,7 +137,8 @@ namespace Lux.UI.Components.Compo private OfferRowModel? EditRecord = null; private string imgBasePath = ""; - + private string genBasePath = "generic"; + private string calcTag = "calc"; private bool isLoading = false; private List ListRecords = new List(); diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 44a1394d..e61d1a30 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2509.2312 + 0.9.2509.2319 @@ -17,7 +17,7 @@ - + diff --git a/Lux.UI/Program.cs b/Lux.UI/Program.cs index b2532041..3ebeafd5 100644 --- a/Lux.UI/Program.cs +++ b/Lux.UI/Program.cs @@ -63,6 +63,7 @@ builder.Services.AddSingleton(); // Aggiunta servizi specifici builder.Services.AddSingleton(); builder.Services.AddSingleton(); +builder.Services.AddSingleton(); var app = builder.Build(); diff --git a/Lux.UI/appsettings.json b/Lux.UI/appsettings.json index 4cc386fb..6b6e5cef 100644 --- a/Lux.UI/appsettings.json +++ b/Lux.UI/appsettings.json @@ -59,9 +59,11 @@ "ImageCalcTag": "svg-preview", "Prog.ApiUrl": "https://office.egalware.com/lux/srv/api", "ImageBaseUrl": "window", + "RouteBaseUrl": "window", "PubChannel": "EgwDevEngineInput", "SubChannel": "EgwDevEngineOutput", "SvgChannel": "svg:img", + "BomChannel": "bom", "BaseUrl": "/lux/ui/" } } diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 39fc89ec..0cb3700a 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

    Versione: 0.9.2509.2312

    +

    Versione: 0.9.2509.2319


    Note di rilascio:
    • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 9d1aeb92..e30f38e5 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2509.2312 +0.9.2509.2319 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 2f7d9c89..1647a7d6 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2509.2312 + 0.9.2509.2319 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 0de245bc2d3125c999a9ebc614357b834e2b4432 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 24 Sep 2025 17:40:19 +0200 Subject: [PATCH 22/65] update e test ricalcolo BOM OK - conf test locale da UI ad API in debug --- Lux.UI/Components/Compo/OfferRowMan.razor | 9 ++++++--- Lux.UI/Lux.UI.csproj | 2 +- Lux.UI/appsettings.Development.json | 3 ++- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index d1768cf1..82b53cb3 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -74,9 +74,12 @@ else } - - @item.OfferRowUID - + +
      @item.OfferRowUID
      + @if(!string.IsNullOrEmpty(item.ItemBOM)) + { + + } @item.Note @item.Qty diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index e61d1a30..01bcce35 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2509.2319 + 0.9.2509.2415 diff --git a/Lux.UI/appsettings.Development.json b/Lux.UI/appsettings.Development.json index 1a306ba8..7e35ec87 100644 --- a/Lux.UI/appsettings.Development.json +++ b/Lux.UI/appsettings.Development.json @@ -8,6 +8,7 @@ "ServerConf": { "PubChannel": "EgwEngineInput", "SubChannel": "EgwEngineOutput", - "Prog.ApiUrl": "https://iis01.egalware.com/lux/srv/api" + //"Prog.ApiUrl": "https://iis01.egalware.com/lux/srv/api" + "Prog.ApiUrl": "https://localhost:7135/api" } } diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 0cb3700a..8911a76c 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

      Versione: 0.9.2509.2319

      +

      Versione: 0.9.2509.2415


      Note di rilascio:
      • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index e30f38e5..463a8f6a 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2509.2319 +0.9.2509.2415 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 1647a7d6..8987f7a8 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2509.2319 + 0.9.2509.2415 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 9cdf59a491d579c00dc462e10f95b15b7c0f7ab5 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 24 Sep 2025 17:40:32 +0200 Subject: [PATCH 23/65] Update con refresh condizionale post calcolo nuova BOM x importi --- .../Controllers/LuxController.cs | 56 ++++++------ EgwCoreLib.Lux.Data/Services/BaseServ.cs | 80 ++++++++++++----- .../Services/DataLayerServices.cs | 4 +- EgwCoreLib.Lux.Data/Services/IRedisService.cs | 4 - .../Services/ImageCacheService.cs | 29 +++++- Lux.API/Lux.API.csproj | 2 +- Lux.API/Services/ExternalMessageProcessor.cs | 4 +- Lux.API/appsettings.json | 4 +- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 89 ++++++++++++++++--- Lux.UI/Lux.UI.csproj | 2 +- Lux.UI/appsettings.Development.json | 1 - Lux.UI/appsettings.json | 8 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 15 files changed, 208 insertions(+), 81 deletions(-) diff --git a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs index b3aaa582..94fe3841 100644 --- a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs +++ b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs @@ -24,7 +24,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal List CustomersGetAll() { List dbResult = new List(); - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -48,7 +48,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal List DealersGetAll() { List dbResult = new List(); - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -73,7 +73,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal async Task GenClassDeleteAsync(GenClassModel rec2del) { bool answ = false; - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -108,7 +108,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal async Task> GenClassGetAllAsync() { List dbResult = new List(); - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -134,7 +134,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal async Task GenClassUpsertAsync(GenClassModel upsRec) { bool answ = false; - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -174,7 +174,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal async Task GenValDeleteAsync(GenValueModel rec2del) { bool answ = false; - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -221,7 +221,7 @@ namespace EgwCoreLib.Lux.Data.Controllers List dbResult = new List(); if (!string.IsNullOrEmpty(codClass)) { - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -250,7 +250,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal async Task GenValMoveAsync(GenValueModel selRec, bool moveUp) { bool answ = false; - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -314,7 +314,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal async Task GenValUpsertAsync(GenValueModel upsRec) { bool answ = false; - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -354,7 +354,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal async Task ItemDeleteAsync(ItemModel rec2del) { bool result = false; - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -384,7 +384,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal List ItemGetAll() { List dbResult = new List(); - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -442,7 +442,7 @@ namespace EgwCoreLib.Lux.Data.Controllers List dbResult = new List(); if (ItemId > 0) { - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -491,7 +491,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal List ItemGetFilt(string CodGroup, ItemClassType ItemType) { List dbResult = new List(); - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -520,7 +520,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal List ItemGetFilt(string CodGroup, ItemClassType ItemType, string SearchVal) { List dbResult = new List(); - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -554,7 +554,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal async Task> ItemGetFiltAsync(string CodGroup, ItemClassType ItemType) { List dbResult = new List(); - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -584,7 +584,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal async Task> ItemGetFiltAsync(string CodGroup, ItemClassType ItemType, string SearchVal) { List dbResult = new List(); - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -616,7 +616,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal List ItemGetSearch(string SearchVal) { List dbResult = new List(); - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -642,7 +642,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal async Task> ItemGetSearchAsync(string SearchVal) { List dbResult = new List(); - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -667,7 +667,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal List ItemGroupGetAll() { List dbResult = new List(); - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -691,7 +691,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal async Task> ItemGroupGetAllAsync() { List dbResult = new List(); - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -711,7 +711,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal bool ItemUpsert(ItemModel newRec) { bool answ = false; - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -756,7 +756,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal async Task ItemUpsertAsync(ItemModel currRec) { bool result = false; - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -803,7 +803,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal bool ItemUpsertFromBom(List bomList) { bool answ = false; - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -861,7 +861,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal async Task> OfferGetAll() { List dbResult = new List(); - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -889,7 +889,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal List OfferRowGetByOffer(int OfferID) { List dbResult = new List(); - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -918,7 +918,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal async Task OffertRowUpdateBom(int OfferRowID, List newBomList) { bool answ = false; - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -979,7 +979,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal async Task OffertUpdateCost(int OfferID) { bool answ = false; - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try @@ -1097,7 +1097,7 @@ namespace EgwCoreLib.Lux.Data.Controllers internal bool OfferUpsertFromBom(string uID, List bomList) { bool answ = false; - //using (DataLayerContext dbCtx = new DataLayerContext(configuration)) + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) using (DataLayerContext dbCtx = new DataLayerContext()) { try diff --git a/EgwCoreLib.Lux.Data/Services/BaseServ.cs b/EgwCoreLib.Lux.Data/Services/BaseServ.cs index 65a9fb33..1bc85ec7 100644 --- a/EgwCoreLib.Lux.Data/Services/BaseServ.cs +++ b/EgwCoreLib.Lux.Data/Services/BaseServ.cs @@ -29,16 +29,27 @@ namespace EgwCoreLib.Lux.Data.Services /// Redis connection multiplexer for database operations. public BaseServ(IConfiguration Configuration, IConnectionMultiplexer RedisConn) { - configuration = Configuration; + _config = Configuration; redisConn = RedisConn; redisDb = redisConn.GetDatabase(); - svgChannel = configuration.GetValue("ServerConf:SvgChannel") ?? "svg:img"; - // Appends ":*" to the SVG channel to enable wildcard subscription for dynamic events + // channel name setup + svgChannel = _config.GetValue("ServerConf:SvgChannel") ?? "Egw-svg:img"; + bomChannel = _config.GetValue("ServerConf:BomChannel") ?? "Egw-bom"; + updateChannel = _config.GetValue("ServerConf:UpdateChannel") ?? "Egw-update"; + // Appends ":*" to the channels to enable wildcard subscription for dynamic events if (!svgChannel.EndsWith(":*")) { svgChannel += ":*"; - } + } + if (!bomChannel.EndsWith(":*")) + { + bomChannel += ":*"; + } + if (!updateChannel.EndsWith(":*")) + { + updateChannel += ":*"; + } // JSON serializer settings to prevent circular reference errors during serialization // ReferenceLoopHandling.Ignore ensures that circular references in objects are ignored instead of throwing exceptions @@ -50,29 +61,20 @@ namespace EgwCoreLib.Lux.Data.Services // Initializes a message pipe for communication between calculation services and UI components // Messages are sent via the specified Redis channel (svgChannel) CalcDonePipe = new MessagePipe(redisConn, svgChannel); + + // init others channel + BomPipe = new MessagePipe(RedisConn, bomChannel); + UpdatePipe = new MessagePipe(RedisConn, updateChannel); } #endregion Public Constructors - #region Protected Fields + #region Public Properties /// - /// The Redis channel name used for subscribing to and publishing messages. - /// Default is "svg:img", with a wildcard suffix ":*" to enable dynamic message matching. + /// Message pipe for BOM calculation update /// - private string svgChannel = ""; - - /// - /// Configuration object for accessing application settings (e.g., connection strings, service parameters). - /// This is a static instance shared across all instances of BaseServ. - /// - protected static IConfiguration configuration = null!; - - /// - /// JSON serialization settings to handle circular references (e.g., object references to themselves). - /// Prevents exceptions during serialization by ignoring loops. - /// - protected JsonSerializerSettings? JSSettings; + public MessagePipe BomPipe { get; set; } = null!; /// /// Message pipe for delivering completion messages from calculation services to the UI. @@ -80,6 +82,28 @@ namespace EgwCoreLib.Lux.Data.Services /// public MessagePipe CalcDonePipe { get; set; } = null!; + /// + /// Message pipe for delivering generico update to the UI. + /// Uses Redis to publish messages on the updateChannel for real-time updates. + /// + public MessagePipe UpdatePipe { get; set; } = null!; + + #endregion Public Properties + + #region Protected Fields + + /// + /// Configuration object for accessing application settings (e.g., connection strings, service parameters). + /// This is a static instance shared across all instances of BaseServ. + /// + protected static IConfiguration _config = null!; + + /// + /// JSON serialization settings to handle circular references (e.g., object references to themselves). + /// Prevents exceptions during serialization by ignoring loops. + /// + protected JsonSerializerSettings? JSSettings; + /// /// Redis connection multiplexer that provides access to Redis database operations. /// Used for reading and writing data in Redis. @@ -142,6 +166,11 @@ namespace EgwCoreLib.Lux.Data.Services /// private static Logger Log = LogManager.GetCurrentClassLogger(); + /// + /// Redis channel for BOM related info + /// + private string bomChannel = ""; + /// /// Duration of long-term cache in seconds (default: 5 minutes). /// Used in the LongCache property to define how long data should be cached. @@ -160,6 +189,17 @@ namespace EgwCoreLib.Lux.Data.Services /// private Random rnd = new Random(); + /// + /// The Redis channel name used for subscribing to and publishing messages. + /// Default is "svg:img", with a wildcard suffix ":*" to enable dynamic message matching. + /// + private string svgChannel = ""; + + /// + /// Redis channel for generic update info + /// + private string updateChannel = ""; + #endregion Private Fields } } \ No newline at end of file diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index f720d25b..6389b5c7 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -27,14 +27,14 @@ namespace EgwCoreLib.Lux.Data.Services public DataLayerServices(IConfiguration configuration, IConnectionMultiplexer RedisConn) : base(configuration, RedisConn) { // conf DB - string connStr = BaseServ.configuration.GetConnectionString("Lux.All") ?? ""; + string connStr = BaseServ._config.GetConnectionString("Lux.All") ?? ""; if (string.IsNullOrEmpty(connStr)) { Log.Error("ConnString empty!"); } else { - //dbController = new Controllers.LuxController(configuration); + //dbController = new Controllers.LuxController(_config); dbController = new LuxController(); StringBuilder sb = new StringBuilder(); sb.AppendLine($"DataLayerServices | LuxController OK"); diff --git a/EgwCoreLib.Lux.Data/Services/IRedisService.cs b/EgwCoreLib.Lux.Data/Services/IRedisService.cs index 11ee11b5..4525ea5c 100644 --- a/EgwCoreLib.Lux.Data/Services/IRedisService.cs +++ b/EgwCoreLib.Lux.Data/Services/IRedisService.cs @@ -12,10 +12,6 @@ namespace EgwCoreLib.Lux.Data.Services ///
    public interface IRedisService { -#if false - IDatabase GetDatabase(); - void Publish(string channel, string message); -#endif long Publish(string channel, string message); Task PublishAsync(string channel, string message); diff --git a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs index ed109aba..3ba9347a 100644 --- a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs +++ b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs @@ -25,6 +25,8 @@ namespace EgwCoreLib.Lux.Data.Services liveTag = _config.GetValue("ServerConf:ImageLiveTag") ?? "svg"; cacheTag = _config.GetValue("ServerConf:ImageFileTag") ?? "svgfile"; calcTag = _config.GetValue("ServerConf:ImageCalcTag") ?? "svg-preview"; + bomChannel = _config.GetValue("ServerConf:BomChannel") ?? "Egw-bom"; + updateChannel = _config.GetValue("ServerConf:UpdateChannel") ?? "Egw-update"; // verifico la url base apiUrl = _config.GetValue("ServerConf:Prog.ApiUrl") ?? "https://iis01.egalware.com/lux/srv/api"; imgBasePath = _config.GetValue("ServerConf:ImageBaseUrl") ?? "window"; @@ -168,13 +170,14 @@ namespace EgwCoreLib.Lux.Data.Services } /// - /// Salva e invia su channel img redis SVG per il doc richiesto + /// Salva e invia su channel BOM redis il doc richiesto /// /// + /// /// - public async Task SaveBomAsync(string uid, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS env, string bomContent) + public async Task SaveBomAsync(string uid, Constants.EXECENVIRONMENTS env, string bomContent) { - // salvo img in cache + // salvo in cache string currKey = $"{redisBaseKey}:{env}:BOM:{uid.Replace("/", ":")}"; var done = await _redisService.SetAsync(currKey, bomContent); // invio notifica nuova svg generata sul canale... viene inviato solo svg con ID nel canale @@ -183,12 +186,29 @@ namespace EgwCoreLib.Lux.Data.Services return done; } + /// + /// Salva e invia su channel richiesto un update x UID + /// è attesao un refresh per chi sottoscrive il canale + /// + /// + /// + public async Task PublishUpdateAsync(string uid, Constants.EXECENVIRONMENTS env) + { + bool done = false; + // invio notifica sul canale di update generale... + string notifyChannel = $"{updateChannel}:{env}"; + // contenuto è UID + long numSent = await _redisService.PublishAsync(notifyChannel, $"{uid}"); + done = numSent > 0; + return done; + } + /// /// Salva e invia su channel img redis SVG per il doc richiesto /// /// /// - public async Task SaveHmlAsync(string uid, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS env, string rawData) + public async Task SaveHmlAsync(string uid, Constants.EXECENVIRONMENTS env, string rawData) { // salvo img in cache string currKey = $"{redisBaseKey}:{env}:HML:{uid.Replace("/", ":")}"; @@ -244,6 +264,7 @@ namespace EgwCoreLib.Lux.Data.Services private readonly string apiUrl = ""; private readonly string bomChannel = "bom:item"; + private readonly string updateChannel = "ui:update"; private readonly string cacheTag = "svgfile"; private readonly string calcTag = "svgpreview"; private readonly string hmlChannel = "hml:item"; diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index ec598b55..2475a0ff 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2509.2319 + 0.9.2509.2417 diff --git a/Lux.API/Services/ExternalMessageProcessor.cs b/Lux.API/Services/ExternalMessageProcessor.cs index ba926c0c..0ea50ac0 100644 --- a/Lux.API/Services/ExternalMessageProcessor.cs +++ b/Lux.API/Services/ExternalMessageProcessor.cs @@ -59,6 +59,8 @@ namespace Lux.API.Services await cacheService.SaveBomAsync(UID, retData.ExecEnvironment, newBom); // salvo la BOM completa con i dati recuperati dal DB await dbService.SaveBomAsync(UID, retData.ExecEnvironment, newBom); + // pubblico refresh info così da segnalare richeista di update conseguente + await cacheService.PublishUpdateAsync(UID, retData.ExecEnvironment); } if (retData.Args.ContainsKey("HardwareModelList")) { @@ -90,9 +92,9 @@ namespace Lux.API.Services #region Private Fields + private static Logger Log = LogManager.GetCurrentClassLogger(); private readonly ImageCacheService cacheService; private readonly DataLayerServices dbService; - private static Logger Log = LogManager.GetCurrentClassLogger(); #endregion Private Fields diff --git a/Lux.API/appsettings.json b/Lux.API/appsettings.json index 0b33efcb..0a1193af 100644 --- a/Lux.API/appsettings.json +++ b/Lux.API/appsettings.json @@ -57,7 +57,9 @@ "ServerConf": { "PubChannel": "EgwDevEngineInput", "SubChannel": "EgwDevEngineOutput", - "SvgChannel": "svg:img", + "SvgChannel": "Egw:svg:img", + "BomChannel": "Egw:bom", + "UpdateChannel": "Egw:update", "BaseUrl": "/lux/srv/", "ImageBaseUrl": "https://iis01.egalware.com/lux/srv/api/window/", "ImageLiveTag": "svg", diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index 64135f95..3a4d0718 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -1,3 +1,4 @@ +using EgwCoreLib.Lux.Core; using EgwCoreLib.Lux.Core.RestPayload; using EgwCoreLib.Lux.Data; using EgwCoreLib.Lux.Data.DbModel.Sales; @@ -9,26 +10,41 @@ using static EgwCoreLib.Lux.Core.Enums; namespace Lux.UI.Components.Compo { - public partial class OfferRowMan + public partial class OfferRowMan : IDisposable { #region Public Properties [Parameter] public DisplayMode DisplayMode { get; set; } = DisplayMode.Standard; - [Parameter] - public int OfferID { get; set; } = 0; - [Parameter] public EventCallback EC_Updated { get; set; } + [Parameter] + public int OfferID { get; set; } = 0; + #endregion Public Properties + #region Public Methods + + /// + /// Dispose sottoscrizione canale + /// + public void Dispose() + { + DLService.UpdatePipe.EA_NewMessage -= UpdatePipe_EA_NewMessage; + } + + #endregion Public Methods + #region Protected Properties [Inject] protected IConfiguration Config { get; set; } = null!; + [Inject] + protected CalcRequestService CService { get; set; } = null!; + [Inject] protected DataLayerServices DLService { get; set; } = null!; @@ -60,6 +76,12 @@ namespace Lux.UI.Components.Compo CurrBomList = DLService.OffertGetBomList(EditBomRecord); } + /// + /// Calcolo URL immagine + /// + /// + /// + /// protected string imgUrl(string imgUid, string env) { // cast string su env.. @@ -68,10 +90,14 @@ namespace Lux.UI.Components.Compo return ICService.ImageUrl($"{apiUrl}/{imgBasePath}", false, imgUid, envir); } + /// + /// init obj + /// protected override void OnInitialized() { apiUrl = Config.GetValue("ServerConf:Prog.ApiUrl") ?? ""; imgBasePath = Config.GetValue("ServerConf:ImageBaseUrl") ?? ""; + DLService.UpdatePipe.EA_NewMessage += UpdatePipe_EA_NewMessage; } protected override async Task OnParametersSetAsync() @@ -97,8 +123,8 @@ namespace Lux.UI.Components.Compo if (!await JSRuntime.InvokeAsync("confirm", $"Confermi di voler ricalcolare la BOM?")) return; - // devo recuperare da ofgferta environment corrente, roa cablato - EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS currEnv = Constants.EXECENVIRONMENTS.WINDOW; + // devo recuperare da ofgferta environment corrente, ora cablato + EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS currEnv = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW; // preparo la domanda serializzata Dictionary DictExec = new Dictionary(); // cablata la BOM @@ -106,7 +132,7 @@ namespace Lux.UI.Components.Compo // UID cablato x ora... DictExec.Add("UID", currRec.OfferRowUID); DictExec.Add("Jwd", currRec.SerStruct); - + CalcRequestDTO req = new CalcRequestDTO() { EnvType = currEnv, @@ -115,11 +141,15 @@ namespace Lux.UI.Components.Compo // chiamo la chiamata POST alla API, che manda la richiesta via REDIS await CService.CallRestPost($"{apiUrl}/{genBasePath}", $"{calcTag}/{currRec.OfferRowUID}", req); +#if false + isLoading = true; + // aspetta 1 sec + await Task.Delay(1000); + // ...e poi rilegge i dati, ricalcolando offerta... + await DoRecalcOffer(); +#endif } - [Inject] - protected CalcRequestService CService { get; set; } = null!; - #endregion Protected Methods #region Private Fields @@ -128,6 +158,8 @@ namespace Lux.UI.Components.Compo private string apiUrl = ""; + private string calcTag = "calc"; + private List? CurrBomList = null; private int currPage = 1; @@ -136,9 +168,10 @@ namespace Lux.UI.Components.Compo private OfferRowModel? EditRecord = null; - private string imgBasePath = ""; private string genBasePath = "generic"; - private string calcTag = "calc"; + + private string imgBasePath = ""; + private bool isLoading = false; private List ListRecords = new List(); @@ -193,6 +226,38 @@ namespace Lux.UI.Components.Compo } } + /// + /// Task verifica update ricevuti + /// + /// + /// + /// + private async void UpdatePipe_EA_NewMessage(object? sender, EventArgs e) + { + // aggiorno visualizzazione + PubSubEventArgs currArgs = (PubSubEventArgs)e; + // conversione on-the-fly SVG da mostrare + if (!string.IsNullOrEmpty(currArgs.newMessage)) + { + // cerco se faccia aprte dei record correnti... + var recFound = AllRecords.Any(x => x.OfferRowUID == currArgs.newMessage); + if (recFound) + { + isLoading = true; + await Task.Delay(10); +#if false + if (currArgs.msgUid.Equals($"{subChannel}:{windowUid}")) + { + } +#endif + // se si tratta dell'UID corrente --> fa update + await DoRecalcOffer(); + await InvokeAsync(StateHasChanged); + } + } + await Task.Delay(1); + } + /// /// Filtro e paginazione /// diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 01bcce35..ac3e0c79 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2509.2415 + 0.9.2509.2417 diff --git a/Lux.UI/appsettings.Development.json b/Lux.UI/appsettings.Development.json index 7e35ec87..84b51424 100644 --- a/Lux.UI/appsettings.Development.json +++ b/Lux.UI/appsettings.Development.json @@ -9,6 +9,5 @@ "PubChannel": "EgwEngineInput", "SubChannel": "EgwEngineOutput", //"Prog.ApiUrl": "https://iis01.egalware.com/lux/srv/api" - "Prog.ApiUrl": "https://localhost:7135/api" } } diff --git a/Lux.UI/appsettings.json b/Lux.UI/appsettings.json index 6b6e5cef..b630a74c 100644 --- a/Lux.UI/appsettings.json +++ b/Lux.UI/appsettings.json @@ -57,13 +57,15 @@ }, "ServerConf": { "ImageCalcTag": "svg-preview", - "Prog.ApiUrl": "https://office.egalware.com/lux/srv/api", + //"Prog.ApiUrl": "https://office.egalware.com/lux/srv/api", + "Prog.ApiUrl": "https://localhost:7135/api", "ImageBaseUrl": "window", "RouteBaseUrl": "window", "PubChannel": "EgwDevEngineInput", "SubChannel": "EgwDevEngineOutput", - "SvgChannel": "svg:img", - "BomChannel": "bom", + "SvgChannel": "Egw:svg:img", + "BomChannel": "Egw:bom", + "UpdateChannel": "Egw:update", "BaseUrl": "/lux/ui/" } } diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 8911a76c..430ad22e 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

    Versione: 0.9.2509.2415

    +

    Versione: 0.9.2509.2417


    Note di rilascio:
    • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 463a8f6a..647b6fa8 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2509.2415 +0.9.2509.2417 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 8987f7a8..0a85f6b6 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2509.2415 + 0.9.2509.2417 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 14657f100b37d80b0b2277900934c3a5c4cc2a42 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 24 Sep 2025 18:08:25 +0200 Subject: [PATCH 24/65] Update x completare condizioni refresh dati post update righe offerta --- .../Services/DataLayerServices.cs | 29 +++++++++++++++++++ Lux.UI/Components/Compo/OfferRowMan.razor | 6 ++-- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 13 +++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index 6389b5c7..810d628b 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -144,6 +144,35 @@ namespace EgwCoreLib.Lux.Data.Services return answ; } + /// + /// Reset cache sistema x Offerte modalità async + /// + public async Task FlushCacheOffersAsync() + { + bool answ = false; + Stopwatch sw = new Stopwatch(); + sw.Start(); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Offers:*"); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:OfferRows:*"); + sw.Stop(); + Log.Debug($"FlushCacheOffersAsync in {sw.Elapsed.TotalMilliseconds} ms"); + return answ; + } + /// + /// Reset cache sistema x Ordini modalità async + /// + public async Task FlushCacheOrdersAsync() + { + bool answ = false; + Stopwatch sw = new Stopwatch(); + sw.Start(); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Orders:*"); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:OrderRows:*"); + sw.Stop(); + Log.Debug($"FlushCacheOrdersAsync in {sw.Elapsed.TotalMilliseconds} ms"); + return answ; + } + /// /// Esegue eliminazione + refresh cache /// diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index 82b53cb3..5d57d561 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -35,7 +35,9 @@ else @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit) { - Def + + + img } else @@ -76,7 +78,7 @@ else }
      @item.OfferRowUID
      - @if(!string.IsNullOrEmpty(item.ItemBOM)) + @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit && !string.IsNullOrEmpty(item.ItemBOM)) { } diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index 3a4d0718..495cf280 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -208,6 +208,19 @@ namespace Lux.UI.Components.Compo totalCount = AllRecords.Count(); } } + /// + /// Svuota cache corrente + rilegge dati + /// + private async Task ForceReloadData() + { + isLoading = true; + await Task.Delay(20); + await DLService.FlushCacheOffersAsync(); + await Task.Delay(20); + await ReloadData(); + UpdateTable(); + isLoading = false; + } /// /// salva nel record corrente la BOM aggiornata e poi ricalcola importo... From fd21093ee45dd3d7478747a7408cc34ddbd45d9f Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 24 Sep 2025 18:27:43 +0200 Subject: [PATCH 25/65] Refresh commenti --- EgwCoreLib.Lux.Data/Services/BaseServ.cs | 83 +++++++++---------- .../Services/DataLayerServices.cs | 2 +- Lux.API/Lux.API.csproj | 2 +- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 23 ++--- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 8 files changed, 57 insertions(+), 61 deletions(-) diff --git a/EgwCoreLib.Lux.Data/Services/BaseServ.cs b/EgwCoreLib.Lux.Data/Services/BaseServ.cs index 1bc85ec7..944f1610 100644 --- a/EgwCoreLib.Lux.Data/Services/BaseServ.cs +++ b/EgwCoreLib.Lux.Data/Services/BaseServ.cs @@ -14,19 +14,24 @@ using System.Threading.Tasks; namespace EgwCoreLib.Lux.Data.Services { /// - /// BaseServ class serves as a foundational service for handling Redis operations and message piping. - /// It provides common configurations, caching strategies, and message delivery mechanisms for derived services. - /// The class initializes Redis connections, sets up message channels, and manages JSON serialization with loop handling. + /// Classe base per i servizi che fornisce funzionalità comuni come + /// - connessione a Redis + /// - configurazione + /// - gestione dei messaggi + /// - strategie di caching. + /// + /// Questa classe agisce come modello per altri servizi derivati. /// public class BaseServ { #region Public Constructors /// - /// Initializes a new instance of the BaseServ class. + /// Inizializza una nuova istanza della classe BaseServ. + /// Configura la connessione Redis, carica le impostazioni di configurazione e inizializza il serializzatore JSON. /// - /// Configuration object to retrieve application settings. - /// Redis connection multiplexer for database operations. + /// Oggetto di configurazione per recuperare le impostazioni dell'applicazione. + /// Multiplexer di connessione Redis per operazioni sul database. public BaseServ(IConfiguration Configuration, IConnectionMultiplexer RedisConn) { _config = Configuration; @@ -51,18 +56,14 @@ namespace EgwCoreLib.Lux.Data.Services updateChannel += ":*"; } - // JSON serializer settings to prevent circular reference errors during serialization - // ReferenceLoopHandling.Ignore ensures that circular references in objects are ignored instead of throwing exceptions + // Configurazione serializzatore JSON per risolvere errore di loop circolare JSSettings = new JsonSerializerSettings() { ReferenceLoopHandling = ReferenceLoopHandling.Ignore }; - // Initializes a message pipe for communication between calculation services and UI components - // Messages are sent via the specified Redis channel (svgChannel) + // Configurazione pipe dei messaggi CalcDonePipe = new MessagePipe(redisConn, svgChannel); - - // init others channel BomPipe = new MessagePipe(RedisConn, bomChannel); UpdatePipe = new MessagePipe(RedisConn, updateChannel); } @@ -72,19 +73,18 @@ namespace EgwCoreLib.Lux.Data.Services #region Public Properties /// - /// Message pipe for BOM calculation update + /// Pipe dei messaggi per la comunicazione riguardo update calcolo BOM /// public MessagePipe BomPipe { get; set; } = null!; /// - /// Message pipe for delivering completion messages from calculation services to the UI. - /// Uses Redis to publish messages on the svgChannel for real-time updates. + /// Pipe dei messaggi per la comunicazione tra servizi di calcolo e interfaccia utente. + /// I messaggi vengono inviati sul canale Redis definito da svgChannel. /// public MessagePipe CalcDonePipe { get; set; } = null!; /// - /// Message pipe for delivering generico update to the UI. - /// Uses Redis to publish messages on the updateChannel for real-time updates. + /// Pipe dei messaggi per la comunicazione riguardo update generico UI /// public MessagePipe UpdatePipe { get; set; } = null!; @@ -93,26 +93,25 @@ namespace EgwCoreLib.Lux.Data.Services #region Protected Fields /// - /// Configuration object for accessing application settings (e.g., connection strings, service parameters). - /// This is a static instance shared across all instances of BaseServ. + /// Oggetto di configurazione statico per accedere alle impostazioni dell'applicazione (es. stringhe di connessione). + /// Condiviso tra tutte le istanze di BaseServ. /// protected static IConfiguration _config = null!; /// - /// JSON serialization settings to handle circular references (e.g., object references to themselves). - /// Prevents exceptions during serialization by ignoring loops. + /// Impostazioni del serializzatore JSON utilizzato per gestire oggetti con riferimenti circolari + /// (es. oggetti che si fanno riferimento reciprocamente). /// protected JsonSerializerSettings? JSSettings; /// - /// Redis connection multiplexer that provides access to Redis database operations. - /// Used for reading and writing data in Redis. + /// Oggetto per la connessione a Redis utilizzato per operazioni di lettura/scrittura. /// protected IConnectionMultiplexer redisConn = null!; /// - /// Redis database instance used for performing read/write operations. - /// This database is accessed via the redisConn.GetDatabase() method. + /// Database Redis utilizzato per le operazioni di lettura/scrittura + /// nb: ottenuto tramite redisConn.GetDatabase() /// protected IDatabase redisDb = null!; @@ -121,8 +120,7 @@ namespace EgwCoreLib.Lux.Data.Services #region Protected Properties /// - /// Cache duration for short-term operations (approximately 1 minute with ±10% variation). - /// The actual duration is calculated dynamically with a random factor to avoid fixed TTLs. + /// Durata della cache breve (circa 1 minuto + variazione del +/-10%) /// protected TimeSpan FastCache { @@ -130,8 +128,7 @@ namespace EgwCoreLib.Lux.Data.Services } /// - /// Cache duration for long-term operations (5 minutes with ±10% variation). - /// Used for data that should be cached for longer periods but still allow some flexibility. + /// Durata della cache lunga (+ variazione del +/-10%) /// protected TimeSpan LongCache { @@ -139,8 +136,7 @@ namespace EgwCoreLib.Lux.Data.Services } /// - /// Cache duration for very short-term operations (approximately 10 seconds with ±10% variation). - /// Used for transient data that needs to be refreshed frequently. + /// Durata della cache molto breve (circa 10 secondi + variazione del +/-10%) /// protected TimeSpan UltraFastCache { @@ -148,8 +144,7 @@ namespace EgwCoreLib.Lux.Data.Services } /// - /// Cache duration for very long-term operations (up to 50 minutes with ±10% variation). - /// Designed for data that changes infrequently and requires long-term persistence. + /// Durata della cache molto lunga (+ variazione del +/-10%) /// protected TimeSpan UltraLongCache { @@ -161,8 +156,8 @@ namespace EgwCoreLib.Lux.Data.Services #region Private Fields /// - /// Logger instance for logging events and errors at the class level. - /// Used to track application behavior and diagnose issues. + /// Oggetto logger utilizzato per registrare eventi e errori a livello di classe. + /// Utile per il monitoraggio del comportamento dell'applicazione e la risoluzione di problemi. /// private static Logger Log = LogManager.GetCurrentClassLogger(); @@ -172,31 +167,31 @@ namespace EgwCoreLib.Lux.Data.Services private string bomChannel = ""; /// - /// Duration of long-term cache in seconds (default: 5 minutes). - /// Used in the LongCache property to define how long data should be cached. + /// Durata della cache lunga in secondi (predefinito: 5 minuti) + /// Utilizzato nella proprietà LongCache per definire quanto a lungo i dati devono essere memorizzati in cache. /// private int cacheTtlLong = 60 * 5; /// - /// Duration of short-term cache in seconds (default: 1 minute). - /// Used in the FastCache and UltraFastCache properties to define short-term cache durations. + /// Durata della cache breve in secondi (predefinito: 1 minuto) + /// Utilizzato nelle proprietà FastCache e UltraFastCache per definire la durata della cache breve. /// private int cacheTtlShort = 60 * 1; /// - /// Random number generator for introducing dynamic variability in cache durations. - /// Used to simulate real-world variations in data freshness and TTL. + /// Generatore di numeri casuali utilizzato per introdurre variabilità dinamica nelle durate della cache + /// (simula variazioni reali nella freschezza dei dati e nei tempi di scadenza). /// private Random rnd = new Random(); /// - /// The Redis channel name used for subscribing to and publishing messages. - /// Default is "svg:img", with a wildcard suffix ":*" to enable dynamic message matching. + /// Nome del canale Redis utilizzato per l'invio/ricezione di messaggi relativi a img svg. + /// Predefinito a "svg:img" con suffisso ":*". /// private string svgChannel = ""; /// - /// Redis channel for generic update info + /// Nome del canale Redis utilizzato per l'invio/ricezione di messaggi di update /// private string updateChannel = ""; diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index 810d628b..efe7a9c3 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -621,7 +621,7 @@ namespace EgwCoreLib.Lux.Data.Services var bomList = JsonConvert.DeserializeObject>(bomContent); if (bomList != null) { - // verifico 1:1 gli item ricevuti dalla BOM sul DB con eventuale insert in anagrafica + // verifico 1:1 gli item ricevuti dalla BOM sul DB con eventuale insert in anagrafica dei nuovi dbController.ItemUpsertFromBom(bomList); // salvo la BOM nel record del DB relativo all'oggetto richiesto dbController.OfferUpsertFromBom(uID, bomList); diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 2475a0ff..732cc7df 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2509.2417 + 0.9.2509.2418 diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index 495cf280..8596254c 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -197,17 +197,6 @@ namespace Lux.UI.Components.Compo await EC_Updated.InvokeAsync(true); } - /// - /// Legge i dati dei record completi - /// - private async Task ReloadData() - { - if (OfferID > 0) - { - AllRecords = await DLService.OfferRowGetByOffer(OfferID); - totalCount = AllRecords.Count(); - } - } /// /// Svuota cache corrente + rilegge dati /// @@ -222,6 +211,18 @@ namespace Lux.UI.Components.Compo isLoading = false; } + /// + /// Legge i dati dei record completi + /// + private async Task ReloadData() + { + if (OfferID > 0) + { + AllRecords = await DLService.OfferRowGetByOffer(OfferID); + totalCount = AllRecords.Count(); + } + } + /// /// salva nel record corrente la BOM aggiornata e poi ricalcola importo... /// diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index ac3e0c79..7ea41b3b 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2509.2417 + 0.9.2509.2418 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 430ad22e..4092c32d 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

      Versione: 0.9.2509.2417

      +

      Versione: 0.9.2509.2418


      Note di rilascio:
      • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 647b6fa8..683e8e87 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2509.2417 +0.9.2509.2418 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 0a85f6b6..55662aee 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2509.2417 + 0.9.2509.2418 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 51d19194dd2a7272b3ef82b14ee7adf9773b54d2 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 24 Sep 2025 19:03:41 +0200 Subject: [PATCH 26/65] =?UTF-8?q?Cambio=20modalit=C3=A0=20calcolo=20BOM=20?= =?UTF-8?q?tornata:=20se=20avevo=20gestito=20eccezioni=20ALT=20item=20le?= =?UTF-8?q?=20mantiene?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/LuxController.cs | 94 ++++++++----------- 1 file changed, 39 insertions(+), 55 deletions(-) diff --git a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs index 94fe3841..71f87b10 100644 --- a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs +++ b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs @@ -190,7 +190,7 @@ namespace EgwCoreLib.Lux.Data.Controllers // modifico record successivi... var list2Move = dbCtx .DbSetGenVal - .Where(x => x.ClassCod == rec2del.ClassCod && x.Ordinal> dbResult.Ordinal) + .Where(x => x.ClassCod == rec2del.ClassCod && x.Ordinal > dbResult.Ordinal) .ToList(); foreach (var item in list2Move) { @@ -949,13 +949,13 @@ namespace EgwCoreLib.Lux.Data.Controllers int numItemOk = 0; int numElems = newBomList.Count; // validazione e completamento BOM - validateBom(itemGroupList, bomGenList, ref newBomList, ref totCost, ref totPrice, ref numGroupOk, ref numItemOk); + validateBom(itemGroupList, bomGenList, ref newBomList, null, ref totCost, ref totPrice, ref numGroupOk, ref numItemOk); // salvo BOM... string itemBom = JsonConvert.SerializeObject(newBomList); currRec.ItemBOM = itemBom; // salvo arrotondato alla 3° decimale - currRec.BomCost = Math.Round(totCost,3); - currRec.BomPrice = Math.Round(totPrice,3); + currRec.BomCost = Math.Round(totCost, 3); + currRec.BomPrice = Math.Round(totPrice, 3); currRec.BomOk = numElems == numGroupOk; currRec.ItemOk = numElems == numItemOk; dbCtx.Entry(currRec).State = EntityState.Modified; @@ -1019,52 +1019,7 @@ namespace EgwCoreLib.Lux.Data.Controllers int numItemOk = 0; int numElems = bomList.Count; // validazione e completamento BOM - validateBom(itemGroupList, bomGenList, ref bomList, ref totCost, ref totPrice, ref numGroupOk, ref numItemOk); -#if false - // ciclo x ogni elemento della BOM, cercando x gruppo e ExtItemCode - foreach (var item in bomList) - { - // verifico item group esistente... - if (itemGroupList.Where(x => x.CodGroup == item.ClassCode).Count() > 0) - { - numGroupOk++; - } - // 2025.09.16: se il prezzo arriva dalla BOM calcolata uso quello... - if (item.Price > 0) - { - // resetto ItemID ma NON il prezzo - item.ItemID = 0; - // conto l'item - numItemOk++; - item.PriceEff = item.Price; - } - else - { - // cerco nella tab in memoria che ho precaricato il costo... cercando x dati di selezione + qtyRange - var recCost = bomGenList - .Where(x => x.CodGroup == item.ClassCode - && x.ExtItemCode == item.ItemCode - && item.Qty >= x.QtyMin - && item.Qty < x.QtyMax) - .OrderByDescending(x => x.Cost) - .FirstOrDefault(); - // se trovato valorizzo! - if (recCost != null) - { - numItemOk++; - item.ItemID = recCost.ItemID; - item.PriceEff = recCost.Cost * (1 + recCost.Margin); - } - else - { - item.ItemID = 0; - item.PriceEff = 0; - } - // ...e aggiorno totale - totCost += item.TotalCost; - } - } -#endif + validateBom(itemGroupList, bomGenList, ref bomList, null, ref totCost, ref totPrice, ref numGroupOk, ref numItemOk); // salvo BOM... string itemBom = JsonConvert.SerializeObject(bomList); currRec.ItemBOM = itemBom; @@ -1117,9 +1072,13 @@ namespace EgwCoreLib.Lux.Data.Controllers // recupero il subset item da BOM... var bomGenList = dbCtx .DbSetItem - .Where(x => x.ItemType == Core.Enums.ItemClassType.Bom) + //.Where(x => x.ItemType == Core.Enums.ItemClassType.Bom) + .Where(x => (x.ItemType == Core.Enums.ItemClassType.Bom || x.ItemType == Core.Enums.ItemClassType.BomAlt)) .ToList(); + // recupero la BOM list precedente + var bomListPrev = JsonConvert.DeserializeObject>(currRec.ItemBOM); + // calcolo il NUOVO costo e lo aggiorno... double totCost = 0; double totPrice = 0; @@ -1127,7 +1086,7 @@ namespace EgwCoreLib.Lux.Data.Controllers int numItemOk = 0; int numElems = bomList.Count; // validazione e completamento BOM - validateBom(itemGroupList, bomGenList, ref bomList, ref totCost, ref totPrice, ref numGroupOk, ref numItemOk); + validateBom(itemGroupList, bomGenList, ref bomList, bomListPrev, ref totCost, ref totPrice, ref numGroupOk, ref numItemOk); // salvo BOM... string itemBom = JsonConvert.SerializeObject(bomList); currRec.ItemBOM = itemBom; @@ -1167,13 +1126,14 @@ namespace EgwCoreLib.Lux.Data.Controllers /// validando i dati stessi ///
      /// Elenco ItemGroup da considerare - /// Item di tipo BOM/BomAlt + /// Item di tipo BOM/BomAlt AMMESSI /// Lista BOM ricevuta da validare + /// Lista BOM precedente da confrontare x scelta alternativi /// Costo netto componenti BOM calcolato /// Prezzo complessivo calcolato (con aggiunta marginalità) /// Controllo coerenza calcoli sui gruppi items /// Controllo coerenza calcoli su num items - private static void validateBom(List itemGroupList, List bomGenList, ref List bomList, ref double totCost, ref double totPrice, ref int numGroupOk, ref int numItemOk) + private static void validateBom(List itemGroupList, List bomGenList, ref List bomList, List? bomListPrev, ref double totCost, ref double totPrice, ref int numGroupOk, ref int numItemOk) { double margin = 0; // ciclo x ogni elemento della BOM, cercando x gruppo e ExtItemCode @@ -1216,9 +1176,33 @@ namespace EgwCoreLib.Lux.Data.Controllers else { recCost = bomGenList - .Where(x => x.CodGroup == item.ClassCode && x.ExtItemCode == item.ItemCode && item.Qty >= x.QtyMin && item.Qty < x.QtyMax) + .Where(x => x.CodGroup == item.ClassCode + && x.ItemIDParent == 0 // voglio NON sia un record CHILD + && x.ExtItemCode == item.ItemCode + && item.Qty >= x.QtyMin + && item.Qty < x.QtyMax) .OrderByDescending(x => x.Cost) .FirstOrDefault(); + // 2025.09.24: se ho un elenco item della BOM precedente + if (bomListPrev != null && bomListPrev.Count > 0 && recCost != null) + { + // ...cerco item trovato come PARENT di altri item + var listAlt = bomGenList.Where(x => x.ItemIDParent == recCost.ItemID).ToList(); + + // che cerco nella nella BOM precedente... + var result = listAlt + .Join( + bomListPrev, + l1 => l1.ItemID, + l2 => l2.ItemID, + (l1, l2) => l1) + .ToList(); + // nel caso ne trovassi solo 1 uso quello al posto del recCost... + if (result.Count == 1) + { + recCost = result.FirstOrDefault(); + } + } } // se trovato valorizzo! From 1ab7cb36e068b2fa8aa62c79bff3e135b0bdd89f Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 25 Sep 2025 17:13:14 +0200 Subject: [PATCH 27/65] update insomnia config --- RestTest/Insomnia_LUX.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RestTest/Insomnia_LUX.json b/RestTest/Insomnia_LUX.json index 0d63b60e..46825385 100644 --- a/RestTest/Insomnia_LUX.json +++ b/RestTest/Insomnia_LUX.json @@ -1 +1 @@ -{"_type":"export","__export_format":4,"__export_date":"2025-09-09T14:11:35.416Z","__export_source":"insomnia.desktop.app:v2023.5.8","resources":[{"_id":"req_c1bcda2fcdb64377b692bfb8d03cc69d","parentId":"fld_1f06e4414a8b4e7a85aad9659305c11d","modified":1754487930530,"created":1754487778319,"url":"{{ _.base_url }}generic/calc/BTL00001","name":"Calc BTL 01","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n \"envType\": 2,\n \"dictExec\": {\n \"Mode\": \"1\",\n \"BTL\": \"\"\n }\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563715,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_1f06e4414a8b4e7a85aad9659305c11d","parentId":"fld_97847f93d150412bbad8c26534f651dc","modified":1754487800959,"created":1754487778303,"name":"Generic - SVG CALC","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1754487800920,"_type":"request_group"},{"_id":"fld_97847f93d150412bbad8c26534f651dc","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1754487790866,"created":1754487790866,"name":"BTL","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1754487790866,"_type":"request_group"},{"_id":"wrk_956c9329fea3470c85a016252f307f83","parentId":null,"modified":1752848514018,"created":1752848514018,"name":"Lux","description":"","scope":"collection","_type":"workspace"},{"_id":"req_d1e5424a1d03461e864b374e01fc1828","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754582303971,"created":1754580116068,"url":"{{ _.base_url }}window/svg-preview/OFF0000000001","name":"Calc OFF0000000001","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1400}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563815,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_cc6b00b4276f4596b39d5e50b960559e","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1754487753725,"created":1753251557762,"name":"Window - SVG CALC","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371915022.3125,"_type":"request_group"},{"_id":"fld_df90c55ced414cdeb5801d0f4c29b002","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1752848593282,"created":1752848586667,"name":"Window","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1752848586667,"_type":"request_group"},{"_id":"req_32aa00a0b954414c862b22bf6448af49","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296503717,"created":1753251541758,"url":"{{ _.base_url }}window/svg-preview/AntaSingola","name":"Calc Finestra 01","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1200}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563715,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_dc99603a881741bea1ede03d2a118a8d","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296529561,"created":1753249702042,"url":"{{ _.base_url }}window/svg-preview/FinestraSplitVert","name":"Calc Finestra 02","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1800}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"VERTICAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563615,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_05c35870bbb34105ab70c6e365d125b7","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296534362,"created":1753249778024,"url":"{{ _.base_url }}window/svg-preview/FinestraSplitVertOriz","name":"Calc Finestra 03","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1800}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"VERTICAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563515,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_bc0664f273c84d458774e565a9ff5b1b","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296537357,"created":1753249781941,"url":"{{ _.base_url }}window/svg-preview/FinDueAnteBottomFisso","name":"Calc Finestra 04","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":2100}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TURNONLY_LEFT\\\",\\\"bHasHandle\\\":false,\\\"dDimension\\\":50},{\\\"OpeningType\\\":\\\"TILTTURN_RIGHT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":50}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563415,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_53b624e8a6a247d181a773a75fb9f735","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296540125,"created":1753251600273,"url":"{{ _.base_url }}window/svg-preview/AntaDoppia","name":"Calc Finestra 05","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1200},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1500}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_V\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TURNONLY_LEFT\\\",\\\"bHasHandle\\\":false,\\\"dDimension\\\":50},{\\\"OpeningType\\\":\\\"TILTTURN_RIGHT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":50}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_V\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753050081023.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_53dbf4e6945245f58b04d5d964397501","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1757084046568,"created":1757083273547,"url":"{{ _.base_url }}window/hwlist/AntaSingola","name":"Calc Finestra 01","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1200}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1751371914947.3125,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_2cdc951ebb1f41868dfc0dee9633ff3a","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1754641825314,"created":1754581617808,"url":"{{ _.base_url }}window/svgfile/OFF0000000001.svg","name":"Get finestra OFF0000000001","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623413,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_215c060235214381a5c9a07a3a6e31ab","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1754487761336,"created":1753251616318,"name":"Window - get SVG","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371914922.3125,"_type":"request_group"},{"_id":"req_847a9754ba6c4bc591defd9364fe3df3","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1754642451675,"created":1754642448689,"url":"{{ _.base_url }}window/svgfile/OFF0000000002.svg","name":"Get finestra OFF0000000002","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623363,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_41c191d42fdc407a8dd75ac5fa0818cb","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753251992197,"created":1753251632384,"url":"{{ _.base_url }}window/svgfile/AntaSingola.svg","name":"Get finestra 01","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623313,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_f8bb8c7088ab4b8caae327b8ed500693","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753251623257,"created":1753251216824,"url":"{{ _.base_url }}window/svgfile/FinestraSplitVert.svg","name":"Get finestra 02","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623213,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_f821725d54bb47a383e4b47854ef607d","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753251626000,"created":1753251260193,"url":"{{ _.base_url }}window/svgfile/FinestraSplitVertOriz.svg","name":"Get finestra 03","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623113,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_68986d53b6cd435985e44497090bf979","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753251628002,"created":1753251264221,"url":"{{ _.base_url }}window/svgfile/FinDueAnteBottomFisso.svg","name":"Get finestra 04","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623013,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_6ae6d705ceb9488797a9a41067a784ce","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753252006985,"created":1753251638035,"url":"{{ _.base_url }}window/svgfile/AntaDoppia.svg","name":"Get finestra 05","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251593364,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_be4e67601fda458da4225282c3e3b988","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1757090856431,"created":1754580125439,"url":"{{ _.base_url }}window/bom/OFF0000000001","name":"Calc OFF0000000001","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1400}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563815,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_68670c5e217c464898fc5289ac12e0f3","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1754487769184,"created":1754296522772,"name":"Window - BOM","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371914822.3125,"_type":"request_group"},{"_id":"req_cb935626775949f29a66224522aa2eee","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1757084069007,"created":1754296522784,"url":"{{ _.base_url }}window/bom/AntaSingola","name":"Calc Finestra 01","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1200}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563715,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_035899d704b7437ea571884269f53c7a","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1754296580348,"created":1754296522774,"url":"{{ _.base_url }}window/bom/FinestraSplitVert","name":"Calc Finestra 02","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1800}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"VERTICAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563615,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_58eb627fb28d42c3b3b47fdebc87ba57","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1754296583460,"created":1754296522779,"url":"{{ _.base_url }}window/bom/FinestraSplitVertOriz","name":"Calc Finestra 03","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1800}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"VERTICAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563515,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_d10fe244bdcd4d838913babf4561a8f5","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1754296586112,"created":1754296522782,"url":"{{ _.base_url }}window/bom/FinDueAnteBottomFisso","name":"Calc Finestra 04","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":2100}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TURNONLY_LEFT\\\",\\\"bHasHandle\\\":false,\\\"dDimension\\\":50},{\\\"OpeningType\\\":\\\"TILTTURN_RIGHT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":50}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563415,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_205c5b5be6da4530a17da2e0fc58427f","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1754296589042,"created":1754296522787,"url":"{{ _.base_url }}window/bom/AntaDoppia","name":"Calc Finestra 05","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1200},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1500}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_V\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TURNONLY_LEFT\\\",\\\"bHasHandle\\\":false,\\\"dDimension\\\":50},{\\\"OpeningType\\\":\\\"TILTTURN_RIGHT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":50}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_V\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753050081023.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_4f43ff07423841b3a06d8702f353f083","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296602457,"created":1752848598632,"url":"{{ _.base_url }}Jwd/svg/123456","name":"JWD 2 SVG","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n \"revNum\": \"string\",\n \"width\": 0,\n \"height\": 0,\n \"nameUrl\": \"\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602386,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_af4eae3f44854f26878da7c94c420914","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1754296625847,"created":1754296597116,"name":"Scratch","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371914722.3125,"_type":"request_group"},{"_id":"req_dea084a8da7b45babd972bc226c579b5","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296609268,"created":1752849622647,"url":"{{ _.base_url }}window/calc/WINDOW001","name":"Calc RAW JWD","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\r\\n \\\"ProfilePath\\\": \\\"Profilo78\\\",\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"Shape\\\": \\\"RECTANGLE\\\",\\r\\n \\\"DimensionList\\\": [\\r\\n {\\r\\n \\\"nIndex\\\": 1,\\r\\n \\\"sName\\\": \\\"Width\\\",\\r\\n \\\"dValue\\\": 1200.0\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 2,\\r\\n \\\"sName\\\": \\\"Height\\\",\\r\\n \\\"dValue\\\": 1500.0\\r\\n }\\r\\n ],\\r\\n \\\"JointList\\\": [\\r\\n {\\r\\n \\\"nIndex\\\": 1,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 2,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 3,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 4,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n }\\r\\n ],\\r\\n \\\"BottomRail\\\": false,\\r\\n \\\"BottomRailQty\\\": 0,\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"bIsSashVertical\\\": true,\\r\\n \\\"SashList\\\": [\\r\\n {\\r\\n \\\"OpeningType\\\": \\\"TURNONLY_LEFT\\\",\\r\\n \\\"bHasHandle\\\": false,\\r\\n \\\"dDimension\\\": 50.0\\r\\n },\\r\\n {\\r\\n \\\"OpeningType\\\": \\\"TILTTURN_RIGHT\\\",\\r\\n \\\"bHasHandle\\\": true,\\r\\n \\\"dDimension\\\": 50.0\\r\\n }\\r\\n ],\\r\\n \\\"SashType\\\": \\\"NULL\\\",\\r\\n \\\"JointList\\\": [\\r\\n {\\r\\n \\\"nIndex\\\": 1,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 2,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 3,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 4,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n }\\r\\n ],\\r\\n \\\"Hardware\\\": \\\"000000\\\",\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"FillType\\\": \\\"GLASS\\\",\\r\\n \\\"AreaList\\\": [],\\r\\n \\\"AreaType\\\": \\\"FILL\\\"\\r\\n }\\r\\n ],\\r\\n \\\"AreaType\\\": \\\"SPLITTED\\\"\\r\\n },\\r\\n {\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"FillType\\\": \\\"GLASS\\\",\\r\\n \\\"AreaList\\\": [],\\r\\n \\\"AreaType\\\": \\\"FILL\\\"\\r\\n }\\r\\n ],\\r\\n \\\"AreaType\\\": \\\"SPLITTED\\\"\\r\\n }\\r\\n ],\\r\\n \\\"AreaType\\\": \\\"SASH\\\"\\r\\n }\\r\\n ],\\r\\n \\\"AreaType\\\": \\\"FRAME\\\"\\r\\n }\\r\\n ]\\r\\n}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602361,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_b0434b77938b4fe192d7954acd3e5631","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296610520,"created":1752853325616,"url":"{{ _.base_url }}window/svg/WINDOW001","name":"Get cached svg","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602348.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_275b96bcc56842c0a32987937e687529","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296611909,"created":1753249617506,"url":"{{ _.base_url }}window/svgfile/WIN123456.svg","name":"Get cached svgfile 02","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602342.25,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_973dfaac59f0473f91ed62e6a56ddb16","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296607208,"created":1753116758990,"url":"{{ _.base_url }}window/svgfile/WINDOW001.svg","name":"Get cached svgfile","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602336,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"env_03694bb015b442e0326ba83a58b6365ca3157aa2","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1752848633269,"created":1752848514034,"name":"Base Environment","data":{"base_url":"https://localhost:7135/Lux/srv/api/"},"dataPropertyOrder":{"&":["base_url"]},"color":null,"isPrivate":false,"metaSortKey":1752848514034,"_type":"environment"},{"_id":"jar_03694bb015b442e0326ba83a58b6365ca3157aa2","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1752848514036,"created":1752848514036,"name":"Default Jar","cookies":[],"_type":"cookie_jar"},{"_id":"env_01f9ae3ab59d4b15a654c74087d159f8","parentId":"env_03694bb015b442e0326ba83a58b6365ca3157aa2","modified":1752848640194,"created":1752848535080,"name":"DEV","data":{"base_url":"https://localhost:7135/Lux/srv/api/"},"dataPropertyOrder":{"&":["base_url"]},"color":null,"isPrivate":false,"metaSortKey":1752848535080,"_type":"environment"},{"_id":"env_0095608273ce4bee8a69e58ef1e69e42","parentId":"env_03694bb015b442e0326ba83a58b6365ca3157aa2","modified":1754645785052,"created":1752848543273,"name":"IIS01 - Dev","data":{"base_url":"https://iis01.egalware.com/Lux/srv/api/"},"dataPropertyOrder":{"&":["base_url"]},"color":null,"isPrivate":false,"metaSortKey":1752848543273,"_type":"environment"},{"_id":"env_2639bb19520a429bb9c887d6b4ab73dc","parentId":"env_03694bb015b442e0326ba83a58b6365ca3157aa2","modified":1754645793068,"created":1754645770515,"name":"IIS04 - Prod","data":{"base_url":"https://office.egalware.com/Lux/srv/api/"},"dataPropertyOrder":{"&":["base_url"]},"color":null,"isPrivate":false,"metaSortKey":1754645770515,"_type":"environment"}]} \ No newline at end of file +{"_type":"export","__export_format":4,"__export_date":"2025-09-25T15:13:03.672Z","__export_source":"insomnia.desktop.app:v2023.5.8","resources":[{"_id":"req_8ec53410a71f4f10a453cfcf7f932231","parentId":"fld_bf8a2780eb0d42e597280c966d4c1fda","modified":1758647834857,"created":1758647832925,"url":"{{ _.base_url }}generic/bom/OFF250000000001","name":"BOM OFF0000000001","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1400}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1758647812542,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_bf8a2780eb0d42e597280c966d4c1fda","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1758647800454,"created":1758647790448,"name":"Generic","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1758647790448,"_type":"request_group"},{"_id":"wrk_956c9329fea3470c85a016252f307f83","parentId":null,"modified":1752848514018,"created":1752848514018,"name":"Lux","description":"","scope":"collection","_type":"workspace"},{"_id":"req_62a9a85c19734c16b4591366d49d3f2a","parentId":"fld_bf8a2780eb0d42e597280c966d4c1fda","modified":1758648412757,"created":1758647809741,"url":"{{ _.base_url }}generic/calc/OFF250000000001","name":"Calc OFF0000000001","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\"EnvType\":1,\"DictExec\":{\"Mode\":\"2\",\"UID\":\"OFF250000000001\",\"Jwd\":\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1400}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\"}}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1758647812442,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_c1bcda2fcdb64377b692bfb8d03cc69d","parentId":"fld_1f06e4414a8b4e7a85aad9659305c11d","modified":1754487930530,"created":1754487778319,"url":"{{ _.base_url }}generic/calc/BTL00001","name":"Calc BTL 01","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n \"envType\": 2,\n \"dictExec\": {\n \"Mode\": \"1\",\n \"BTL\": \"\"\n }\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563715,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_1f06e4414a8b4e7a85aad9659305c11d","parentId":"fld_97847f93d150412bbad8c26534f651dc","modified":1754487800959,"created":1754487778303,"name":"Generic - SVG CALC","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1754487800920,"_type":"request_group"},{"_id":"fld_97847f93d150412bbad8c26534f651dc","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1754487790866,"created":1754487790866,"name":"BTL","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1754487790866,"_type":"request_group"},{"_id":"req_d1e5424a1d03461e864b374e01fc1828","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1758618977060,"created":1754580116068,"url":"{{ _.base_url }}window/svg-preview/OFF250000000001","name":"Calc OFF0000000001","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1400}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563815,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_cc6b00b4276f4596b39d5e50b960559e","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1754487753725,"created":1753251557762,"name":"Window - SVG CALC","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371915022.3125,"_type":"request_group"},{"_id":"fld_df90c55ced414cdeb5801d0f4c29b002","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1752848593282,"created":1752848586667,"name":"Window","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1752848586667,"_type":"request_group"},{"_id":"req_32aa00a0b954414c862b22bf6448af49","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296503717,"created":1753251541758,"url":"{{ _.base_url }}window/svg-preview/AntaSingola","name":"Calc Finestra 01","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1200}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563715,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_dc99603a881741bea1ede03d2a118a8d","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296529561,"created":1753249702042,"url":"{{ _.base_url }}window/svg-preview/FinestraSplitVert","name":"Calc Finestra 02","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1800}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"VERTICAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563615,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_05c35870bbb34105ab70c6e365d125b7","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296534362,"created":1753249778024,"url":"{{ _.base_url }}window/svg-preview/FinestraSplitVertOriz","name":"Calc Finestra 03","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1800}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"VERTICAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563515,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_bc0664f273c84d458774e565a9ff5b1b","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296537357,"created":1753249781941,"url":"{{ _.base_url }}window/svg-preview/FinDueAnteBottomFisso","name":"Calc Finestra 04","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":2100}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TURNONLY_LEFT\\\",\\\"bHasHandle\\\":false,\\\"dDimension\\\":50},{\\\"OpeningType\\\":\\\"TILTTURN_RIGHT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":50}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563415,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_53b624e8a6a247d181a773a75fb9f735","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296540125,"created":1753251600273,"url":"{{ _.base_url }}window/svg-preview/AntaDoppia","name":"Calc Finestra 05","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1200},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1500}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_V\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TURNONLY_LEFT\\\",\\\"bHasHandle\\\":false,\\\"dDimension\\\":50},{\\\"OpeningType\\\":\\\"TILTTURN_RIGHT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":50}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_V\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753050081023.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_569c1e42853f48fd91b070ce669a4be3","parentId":"fld_e255538a539345679c0f774f77d675bf","modified":1757685919915,"created":1757685886259,"url":"{{ _.base_url }}window/hwlist","name":"GetHwList","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1757685898581,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_e255538a539345679c0f774f77d675bf","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1757688721653,"created":1757083263247,"name":"Window - config","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371914972.3125,"_type":"request_group"},{"_id":"req_53dbf4e6945245f58b04d5d964397501","parentId":"fld_e255538a539345679c0f774f77d675bf","modified":1757688740384,"created":1757083273547,"url":"{{ _.base_url }}window/hwlist/AntaSingola","name":"GetHw-v00-2del","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1200}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1757685898481,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_2cdc951ebb1f41868dfc0dee9633ff3a","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1754641825314,"created":1754581617808,"url":"{{ _.base_url }}window/svgfile/OFF0000000001.svg","name":"Get finestra OFF0000000001","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623413,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_215c060235214381a5c9a07a3a6e31ab","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1754487761336,"created":1753251616318,"name":"Window - get SVG","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371914922.3125,"_type":"request_group"},{"_id":"req_847a9754ba6c4bc591defd9364fe3df3","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1754642451675,"created":1754642448689,"url":"{{ _.base_url }}window/svgfile/OFF0000000002.svg","name":"Get finestra OFF0000000002","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623363,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_41c191d42fdc407a8dd75ac5fa0818cb","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753251992197,"created":1753251632384,"url":"{{ _.base_url }}window/svgfile/AntaSingola.svg","name":"Get finestra 01","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623313,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_f8bb8c7088ab4b8caae327b8ed500693","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753251623257,"created":1753251216824,"url":"{{ _.base_url }}window/svgfile/FinestraSplitVert.svg","name":"Get finestra 02","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623213,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_f821725d54bb47a383e4b47854ef607d","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753251626000,"created":1753251260193,"url":"{{ _.base_url }}window/svgfile/FinestraSplitVertOriz.svg","name":"Get finestra 03","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623113,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_68986d53b6cd435985e44497090bf979","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753251628002,"created":1753251264221,"url":"{{ _.base_url }}window/svgfile/FinDueAnteBottomFisso.svg","name":"Get finestra 04","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623013,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_6ae6d705ceb9488797a9a41067a784ce","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753252006985,"created":1753251638035,"url":"{{ _.base_url }}window/svgfile/AntaDoppia.svg","name":"Get finestra 05","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251593364,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_be4e67601fda458da4225282c3e3b988","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1758618937264,"created":1754580125439,"url":"{{ _.base_url }}window/bom/OFF250000000001","name":"Calc OFF0000000001","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1400}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563815,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_68670c5e217c464898fc5289ac12e0f3","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1754487769184,"created":1754296522772,"name":"Window - BOM","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371914822.3125,"_type":"request_group"},{"_id":"req_cb935626775949f29a66224522aa2eee","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1757084069007,"created":1754296522784,"url":"{{ _.base_url }}window/bom/AntaSingola","name":"Calc Finestra 01","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1200}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563715,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_035899d704b7437ea571884269f53c7a","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1754296580348,"created":1754296522774,"url":"{{ _.base_url }}window/bom/FinestraSplitVert","name":"Calc Finestra 02","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1800}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"VERTICAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563615,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_58eb627fb28d42c3b3b47fdebc87ba57","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1754296583460,"created":1754296522779,"url":"{{ _.base_url }}window/bom/FinestraSplitVertOriz","name":"Calc Finestra 03","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1800}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"VERTICAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563515,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_d10fe244bdcd4d838913babf4561a8f5","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1754296586112,"created":1754296522782,"url":"{{ _.base_url }}window/bom/FinDueAnteBottomFisso","name":"Calc Finestra 04","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":2100}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TURNONLY_LEFT\\\",\\\"bHasHandle\\\":false,\\\"dDimension\\\":50},{\\\"OpeningType\\\":\\\"TILTTURN_RIGHT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":50}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563415,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_205c5b5be6da4530a17da2e0fc58427f","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1754296589042,"created":1754296522787,"url":"{{ _.base_url }}window/bom/AntaDoppia","name":"Calc Finestra 05","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1200},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1500}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_V\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TURNONLY_LEFT\\\",\\\"bHasHandle\\\":false,\\\"dDimension\\\":50},{\\\"OpeningType\\\":\\\"TILTTURN_RIGHT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":50}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_V\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753050081023.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_4f43ff07423841b3a06d8702f353f083","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296602457,"created":1752848598632,"url":"{{ _.base_url }}Jwd/svg/123456","name":"JWD 2 SVG","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n \"revNum\": \"string\",\n \"width\": 0,\n \"height\": 0,\n \"nameUrl\": \"\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602386,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_af4eae3f44854f26878da7c94c420914","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1754296625847,"created":1754296597116,"name":"Scratch","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371914722.3125,"_type":"request_group"},{"_id":"req_dea084a8da7b45babd972bc226c579b5","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296609268,"created":1752849622647,"url":"{{ _.base_url }}window/calc/WINDOW001","name":"Calc RAW JWD","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\r\\n \\\"ProfilePath\\\": \\\"Profilo78\\\",\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"Shape\\\": \\\"RECTANGLE\\\",\\r\\n \\\"DimensionList\\\": [\\r\\n {\\r\\n \\\"nIndex\\\": 1,\\r\\n \\\"sName\\\": \\\"Width\\\",\\r\\n \\\"dValue\\\": 1200.0\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 2,\\r\\n \\\"sName\\\": \\\"Height\\\",\\r\\n \\\"dValue\\\": 1500.0\\r\\n }\\r\\n ],\\r\\n \\\"JointList\\\": [\\r\\n {\\r\\n \\\"nIndex\\\": 1,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 2,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 3,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 4,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n }\\r\\n ],\\r\\n \\\"BottomRail\\\": false,\\r\\n \\\"BottomRailQty\\\": 0,\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"bIsSashVertical\\\": true,\\r\\n \\\"SashList\\\": [\\r\\n {\\r\\n \\\"OpeningType\\\": \\\"TURNONLY_LEFT\\\",\\r\\n \\\"bHasHandle\\\": false,\\r\\n \\\"dDimension\\\": 50.0\\r\\n },\\r\\n {\\r\\n \\\"OpeningType\\\": \\\"TILTTURN_RIGHT\\\",\\r\\n \\\"bHasHandle\\\": true,\\r\\n \\\"dDimension\\\": 50.0\\r\\n }\\r\\n ],\\r\\n \\\"SashType\\\": \\\"NULL\\\",\\r\\n \\\"JointList\\\": [\\r\\n {\\r\\n \\\"nIndex\\\": 1,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 2,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 3,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 4,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n }\\r\\n ],\\r\\n \\\"Hardware\\\": \\\"000000\\\",\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"FillType\\\": \\\"GLASS\\\",\\r\\n \\\"AreaList\\\": [],\\r\\n \\\"AreaType\\\": \\\"FILL\\\"\\r\\n }\\r\\n ],\\r\\n \\\"AreaType\\\": \\\"SPLITTED\\\"\\r\\n },\\r\\n {\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"FillType\\\": \\\"GLASS\\\",\\r\\n \\\"AreaList\\\": [],\\r\\n \\\"AreaType\\\": \\\"FILL\\\"\\r\\n }\\r\\n ],\\r\\n \\\"AreaType\\\": \\\"SPLITTED\\\"\\r\\n }\\r\\n ],\\r\\n \\\"AreaType\\\": \\\"SASH\\\"\\r\\n }\\r\\n ],\\r\\n \\\"AreaType\\\": \\\"FRAME\\\"\\r\\n }\\r\\n ]\\r\\n}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602361,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_b0434b77938b4fe192d7954acd3e5631","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296610520,"created":1752853325616,"url":"{{ _.base_url }}window/svg/WINDOW001","name":"Get cached svg","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602348.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_275b96bcc56842c0a32987937e687529","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296611909,"created":1753249617506,"url":"{{ _.base_url }}window/svgfile/WIN123456.svg","name":"Get cached svgfile 02","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602342.25,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_973dfaac59f0473f91ed62e6a56ddb16","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296607208,"created":1753116758990,"url":"{{ _.base_url }}window/svgfile/WINDOW001.svg","name":"Get cached svgfile","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602336,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"env_03694bb015b442e0326ba83a58b6365ca3157aa2","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1752848633269,"created":1752848514034,"name":"Base Environment","data":{"base_url":"https://localhost:7135/Lux/srv/api/"},"dataPropertyOrder":{"&":["base_url"]},"color":null,"isPrivate":false,"metaSortKey":1752848514034,"_type":"environment"},{"_id":"jar_03694bb015b442e0326ba83a58b6365ca3157aa2","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1752848514036,"created":1752848514036,"name":"Default Jar","cookies":[],"_type":"cookie_jar"},{"_id":"env_01f9ae3ab59d4b15a654c74087d159f8","parentId":"env_03694bb015b442e0326ba83a58b6365ca3157aa2","modified":1752848640194,"created":1752848535080,"name":"DEV","data":{"base_url":"https://localhost:7135/Lux/srv/api/"},"dataPropertyOrder":{"&":["base_url"]},"color":null,"isPrivate":false,"metaSortKey":1752848535080,"_type":"environment"},{"_id":"env_0095608273ce4bee8a69e58ef1e69e42","parentId":"env_03694bb015b442e0326ba83a58b6365ca3157aa2","modified":1754645785052,"created":1752848543273,"name":"IIS01 - Dev","data":{"base_url":"https://iis01.egalware.com/Lux/srv/api/"},"dataPropertyOrder":{"&":["base_url"]},"color":null,"isPrivate":false,"metaSortKey":1752848543273,"_type":"environment"},{"_id":"env_2639bb19520a429bb9c887d6b4ab73dc","parentId":"env_03694bb015b442e0326ba83a58b6365ca3157aa2","modified":1754645793068,"created":1754645770515,"name":"IIS04 - Prod","data":{"base_url":"https://office.egalware.com/Lux/srv/api/"},"dataPropertyOrder":{"&":["base_url"]},"color":null,"isPrivate":false,"metaSortKey":1754645770515,"_type":"environment"}]} \ No newline at end of file From 7d1cae90613778681a4efeb8d8f4d57f71253ddd Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 29 Sep 2025 15:09:45 +0200 Subject: [PATCH 28/65] Update datamodel --- EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj | 2 +- EgwCoreLib.Lux.Data/DataLayerContext.cs | 8 ++++---- EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs | 15 +++++++-------- .../DbModel/Sales/OfferRowModel.cs | 15 +++++++++++++-- EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs | 16 ++++++---------- 5 files changed, 31 insertions(+), 25 deletions(-) diff --git a/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj b/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj index 59a004c1..1c8405f1 100644 --- a/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj +++ b/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj @@ -21,6 +21,6 @@ - + diff --git a/EgwCoreLib.Lux.Data/DataLayerContext.cs b/EgwCoreLib.Lux.Data/DataLayerContext.cs index 7dcf1874..e6268c2f 100644 --- a/EgwCoreLib.Lux.Data/DataLayerContext.cs +++ b/EgwCoreLib.Lux.Data/DataLayerContext.cs @@ -1,8 +1,10 @@ using EgwCoreLib.Lux.Data.DbModel.Cost; -using EgwCoreLib.Lux.Data.DbModel.Utils; +using EgwCoreLib.Lux.Data.DbModel.Items; using EgwCoreLib.Lux.Data.DbModel.Production; using EgwCoreLib.Lux.Data.DbModel.Sales; +using EgwCoreLib.Lux.Data.DbModel.Stock; using EgwCoreLib.Lux.Data.DbModel.Task; +using EgwCoreLib.Lux.Data.DbModel.Utils; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using NLog; @@ -11,8 +13,6 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using EgwCoreLib.Lux.Data.DbModel.Stock; -using EgwCoreLib.Lux.Data.DbModel.Items; namespace EgwCoreLib.Lux.Data { @@ -45,8 +45,8 @@ namespace EgwCoreLib.Lux.Data } } - public virtual DbSet DbSetCounters { get; set; } + public virtual DbSet DbSetItemGroup { get; set; } public virtual DbSet DbSetItem { get; set; } public virtual DbSet DbSetSellItem { get; set; } diff --git a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs index cb72b191..fee06031 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs @@ -1,11 +1,5 @@ -using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using static EgwCoreLib.Lux.Core.Enums; namespace EgwCoreLib.Lux.Data.DbModel.Sales @@ -23,6 +17,11 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales [Key] public int OfferID { get; set; } + /// + /// Environment della richiesta + /// + public EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS Envir { get; set; } = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW; + /// /// Anno rif offerta /// @@ -77,7 +76,6 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales ///
public DateTime Modified { get; set; } = DateTime.Now; - /// /// Enum stato offerta /// @@ -150,6 +148,7 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales [ForeignKey("DealerID")] public virtual DealerModel DealerNav { get; set; } = null!; + /// /// Navigazione alle righe offerta /// diff --git a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs index 8a4914be..1c9e9cdf 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs @@ -7,6 +7,7 @@ using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; +using static EgwCoreLib.Lux.Core.Enums; namespace EgwCoreLib.Lux.Data.DbModel.Sales { @@ -34,9 +35,9 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales public int RowNum { get; set; } = 0; /// - /// Campo salvato dell'Environment + /// Environment della richiesta /// - public string Environment { get; set; } = "WINDOW"; + public EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS Envir { get; set; } = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW; /// /// Campo salvato dell'UID da codice DataMatrix calcolato @@ -178,6 +179,16 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales /// public DateTime Modified { get; set; } = DateTime.Now; + /// + /// Indica che è in attesa aggiornamento BOM + /// + public bool AwaitBom { get; set; } = false; + + /// + /// Indica che è in attesa aggiornamento Price + /// + public bool AwaitPrice { get; set; } = false; + /// /// Navigazione Offer /// diff --git a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs index 75befcf7..c546538e 100644 --- a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs +++ b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs @@ -1,15 +1,10 @@ using EgwCoreLib.Lux.Data.DbModel.Cost; -using EgwCoreLib.Lux.Data.DbModel.Utils; -using EgwCoreLib.Lux.Data.DbModel.Sales; -using EgwCoreLib.Lux.Data.DbModel.Task; -using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using EgwCoreLib.Lux.Data.DbModel.Stock; using EgwCoreLib.Lux.Data.DbModel.Items; +using EgwCoreLib.Lux.Data.DbModel.Sales; +using EgwCoreLib.Lux.Data.DbModel.Stock; +using EgwCoreLib.Lux.Data.DbModel.Task; +using EgwCoreLib.Lux.Data.DbModel.Utils; +using Microsoft.EntityFrameworkCore; namespace EgwCoreLib.Lux.Data { @@ -23,6 +18,7 @@ namespace EgwCoreLib.Lux.Data /// public static void Seed(this ModelBuilder modelBuilder) { + // inizializzazione dei valori di default x Ruoli/Tags modelBuilder.Entity().HasData( new TagsModel { TagID = 1, Description = "Tag 01" }, From 7dabbf3870b0b9dee88bbb4a1f3460158f88080a Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 29 Sep 2025 16:33:59 +0200 Subject: [PATCH 29/65] Update migration: singolo InitDb, aggiunta preliminare classi tipo environment (da completare) --- .../EgwCoreLib.Lux.Data.csproj | 1 + .../20250919165643_InitDb.Designer.cs | 2239 ----------------- .../20250923101803_AddOffertDiscount.cs | 226 -- ...r.cs => 20250929142415_InitDb.Designer.cs} | 89 +- ...643_InitDb.cs => 20250929142415_InitDb.cs} | 43 +- .../DataLayerContextModelSnapshot.cs | 85 +- Lux.API/Lux.API.csproj | 3 +- Lux.UI/Components/Compo/OfferRowMan.razor | 5 +- Lux.UI/Components/Pages/Home.razor | 37 +- Lux.UI/Lux.UI.csproj | 3 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 13 files changed, 167 insertions(+), 2570 deletions(-) delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20250919165643_InitDb.Designer.cs delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20250923101803_AddOffertDiscount.cs rename EgwCoreLib.Lux.Data/Migrations/{20250923101803_AddOffertDiscount.Designer.cs => 20250929142415_InitDb.Designer.cs} (95%) rename EgwCoreLib.Lux.Data/Migrations/{20250919165643_InitDb.cs => 20250929142415_InitDb.cs} (94%) diff --git a/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj b/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj index 235936b3..0566e374 100644 --- a/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj +++ b/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj @@ -49,6 +49,7 @@ + diff --git a/EgwCoreLib.Lux.Data/Migrations/20250919165643_InitDb.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20250919165643_InitDb.Designer.cs deleted file mode 100644 index 30fc0703..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20250919165643_InitDb.Designer.cs +++ /dev/null @@ -1,2239 +0,0 @@ -// -using System; -using EgwCoreLib.Lux.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace EgwCoreLib.Lux.Data.Migrations -{ - [DbContext(typeof(DataLayerContext))] - [Migration("20250919165643_InitDb")] - partial class InitDb - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.17") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", b => - { - b.Property("CostDriverID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CostDriverID")); - - b.Property("Descript") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Unit") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CostDriverID"); - - b.ToTable("cost_driver"); - - b.HasData( - new - { - CostDriverID = 1, - Descript = "Ore lavorate per step/fase", - Name = "WorkHour", - Unit = "h" - }, - new - { - CostDriverID = 2, - Descript = "Metri prodotti per step/fase", - Name = "Meter", - Unit = "m" - }, - new - { - CostDriverID = 3, - Descript = "Numero unità prodotte (lavorate) per step/fase", - Name = "Unit", - Unit = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => - { - b.Property("ResourceID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); - - b.Property("CostDriverBudget") - .HasColumnType("decimal(65,30)"); - - b.Property("CostDriverID") - .HasColumnType("int"); - - b.Property("EBTPerc") - .HasColumnType("decimal(65,30)"); - - b.Property("FixedCost") - .HasColumnType("decimal(65,30)"); - - b.Property("LaborCost") - .HasColumnType("decimal(65,30)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OverHeadCost") - .HasColumnType("decimal(65,30)"); - - b.Property("OverHeadPerc") - .HasColumnType("decimal(65,30)"); - - b.Property("PriceMargin") - .HasColumnType("decimal(65,30)"); - - b.Property("VariableCost") - .HasColumnType("decimal(65,30)"); - - b.HasKey("ResourceID"); - - b.HasIndex("CostDriverID"); - - b.ToTable("cost_resource"); - - b.HasData( - new - { - ResourceID = 1, - CostDriverBudget = 880m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 12000m, - LaborCost = 30m, - Name = "Sezionatrice", - OverHeadCost = 5000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 6000m - }, - new - { - ResourceID = 2, - CostDriverBudget = 1760m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 100000m, - LaborCost = 40m, - Name = "Linea SAOMAD WoodPecker Just 3500", - OverHeadCost = 15000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 30000m - }, - new - { - ResourceID = 3, - CostDriverBudget = 1760m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 24000m, - LaborCost = 35m, - Name = "Linea Pantografo", - OverHeadCost = 5000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 6000m - }, - new - { - ResourceID = 4, - CostDriverBudget = 880m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 24000m, - LaborCost = 30m, - Name = "Stazione Verniciatura", - OverHeadCost = 3000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 6000m - }, - new - { - ResourceID = 5, - CostDriverBudget = 220m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 6000m, - LaborCost = 30m, - Name = "Verniciatura Manuale", - OverHeadCost = 3000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 2000m - }, - new - { - ResourceID = 6, - CostDriverBudget = 3520m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 500m, - LaborCost = 30m, - Name = "Montaggio Manuale", - OverHeadCost = 500m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 500m - }, - new - { - ResourceID = 7, - CostDriverBudget = 3520m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 0m, - LaborCost = 40m, - Name = "Installatore", - OverHeadCost = 0m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 3000m - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", b => - { - b.Property("CodGroup") - .HasColumnType("varchar(255)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CodGroup"); - - b.ToTable("item_group"); - - b.HasData( - new - { - CodGroup = "WindowTrunk", - Description = "Barre legno per lavorazione" - }, - new - { - CodGroup = "WindowGlass", - Description = "Vetri serramento" - }, - new - { - CodGroup = "WindowVarnish", - Description = "Vernici per legno" - }, - new - { - CodGroup = "WindowHardware", - Description = "Ferramenta serramento" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => - { - b.Property("ItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); - - b.Property("CodGroup") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Cost") - .HasColumnType("double"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsService") - .HasColumnType("tinyint(1)"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("ItemIDParent") - .HasColumnType("int"); - - b.Property("ItemType") - .HasColumnType("int"); - - b.Property("Margin") - .HasColumnType("double"); - - b.Property("QtyMax") - .HasColumnType("double"); - - b.Property("QtyMin") - .HasColumnType("double"); - - b.Property("SupplCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UM") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("ItemID"); - - b.HasIndex("CodGroup"); - - b.ToTable("item_item"); - - b.HasData( - new - { - ItemID = 1, - CodGroup = "WindowTrunk", - Cost = 20.0, - Description = "BARRA-60x80 generica", - ExtItemCode = "", - IsService = false, - ItemCode = 1001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.29999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "BARR.001", - UM = "#" - }, - new - { - ItemID = 2, - CodGroup = "WindowTrunk", - Cost = 16.5, - Description = "Barra 60x80, lunghezza 12m", - ExtItemCode = "BARRA-60x80x12000", - IsService = false, - ItemCode = 1002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.12000", - UM = "#" - }, - new - { - ItemID = 3, - CodGroup = "WindowTrunk", - Cost = 17.5, - Description = "Barra 60x80, lunghezza 8m", - ExtItemCode = "BARRA-60x80x8000", - IsService = false, - ItemCode = 1003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.22, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.8000", - UM = "#" - }, - new - { - ItemID = 4, - CodGroup = "WindowTrunk", - Cost = 15.5, - Description = "Barra 60x80, lunghezza 16m", - ExtItemCode = "BARRA-60x80x16000", - IsService = false, - ItemCode = 1004, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.16000", - UM = "#" - }, - new - { - ItemID = 5, - CodGroup = "WindowGlass", - Cost = 300.0, - Description = "Vetro triplo, basso indice termico, 800x1000", - ExtItemCode = "VETRO-3L-THERMO-800x1000", - IsService = false, - ItemCode = 2001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V3T.800.1000", - UM = "m2" - }, - new - { - ItemID = 6, - CodGroup = "WindowGlass", - Cost = 200.0, - Description = "Vetro doppio, 800x1000", - ExtItemCode = "VETRO-2L-800x1000", - IsService = false, - ItemCode = 2002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.14999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V2.800.1000", - UM = "m2" - }, - new - { - ItemID = 7, - CodGroup = "WindowGlass", - Cost = 250.0, - Description = "Vetro triplo, 800x1000", - ExtItemCode = "VETRO-3L-800x1000", - IsService = false, - ItemCode = 2003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.17999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V3.800.1000", - UM = "m2" - }, - new - { - ItemID = 8, - CodGroup = "WindowVarnish", - Cost = 20.0, - Description = "Vernice trasparente", - ExtItemCode = "VERN-TRASP", - IsService = false, - ItemCode = 3001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "VT.STD", - UM = "l" - }, - new - { - ItemID = 9, - CodGroup = "WindowHardware", - Cost = 65.0, - Description = "Kit standard completo AGB tipo 001", - ExtItemCode = "KIT-001", - IsService = false, - ItemCode = 5001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-KIT-001", - UM = "#" - }, - new - { - ItemID = 10, - CodGroup = "WindowHardware", - Cost = 10.0, - Description = "Cerniera AGB tipo 001", - ExtItemCode = "CERN-001", - IsService = false, - ItemCode = 5002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-CERN-001", - UM = "#" - }, - new - { - ItemID = 11, - CodGroup = "WindowHardware", - Cost = 15.0, - Description = "Serratura AGB tipo 001", - ExtItemCode = "SERR-001", - IsService = false, - ItemCode = 5003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-SERR-001", - UM = "#" - }, - new - { - ItemID = 12, - CodGroup = "WindowHardware", - Cost = 25.0, - Description = "Maniglia AGB tipo 001", - ExtItemCode = "MAN-001", - IsService = false, - ItemCode = 5004, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-MAN-001", - UM = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => - { - b.Property("SellingItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); - - b.Property("Cost") - .HasColumnType("double"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsService") - .HasColumnType("tinyint(1)"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("JobID") - .HasColumnType("int"); - - b.Property("Margin") - .HasColumnType("double"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UM") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SellingItemID"); - - b.HasIndex("JobID"); - - b.ToTable("item_selling_item"); - - b.HasData( - new - { - SellingItemID = 1, - Cost = 820.0, - Description = "Finestra anta Singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSteps = "", - JobID = 2, - Margin = 0.20000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 2, - Cost = 150.0, - Description = "Persiana anta singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSteps = "", - JobID = 1, - Margin = 0.10000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 3, - Cost = 200.0, - Description = "Installazione", - ExtItemCode = "", - IsService = true, - ItemCode = 0, - ItemSteps = "", - JobID = 1, - Margin = 0.29999999999999999, - SerStruct = "", - SupplCode = "", - UM = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SupplierModel", b => - { - b.Property("SupplierID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SupplierID"); - - b.ToTable("item_supplier"); - - b.HasData( - new - { - SupplierID = 1, - CompanyName = "Company One", - FirstName = "Supplier A", - LastName = "Egalware", - VAT = "7294857103879254" - }, - new - { - SupplierID = 2, - CompanyName = "Company Two", - FirstName = "Supplier B", - LastName = "User", - VAT = "7294857103879254" - }, - new - { - SupplierID = 3, - CompanyName = "Company Two", - FirstName = "Supplier C", - LastName = "User Test", - VAT = "7294857103879254" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", b => - { - b.Property("ProductionBatchID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("DueDate") - .HasColumnType("datetime(6)"); - - b.HasKey("ProductionBatchID"); - - b.ToTable("production_batch"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => - { - b.Property("ProdItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("OrderRowID") - .HasColumnType("int"); - - b.Property("ProductionBatchID") - .HasColumnType("int"); - - b.HasKey("ProdItemID"); - - b.HasIndex("OrderRowID"); - - b.HasIndex("ProductionBatchID"); - - b.ToTable("production_item"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => - { - b.Property("ProdItemStepID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("PhaseID") - .HasColumnType("int"); - - b.Property("ProdItemID") - .HasColumnType("int"); - - b.Property("Qty") - .HasColumnType("double"); - - b.Property("ResourceID") - .HasColumnType("int"); - - b.Property("WorkTime") - .HasColumnType("double"); - - b.HasKey("ProdItemStepID"); - - b.HasIndex("PhaseID"); - - b.HasIndex("ProdItemID"); - - b.HasIndex("ResourceID"); - - b.ToTable("production_item_step"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", b => - { - b.Property("CustomerID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CustomerID"); - - b.ToTable("sales_customer"); - - b.HasData( - new - { - CustomerID = 1, - CompanyName = "", - FirstName = "Customer A", - LastName = "Egalware", - VAT = "1234567890123456" - }, - new - { - CustomerID = 2, - CompanyName = "", - FirstName = "Customer B", - LastName = "User", - VAT = "1234567890123456" - }, - new - { - CustomerID = 3, - CompanyName = "", - FirstName = "Customer C", - LastName = "User Test", - VAT = "1234567890123456" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", b => - { - b.Property("DealerID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("DealerID"); - - b.ToTable("sales_dealer"); - - b.HasData( - new - { - DealerID = 1, - CompanyName = "Company First", - FirstName = "Dealer A", - LastName = "Egalware", - VAT = "9587362514671527" - }, - new - { - DealerID = 2, - CompanyName = "Company First", - FirstName = "Dealer B", - LastName = "User", - VAT = "9587362514671527" - }, - new - { - DealerID = 3, - CompanyName = "Company Second", - FirstName = "Dealer C", - LastName = "User Test", - VAT = "9587362514671527" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => - { - b.Property("OfferID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); - - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("OffertState") - .HasColumnType("int"); - - b.Property("RefNum") - .HasColumnType("int"); - - b.Property("RefRev") - .HasColumnType("int"); - - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("ValidUntil") - .HasColumnType("datetime(6)"); - - b.HasKey("OfferID"); - - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - - b.ToTable("sales_offer"); - - b.HasData( - new - { - OfferID = 1, - CustomerID = 2, - DealerID = 2, - Description = "Offerta per tre serramenti", - Inserted = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5787), - Modified = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5789), - OffertState = 0, - RefNum = 1, - RefRev = 1, - RefYear = 2024, - ValidUntil = new DateTime(2025, 10, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5785) - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferRowModel", b => - { - b.Property("OfferRowID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("BomOk") - .HasColumnType("tinyint(1)"); - - b.Property("BomPrice") - .HasColumnType("double"); - - b.Property("Environment") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("ItemBOM") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ItemOk") - .HasColumnType("tinyint(1)"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OfferID") - .HasColumnType("int"); - - b.Property("OfferRowUID") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Qty") - .HasColumnType("double"); - - b.Property("RowNum") - .HasColumnType("int"); - - b.Property("SellingItemID") - .HasColumnType("int"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StepCost") - .HasColumnType("double"); - - b.Property("StepPrice") - .HasColumnType("double"); - - b.HasKey("OfferRowID"); - - b.HasIndex("OfferID"); - - b.HasIndex("SellingItemID"); - - b.ToTable("sales_offer_row"); - - b.HasData( - new - { - OfferRowID = 1, - BomCost = 950.0, - BomOk = true, - BomPrice = 0.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5885), - ItemBOM = "", - ItemOk = true, - ItemSteps = "{}", - Modified = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5887), - Note = "Finestra anta singola 2025", - OfferID = 1, - OfferRowUID = "OFF250000000001", - Qty = 3.0, - RowNum = 1, - SellingItemID = 1, - SerStruct = "{}", - StepCost = 0.0, - StepPrice = 0.0 - }, - new - { - OfferRowID = 2, - BomCost = 160.0, - BomOk = true, - BomPrice = 0.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5906), - ItemBOM = "", - ItemOk = true, - ItemSteps = "{}", - Modified = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5908), - Note = "Persiana per Finestra anta singola 2025", - OfferID = 1, - OfferRowUID = "OFF250000000002", - Qty = 3.0, - RowNum = 2, - SellingItemID = 2, - SerStruct = "{}", - StepCost = 0.0, - StepPrice = 0.0 - }, - new - { - OfferRowID = 3, - BomCost = 200.0, - BomOk = true, - BomPrice = 0.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5920), - ItemBOM = "", - ItemOk = true, - ItemSteps = "{}", - Modified = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5922), - Note = "Installazione serramento", - OfferID = 1, - OfferRowUID = "OFF250000000003", - Qty = 3.0, - RowNum = 3, - SellingItemID = 3, - SerStruct = "{}", - StepCost = 0.0, - StepPrice = 0.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", b => - { - b.Property("OrderID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); - - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("OfferID") - .HasColumnType("int"); - - b.Property("OffertState") - .HasColumnType("int"); - - b.Property("RefNum") - .HasColumnType("int"); - - b.Property("RefRev") - .HasColumnType("int"); - - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("ValidUntil") - .HasColumnType("datetime(6)"); - - b.HasKey("OrderID"); - - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - - b.HasIndex("OfferID"); - - b.ToTable("sales_order"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => - { - b.Property("OrderRowID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("BomPrice") - .HasColumnType("double"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrderID") - .HasColumnType("int"); - - b.Property("Qty") - .HasColumnType("double"); - - b.Property("RowNum") - .HasColumnType("int"); - - b.Property("SellingItemID") - .HasColumnType("int"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StepCost") - .HasColumnType("double"); - - b.Property("StepPrice") - .HasColumnType("double"); - - b.HasKey("OrderRowID"); - - b.HasIndex("OrderID"); - - b.HasIndex("SellingItemID"); - - b.ToTable("sales_order_row"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => - { - b.Property("StockMovID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); - - b.Property("CodDoc") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("DtCreate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DtMod") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); - - b.Property("MovCod") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QtyRec") - .HasColumnType("double"); - - b.Property("StockStatusId") - .HasColumnType("int"); - - b.Property("UnitVal") - .HasColumnType("double"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("StockMovID"); - - b.HasIndex("MovCod"); - - b.HasIndex("StockStatusId"); - - b.ToTable("stock_mov"); - - b.HasData( - new - { - StockMovID = 1, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5439), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5482), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 5.0, - StockStatusId = 1, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 2, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5485), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5487), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 8.0, - StockStatusId = 2, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 3, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5489), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5491), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 5.0, - StockStatusId = 3, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 4, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5493), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5495), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 4, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 5, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5497), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5499), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 10.0, - StockStatusId = 5, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 6, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5501), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5503), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 6, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 7, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5505), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5507), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 50.0, - StockStatusId = 7, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 8, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5509), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5511), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 8, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 9, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5514), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5515), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 9, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 10, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5518), - DtMod = new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5519), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 10, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => - { - b.Property("StockStatusId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); - - b.Property("IsDeleted") - .HasColumnType("tinyint(1)"); - - b.Property("IsRemn") - .HasColumnType("tinyint(1)"); - - b.Property("ItemID") - .HasColumnType("int"); - - b.Property("Location") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QtyAvail") - .HasColumnType("double"); - - b.HasKey("StockStatusId"); - - b.HasIndex("ItemID"); - - b.ToTable("stock_status"); - - b.HasData( - new - { - StockStatusId = 1, - IsDeleted = false, - IsRemn = false, - ItemID = 1, - Location = "B001-001-003", - QtyAvail = 5.0 - }, - new - { - StockStatusId = 2, - IsDeleted = false, - IsRemn = false, - ItemID = 2, - Location = "B001-001-002", - QtyAvail = 8.0 - }, - new - { - StockStatusId = 3, - IsDeleted = false, - IsRemn = false, - ItemID = 3, - Location = "B001-001-001", - QtyAvail = 5.0 - }, - new - { - StockStatusId = 4, - IsDeleted = false, - IsRemn = false, - ItemID = 4, - Location = "V002-001-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 5, - IsDeleted = false, - IsRemn = false, - ItemID = 5, - Location = "V001-001-002", - QtyAvail = 10.0 - }, - new - { - StockStatusId = 6, - IsDeleted = false, - IsRemn = false, - ItemID = 6, - Location = "V001-001-003", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 7, - IsDeleted = false, - IsRemn = false, - ItemID = 8, - Location = "V001-001-003", - QtyAvail = 50.0 - }, - new - { - StockStatusId = 8, - IsDeleted = false, - IsRemn = false, - ItemID = 11, - Location = "S001-002-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 9, - IsDeleted = false, - IsRemn = false, - ItemID = 9, - Location = "S001-002-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 10, - IsDeleted = false, - IsRemn = false, - ItemID = 10, - Location = "S001-001-001", - QtyAvail = 1.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => - { - b.Property("JobID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("JobID"); - - b.ToTable("task_job"); - - b.HasData( - new - { - JobID = 1, - Description = "Rivendita / servizi" - }, - new - { - JobID = 2, - Description = "Serramento Completo Legno su linea Saomad e installatore interno" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => - { - b.Property("JobStepItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("ItemID") - .HasColumnType("int"); - - b.Property("JobStepID") - .HasColumnType("int"); - - b.Property("Qty") - .HasColumnType("double"); - - b.HasKey("JobStepItemID"); - - b.HasIndex("ItemID"); - - b.HasIndex("JobStepID"); - - b.ToTable("task_job_step_item"); - - b.HasData( - new - { - JobStepItemID = 1, - Description = "Grezzo legno abete", - Index = 1, - ItemID = 1, - JobStepID = 1, - Qty = 1.0 - }, - new - { - JobStepItemID = 2, - Description = "Vernice trasparente standard 1L", - Index = 2, - ItemID = 8, - JobStepID = 3, - Qty = 0.10000000000000001 - }, - new - { - JobStepItemID = 3, - Description = "Ferramenta AGB - rif. AGFD.00000.00000", - Index = 3, - ItemID = 9, - JobStepID = 4, - Qty = 1.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => - { - b.Property("JobStepID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); - - b.Property("CostDriverID") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("JobID") - .HasColumnType("int"); - - b.Property("PhaseID") - .HasColumnType("int"); - - b.Property("ProductivityRate") - .HasColumnType("decimal(65,30)"); - - b.Property("ResourceID") - .HasColumnType("int"); - - b.HasKey("JobStepID"); - - b.HasIndex("CostDriverID"); - - b.HasIndex("JobID"); - - b.HasIndex("PhaseID"); - - b.HasIndex("ResourceID"); - - b.ToTable("task_job_step"); - - b.HasData( - new - { - JobStepID = 1, - CostDriverID = 3, - Description = "", - Index = 1, - JobID = 2, - PhaseID = 1, - ProductivityRate = 1m, - ResourceID = 1 - }, - new - { - JobStepID = 2, - CostDriverID = 2, - Description = "", - Index = 2, - JobID = 2, - PhaseID = 2, - ProductivityRate = 1m, - ResourceID = 2 - }, - new - { - JobStepID = 3, - CostDriverID = 3, - Description = "", - Index = 3, - JobID = 2, - PhaseID = 3, - ProductivityRate = 1m, - ResourceID = 4 - }, - new - { - JobStepID = 4, - CostDriverID = 3, - Description = "", - Index = 4, - JobID = 2, - PhaseID = 4, - ProductivityRate = 1m, - ResourceID = 6 - }, - new - { - JobStepID = 5, - CostDriverID = 3, - Description = "", - Index = 5, - JobID = 2, - PhaseID = 6, - ProductivityRate = 1m, - ResourceID = 7 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", b => - { - b.Property("PhaseID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("PhaseID"); - - b.ToTable("task_phase"); - - b.HasData( - new - { - PhaseID = 1, - Description = "Taglio tronchetti" - }, - new - { - PhaseID = 2, - Description = "Lavorazione pezzi serramento" - }, - new - { - PhaseID = 3, - Description = "Verniciatura" - }, - new - { - PhaseID = 4, - Description = "Assemblaggio completo" - }, - new - { - PhaseID = 5, - Description = "Assemblaggio Ferramenta" - }, - new - { - PhaseID = 6, - Description = "Installazione e posa in opera" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.CounterModel", b => - { - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("CountName") - .HasColumnType("varchar(255)"); - - b.Property("Counter") - .HasColumnType("int"); - - b.HasKey("RefYear", "CountName"); - - b.ToTable("utils_counter"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => - { - b.Property("ClassCod") - .HasColumnType("varchar(255)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("ClassCod"); - - b.ToTable("utils_gen_class"); - - b.HasData( - new - { - ClassCod = "WoodMat", - Description = "Elenco Materiali Legno" - }, - new - { - ClassCod = "WoodCol", - Description = "Elenco Colori Legno" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => - { - b.Property("GenValID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); - - b.Property("ClassCod") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Ordinal") - .HasColumnType("int"); - - b.Property("ValString") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("GenValID"); - - b.HasIndex("ClassCod"); - - b.ToTable("utils_gen_value"); - - 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 = "Legno" - }, - 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.Utils.MovTypeModel", b => - { - b.Property("MovCod") - .HasColumnType("varchar(255)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("MovCod"); - - b.ToTable("utils_mov_type"); - - b.HasData( - new - { - MovCod = "CAR", - Description = "Carico a magazzino" - }, - new - { - MovCod = "MOV", - Description = "Movimento interno (spostamento)" - }, - new - { - MovCod = "ND", - Description = "Non Definito" - }, - new - { - MovCod = "OFOR", - Description = "Ordine Fornitore" - }, - new - { - MovCod = "RETT", - Description = "Rettifica magazzino" - }, - new - { - MovCod = "SCAR", - Description = "Scarico da magazzino" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", b => - { - b.Property("TagID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("TagID"); - - b.ToTable("utils_tags"); - - b.HasData( - new - { - TagID = 1, - Description = "Tag 01" - }, - new - { - TagID = 2, - Description = "Tag 02" - }, - new - { - TagID = 3, - Description = "Tag 03" - }, - new - { - TagID = 4, - Description = "Tag 04" - }, - new - { - TagID = 5, - Description = "Tag 05" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") - .WithMany() - .HasForeignKey("CostDriverID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("DriverNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", "ItemGroupNav") - .WithMany() - .HasForeignKey("CodGroup") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemGroupNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") - .WithMany() - .HasForeignKey("JobID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("JobNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", "OrderRowNav") - .WithMany() - .HasForeignKey("OrderRowID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", "ProductionBatchNav") - .WithMany() - .HasForeignKey("ProductionBatchID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OrderRowNav"); - - b.Navigation("ProductionBatchNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") - .WithMany() - .HasForeignKey("PhaseID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", "ProdItemNav") - .WithMany() - .HasForeignKey("ProdItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") - .WithMany() - .HasForeignKey("ResourceID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("PhaseNav"); - - b.Navigation("ProdItemNav"); - - b.Navigation("ResourceNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", 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.OfferRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") - .WithMany("OfferRowNav") - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OfferNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", 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.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") - .WithMany() - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CustomerNav"); - - b.Navigation("DealerNav"); - - b.Navigation("OfferNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", "OrderNav") - .WithMany() - .HasForeignKey("OrderID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OrderNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", "MovTypeNav") - .WithMany() - .HasForeignKey("MovCod") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", "StockStatusNav") - .WithMany() - .HasForeignKey("StockStatusId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("MovTypeNav"); - - b.Navigation("StockStatusNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") - .WithMany() - .HasForeignKey("ItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") - .WithMany() - .HasForeignKey("ItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", "JobStepNav") - .WithMany() - .HasForeignKey("JobStepID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemNav"); - - b.Navigation("JobStepNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") - .WithMany() - .HasForeignKey("CostDriverID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") - .WithMany("JobStepNav") - .HasForeignKey("JobID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") - .WithMany() - .HasForeignKey("PhaseID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") - .WithMany() - .HasForeignKey("ResourceID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("DriverNav"); - - b.Navigation("JobNav"); - - b.Navigation("PhaseNav"); - - b.Navigation("ResourceNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", "GenClassNav") - .WithMany("GenValNav") - .HasForeignKey("ClassCod") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("GenClassNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => - { - b.Navigation("OfferRowNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => - { - b.Navigation("JobStepNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => - { - b.Navigation("GenValNav"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20250923101803_AddOffertDiscount.cs b/EgwCoreLib.Lux.Data/Migrations/20250923101803_AddOffertDiscount.cs deleted file mode 100644 index 7941f9c6..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20250923101803_AddOffertDiscount.cs +++ /dev/null @@ -1,226 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EgwCoreLib.Lux.Data.Migrations -{ - /// - public partial class AddOffertDiscount : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "Discount", - table: "sales_offer", - type: "double", - nullable: false, - defaultValue: 0.0); - - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 1, - columns: new[] { "Discount", "Inserted", "Modified", "ValidUntil" }, - values: new object[] { 0.0, new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3122), new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3124), new DateTime(2025, 10, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3117) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 1, - columns: new[] { "BomCost", "BomPrice", "Inserted", "Modified" }, - values: new object[] { 900.0, 950.0, new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3264), new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3266) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 2, - columns: new[] { "BomPrice", "Inserted", "Modified" }, - values: new object[] { 200.0, new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3279), new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3280) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 3, - columns: new[] { "BomPrice", "Inserted", "Modified" }, - values: new object[] { 250.0, new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3291), new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3292) }); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 1, - column: "DtCreate", - value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2709)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 2, - column: "DtCreate", - value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2790)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 3, - column: "DtCreate", - value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2793)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 4, - column: "DtCreate", - value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2797)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 5, - column: "DtCreate", - value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2801)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 6, - column: "DtCreate", - value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2804)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 7, - column: "DtCreate", - value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2808)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 8, - column: "DtCreate", - value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2811)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 9, - column: "DtCreate", - value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2815)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 10, - column: "DtCreate", - value: new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2819)); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "Discount", - table: "sales_offer"); - - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 1, - columns: new[] { "Inserted", "Modified", "ValidUntil" }, - values: new object[] { new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5787), new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5789), new DateTime(2025, 10, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5785) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 1, - columns: new[] { "BomCost", "BomPrice", "Inserted", "Modified" }, - values: new object[] { 950.0, 0.0, new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5885), new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5887) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 2, - columns: new[] { "BomPrice", "Inserted", "Modified" }, - values: new object[] { 0.0, new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5906), new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5908) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 3, - columns: new[] { "BomPrice", "Inserted", "Modified" }, - values: new object[] { 0.0, new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5920), new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5922) }); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 1, - column: "DtCreate", - value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5439)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 2, - column: "DtCreate", - value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5485)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 3, - column: "DtCreate", - value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5489)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 4, - column: "DtCreate", - value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5493)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 5, - column: "DtCreate", - value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5497)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 6, - column: "DtCreate", - value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5501)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 7, - column: "DtCreate", - value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5505)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 8, - column: "DtCreate", - value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5509)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 9, - column: "DtCreate", - value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5514)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 10, - column: "DtCreate", - value: new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5518)); - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20250923101803_AddOffertDiscount.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20250929142415_InitDb.Designer.cs similarity index 95% rename from EgwCoreLib.Lux.Data/Migrations/20250923101803_AddOffertDiscount.Designer.cs rename to EgwCoreLib.Lux.Data/Migrations/20250929142415_InitDb.Designer.cs index 3cb595ae..e17896ef 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20250923101803_AddOffertDiscount.Designer.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20250929142415_InitDb.Designer.cs @@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace EgwCoreLib.Lux.Data.Migrations { [DbContext(typeof(DataLayerContext))] - [Migration("20250923101803_AddOffertDiscount")] - partial class AddOffertDiscount + [Migration("20250929142415_InitDb")] + partial class InitDb { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -910,6 +910,9 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("Discount") .HasColumnType("double"); + b.Property("Envir") + .HasColumnType("int"); + b.Property("Inserted") .HasColumnType("datetime(6)"); @@ -947,13 +950,14 @@ namespace EgwCoreLib.Lux.Data.Migrations DealerID = 2, Description = "Offerta per tre serramenti", Discount = 0.0, - Inserted = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3122), - Modified = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3124), + Envir = 1, + Inserted = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4738), + Modified = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4739), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 10, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3117) + ValidUntil = new DateTime(2025, 10, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4735) }); }); @@ -965,6 +969,12 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); + b.Property("AwaitBom") + .HasColumnType("tinyint(1)"); + + b.Property("AwaitPrice") + .HasColumnType("tinyint(1)"); + b.Property("BomCost") .HasColumnType("double"); @@ -974,9 +984,8 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("BomPrice") .HasColumnType("double"); - b.Property("Environment") - .IsRequired() - .HasColumnType("longtext"); + b.Property("Envir") + .HasColumnType("int"); b.Property("Inserted") .HasColumnType("datetime(6)"); @@ -1037,15 +1046,17 @@ namespace EgwCoreLib.Lux.Data.Migrations new { OfferRowID = 1, + AwaitBom = false, + AwaitPrice = false, BomCost = 900.0, BomOk = true, BomPrice = 950.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3264), + Envir = 1, + Inserted = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4848), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3266), + Modified = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4850), Note = "Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000001", @@ -1059,15 +1070,17 @@ namespace EgwCoreLib.Lux.Data.Migrations new { OfferRowID = 2, + AwaitBom = false, + AwaitPrice = false, BomCost = 160.0, BomOk = true, BomPrice = 200.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3279), + Envir = 1, + Inserted = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4862), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3280), + Modified = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4864), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000002", @@ -1081,15 +1094,17 @@ namespace EgwCoreLib.Lux.Data.Migrations new { OfferRowID = 3, + AwaitBom = false, + AwaitPrice = false, BomCost = 200.0, BomOk = true, BomPrice = 250.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3291), + Envir = 1, + Inserted = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4874), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3292), + Modified = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4875), Note = "Installazione serramento", OfferID = 1, OfferRowUID = "OFF250000000003", @@ -1272,8 +1287,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 1, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2709), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2786), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4416), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4472), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1285,8 +1300,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2790), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2791), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4475), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4476), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -1298,8 +1313,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2793), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2795), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4479), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4480), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1311,8 +1326,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2797), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2798), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4482), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4484), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1324,8 +1339,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2801), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2802), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4486), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4487), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -1337,8 +1352,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2804), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2806), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4490), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4491), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1350,8 +1365,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2808), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2809), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4493), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4495), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -1363,8 +1378,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2811), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2813), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4497), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4498), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1376,8 +1391,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2815), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2817), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4501), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4502), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1389,8 +1404,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2819), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2820), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4504), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4506), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, diff --git a/EgwCoreLib.Lux.Data/Migrations/20250919165643_InitDb.cs b/EgwCoreLib.Lux.Data/Migrations/20250929142415_InitDb.cs similarity index 94% rename from EgwCoreLib.Lux.Data/Migrations/20250919165643_InitDb.cs rename to EgwCoreLib.Lux.Data/Migrations/20250929142415_InitDb.cs index 3709126f..e89697d0 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20250919165643_InitDb.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20250929142415_InitDb.cs @@ -295,6 +295,7 @@ namespace EgwCoreLib.Lux.Data.Migrations { OfferID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Envir = table.Column(type: "int", nullable: false), RefYear = table.Column(type: "int", nullable: false), RefNum = table.Column(type: "int", nullable: false), RefRev = table.Column(type: "int", nullable: false), @@ -305,7 +306,8 @@ namespace EgwCoreLib.Lux.Data.Migrations ValidUntil = table.Column(type: "datetime(6)", nullable: false), Inserted = table.Column(type: "datetime(6)", nullable: false), Modified = table.Column(type: "datetime(6)", nullable: false), - OffertState = table.Column(type: "int", nullable: false) + OffertState = table.Column(type: "int", nullable: false), + Discount = table.Column(type: "double", nullable: false) }, constraints: table => { @@ -506,8 +508,7 @@ namespace EgwCoreLib.Lux.Data.Migrations .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), OfferID = table.Column(type: "int", nullable: false), RowNum = table.Column(type: "int", nullable: false), - Environment = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), + Envir = table.Column(type: "int", nullable: false), OfferRowUID = table.Column(type: "longtext", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), SellingItemID = table.Column(type: "int", nullable: false), @@ -527,7 +528,9 @@ namespace EgwCoreLib.Lux.Data.Migrations Note = table.Column(type: "longtext", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Inserted = table.Column(type: "datetime(6)", nullable: false), - Modified = table.Column(type: "datetime(6)", nullable: false) + Modified = table.Column(type: "datetime(6)", nullable: false), + AwaitBom = table.Column(type: "tinyint(1)", nullable: false), + AwaitPrice = table.Column(type: "tinyint(1)", nullable: false) }, constraints: table => { @@ -881,8 +884,8 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.InsertData( table: "sales_offer", - columns: new[] { "OfferID", "CustomerID", "DealerID", "Description", "Inserted", "Modified", "OffertState", "RefNum", "RefRev", "RefYear", "ValidUntil" }, - values: new object[] { 1, 2, 2, "Offerta per tre serramenti", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5787), new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5789), 0, 1, 1, 2024, new DateTime(2025, 10, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5785) }); + columns: new[] { "OfferID", "CustomerID", "DealerID", "Description", "Discount", "Envir", "Inserted", "Modified", "OffertState", "RefNum", "RefRev", "RefYear", "ValidUntil" }, + values: new object[] { 1, 2, 2, "Offerta per tre serramenti", 0.0, 1, new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4738), new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4739), 0, 1, 1, 2024, new DateTime(2025, 10, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4735) }); migrationBuilder.InsertData( table: "utils_gen_value", @@ -899,12 +902,12 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.InsertData( table: "sales_offer_row", - columns: new[] { "OfferRowID", "BomCost", "BomOk", "BomPrice", "Environment", "Inserted", "ItemBOM", "ItemOk", "ItemSteps", "Modified", "Note", "OfferID", "OfferRowUID", "Qty", "RowNum", "SellingItemID", "SerStruct", "StepCost", "StepPrice" }, + columns: new[] { "OfferRowID", "AwaitBom", "AwaitPrice", "BomCost", "BomOk", "BomPrice", "Envir", "Inserted", "ItemBOM", "ItemOk", "ItemSteps", "Modified", "Note", "OfferID", "OfferRowUID", "Qty", "RowNum", "SellingItemID", "SerStruct", "StepCost", "StepPrice" }, values: new object[,] { - { 1, 950.0, true, 0.0, "WINDOW", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5885), "", true, "{}", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5887), "Finestra anta singola 2025", 1, "OFF250000000001", 3.0, 1, 1, "{}", 0.0, 0.0 }, - { 2, 160.0, true, 0.0, "WINDOW", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5906), "", true, "{}", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5908), "Persiana per Finestra anta singola 2025", 1, "OFF250000000002", 3.0, 2, 2, "{}", 0.0, 0.0 }, - { 3, 200.0, true, 0.0, "WINDOW", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5920), "", true, "{}", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5922), "Installazione serramento", 1, "OFF250000000003", 3.0, 3, 3, "{}", 0.0, 0.0 } + { 1, false, false, 900.0, true, 950.0, 1, new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4848), "", true, "{}", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4850), "Finestra anta singola 2025", 1, "OFF250000000001", 3.0, 1, 1, "{}", 0.0, 0.0 }, + { 2, false, false, 160.0, true, 200.0, 1, new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4862), "", true, "{}", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4864), "Persiana per Finestra anta singola 2025", 1, "OFF250000000002", 3.0, 2, 2, "{}", 0.0, 0.0 }, + { 3, false, false, 200.0, true, 250.0, 1, new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4874), "", true, "{}", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4875), "Installazione serramento", 1, "OFF250000000003", 3.0, 3, 3, "{}", 0.0, 0.0 } }); migrationBuilder.InsertData( @@ -941,16 +944,16 @@ namespace EgwCoreLib.Lux.Data.Migrations columns: new[] { "StockMovID", "CodDoc", "DtCreate", "MovCod", "Note", "QtyRec", "StockStatusId", "UnitVal", "UserId" }, values: new object[,] { - { 1, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5439), "CAR", "DEMO", 5.0, 1, 0.0, "samuele.locatelli@egalware.com" }, - { 2, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5485), "CAR", "DEMO", 8.0, 2, 0.0, "samuele.locatelli@egalware.com" }, - { 3, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5489), "CAR", "DEMO", 5.0, 3, 0.0, "samuele.locatelli@egalware.com" }, - { 4, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5493), "CAR", "DEMO", 1.0, 4, 0.0, "samuele.locatelli@egalware.com" }, - { 5, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5497), "CAR", "DEMO", 10.0, 5, 0.0, "samuele.locatelli@egalware.com" }, - { 6, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5501), "CAR", "DEMO", 1.0, 6, 0.0, "samuele.locatelli@egalware.com" }, - { 7, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5505), "CAR", "DEMO", 50.0, 7, 0.0, "samuele.locatelli@egalware.com" }, - { 8, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5509), "CAR", "DEMO", 1.0, 8, 0.0, "samuele.locatelli@egalware.com" }, - { 9, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5514), "CAR", "DEMO", 1.0, 9, 0.0, "samuele.locatelli@egalware.com" }, - { 10, "", new DateTime(2025, 9, 19, 18, 56, 43, 487, DateTimeKind.Local).AddTicks(5518), "CAR", "DEMO", 1.0, 10, 0.0, "samuele.locatelli@egalware.com" } + { 1, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4416), "CAR", "DEMO", 5.0, 1, 0.0, "samuele.locatelli@egalware.com" }, + { 2, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4475), "CAR", "DEMO", 8.0, 2, 0.0, "samuele.locatelli@egalware.com" }, + { 3, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4479), "CAR", "DEMO", 5.0, 3, 0.0, "samuele.locatelli@egalware.com" }, + { 4, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4482), "CAR", "DEMO", 1.0, 4, 0.0, "samuele.locatelli@egalware.com" }, + { 5, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4486), "CAR", "DEMO", 10.0, 5, 0.0, "samuele.locatelli@egalware.com" }, + { 6, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4490), "CAR", "DEMO", 1.0, 6, 0.0, "samuele.locatelli@egalware.com" }, + { 7, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4493), "CAR", "DEMO", 50.0, 7, 0.0, "samuele.locatelli@egalware.com" }, + { 8, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4497), "CAR", "DEMO", 1.0, 8, 0.0, "samuele.locatelli@egalware.com" }, + { 9, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4501), "CAR", "DEMO", 1.0, 9, 0.0, "samuele.locatelli@egalware.com" }, + { 10, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4504), "CAR", "DEMO", 1.0, 10, 0.0, "samuele.locatelli@egalware.com" } }); migrationBuilder.InsertData( diff --git a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs index 498f6293..1fbe80cd 100644 --- a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs +++ b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs @@ -907,6 +907,9 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("Discount") .HasColumnType("double"); + b.Property("Envir") + .HasColumnType("int"); + b.Property("Inserted") .HasColumnType("datetime(6)"); @@ -944,13 +947,14 @@ namespace EgwCoreLib.Lux.Data.Migrations DealerID = 2, Description = "Offerta per tre serramenti", Discount = 0.0, - Inserted = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3122), - Modified = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3124), + Envir = 1, + Inserted = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4738), + Modified = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4739), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 10, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3117) + ValidUntil = new DateTime(2025, 10, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4735) }); }); @@ -962,6 +966,12 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); + b.Property("AwaitBom") + .HasColumnType("tinyint(1)"); + + b.Property("AwaitPrice") + .HasColumnType("tinyint(1)"); + b.Property("BomCost") .HasColumnType("double"); @@ -971,9 +981,8 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("BomPrice") .HasColumnType("double"); - b.Property("Environment") - .IsRequired() - .HasColumnType("longtext"); + b.Property("Envir") + .HasColumnType("int"); b.Property("Inserted") .HasColumnType("datetime(6)"); @@ -1034,15 +1043,17 @@ namespace EgwCoreLib.Lux.Data.Migrations new { OfferRowID = 1, + AwaitBom = false, + AwaitPrice = false, BomCost = 900.0, BomOk = true, BomPrice = 950.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3264), + Envir = 1, + Inserted = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4848), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3266), + Modified = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4850), Note = "Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000001", @@ -1056,15 +1067,17 @@ namespace EgwCoreLib.Lux.Data.Migrations new { OfferRowID = 2, + AwaitBom = false, + AwaitPrice = false, BomCost = 160.0, BomOk = true, BomPrice = 200.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3279), + Envir = 1, + Inserted = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4862), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3280), + Modified = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4864), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000002", @@ -1078,15 +1091,17 @@ namespace EgwCoreLib.Lux.Data.Migrations new { OfferRowID = 3, + AwaitBom = false, + AwaitPrice = false, BomCost = 200.0, BomOk = true, BomPrice = 250.0, - Environment = "WINDOW", - Inserted = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3291), + Envir = 1, + Inserted = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4874), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(3292), + Modified = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4875), Note = "Installazione serramento", OfferID = 1, OfferRowUID = "OFF250000000003", @@ -1269,8 +1284,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 1, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2709), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2786), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4416), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4472), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1282,8 +1297,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2790), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2791), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4475), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4476), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -1295,8 +1310,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2793), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2795), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4479), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4480), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1308,8 +1323,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2797), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2798), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4482), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4484), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1321,8 +1336,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2801), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2802), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4486), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4487), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -1334,8 +1349,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2804), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2806), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4490), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4491), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1347,8 +1362,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2808), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2809), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4493), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4495), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -1360,8 +1375,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2811), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2813), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4497), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4498), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1373,8 +1388,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2815), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2817), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4501), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4502), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1386,8 +1401,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - DtCreate = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2819), - DtMod = new DateTime(2025, 9, 23, 12, 18, 3, 279, DateTimeKind.Local).AddTicks(2820), + DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4504), + DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4506), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 732cc7df..0e1e266f 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2509.2418 + 0.9.2509.2916 @@ -66,7 +66,6 @@ - diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index 5d57d561..3d5d53b1 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -73,12 +73,13 @@ else @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit) { - + + @* *@ }
@item.OfferRowUID
- @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit && !string.IsNullOrEmpty(item.ItemBOM)) + @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit && !string.IsNullOrEmpty(item.SerStruct) && item.SerStruct.Length>2) { } diff --git a/Lux.UI/Components/Pages/Home.razor b/Lux.UI/Components/Pages/Home.razor index 1e3e1717..7b1ad246 100644 --- a/Lux.UI/Components/Pages/Home.razor +++ b/Lux.UI/Components/Pages/Home.razor @@ -1,8 +1,37 @@ @page "/" @page "/Home" -Home +LUX -

Hello, world!

- -Welcome to your new app. +
+

LUX Wood MES

+ Development Version +
+
+
+
    +
  • Sezioni Attive
  • +
  • Anagrafiche generiche
  • +
  • Articoli
  • +
  • Offerte e ricalcoli
  • +
+
+
+
    +
  • Sezioni in sviluppo
  • +
  • Configuratore
  • +
  • Cicli
  • +
  • Ordini
  • +
  • Sistema Costing
  • +
+
+
+
    +
  • Sezioni TBD
  • +
  • Pianificazione Produzione
  • +
  • Rilievo produzione
  • +
  • Consuntivazione
  • +
  • Stampe
  • +
+
+
\ No newline at end of file diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 7ea41b3b..6dc24151 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2509.2418 + 0.9.2509.2916 @@ -21,7 +21,6 @@ - diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 4092c32d..a7b84496 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 0.9.2509.2418

+

Versione: 0.9.2509.2916


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 683e8e87..d5241621 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2509.2418 +0.9.2509.2916 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 55662aee..a3cb7903 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2509.2418 + 0.9.2509.2916 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From c27c727dd2b96f1cfcbf12244af4f70605e88741 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 30 Sep 2025 07:27:33 +0200 Subject: [PATCH 30/65] Integrazione nuget librerie base windows, aggiunta servizio base deserializzazione elenco hw --- .../EgwCoreLib.Lux.Core.csproj | 1 + .../Services/ConfigDataService.cs | 52 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 EgwCoreLib.Lux.Data/Services/ConfigDataService.cs diff --git a/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj b/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj index 1c8405f1..405277ae 100644 --- a/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj +++ b/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj @@ -21,6 +21,7 @@ + diff --git a/EgwCoreLib.Lux.Data/Services/ConfigDataService.cs b/EgwCoreLib.Lux.Data/Services/ConfigDataService.cs new file mode 100644 index 00000000..bd6b9365 --- /dev/null +++ b/EgwCoreLib.Lux.Data/Services/ConfigDataService.cs @@ -0,0 +1,52 @@ +using EgwCoreLib.Lux.Core.RestPayload; +using EgwCoreLib.Lux.Data.Controllers; +using EgwMultiEngineManager.Data; +using Microsoft.Extensions.Configuration; +using Newtonsoft.Json; +using NLog; +using StackExchange.Redis; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EgwCoreLib.Lux.Data.Services +{ + public class ConfigDataService : BaseServ + { + + public ConfigDataService(IConfiguration configuration, IConnectionMultiplexer RedisConn) : base(configuration, RedisConn) + { + // init implicito + Log.Info($"ConfigDataService | Init OK"); + } + + /// + /// restituisce l'elenco dell'HW valido in memoria + /// + /// + public List ElencoHw(Constants.EXECENVIRONMENTS execEnvironment, string HwReq = "HW.AGB") + { + List result = new List(); + // leggo obj da redis cache + var currKey = $"{redisBaseKey}:{execEnvironment}:HML:{HwReq}"; + RedisValue rawData = redisDb.StringGet(currKey); + // prendo solo i valori validi (Description <> FamilyName) + if (rawData.HasValue) + { + var currList = JsonConvert.DeserializeObject>($"{rawData}"); + result = currList ?? new List(); + //var currList = JsonConvert.DeserializeObject($"{rawData}"); + //if (currList != null && currList.ListItem != null) + //{ + // result = currList.ListItem; + //} + } + return result; + } + + private static Logger Log = LogManager.GetCurrentClassLogger(); + private string redisBaseKey = "Lux"; + } +} From 23abaeedfffbab190645721b21c8e856c84b7661 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 30 Sep 2025 07:27:58 +0200 Subject: [PATCH 31/65] Update API x elenco hwlist (get) --- Lux.API/Controllers/WindowController.cs | 51 +++++++++++++++++++++++-- Lux.API/Lux.API.csproj | 4 +- Lux.API/Program.cs | 1 + 3 files changed, 50 insertions(+), 6 deletions(-) diff --git a/Lux.API/Controllers/WindowController.cs b/Lux.API/Controllers/WindowController.cs index a1df77c4..745bd05e 100644 --- a/Lux.API/Controllers/WindowController.cs +++ b/Lux.API/Controllers/WindowController.cs @@ -13,11 +13,12 @@ namespace Lux.API.Controllers { #region Public Constructors - public WindowController(IConfiguration config, IRedisService redisService, ImageCacheService imgServ) + public WindowController(IConfiguration config, IRedisService redisService, ImageCacheService imgServ, ConfigDataService confServ) { _config = config; _redisService = redisService; _imgService = imgServ; + _confService = confServ; pubChannel = _config.GetValue("ServerConf:PubChannel") ?? ""; } @@ -75,7 +76,7 @@ namespace Lux.API.Controllers } /// - /// Chiamata GET: riceve Json in formato serializzato, invia richiesta modo 3 (HardwareModelList) + /// Chiamata GET: invia richiesta modo 3 (HardwareModelList) che sarà poi salvata /// GET: api/window/hwlist /// /// id oggetto @@ -86,6 +87,19 @@ namespace Lux.API.Controllers Stopwatch sw = new Stopwatch(); sw.Start(); string hwContent = ""; + await sendHwReq(); + hwContent = "DONE"; + sw.Stop(); + Log.Info($"getHardwareList | {sw.Elapsed.TotalMilliseconds:N3} ms"); + return Ok(hwContent); + } + + /// + /// Esegue invio effettivo richiesta elenco HW list + /// + /// + private async Task sendHwReq() + { Dictionary DictExec = new Dictionary(); DictExec.Add("Mode", $"{(int)Enums.EngineQueryType.HardwareModelList}"); // da rivedere? @@ -96,10 +110,38 @@ namespace Lux.API.Controllers // da modificare con tipo richiesta... QuestionDTO currArgs = new QuestionDTO(nId, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, DictExec); await _redisService.PublishAsync(pubChannel, currArgs.sProcessArgs); - hwContent = "DONE"; + } + + /// + /// Chiamata GET: + /// - se trova in cache risponde con elenco hw già ricevuto + /// - se non trova invia richiesta modo 3 (HardwareModelList) che sarà poi salvata + /// GET: api/window/hwlist/nome_produttore + /// + /// nome del produttore, es HW.AGB (default) + /// + [HttpGet("hwlist/{id}")] + public async Task>> getHardwareList(string id) + { + Stopwatch sw = new Stopwatch(); + sw.Start(); + string hwReq = id ?? "HW.AGB"; + var answ = _confService.ElencoHw(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, hwReq); + if (answ == null || answ.Count == 0) + { + await sendHwReq(); + answ = new List(); + } + // filtro quelli default/non significativi (famili=descript) + else + { + answ = answ + .Where(x => !x.FamilyName.Equals(x.Description, StringComparison.OrdinalIgnoreCase)) + .ToList(); + } sw.Stop(); Log.Info($"getHardwareList | {sw.Elapsed.TotalMilliseconds:N3} ms"); - return Ok(hwContent); + return Ok(answ); } /// @@ -224,6 +266,7 @@ namespace Lux.API.Controllers #region Private Properties private ImageCacheService _imgService { get; set; } + private ConfigDataService _confService { get; set; } #endregion Private Properties } diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 0e1e266f..f2cb7dc7 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2509.2916 + 0.9.2509.3007 @@ -65,7 +65,7 @@ - + diff --git a/Lux.API/Program.cs b/Lux.API/Program.cs index d7ef54a3..86926adb 100644 --- a/Lux.API/Program.cs +++ b/Lux.API/Program.cs @@ -48,6 +48,7 @@ builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddHostedService(); +builder.Services.AddSingleton(); var app = builder.Build(); From 8aa8dfde72f97ed5e25680b225db8fb3dd729383 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 30 Sep 2025 07:28:12 +0200 Subject: [PATCH 32/65] Bozza integrazione componente design finestra (da completare) --- Lux.UI/Components/Compo/OfferRowMan.razor | 30 +++++++++++++++++------ Lux.UI/Components/Pages/Offers.razor | 4 ++- Lux.UI/Lux.UI.csproj | 6 ++--- Lux.UI/Program.cs | 2 ++ 4 files changed, 30 insertions(+), 12 deletions(-) diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index 3d5d53b1..9c14c323 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -2,12 +2,27 @@ {

    EDITING

    @EditRecord.OfferRowUID

    - @* - *@ + @* + *@ +@* + *@ } else { @@ -74,12 +89,11 @@ else { - @* *@ }
    @item.OfferRowUID
    - @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit && !string.IsNullOrEmpty(item.SerStruct) && item.SerStruct.Length>2) + @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit && !string.IsNullOrEmpty(item.SerStruct) && item.SerStruct.Length > 2) { } diff --git a/Lux.UI/Components/Pages/Offers.razor b/Lux.UI/Components/Pages/Offers.razor index 1cd28348..363aa615 100644 --- a/Lux.UI/Components/Pages/Offers.razor +++ b/Lux.UI/Components/Pages/Offers.razor @@ -143,7 +143,9 @@ else @* *@ @item.OfferID - @item.OfferCode + @item.OfferCode +
    @item.Envir
    + @if (item.DealerNav != null) { diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 6dc24151..d97e08bb 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2509.2916 + 0.9.2509.3007 @@ -17,8 +17,8 @@ - - + + diff --git a/Lux.UI/Program.cs b/Lux.UI/Program.cs index 3ebeafd5..197158d0 100644 --- a/Lux.UI/Program.cs +++ b/Lux.UI/Program.cs @@ -64,6 +64,8 @@ builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); +builder.Services.AddSingleton(); + var app = builder.Build(); From 5d41e98c07db79a7b517b6a711597ce2ce727639 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 30 Sep 2025 07:28:22 +0200 Subject: [PATCH 33/65] update test insomnia --- Lux.UI.Client/Lux.UI.Client.csproj | 3 ++- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- RestTest/Insomnia_LUX.json | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Lux.UI.Client/Lux.UI.Client.csproj b/Lux.UI.Client/Lux.UI.Client.csproj index 23bd6929..b453c04a 100644 --- a/Lux.UI.Client/Lux.UI.Client.csproj +++ b/Lux.UI.Client/Lux.UI.Client.csproj @@ -9,7 +9,8 @@ - + + diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index a7b84496..7c864f09 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

    Versione: 0.9.2509.2916

    +

    Versione: 0.9.2509.3007


    Note di rilascio:
    • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index d5241621..99c696c6 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2509.2916 +0.9.2509.3007 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index a3cb7903..8192c083 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2509.2916 + 0.9.2509.3007 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false diff --git a/RestTest/Insomnia_LUX.json b/RestTest/Insomnia_LUX.json index 46825385..e7b6ab3f 100644 --- a/RestTest/Insomnia_LUX.json +++ b/RestTest/Insomnia_LUX.json @@ -1 +1 @@ -{"_type":"export","__export_format":4,"__export_date":"2025-09-25T15:13:03.672Z","__export_source":"insomnia.desktop.app:v2023.5.8","resources":[{"_id":"req_8ec53410a71f4f10a453cfcf7f932231","parentId":"fld_bf8a2780eb0d42e597280c966d4c1fda","modified":1758647834857,"created":1758647832925,"url":"{{ _.base_url }}generic/bom/OFF250000000001","name":"BOM OFF0000000001","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1400}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1758647812542,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_bf8a2780eb0d42e597280c966d4c1fda","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1758647800454,"created":1758647790448,"name":"Generic","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1758647790448,"_type":"request_group"},{"_id":"wrk_956c9329fea3470c85a016252f307f83","parentId":null,"modified":1752848514018,"created":1752848514018,"name":"Lux","description":"","scope":"collection","_type":"workspace"},{"_id":"req_62a9a85c19734c16b4591366d49d3f2a","parentId":"fld_bf8a2780eb0d42e597280c966d4c1fda","modified":1758648412757,"created":1758647809741,"url":"{{ _.base_url }}generic/calc/OFF250000000001","name":"Calc OFF0000000001","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\"EnvType\":1,\"DictExec\":{\"Mode\":\"2\",\"UID\":\"OFF250000000001\",\"Jwd\":\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1400}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\"}}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1758647812442,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_c1bcda2fcdb64377b692bfb8d03cc69d","parentId":"fld_1f06e4414a8b4e7a85aad9659305c11d","modified":1754487930530,"created":1754487778319,"url":"{{ _.base_url }}generic/calc/BTL00001","name":"Calc BTL 01","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n \"envType\": 2,\n \"dictExec\": {\n \"Mode\": \"1\",\n \"BTL\": \"\"\n }\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563715,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_1f06e4414a8b4e7a85aad9659305c11d","parentId":"fld_97847f93d150412bbad8c26534f651dc","modified":1754487800959,"created":1754487778303,"name":"Generic - SVG CALC","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1754487800920,"_type":"request_group"},{"_id":"fld_97847f93d150412bbad8c26534f651dc","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1754487790866,"created":1754487790866,"name":"BTL","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1754487790866,"_type":"request_group"},{"_id":"req_d1e5424a1d03461e864b374e01fc1828","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1758618977060,"created":1754580116068,"url":"{{ _.base_url }}window/svg-preview/OFF250000000001","name":"Calc OFF0000000001","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1400}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563815,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_cc6b00b4276f4596b39d5e50b960559e","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1754487753725,"created":1753251557762,"name":"Window - SVG CALC","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371915022.3125,"_type":"request_group"},{"_id":"fld_df90c55ced414cdeb5801d0f4c29b002","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1752848593282,"created":1752848586667,"name":"Window","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1752848586667,"_type":"request_group"},{"_id":"req_32aa00a0b954414c862b22bf6448af49","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296503717,"created":1753251541758,"url":"{{ _.base_url }}window/svg-preview/AntaSingola","name":"Calc Finestra 01","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1200}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563715,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_dc99603a881741bea1ede03d2a118a8d","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296529561,"created":1753249702042,"url":"{{ _.base_url }}window/svg-preview/FinestraSplitVert","name":"Calc Finestra 02","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1800}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"VERTICAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563615,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_05c35870bbb34105ab70c6e365d125b7","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296534362,"created":1753249778024,"url":"{{ _.base_url }}window/svg-preview/FinestraSplitVertOriz","name":"Calc Finestra 03","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1800}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"VERTICAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563515,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_bc0664f273c84d458774e565a9ff5b1b","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296537357,"created":1753249781941,"url":"{{ _.base_url }}window/svg-preview/FinDueAnteBottomFisso","name":"Calc Finestra 04","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":2100}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TURNONLY_LEFT\\\",\\\"bHasHandle\\\":false,\\\"dDimension\\\":50},{\\\"OpeningType\\\":\\\"TILTTURN_RIGHT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":50}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563415,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_53b624e8a6a247d181a773a75fb9f735","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296540125,"created":1753251600273,"url":"{{ _.base_url }}window/svg-preview/AntaDoppia","name":"Calc Finestra 05","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1200},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1500}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_V\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TURNONLY_LEFT\\\",\\\"bHasHandle\\\":false,\\\"dDimension\\\":50},{\\\"OpeningType\\\":\\\"TILTTURN_RIGHT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":50}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_V\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753050081023.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_569c1e42853f48fd91b070ce669a4be3","parentId":"fld_e255538a539345679c0f774f77d675bf","modified":1757685919915,"created":1757685886259,"url":"{{ _.base_url }}window/hwlist","name":"GetHwList","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1757685898581,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_e255538a539345679c0f774f77d675bf","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1757688721653,"created":1757083263247,"name":"Window - config","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371914972.3125,"_type":"request_group"},{"_id":"req_53dbf4e6945245f58b04d5d964397501","parentId":"fld_e255538a539345679c0f774f77d675bf","modified":1757688740384,"created":1757083273547,"url":"{{ _.base_url }}window/hwlist/AntaSingola","name":"GetHw-v00-2del","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1200}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1757685898481,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_2cdc951ebb1f41868dfc0dee9633ff3a","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1754641825314,"created":1754581617808,"url":"{{ _.base_url }}window/svgfile/OFF0000000001.svg","name":"Get finestra OFF0000000001","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623413,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_215c060235214381a5c9a07a3a6e31ab","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1754487761336,"created":1753251616318,"name":"Window - get SVG","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371914922.3125,"_type":"request_group"},{"_id":"req_847a9754ba6c4bc591defd9364fe3df3","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1754642451675,"created":1754642448689,"url":"{{ _.base_url }}window/svgfile/OFF0000000002.svg","name":"Get finestra OFF0000000002","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623363,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_41c191d42fdc407a8dd75ac5fa0818cb","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753251992197,"created":1753251632384,"url":"{{ _.base_url }}window/svgfile/AntaSingola.svg","name":"Get finestra 01","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623313,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_f8bb8c7088ab4b8caae327b8ed500693","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753251623257,"created":1753251216824,"url":"{{ _.base_url }}window/svgfile/FinestraSplitVert.svg","name":"Get finestra 02","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623213,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_f821725d54bb47a383e4b47854ef607d","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753251626000,"created":1753251260193,"url":"{{ _.base_url }}window/svgfile/FinestraSplitVertOriz.svg","name":"Get finestra 03","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623113,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_68986d53b6cd435985e44497090bf979","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753251628002,"created":1753251264221,"url":"{{ _.base_url }}window/svgfile/FinDueAnteBottomFisso.svg","name":"Get finestra 04","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623013,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_6ae6d705ceb9488797a9a41067a784ce","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753252006985,"created":1753251638035,"url":"{{ _.base_url }}window/svgfile/AntaDoppia.svg","name":"Get finestra 05","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251593364,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_be4e67601fda458da4225282c3e3b988","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1758618937264,"created":1754580125439,"url":"{{ _.base_url }}window/bom/OFF250000000001","name":"Calc OFF0000000001","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1400}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563815,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_68670c5e217c464898fc5289ac12e0f3","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1754487769184,"created":1754296522772,"name":"Window - BOM","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371914822.3125,"_type":"request_group"},{"_id":"req_cb935626775949f29a66224522aa2eee","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1757084069007,"created":1754296522784,"url":"{{ _.base_url }}window/bom/AntaSingola","name":"Calc Finestra 01","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1200}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563715,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_035899d704b7437ea571884269f53c7a","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1754296580348,"created":1754296522774,"url":"{{ _.base_url }}window/bom/FinestraSplitVert","name":"Calc Finestra 02","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1800}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"VERTICAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563615,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_58eb627fb28d42c3b3b47fdebc87ba57","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1754296583460,"created":1754296522779,"url":"{{ _.base_url }}window/bom/FinestraSplitVertOriz","name":"Calc Finestra 03","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1800}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"VERTICAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563515,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_d10fe244bdcd4d838913babf4561a8f5","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1754296586112,"created":1754296522782,"url":"{{ _.base_url }}window/bom/FinDueAnteBottomFisso","name":"Calc Finestra 04","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":2100}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TURNONLY_LEFT\\\",\\\"bHasHandle\\\":false,\\\"dDimension\\\":50},{\\\"OpeningType\\\":\\\"TILTTURN_RIGHT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":50}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563415,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_205c5b5be6da4530a17da2e0fc58427f","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1754296589042,"created":1754296522787,"url":"{{ _.base_url }}window/bom/AntaDoppia","name":"Calc Finestra 05","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1200},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1500}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_V\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TURNONLY_LEFT\\\",\\\"bHasHandle\\\":false,\\\"dDimension\\\":50},{\\\"OpeningType\\\":\\\"TILTTURN_RIGHT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":50}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_V\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753050081023.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_4f43ff07423841b3a06d8702f353f083","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296602457,"created":1752848598632,"url":"{{ _.base_url }}Jwd/svg/123456","name":"JWD 2 SVG","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n \"revNum\": \"string\",\n \"width\": 0,\n \"height\": 0,\n \"nameUrl\": \"\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602386,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_af4eae3f44854f26878da7c94c420914","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1754296625847,"created":1754296597116,"name":"Scratch","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371914722.3125,"_type":"request_group"},{"_id":"req_dea084a8da7b45babd972bc226c579b5","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296609268,"created":1752849622647,"url":"{{ _.base_url }}window/calc/WINDOW001","name":"Calc RAW JWD","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\r\\n \\\"ProfilePath\\\": \\\"Profilo78\\\",\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"Shape\\\": \\\"RECTANGLE\\\",\\r\\n \\\"DimensionList\\\": [\\r\\n {\\r\\n \\\"nIndex\\\": 1,\\r\\n \\\"sName\\\": \\\"Width\\\",\\r\\n \\\"dValue\\\": 1200.0\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 2,\\r\\n \\\"sName\\\": \\\"Height\\\",\\r\\n \\\"dValue\\\": 1500.0\\r\\n }\\r\\n ],\\r\\n \\\"JointList\\\": [\\r\\n {\\r\\n \\\"nIndex\\\": 1,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 2,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 3,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 4,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n }\\r\\n ],\\r\\n \\\"BottomRail\\\": false,\\r\\n \\\"BottomRailQty\\\": 0,\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"bIsSashVertical\\\": true,\\r\\n \\\"SashList\\\": [\\r\\n {\\r\\n \\\"OpeningType\\\": \\\"TURNONLY_LEFT\\\",\\r\\n \\\"bHasHandle\\\": false,\\r\\n \\\"dDimension\\\": 50.0\\r\\n },\\r\\n {\\r\\n \\\"OpeningType\\\": \\\"TILTTURN_RIGHT\\\",\\r\\n \\\"bHasHandle\\\": true,\\r\\n \\\"dDimension\\\": 50.0\\r\\n }\\r\\n ],\\r\\n \\\"SashType\\\": \\\"NULL\\\",\\r\\n \\\"JointList\\\": [\\r\\n {\\r\\n \\\"nIndex\\\": 1,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 2,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 3,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 4,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n }\\r\\n ],\\r\\n \\\"Hardware\\\": \\\"000000\\\",\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"FillType\\\": \\\"GLASS\\\",\\r\\n \\\"AreaList\\\": [],\\r\\n \\\"AreaType\\\": \\\"FILL\\\"\\r\\n }\\r\\n ],\\r\\n \\\"AreaType\\\": \\\"SPLITTED\\\"\\r\\n },\\r\\n {\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"FillType\\\": \\\"GLASS\\\",\\r\\n \\\"AreaList\\\": [],\\r\\n \\\"AreaType\\\": \\\"FILL\\\"\\r\\n }\\r\\n ],\\r\\n \\\"AreaType\\\": \\\"SPLITTED\\\"\\r\\n }\\r\\n ],\\r\\n \\\"AreaType\\\": \\\"SASH\\\"\\r\\n }\\r\\n ],\\r\\n \\\"AreaType\\\": \\\"FRAME\\\"\\r\\n }\\r\\n ]\\r\\n}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602361,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_b0434b77938b4fe192d7954acd3e5631","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296610520,"created":1752853325616,"url":"{{ _.base_url }}window/svg/WINDOW001","name":"Get cached svg","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602348.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_275b96bcc56842c0a32987937e687529","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296611909,"created":1753249617506,"url":"{{ _.base_url }}window/svgfile/WIN123456.svg","name":"Get cached svgfile 02","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602342.25,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_973dfaac59f0473f91ed62e6a56ddb16","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296607208,"created":1753116758990,"url":"{{ _.base_url }}window/svgfile/WINDOW001.svg","name":"Get cached svgfile","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602336,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"env_03694bb015b442e0326ba83a58b6365ca3157aa2","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1752848633269,"created":1752848514034,"name":"Base Environment","data":{"base_url":"https://localhost:7135/Lux/srv/api/"},"dataPropertyOrder":{"&":["base_url"]},"color":null,"isPrivate":false,"metaSortKey":1752848514034,"_type":"environment"},{"_id":"jar_03694bb015b442e0326ba83a58b6365ca3157aa2","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1752848514036,"created":1752848514036,"name":"Default Jar","cookies":[],"_type":"cookie_jar"},{"_id":"env_01f9ae3ab59d4b15a654c74087d159f8","parentId":"env_03694bb015b442e0326ba83a58b6365ca3157aa2","modified":1752848640194,"created":1752848535080,"name":"DEV","data":{"base_url":"https://localhost:7135/Lux/srv/api/"},"dataPropertyOrder":{"&":["base_url"]},"color":null,"isPrivate":false,"metaSortKey":1752848535080,"_type":"environment"},{"_id":"env_0095608273ce4bee8a69e58ef1e69e42","parentId":"env_03694bb015b442e0326ba83a58b6365ca3157aa2","modified":1754645785052,"created":1752848543273,"name":"IIS01 - Dev","data":{"base_url":"https://iis01.egalware.com/Lux/srv/api/"},"dataPropertyOrder":{"&":["base_url"]},"color":null,"isPrivate":false,"metaSortKey":1752848543273,"_type":"environment"},{"_id":"env_2639bb19520a429bb9c887d6b4ab73dc","parentId":"env_03694bb015b442e0326ba83a58b6365ca3157aa2","modified":1754645793068,"created":1754645770515,"name":"IIS04 - Prod","data":{"base_url":"https://office.egalware.com/Lux/srv/api/"},"dataPropertyOrder":{"&":["base_url"]},"color":null,"isPrivate":false,"metaSortKey":1754645770515,"_type":"environment"}]} \ No newline at end of file +{"_type":"export","__export_format":4,"__export_date":"2025-09-30T05:26:18.596Z","__export_source":"insomnia.desktop.app:v2023.5.8","resources":[{"_id":"req_8ec53410a71f4f10a453cfcf7f932231","parentId":"fld_bf8a2780eb0d42e597280c966d4c1fda","modified":1758647834857,"created":1758647832925,"url":"{{ _.base_url }}generic/bom/OFF250000000001","name":"BOM OFF0000000001","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1400}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1758647812542,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_bf8a2780eb0d42e597280c966d4c1fda","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1758647800454,"created":1758647790448,"name":"Generic","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1758647790448,"_type":"request_group"},{"_id":"wrk_956c9329fea3470c85a016252f307f83","parentId":null,"modified":1752848514018,"created":1752848514018,"name":"Lux","description":"","scope":"collection","_type":"workspace"},{"_id":"req_62a9a85c19734c16b4591366d49d3f2a","parentId":"fld_bf8a2780eb0d42e597280c966d4c1fda","modified":1758648412757,"created":1758647809741,"url":"{{ _.base_url }}generic/calc/OFF250000000001","name":"Calc OFF0000000001","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\"EnvType\":1,\"DictExec\":{\"Mode\":\"2\",\"UID\":\"OFF250000000001\",\"Jwd\":\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1400}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\"}}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1758647812442,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_c1bcda2fcdb64377b692bfb8d03cc69d","parentId":"fld_1f06e4414a8b4e7a85aad9659305c11d","modified":1754487930530,"created":1754487778319,"url":"{{ _.base_url }}generic/calc/BTL00001","name":"Calc BTL 01","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n \"envType\": 2,\n \"dictExec\": {\n \"Mode\": \"1\",\n \"BTL\": \"\"\n }\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563715,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_1f06e4414a8b4e7a85aad9659305c11d","parentId":"fld_97847f93d150412bbad8c26534f651dc","modified":1754487800959,"created":1754487778303,"name":"Generic - SVG CALC","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1754487800920,"_type":"request_group"},{"_id":"fld_97847f93d150412bbad8c26534f651dc","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1754487790866,"created":1754487790866,"name":"BTL","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1754487790866,"_type":"request_group"},{"_id":"req_d1e5424a1d03461e864b374e01fc1828","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1758618977060,"created":1754580116068,"url":"{{ _.base_url }}window/svg-preview/OFF250000000001","name":"Calc OFF0000000001","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1400}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563815,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_cc6b00b4276f4596b39d5e50b960559e","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1754487753725,"created":1753251557762,"name":"Window - SVG CALC","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371915022.3125,"_type":"request_group"},{"_id":"fld_df90c55ced414cdeb5801d0f4c29b002","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1752848593282,"created":1752848586667,"name":"Window","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1752848586667,"_type":"request_group"},{"_id":"req_32aa00a0b954414c862b22bf6448af49","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296503717,"created":1753251541758,"url":"{{ _.base_url }}window/svg-preview/AntaSingola","name":"Calc Finestra 01","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1200}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563715,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_dc99603a881741bea1ede03d2a118a8d","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296529561,"created":1753249702042,"url":"{{ _.base_url }}window/svg-preview/FinestraSplitVert","name":"Calc Finestra 02","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1800}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"VERTICAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563615,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_05c35870bbb34105ab70c6e365d125b7","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296534362,"created":1753249778024,"url":"{{ _.base_url }}window/svg-preview/FinestraSplitVertOriz","name":"Calc Finestra 03","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1800}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"VERTICAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563515,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_bc0664f273c84d458774e565a9ff5b1b","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296537357,"created":1753249781941,"url":"{{ _.base_url }}window/svg-preview/FinDueAnteBottomFisso","name":"Calc Finestra 04","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":2100}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TURNONLY_LEFT\\\",\\\"bHasHandle\\\":false,\\\"dDimension\\\":50},{\\\"OpeningType\\\":\\\"TILTTURN_RIGHT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":50}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563415,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_53b624e8a6a247d181a773a75fb9f735","parentId":"fld_cc6b00b4276f4596b39d5e50b960559e","modified":1754296540125,"created":1753251600273,"url":"{{ _.base_url }}window/svg-preview/AntaDoppia","name":"Calc Finestra 05","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1200},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1500}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_V\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TURNONLY_LEFT\\\",\\\"bHasHandle\\\":false,\\\"dDimension\\\":50},{\\\"OpeningType\\\":\\\"TILTTURN_RIGHT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":50}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_V\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753050081023.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_569c1e42853f48fd91b070ce669a4be3","parentId":"fld_e255538a539345679c0f774f77d675bf","modified":1757685919915,"created":1757685886259,"url":"{{ _.base_url }}window/hwlist","name":"GetHwList","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1757685898581,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_e255538a539345679c0f774f77d675bf","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1757688721653,"created":1757083263247,"name":"Window - config","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371914972.3125,"_type":"request_group"},{"_id":"req_e3a9783055984110a197ad261837d166","parentId":"fld_e255538a539345679c0f774f77d675bf","modified":1759209004778,"created":1759208999803,"url":"{{ _.base_url }}window/hwlist/HW.AGB","name":"GetHwList AGB","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1757685898531,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_53dbf4e6945245f58b04d5d964397501","parentId":"fld_e255538a539345679c0f774f77d675bf","modified":1757688740384,"created":1757083273547,"url":"{{ _.base_url }}window/hwlist/AntaSingola","name":"GetHw-v00-2del","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1200}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1757685898481,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_2cdc951ebb1f41868dfc0dee9633ff3a","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1754641825314,"created":1754581617808,"url":"{{ _.base_url }}window/svgfile/OFF0000000001.svg","name":"Get finestra OFF0000000001","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623413,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_215c060235214381a5c9a07a3a6e31ab","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1754487761336,"created":1753251616318,"name":"Window - get SVG","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371914922.3125,"_type":"request_group"},{"_id":"req_847a9754ba6c4bc591defd9364fe3df3","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1754642451675,"created":1754642448689,"url":"{{ _.base_url }}window/svgfile/OFF0000000002.svg","name":"Get finestra OFF0000000002","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623363,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_41c191d42fdc407a8dd75ac5fa0818cb","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753251992197,"created":1753251632384,"url":"{{ _.base_url }}window/svgfile/AntaSingola.svg","name":"Get finestra 01","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623313,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_f8bb8c7088ab4b8caae327b8ed500693","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753251623257,"created":1753251216824,"url":"{{ _.base_url }}window/svgfile/FinestraSplitVert.svg","name":"Get finestra 02","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623213,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_f821725d54bb47a383e4b47854ef607d","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753251626000,"created":1753251260193,"url":"{{ _.base_url }}window/svgfile/FinestraSplitVertOriz.svg","name":"Get finestra 03","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623113,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_68986d53b6cd435985e44497090bf979","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753251628002,"created":1753251264221,"url":"{{ _.base_url }}window/svgfile/FinDueAnteBottomFisso.svg","name":"Get finestra 04","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251623013,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_6ae6d705ceb9488797a9a41067a784ce","parentId":"fld_215c060235214381a5c9a07a3a6e31ab","modified":1753252006985,"created":1753251638035,"url":"{{ _.base_url }}window/svgfile/AntaDoppia.svg","name":"Get finestra 05","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251593364,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_be4e67601fda458da4225282c3e3b988","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1758618937264,"created":1754580125439,"url":"{{ _.base_url }}window/bom/OFF250000000001","name":"Calc OFF0000000001","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1400}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563815,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_68670c5e217c464898fc5289ac12e0f3","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1754487769184,"created":1754296522772,"name":"Window - BOM","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371914822.3125,"_type":"request_group"},{"_id":"req_cb935626775949f29a66224522aa2eee","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1757084069007,"created":1754296522784,"url":"{{ _.base_url }}window/bom/AntaSingola","name":"Calc Finestra 01","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":800},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1200}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TILTTURN_LEFT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":100}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000544\\\",\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563715,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_035899d704b7437ea571884269f53c7a","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1754296580348,"created":1754296522774,"url":"{{ _.base_url }}window/bom/FinestraSplitVert","name":"Calc Finestra 02","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1800}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"VERTICAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563615,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_58eb627fb28d42c3b3b47fdebc87ba57","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1754296583460,"created":1754296522779,"url":"{{ _.base_url }}window/bom/FinestraSplitVertOriz","name":"Calc Finestra 03","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1800}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"VERTICAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":50}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563515,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_d10fe244bdcd4d838913babf4561a8f5","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1754296586112,"created":1754296522782,"url":"{{ _.base_url }}window/bom/FinDueAnteBottomFisso","name":"Calc Finestra 04","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1500},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":2100}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"SplitShape\\\":\\\"HORIZONTAL\\\",\\\"SplitPositionList\\\":[{\\\"bIsRelative\\\":true,\\\"dDimension\\\":40},{\\\"bIsRelative\\\":true,\\\"dDimension\\\":60}],\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TURNONLY_LEFT\\\",\\\"bHasHandle\\\":false,\\\"dDimension\\\":50},{\\\"OpeningType\\\":\\\"TILTTURN_RIGHT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":50}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_H\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_H\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SPLIT\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753251563415,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_205c5b5be6da4530a17da2e0fc58427f","parentId":"fld_68670c5e217c464898fc5289ac12e0f3","modified":1754296589042,"created":1754296522787,"url":"{{ _.base_url }}window/bom/AntaDoppia","name":"Calc Finestra 05","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\\"ProfilePath\\\":\\\"Profilo78\\\",\\\"AreaList\\\":[{\\\"Shape\\\":\\\"RECTANGLE\\\",\\\"DimensionList\\\":[{\\\"nIndex\\\":1,\\\"sName\\\":\\\"Width\\\",\\\"dValue\\\":1200},{\\\"nIndex\\\":2,\\\"sName\\\":\\\"Height\\\",\\\"dValue\\\":1500}],\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_V\\\"}],\\\"BottomRail\\\":false,\\\"BottomRailQty\\\":0,\\\"AreaList\\\":[{\\\"bIsSashVertical\\\":true,\\\"SashList\\\":[{\\\"OpeningType\\\":\\\"TURNONLY_LEFT\\\",\\\"bHasHandle\\\":false,\\\"dDimension\\\":50},{\\\"OpeningType\\\":\\\"TILTTURN_RIGHT\\\",\\\"bHasHandle\\\":true,\\\"dDimension\\\":50}],\\\"SashType\\\":\\\"NULL\\\",\\\"JointList\\\":[{\\\"nIndex\\\":1,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":2,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":3,\\\"JointType\\\":\\\"FULL_V\\\"},{\\\"nIndex\\\":4,\\\"JointType\\\":\\\"FULL_V\\\"}],\\\"Hardware\\\":\\\"000000\\\",\\\"AreaList\\\":[{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"},{\\\"AreaList\\\":[{\\\"FillType\\\":\\\"GLASS\\\",\\\"AreaList\\\":[],\\\"AreaType\\\":\\\"FILL\\\"}],\\\"AreaType\\\":\\\"SPLITTED\\\"}],\\\"AreaType\\\":\\\"SASH\\\"}],\\\"AreaType\\\":\\\"FRAME\\\"}]}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1753050081023.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_4f43ff07423841b3a06d8702f353f083","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296602457,"created":1752848598632,"url":"{{ _.base_url }}Jwd/svg/123456","name":"JWD 2 SVG","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n \"revNum\": \"string\",\n \"width\": 0,\n \"height\": 0,\n \"nameUrl\": \"\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602386,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_af4eae3f44854f26878da7c94c420914","parentId":"fld_df90c55ced414cdeb5801d0f4c29b002","modified":1754296625847,"created":1754296597116,"name":"Scratch","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1751371914722.3125,"_type":"request_group"},{"_id":"req_dea084a8da7b45babd972bc226c579b5","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296609268,"created":1752849622647,"url":"{{ _.base_url }}window/calc/WINDOW001","name":"Calc RAW JWD","description":"","method":"POST","body":{"mimeType":"application/json","text":"\"{\\r\\n \\\"ProfilePath\\\": \\\"Profilo78\\\",\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"Shape\\\": \\\"RECTANGLE\\\",\\r\\n \\\"DimensionList\\\": [\\r\\n {\\r\\n \\\"nIndex\\\": 1,\\r\\n \\\"sName\\\": \\\"Width\\\",\\r\\n \\\"dValue\\\": 1200.0\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 2,\\r\\n \\\"sName\\\": \\\"Height\\\",\\r\\n \\\"dValue\\\": 1500.0\\r\\n }\\r\\n ],\\r\\n \\\"JointList\\\": [\\r\\n {\\r\\n \\\"nIndex\\\": 1,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 2,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 3,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 4,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n }\\r\\n ],\\r\\n \\\"BottomRail\\\": false,\\r\\n \\\"BottomRailQty\\\": 0,\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"bIsSashVertical\\\": true,\\r\\n \\\"SashList\\\": [\\r\\n {\\r\\n \\\"OpeningType\\\": \\\"TURNONLY_LEFT\\\",\\r\\n \\\"bHasHandle\\\": false,\\r\\n \\\"dDimension\\\": 50.0\\r\\n },\\r\\n {\\r\\n \\\"OpeningType\\\": \\\"TILTTURN_RIGHT\\\",\\r\\n \\\"bHasHandle\\\": true,\\r\\n \\\"dDimension\\\": 50.0\\r\\n }\\r\\n ],\\r\\n \\\"SashType\\\": \\\"NULL\\\",\\r\\n \\\"JointList\\\": [\\r\\n {\\r\\n \\\"nIndex\\\": 1,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 2,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 3,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n },\\r\\n {\\r\\n \\\"nIndex\\\": 4,\\r\\n \\\"JointType\\\": \\\"FULL_V\\\"\\r\\n }\\r\\n ],\\r\\n \\\"Hardware\\\": \\\"000000\\\",\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"FillType\\\": \\\"GLASS\\\",\\r\\n \\\"AreaList\\\": [],\\r\\n \\\"AreaType\\\": \\\"FILL\\\"\\r\\n }\\r\\n ],\\r\\n \\\"AreaType\\\": \\\"SPLITTED\\\"\\r\\n },\\r\\n {\\r\\n \\\"AreaList\\\": [\\r\\n {\\r\\n \\\"FillType\\\": \\\"GLASS\\\",\\r\\n \\\"AreaList\\\": [],\\r\\n \\\"AreaType\\\": \\\"FILL\\\"\\r\\n }\\r\\n ],\\r\\n \\\"AreaType\\\": \\\"SPLITTED\\\"\\r\\n }\\r\\n ],\\r\\n \\\"AreaType\\\": \\\"SASH\\\"\\r\\n }\\r\\n ],\\r\\n \\\"AreaType\\\": \\\"FRAME\\\"\\r\\n }\\r\\n ]\\r\\n}\""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602361,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_b0434b77938b4fe192d7954acd3e5631","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296610520,"created":1752853325616,"url":"{{ _.base_url }}window/svg/WINDOW001","name":"Get cached svg","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602348.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_275b96bcc56842c0a32987937e687529","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296611909,"created":1753249617506,"url":"{{ _.base_url }}window/svgfile/WIN123456.svg","name":"Get cached svgfile 02","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602342.25,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_973dfaac59f0473f91ed62e6a56ddb16","parentId":"fld_af4eae3f44854f26878da7c94c420914","modified":1754296607208,"created":1753116758990,"url":"{{ _.base_url }}window/svgfile/WINDOW001.svg","name":"Get cached svgfile","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/2023.5.8"}],"authentication":{},"metaSortKey":-1754296602336,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"env_03694bb015b442e0326ba83a58b6365ca3157aa2","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1752848633269,"created":1752848514034,"name":"Base Environment","data":{"base_url":"https://localhost:7135/Lux/srv/api/"},"dataPropertyOrder":{"&":["base_url"]},"color":null,"isPrivate":false,"metaSortKey":1752848514034,"_type":"environment"},{"_id":"jar_03694bb015b442e0326ba83a58b6365ca3157aa2","parentId":"wrk_956c9329fea3470c85a016252f307f83","modified":1752848514036,"created":1752848514036,"name":"Default Jar","cookies":[],"_type":"cookie_jar"},{"_id":"env_01f9ae3ab59d4b15a654c74087d159f8","parentId":"env_03694bb015b442e0326ba83a58b6365ca3157aa2","modified":1752848640194,"created":1752848535080,"name":"DEV","data":{"base_url":"https://localhost:7135/Lux/srv/api/"},"dataPropertyOrder":{"&":["base_url"]},"color":null,"isPrivate":false,"metaSortKey":1752848535080,"_type":"environment"},{"_id":"env_0095608273ce4bee8a69e58ef1e69e42","parentId":"env_03694bb015b442e0326ba83a58b6365ca3157aa2","modified":1754645785052,"created":1752848543273,"name":"IIS01 - Dev","data":{"base_url":"https://iis01.egalware.com/Lux/srv/api/"},"dataPropertyOrder":{"&":["base_url"]},"color":null,"isPrivate":false,"metaSortKey":1752848543273,"_type":"environment"},{"_id":"env_2639bb19520a429bb9c887d6b4ab73dc","parentId":"env_03694bb015b442e0326ba83a58b6365ca3157aa2","modified":1754645793068,"created":1754645770515,"name":"IIS04 - Prod","data":{"base_url":"https://office.egalware.com/Lux/srv/api/"},"dataPropertyOrder":{"&":["base_url"]},"color":null,"isPrivate":false,"metaSortKey":1754645770515,"_type":"environment"}]} \ No newline at end of file From a6b72068f4e7456434a3bf3e9cb9ca850f6b171b Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 2 Oct 2025 15:48:48 +0200 Subject: [PATCH 34/65] Aggiunta modelli e migrazioni x confdata --- .../Controllers/LuxController.cs | 73 + EgwCoreLib.Lux.Data/DataLayerContext.cs | 15 +- .../DbModel/Config/GlassModel .cs | 21 + .../DbModel/Config/HardwareModel.cs | 21 + .../DbModel/Config/ProfileModel.cs | 21 + .../DbModel/Config/WoodModel.cs | 21 + .../EgwCoreLib.Lux.Data.csproj | 3 +- ...0251002110150_AddConfTables_01.Designer.cs | 2324 ++++++++++++++++ .../20251002110150_AddConfTables_01.cs | 279 ++ .../20251002134750_AddInitConfVal.Designer.cs | 2400 +++++++++++++++++ .../20251002134750_AddInitConfVal.cs | 298 ++ .../DataLayerContextModelSnapshot.cs | 200 +- EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs | 20 +- .../Services/DataLayerServices.cs | 132 +- 14 files changed, 5781 insertions(+), 47 deletions(-) create mode 100644 EgwCoreLib.Lux.Data/DbModel/Config/GlassModel .cs create mode 100644 EgwCoreLib.Lux.Data/DbModel/Config/HardwareModel.cs create mode 100644 EgwCoreLib.Lux.Data/DbModel/Config/ProfileModel.cs create mode 100644 EgwCoreLib.Lux.Data/DbModel/Config/WoodModel.cs create mode 100644 EgwCoreLib.Lux.Data/Migrations/20251002110150_AddConfTables_01.Designer.cs create mode 100644 EgwCoreLib.Lux.Data/Migrations/20251002110150_AddConfTables_01.cs create mode 100644 EgwCoreLib.Lux.Data/Migrations/20251002134750_AddInitConfVal.Designer.cs create mode 100644 EgwCoreLib.Lux.Data/Migrations/20251002134750_AddInitConfVal.cs diff --git a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs index 71f87b10..50bb4c04 100644 --- a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs +++ b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs @@ -8,6 +8,7 @@ using NLog; using NLog.LayoutRenderers; using static EgwCoreLib.Lux.Core.Enums; using EgwCoreLib.Lux.Data.DbModel.Items; +using EgwCoreLib.Lux.Data.DbModel.Config; namespace EgwCoreLib.Lux.Data.Controllers { @@ -17,6 +18,78 @@ namespace EgwCoreLib.Lux.Data.Controllers #region Internal Methods + /// + /// Elenco completo Config Glass + /// + /// + internal async Task> ConfGlassGetAllAsync() + { + List dbResult = new List(); + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + dbResult = await dbCtx + .DbSetConfGlass + .ToListAsync(); + } + catch (Exception exc) + { + Log.Error($"Eccezione durante ConfGlassGetAllAsync{Environment.NewLine}{exc}"); + } + } + return dbResult; + } + + /// + /// Elenco completo Config Profile + /// + /// + internal async Task> ConfProfileGetAllAsync() + { + List dbResult = new List(); + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + dbResult = await dbCtx + .DbSetConfProfile + .ToListAsync(); + } + catch (Exception exc) + { + Log.Error($"Eccezione durante ConfProfileGetAllAsync{Environment.NewLine}{exc}"); + } + } + return dbResult; + } + + /// + /// Elenco completo Config Wood + /// + /// + internal async Task> ConfWoodGetAllAsync() + { + List dbResult = new List(); + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + dbResult = await dbCtx + .DbSetConfWood + .ToListAsync(); + } + catch (Exception exc) + { + Log.Error($"Eccezione durante ConfWoodGetAllAsync{Environment.NewLine}{exc}"); + } + } + return dbResult; + } + /// /// Elenco completo Customers da DB /// diff --git a/EgwCoreLib.Lux.Data/DataLayerContext.cs b/EgwCoreLib.Lux.Data/DataLayerContext.cs index e6268c2f..87568d8b 100644 --- a/EgwCoreLib.Lux.Data/DataLayerContext.cs +++ b/EgwCoreLib.Lux.Data/DataLayerContext.cs @@ -1,4 +1,5 @@ -using EgwCoreLib.Lux.Data.DbModel.Cost; +using EgwCoreLib.Lux.Data.DbModel.Config; +using EgwCoreLib.Lux.Data.DbModel.Cost; using EgwCoreLib.Lux.Data.DbModel.Items; using EgwCoreLib.Lux.Data.DbModel.Production; using EgwCoreLib.Lux.Data.DbModel.Sales; @@ -46,7 +47,10 @@ namespace EgwCoreLib.Lux.Data } public virtual DbSet DbSetCounters { get; set; } - + public virtual DbSet DbSetConfGlass { get; set; } + public virtual DbSet DbSetConfProfile { get; set; } + public virtual DbSet DbSetConfWood { get; set; } + public virtual DbSet DbSetItemGroup { get; set; } public virtual DbSet DbSetItem { get; set; } public virtual DbSet DbSetSellItem { get; set; } @@ -113,6 +117,13 @@ namespace EgwCoreLib.Lux.Data modelBuilder.Entity() .HasKey(c => new { c.RefYear, c.CountName}); + modelBuilder.Entity() + .HasKey(c => new { c.GlassID }); + modelBuilder.Entity() + .HasKey(c => new { c.ProfileID }); + modelBuilder.Entity() + .HasKey(c => new { c.WoodID }); + // fix valori timestamp modelBuilder.Entity(entity => { diff --git a/EgwCoreLib.Lux.Data/DbModel/Config/GlassModel .cs b/EgwCoreLib.Lux.Data/DbModel/Config/GlassModel .cs new file mode 100644 index 00000000..1bab5f49 --- /dev/null +++ b/EgwCoreLib.Lux.Data/DbModel/Config/GlassModel .cs @@ -0,0 +1,21 @@ +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; + +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace EgwCoreLib.Lux.Data.DbModel.Config +{ + /// + /// Risorsa tipo di Glass x EF + /// + [Table("conf_glass")] + public class GlassModel : Egw.Window.Data.Glass + { + } +} diff --git a/EgwCoreLib.Lux.Data/DbModel/Config/HardwareModel.cs b/EgwCoreLib.Lux.Data/DbModel/Config/HardwareModel.cs new file mode 100644 index 00000000..91f6b7bd --- /dev/null +++ b/EgwCoreLib.Lux.Data/DbModel/Config/HardwareModel.cs @@ -0,0 +1,21 @@ +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; + +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace EgwCoreLib.Lux.Data.DbModel.Config +{ + /// + /// Risorsa tipo di Hardware x EF + /// + [Table("conf_Hardware")] + public class HardwareModel : Egw.Window.Data.Hardware + { + } +} diff --git a/EgwCoreLib.Lux.Data/DbModel/Config/ProfileModel.cs b/EgwCoreLib.Lux.Data/DbModel/Config/ProfileModel.cs new file mode 100644 index 00000000..e6a9db9a --- /dev/null +++ b/EgwCoreLib.Lux.Data/DbModel/Config/ProfileModel.cs @@ -0,0 +1,21 @@ +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; + +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace EgwCoreLib.Lux.Data.DbModel.Config +{ + /// + /// Risorsa tipo di Wood x EF + /// + [Table("conf_profile")] + public class ProfileModel : Egw.Window.Data.Profile + { + } +} diff --git a/EgwCoreLib.Lux.Data/DbModel/Config/WoodModel.cs b/EgwCoreLib.Lux.Data/DbModel/Config/WoodModel.cs new file mode 100644 index 00000000..cd2aa5d7 --- /dev/null +++ b/EgwCoreLib.Lux.Data/DbModel/Config/WoodModel.cs @@ -0,0 +1,21 @@ +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; + +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace EgwCoreLib.Lux.Data.DbModel.Config +{ + /// + /// Risorsa tipo di Wood x EF + /// + [Table("conf_wood")] + public class WoodModel : Egw.Window.Data.Wood + { + } +} diff --git a/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj b/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj index 0566e374..12d05bf1 100644 --- a/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj +++ b/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj @@ -17,6 +17,7 @@ + @@ -41,7 +42,7 @@ - + diff --git a/EgwCoreLib.Lux.Data/Migrations/20251002110150_AddConfTables_01.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20251002110150_AddConfTables_01.Designer.cs new file mode 100644 index 00000000..dda2af9b --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20251002110150_AddConfTables_01.Designer.cs @@ -0,0 +1,2324 @@ +// +using System; +using EgwCoreLib.Lux.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace EgwCoreLib.Lux.Data.Migrations +{ + [DbContext(typeof(DataLayerContext))] + [Migration("20251002110150_AddConfTables_01")] + partial class AddConfTables_01 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.17") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.GlassModel", b => + { + b.Property("GlassID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GlassID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Thickness") + .HasColumnType("double"); + + b.HasKey("GlassID"); + + b.ToTable("conf_glass"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.ProfileModel", b => + { + b.Property("ProfileID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProfileID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Thickness") + .HasColumnType("double"); + + b.HasKey("ProfileID"); + + b.ToTable("conf_profile"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.WoodModel", b => + { + b.Property("WoodID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("WoodID")); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("ExtId") + .HasColumnType("longtext"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("WoodID"); + + b.ToTable("conf_wood"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", b => + { + b.Property("CostDriverID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CostDriverID")); + + b.Property("Descript") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Unit") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CostDriverID"); + + b.ToTable("cost_driver"); + + b.HasData( + new + { + CostDriverID = 1, + Descript = "Ore lavorate per step/fase", + Name = "WorkHour", + Unit = "h" + }, + new + { + CostDriverID = 2, + Descript = "Metri prodotti per step/fase", + Name = "Meter", + Unit = "m" + }, + new + { + CostDriverID = 3, + Descript = "Numero unità prodotte (lavorate) per step/fase", + Name = "Unit", + Unit = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.Property("ResourceID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); + + b.Property("CostDriverBudget") + .HasColumnType("decimal(65,30)"); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("EBTPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("FixedCost") + .HasColumnType("decimal(65,30)"); + + b.Property("LaborCost") + .HasColumnType("decimal(65,30)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OverHeadCost") + .HasColumnType("decimal(65,30)"); + + b.Property("OverHeadPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("PriceMargin") + .HasColumnType("decimal(65,30)"); + + b.Property("VariableCost") + .HasColumnType("decimal(65,30)"); + + b.HasKey("ResourceID"); + + b.HasIndex("CostDriverID"); + + b.ToTable("cost_resource"); + + b.HasData( + new + { + ResourceID = 1, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 12000m, + LaborCost = 30m, + Name = "Sezionatrice", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 2, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 100000m, + LaborCost = 40m, + Name = "Linea SAOMAD WoodPecker Just 3500", + OverHeadCost = 15000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 30000m + }, + new + { + ResourceID = 3, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 35m, + Name = "Linea Pantografo", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 4, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 30m, + Name = "Stazione Verniciatura", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 5, + CostDriverBudget = 220m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 6000m, + LaborCost = 30m, + Name = "Verniciatura Manuale", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 2000m + }, + new + { + ResourceID = 6, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 500m, + LaborCost = 30m, + Name = "Montaggio Manuale", + OverHeadCost = 500m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 500m + }, + new + { + ResourceID = 7, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 0m, + LaborCost = 40m, + Name = "Installatore", + OverHeadCost = 0m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 3000m + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", b => + { + b.Property("CodGroup") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CodGroup"); + + b.ToTable("item_group"); + + b.HasData( + new + { + CodGroup = "WindowTrunk", + Description = "Barre legno per lavorazione" + }, + new + { + CodGroup = "WindowGlass", + Description = "Vetri serramento" + }, + new + { + CodGroup = "WindowVarnish", + Description = "Vernici per legno" + }, + new + { + CodGroup = "WindowHardware", + Description = "Ferramenta serramento" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.Property("ItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); + + b.Property("CodGroup") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemIDParent") + .HasColumnType("int"); + + b.Property("ItemType") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("QtyMax") + .HasColumnType("double"); + + b.Property("QtyMin") + .HasColumnType("double"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ItemID"); + + b.HasIndex("CodGroup"); + + b.ToTable("item_item"); + + b.HasData( + new + { + ItemID = 1, + CodGroup = "WindowTrunk", + Cost = 20.0, + Description = "BARRA-60x80 generica", + ExtItemCode = "", + IsService = false, + ItemCode = 1001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.29999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "BARR.001", + UM = "#" + }, + new + { + ItemID = 2, + CodGroup = "WindowTrunk", + Cost = 16.5, + Description = "Barra 60x80, lunghezza 12m", + ExtItemCode = "BARRA-60x80x12000", + IsService = false, + ItemCode = 1002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.12000", + UM = "#" + }, + new + { + ItemID = 3, + CodGroup = "WindowTrunk", + Cost = 17.5, + Description = "Barra 60x80, lunghezza 8m", + ExtItemCode = "BARRA-60x80x8000", + IsService = false, + ItemCode = 1003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.22, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.8000", + UM = "#" + }, + new + { + ItemID = 4, + CodGroup = "WindowTrunk", + Cost = 15.5, + Description = "Barra 60x80, lunghezza 16m", + ExtItemCode = "BARRA-60x80x16000", + IsService = false, + ItemCode = 1004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.16000", + UM = "#" + }, + new + { + ItemID = 5, + CodGroup = "WindowGlass", + Cost = 300.0, + Description = "Vetro triplo, basso indice termico, 800x1000", + ExtItemCode = "VETRO-3L-THERMO-800x1000", + IsService = false, + ItemCode = 2001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3T.800.1000", + UM = "m2" + }, + new + { + ItemID = 6, + CodGroup = "WindowGlass", + Cost = 200.0, + Description = "Vetro doppio, 800x1000", + ExtItemCode = "VETRO-2L-800x1000", + IsService = false, + ItemCode = 2002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.14999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V2.800.1000", + UM = "m2" + }, + new + { + ItemID = 7, + CodGroup = "WindowGlass", + Cost = 250.0, + Description = "Vetro triplo, 800x1000", + ExtItemCode = "VETRO-3L-800x1000", + IsService = false, + ItemCode = 2003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.17999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3.800.1000", + UM = "m2" + }, + new + { + ItemID = 8, + CodGroup = "WindowVarnish", + Cost = 20.0, + Description = "Vernice trasparente", + ExtItemCode = "VERN-TRASP", + IsService = false, + ItemCode = 3001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "VT.STD", + UM = "l" + }, + new + { + ItemID = 9, + CodGroup = "WindowHardware", + Cost = 65.0, + Description = "Kit standard completo AGB tipo 001", + ExtItemCode = "KIT-001", + IsService = false, + ItemCode = 5001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-KIT-001", + UM = "#" + }, + new + { + ItemID = 10, + CodGroup = "WindowHardware", + Cost = 10.0, + Description = "Cerniera AGB tipo 001", + ExtItemCode = "CERN-001", + IsService = false, + ItemCode = 5002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-CERN-001", + UM = "#" + }, + new + { + ItemID = 11, + CodGroup = "WindowHardware", + Cost = 15.0, + Description = "Serratura AGB tipo 001", + ExtItemCode = "SERR-001", + IsService = false, + ItemCode = 5003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-SERR-001", + UM = "#" + }, + new + { + ItemID = 12, + CodGroup = "WindowHardware", + Cost = 25.0, + Description = "Maniglia AGB tipo 001", + ExtItemCode = "MAN-001", + IsService = false, + ItemCode = 5004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-MAN-001", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.Property("SellingItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SellingItemID"); + + b.HasIndex("JobID"); + + b.ToTable("item_selling_item"); + + b.HasData( + new + { + SellingItemID = 1, + Cost = 820.0, + Description = "Finestra anta Singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 2, + Margin = 0.20000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 2, + Cost = 150.0, + Description = "Persiana anta singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.10000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 3, + Cost = 200.0, + Description = "Installazione", + ExtItemCode = "", + IsService = true, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SupplierModel", b => + { + b.Property("SupplierID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SupplierID"); + + b.ToTable("item_supplier"); + + b.HasData( + new + { + SupplierID = 1, + CompanyName = "Company One", + FirstName = "Supplier A", + LastName = "Egalware", + VAT = "7294857103879254" + }, + new + { + SupplierID = 2, + CompanyName = "Company Two", + FirstName = "Supplier B", + LastName = "User", + VAT = "7294857103879254" + }, + new + { + SupplierID = 3, + CompanyName = "Company Two", + FirstName = "Supplier C", + LastName = "User Test", + VAT = "7294857103879254" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", b => + { + b.Property("ProductionBatchID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DueDate") + .HasColumnType("datetime(6)"); + + b.HasKey("ProductionBatchID"); + + b.ToTable("production_batch"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.Property("ProdItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("OrderRowID") + .HasColumnType("int"); + + b.Property("ProductionBatchID") + .HasColumnType("int"); + + b.HasKey("ProdItemID"); + + b.HasIndex("OrderRowID"); + + b.HasIndex("ProductionBatchID"); + + b.ToTable("production_item"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.Property("ProdItemStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProdItemID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.Property("WorkTime") + .HasColumnType("double"); + + b.HasKey("ProdItemStepID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ProdItemID"); + + b.HasIndex("ResourceID"); + + b.ToTable("production_item_step"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", b => + { + b.Property("CustomerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CustomerID"); + + b.ToTable("sales_customer"); + + b.HasData( + new + { + CustomerID = 1, + CompanyName = "", + FirstName = "Customer A", + LastName = "Egalware", + VAT = "1234567890123456" + }, + new + { + CustomerID = 2, + CompanyName = "", + FirstName = "Customer B", + LastName = "User", + VAT = "1234567890123456" + }, + new + { + CustomerID = 3, + CompanyName = "", + FirstName = "Customer C", + LastName = "User Test", + VAT = "1234567890123456" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", b => + { + b.Property("DealerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("DealerID"); + + b.ToTable("sales_dealer"); + + b.HasData( + new + { + DealerID = 1, + CompanyName = "Company First", + FirstName = "Dealer A", + LastName = "Egalware", + VAT = "9587362514671527" + }, + new + { + DealerID = 2, + CompanyName = "Company First", + FirstName = "Dealer B", + LastName = "User", + VAT = "9587362514671527" + }, + new + { + DealerID = 3, + CompanyName = "Company Second", + FirstName = "Dealer C", + LastName = "User Test", + VAT = "9587362514671527" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Property("OfferID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Discount") + .HasColumnType("double"); + + b.Property("Envir") + .HasColumnType("int"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OfferID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.ToTable("sales_offer"); + + b.HasData( + new + { + OfferID = 1, + CustomerID = 2, + DealerID = 2, + Description = "Offerta per tre serramenti", + Discount = 0.0, + Envir = 1, + Inserted = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4627), + Modified = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4629), + OffertState = 0, + RefNum = 1, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4624) + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferRowModel", b => + { + b.Property("OfferRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); + + b.Property("AwaitBom") + .HasColumnType("tinyint(1)"); + + b.Property("AwaitPrice") + .HasColumnType("tinyint(1)"); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomOk") + .HasColumnType("tinyint(1)"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Envir") + .HasColumnType("int"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemBOM") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemOk") + .HasColumnType("tinyint(1)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OfferRowUID") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OfferRowID"); + + b.HasIndex("OfferID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_offer_row"); + + b.HasData( + new + { + OfferRowID = 1, + AwaitBom = false, + AwaitPrice = false, + BomCost = 900.0, + BomOk = true, + BomPrice = 950.0, + Envir = 1, + Inserted = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4753), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4755), + Note = "Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000000001", + Qty = 3.0, + RowNum = 1, + SellingItemID = 1, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 2, + AwaitBom = false, + AwaitPrice = false, + BomCost = 160.0, + BomOk = true, + BomPrice = 200.0, + Envir = 1, + Inserted = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4768), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4770), + Note = "Persiana per Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000000002", + Qty = 3.0, + RowNum = 2, + SellingItemID = 2, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 3, + AwaitBom = false, + AwaitPrice = false, + BomCost = 200.0, + BomOk = true, + BomPrice = 250.0, + Envir = 1, + Inserted = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4780), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4782), + Note = "Installazione serramento", + OfferID = 1, + OfferRowUID = "OFF250000000003", + Qty = 3.0, + RowNum = 3, + SellingItemID = 3, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", b => + { + b.Property("OrderID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OrderID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.HasIndex("OfferID"); + + b.ToTable("sales_order"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.Property("OrderRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OrderID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OrderRowID"); + + b.HasIndex("OrderID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_order_row"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.Property("StockMovID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); + + b.Property("CodDoc") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DtCreate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("DtMod") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); + + b.Property("MovCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyRec") + .HasColumnType("double"); + + b.Property("StockStatusId") + .HasColumnType("int"); + + b.Property("UnitVal") + .HasColumnType("double"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("StockMovID"); + + b.HasIndex("MovCod"); + + b.HasIndex("StockStatusId"); + + b.ToTable("stock_mov"); + + b.HasData( + new + { + StockMovID = 1, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4289), + DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4360), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 1, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 2, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4363), + DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4364), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 8.0, + StockStatusId = 2, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 3, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4367), + DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4368), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 3, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 4, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4370), + DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4372), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 4, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 5, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4374), + DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4375), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 10.0, + StockStatusId = 5, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 6, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4378), + DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4379), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 6, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 7, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4381), + DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4383), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 50.0, + StockStatusId = 7, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 8, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4385), + DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4386), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 8, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 9, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4389), + DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4390), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 9, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 10, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4392), + DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4394), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 10, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.Property("StockStatusId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("IsRemn") + .HasColumnType("tinyint(1)"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("Location") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyAvail") + .HasColumnType("double"); + + b.HasKey("StockStatusId"); + + b.HasIndex("ItemID"); + + b.ToTable("stock_status"); + + b.HasData( + new + { + StockStatusId = 1, + IsDeleted = false, + IsRemn = false, + ItemID = 1, + Location = "B001-001-003", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 2, + IsDeleted = false, + IsRemn = false, + ItemID = 2, + Location = "B001-001-002", + QtyAvail = 8.0 + }, + new + { + StockStatusId = 3, + IsDeleted = false, + IsRemn = false, + ItemID = 3, + Location = "B001-001-001", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 4, + IsDeleted = false, + IsRemn = false, + ItemID = 4, + Location = "V002-001-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 5, + IsDeleted = false, + IsRemn = false, + ItemID = 5, + Location = "V001-001-002", + QtyAvail = 10.0 + }, + new + { + StockStatusId = 6, + IsDeleted = false, + IsRemn = false, + ItemID = 6, + Location = "V001-001-003", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 7, + IsDeleted = false, + IsRemn = false, + ItemID = 8, + Location = "V001-001-003", + QtyAvail = 50.0 + }, + new + { + StockStatusId = 8, + IsDeleted = false, + IsRemn = false, + ItemID = 11, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 9, + IsDeleted = false, + IsRemn = false, + ItemID = 9, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 10, + IsDeleted = false, + IsRemn = false, + ItemID = 10, + Location = "S001-001-001", + QtyAvail = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => + { + b.Property("JobID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("JobID"); + + b.ToTable("task_job"); + + b.HasData( + new + { + JobID = 1, + Description = "Rivendita / servizi" + }, + new + { + JobID = 2, + Description = "Serramento Completo Legno su linea Saomad e installatore interno" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.Property("JobStepItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("JobStepID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.HasKey("JobStepItemID"); + + b.HasIndex("ItemID"); + + b.HasIndex("JobStepID"); + + b.ToTable("task_job_step_item"); + + b.HasData( + new + { + JobStepItemID = 1, + Description = "Grezzo legno abete", + Index = 1, + ItemID = 1, + JobStepID = 1, + Qty = 1.0 + }, + new + { + JobStepItemID = 2, + Description = "Vernice trasparente standard 1L", + Index = 2, + ItemID = 8, + JobStepID = 3, + Qty = 0.10000000000000001 + }, + new + { + JobStepItemID = 3, + Description = "Ferramenta AGB - rif. AGFD.00000.00000", + Index = 3, + ItemID = 9, + JobStepID = 4, + Qty = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.Property("JobStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProductivityRate") + .HasColumnType("decimal(65,30)"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.HasKey("JobStepID"); + + b.HasIndex("CostDriverID"); + + b.HasIndex("JobID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ResourceID"); + + b.ToTable("task_job_step"); + + b.HasData( + new + { + JobStepID = 1, + CostDriverID = 3, + Description = "", + Index = 1, + JobID = 2, + PhaseID = 1, + ProductivityRate = 1m, + ResourceID = 1 + }, + new + { + JobStepID = 2, + CostDriverID = 2, + Description = "", + Index = 2, + JobID = 2, + PhaseID = 2, + ProductivityRate = 1m, + ResourceID = 2 + }, + new + { + JobStepID = 3, + CostDriverID = 3, + Description = "", + Index = 3, + JobID = 2, + PhaseID = 3, + ProductivityRate = 1m, + ResourceID = 4 + }, + new + { + JobStepID = 4, + CostDriverID = 3, + Description = "", + Index = 4, + JobID = 2, + PhaseID = 4, + ProductivityRate = 1m, + ResourceID = 6 + }, + new + { + JobStepID = 5, + CostDriverID = 3, + Description = "", + Index = 5, + JobID = 2, + PhaseID = 6, + ProductivityRate = 1m, + ResourceID = 7 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", b => + { + b.Property("PhaseID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("PhaseID"); + + b.ToTable("task_phase"); + + b.HasData( + new + { + PhaseID = 1, + Description = "Taglio tronchetti" + }, + new + { + PhaseID = 2, + Description = "Lavorazione pezzi serramento" + }, + new + { + PhaseID = 3, + Description = "Verniciatura" + }, + new + { + PhaseID = 4, + Description = "Assemblaggio completo" + }, + new + { + PhaseID = 5, + Description = "Assemblaggio Ferramenta" + }, + new + { + PhaseID = 6, + Description = "Installazione e posa in opera" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.CounterModel", b => + { + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("CountName") + .HasColumnType("varchar(255)"); + + b.Property("Counter") + .HasColumnType("int"); + + b.HasKey("RefYear", "CountName"); + + b.ToTable("utils_counter"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Property("ClassCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ClassCod"); + + b.ToTable("utils_gen_class"); + + b.HasData( + new + { + ClassCod = "WoodMat", + Description = "Elenco Materiali Legno" + }, + new + { + ClassCod = "WoodCol", + Description = "Elenco Colori Legno" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.Property("GenValID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); + + b.Property("ClassCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Ordinal") + .HasColumnType("int"); + + b.Property("ValString") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("GenValID"); + + b.HasIndex("ClassCod"); + + b.ToTable("utils_gen_value"); + + 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 = "Legno" + }, + 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.Utils.MovTypeModel", b => + { + b.Property("MovCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("MovCod"); + + b.ToTable("utils_mov_type"); + + b.HasData( + new + { + MovCod = "CAR", + Description = "Carico a magazzino" + }, + new + { + MovCod = "MOV", + Description = "Movimento interno (spostamento)" + }, + new + { + MovCod = "ND", + Description = "Non Definito" + }, + new + { + MovCod = "OFOR", + Description = "Ordine Fornitore" + }, + new + { + MovCod = "RETT", + Description = "Rettifica magazzino" + }, + new + { + MovCod = "SCAR", + Description = "Scarico da magazzino" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", b => + { + b.Property("TagID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("TagID"); + + b.ToTable("utils_tags"); + + b.HasData( + new + { + TagID = 1, + Description = "Tag 01" + }, + new + { + TagID = 2, + Description = "Tag 02" + }, + new + { + TagID = 3, + Description = "Tag 03" + }, + new + { + TagID = 4, + Description = "Tag 04" + }, + new + { + TagID = 5, + Description = "Tag 05" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", "ItemGroupNav") + .WithMany() + .HasForeignKey("CodGroup") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemGroupNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") + .WithMany() + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("JobNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", "OrderRowNav") + .WithMany() + .HasForeignKey("OrderRowID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", "ProductionBatchNav") + .WithMany() + .HasForeignKey("ProductionBatchID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderRowNav"); + + b.Navigation("ProductionBatchNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", "ProdItemNav") + .WithMany() + .HasForeignKey("ProdItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("PhaseNav"); + + b.Navigation("ProdItemNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", 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.OfferRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany("OfferRowNav") + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OfferNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", 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.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany() + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CustomerNav"); + + b.Navigation("DealerNav"); + + b.Navigation("OfferNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", "OrderNav") + .WithMany() + .HasForeignKey("OrderID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", "MovTypeNav") + .WithMany() + .HasForeignKey("MovCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", "StockStatusNav") + .WithMany() + .HasForeignKey("StockStatusId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("MovTypeNav"); + + b.Navigation("StockStatusNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", "JobStepNav") + .WithMany() + .HasForeignKey("JobStepID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") + .WithMany("JobStepNav") + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + + b.Navigation("JobNav"); + + b.Navigation("PhaseNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", "GenClassNav") + .WithMany("GenValNav") + .HasForeignKey("ClassCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GenClassNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Navigation("OfferRowNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => + { + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Navigation("GenValNav"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251002110150_AddConfTables_01.cs b/EgwCoreLib.Lux.Data/Migrations/20251002110150_AddConfTables_01.cs new file mode 100644 index 00000000..b42e0a3d --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20251002110150_AddConfTables_01.cs @@ -0,0 +1,279 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EgwCoreLib.Lux.Data.Migrations +{ + /// + public partial class AddConfTables_01 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "conf_glass", + columns: table => new + { + GlassID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Code = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Thickness = table.Column(type: "double", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_conf_glass", x => x.GlassID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "conf_profile", + columns: table => new + { + ProfileID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Code = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Thickness = table.Column(type: "double", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_conf_profile", x => x.ProfileID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "conf_wood", + columns: table => new + { + WoodID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + ExtId = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Type = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_conf_wood", x => x.WoodID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4627), new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4629), new DateTime(2025, 11, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4624) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4753), new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4755) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4768), new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4770) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4780), new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4782) }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4289)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4363)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4367)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4370)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4374)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4378)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4381)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4385)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4389)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4392)); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "conf_glass"); + + migrationBuilder.DropTable( + name: "conf_profile"); + + migrationBuilder.DropTable( + name: "conf_wood"); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4738), new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4739), new DateTime(2025, 10, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4735) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4848), new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4850) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4862), new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4864) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4874), new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4875) }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4416)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4475)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4479)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4482)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4486)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4490)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4493)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4497)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4501)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4504)); + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251002134750_AddInitConfVal.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20251002134750_AddInitConfVal.Designer.cs new file mode 100644 index 00000000..98cfa909 --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20251002134750_AddInitConfVal.Designer.cs @@ -0,0 +1,2400 @@ +// +using System; +using EgwCoreLib.Lux.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace EgwCoreLib.Lux.Data.Migrations +{ + [DbContext(typeof(DataLayerContext))] + [Migration("20251002134750_AddInitConfVal")] + partial class AddInitConfVal + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.17") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.GlassModel", b => + { + b.Property("GlassID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GlassID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Thickness") + .HasColumnType("double"); + + b.HasKey("GlassID"); + + b.ToTable("conf_glass"); + + b.HasData( + new + { + GlassID = 1, + Code = "", + Description = "Vetro BE 2S 4/12/4", + Thickness = 20.0 + }, + new + { + GlassID = 2, + Code = "", + Description = "Vetro BE 3S 4/12/4/12/4", + Thickness = 36.0 + }, + new + { + GlassID = 3, + Code = "", + Description = "Vetro BE 3S 4/16/4/16/4", + Thickness = 44.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.ProfileModel", b => + { + b.Property("ProfileID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProfileID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Thickness") + .HasColumnType("double"); + + b.HasKey("ProfileID"); + + b.ToTable("conf_profile"); + + b.HasData( + new + { + ProfileID = 1, + Code = "", + Description = "Profilo 32", + Thickness = 32.0 + }, + new + { + ProfileID = 2, + Code = "", + Description = "Profilo 48", + Thickness = 48.0 + }, + new + { + ProfileID = 3, + Code = "", + Description = "Profilo 58", + Thickness = 58.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.WoodModel", b => + { + b.Property("WoodID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("WoodID")); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("ExtId") + .HasColumnType("longtext"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("WoodID"); + + b.ToTable("conf_wood"); + + b.HasData( + new + { + WoodID = 1, + Description = "Abete", + ExtId = "", + Type = 1 + }, + new + { + WoodID = 2, + Description = "Acero", + ExtId = "", + Type = 1 + }, + new + { + WoodID = 3, + Description = "Pino", + ExtId = "", + Type = 2 + }, + new + { + WoodID = 4, + Description = "Tek", + ExtId = "", + Type = 3 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", b => + { + b.Property("CostDriverID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CostDriverID")); + + b.Property("Descript") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Unit") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CostDriverID"); + + b.ToTable("cost_driver"); + + b.HasData( + new + { + CostDriverID = 1, + Descript = "Ore lavorate per step/fase", + Name = "WorkHour", + Unit = "h" + }, + new + { + CostDriverID = 2, + Descript = "Metri prodotti per step/fase", + Name = "Meter", + Unit = "m" + }, + new + { + CostDriverID = 3, + Descript = "Numero unità prodotte (lavorate) per step/fase", + Name = "Unit", + Unit = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.Property("ResourceID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); + + b.Property("CostDriverBudget") + .HasColumnType("decimal(65,30)"); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("EBTPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("FixedCost") + .HasColumnType("decimal(65,30)"); + + b.Property("LaborCost") + .HasColumnType("decimal(65,30)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OverHeadCost") + .HasColumnType("decimal(65,30)"); + + b.Property("OverHeadPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("PriceMargin") + .HasColumnType("decimal(65,30)"); + + b.Property("VariableCost") + .HasColumnType("decimal(65,30)"); + + b.HasKey("ResourceID"); + + b.HasIndex("CostDriverID"); + + b.ToTable("cost_resource"); + + b.HasData( + new + { + ResourceID = 1, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 12000m, + LaborCost = 30m, + Name = "Sezionatrice", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 2, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 100000m, + LaborCost = 40m, + Name = "Linea SAOMAD WoodPecker Just 3500", + OverHeadCost = 15000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 30000m + }, + new + { + ResourceID = 3, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 35m, + Name = "Linea Pantografo", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 4, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 30m, + Name = "Stazione Verniciatura", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 5, + CostDriverBudget = 220m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 6000m, + LaborCost = 30m, + Name = "Verniciatura Manuale", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 2000m + }, + new + { + ResourceID = 6, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 500m, + LaborCost = 30m, + Name = "Montaggio Manuale", + OverHeadCost = 500m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 500m + }, + new + { + ResourceID = 7, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 0m, + LaborCost = 40m, + Name = "Installatore", + OverHeadCost = 0m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 3000m + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", b => + { + b.Property("CodGroup") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CodGroup"); + + b.ToTable("item_group"); + + b.HasData( + new + { + CodGroup = "WindowTrunk", + Description = "Barre legno per lavorazione" + }, + new + { + CodGroup = "WindowGlass", + Description = "Vetri serramento" + }, + new + { + CodGroup = "WindowVarnish", + Description = "Vernici per legno" + }, + new + { + CodGroup = "WindowHardware", + Description = "Ferramenta serramento" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.Property("ItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); + + b.Property("CodGroup") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemIDParent") + .HasColumnType("int"); + + b.Property("ItemType") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("QtyMax") + .HasColumnType("double"); + + b.Property("QtyMin") + .HasColumnType("double"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ItemID"); + + b.HasIndex("CodGroup"); + + b.ToTable("item_item"); + + b.HasData( + new + { + ItemID = 1, + CodGroup = "WindowTrunk", + Cost = 20.0, + Description = "BARRA-60x80 generica", + ExtItemCode = "", + IsService = false, + ItemCode = 1001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.29999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "BARR.001", + UM = "#" + }, + new + { + ItemID = 2, + CodGroup = "WindowTrunk", + Cost = 16.5, + Description = "Barra 60x80, lunghezza 12m", + ExtItemCode = "BARRA-60x80x12000", + IsService = false, + ItemCode = 1002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.12000", + UM = "#" + }, + new + { + ItemID = 3, + CodGroup = "WindowTrunk", + Cost = 17.5, + Description = "Barra 60x80, lunghezza 8m", + ExtItemCode = "BARRA-60x80x8000", + IsService = false, + ItemCode = 1003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.22, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.8000", + UM = "#" + }, + new + { + ItemID = 4, + CodGroup = "WindowTrunk", + Cost = 15.5, + Description = "Barra 60x80, lunghezza 16m", + ExtItemCode = "BARRA-60x80x16000", + IsService = false, + ItemCode = 1004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.16000", + UM = "#" + }, + new + { + ItemID = 5, + CodGroup = "WindowGlass", + Cost = 300.0, + Description = "Vetro triplo, basso indice termico, 800x1000", + ExtItemCode = "VETRO-3L-THERMO-800x1000", + IsService = false, + ItemCode = 2001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3T.800.1000", + UM = "m2" + }, + new + { + ItemID = 6, + CodGroup = "WindowGlass", + Cost = 200.0, + Description = "Vetro doppio, 800x1000", + ExtItemCode = "VETRO-2L-800x1000", + IsService = false, + ItemCode = 2002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.14999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V2.800.1000", + UM = "m2" + }, + new + { + ItemID = 7, + CodGroup = "WindowGlass", + Cost = 250.0, + Description = "Vetro triplo, 800x1000", + ExtItemCode = "VETRO-3L-800x1000", + IsService = false, + ItemCode = 2003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.17999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3.800.1000", + UM = "m2" + }, + new + { + ItemID = 8, + CodGroup = "WindowVarnish", + Cost = 20.0, + Description = "Vernice trasparente", + ExtItemCode = "VERN-TRASP", + IsService = false, + ItemCode = 3001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "VT.STD", + UM = "l" + }, + new + { + ItemID = 9, + CodGroup = "WindowHardware", + Cost = 65.0, + Description = "Kit standard completo AGB tipo 001", + ExtItemCode = "KIT-001", + IsService = false, + ItemCode = 5001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-KIT-001", + UM = "#" + }, + new + { + ItemID = 10, + CodGroup = "WindowHardware", + Cost = 10.0, + Description = "Cerniera AGB tipo 001", + ExtItemCode = "CERN-001", + IsService = false, + ItemCode = 5002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-CERN-001", + UM = "#" + }, + new + { + ItemID = 11, + CodGroup = "WindowHardware", + Cost = 15.0, + Description = "Serratura AGB tipo 001", + ExtItemCode = "SERR-001", + IsService = false, + ItemCode = 5003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-SERR-001", + UM = "#" + }, + new + { + ItemID = 12, + CodGroup = "WindowHardware", + Cost = 25.0, + Description = "Maniglia AGB tipo 001", + ExtItemCode = "MAN-001", + IsService = false, + ItemCode = 5004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-MAN-001", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.Property("SellingItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SellingItemID"); + + b.HasIndex("JobID"); + + b.ToTable("item_selling_item"); + + b.HasData( + new + { + SellingItemID = 1, + Cost = 820.0, + Description = "Finestra anta Singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 2, + Margin = 0.20000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 2, + Cost = 150.0, + Description = "Persiana anta singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.10000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 3, + Cost = 200.0, + Description = "Installazione", + ExtItemCode = "", + IsService = true, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SupplierModel", b => + { + b.Property("SupplierID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SupplierID"); + + b.ToTable("item_supplier"); + + b.HasData( + new + { + SupplierID = 1, + CompanyName = "Company One", + FirstName = "Supplier A", + LastName = "Egalware", + VAT = "7294857103879254" + }, + new + { + SupplierID = 2, + CompanyName = "Company Two", + FirstName = "Supplier B", + LastName = "User", + VAT = "7294857103879254" + }, + new + { + SupplierID = 3, + CompanyName = "Company Two", + FirstName = "Supplier C", + LastName = "User Test", + VAT = "7294857103879254" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", b => + { + b.Property("ProductionBatchID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DueDate") + .HasColumnType("datetime(6)"); + + b.HasKey("ProductionBatchID"); + + b.ToTable("production_batch"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.Property("ProdItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("OrderRowID") + .HasColumnType("int"); + + b.Property("ProductionBatchID") + .HasColumnType("int"); + + b.HasKey("ProdItemID"); + + b.HasIndex("OrderRowID"); + + b.HasIndex("ProductionBatchID"); + + b.ToTable("production_item"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.Property("ProdItemStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProdItemID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.Property("WorkTime") + .HasColumnType("double"); + + b.HasKey("ProdItemStepID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ProdItemID"); + + b.HasIndex("ResourceID"); + + b.ToTable("production_item_step"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", b => + { + b.Property("CustomerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CustomerID"); + + b.ToTable("sales_customer"); + + b.HasData( + new + { + CustomerID = 1, + CompanyName = "", + FirstName = "Customer A", + LastName = "Egalware", + VAT = "1234567890123456" + }, + new + { + CustomerID = 2, + CompanyName = "", + FirstName = "Customer B", + LastName = "User", + VAT = "1234567890123456" + }, + new + { + CustomerID = 3, + CompanyName = "", + FirstName = "Customer C", + LastName = "User Test", + VAT = "1234567890123456" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", b => + { + b.Property("DealerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("DealerID"); + + b.ToTable("sales_dealer"); + + b.HasData( + new + { + DealerID = 1, + CompanyName = "Company First", + FirstName = "Dealer A", + LastName = "Egalware", + VAT = "9587362514671527" + }, + new + { + DealerID = 2, + CompanyName = "Company First", + FirstName = "Dealer B", + LastName = "User", + VAT = "9587362514671527" + }, + new + { + DealerID = 3, + CompanyName = "Company Second", + FirstName = "Dealer C", + LastName = "User Test", + VAT = "9587362514671527" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Property("OfferID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Discount") + .HasColumnType("double"); + + b.Property("Envir") + .HasColumnType("int"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OfferID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.ToTable("sales_offer"); + + b.HasData( + new + { + OfferID = 1, + CustomerID = 2, + DealerID = 2, + Description = "Offerta per tre serramenti", + Discount = 0.0, + Envir = 1, + Inserted = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9241), + Modified = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9242), + OffertState = 0, + RefNum = 1, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9238) + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferRowModel", b => + { + b.Property("OfferRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); + + b.Property("AwaitBom") + .HasColumnType("tinyint(1)"); + + b.Property("AwaitPrice") + .HasColumnType("tinyint(1)"); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomOk") + .HasColumnType("tinyint(1)"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Envir") + .HasColumnType("int"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemBOM") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemOk") + .HasColumnType("tinyint(1)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OfferRowUID") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OfferRowID"); + + b.HasIndex("OfferID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_offer_row"); + + b.HasData( + new + { + OfferRowID = 1, + AwaitBom = false, + AwaitPrice = false, + BomCost = 900.0, + BomOk = true, + BomPrice = 950.0, + Envir = 1, + Inserted = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9337), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9339), + Note = "Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000000001", + Qty = 3.0, + RowNum = 1, + SellingItemID = 1, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 2, + AwaitBom = false, + AwaitPrice = false, + BomCost = 160.0, + BomOk = true, + BomPrice = 200.0, + Envir = 1, + Inserted = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9350), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9352), + Note = "Persiana per Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000000002", + Qty = 3.0, + RowNum = 2, + SellingItemID = 2, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 3, + AwaitBom = false, + AwaitPrice = false, + BomCost = 200.0, + BomOk = true, + BomPrice = 250.0, + Envir = 1, + Inserted = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9362), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9364), + Note = "Installazione serramento", + OfferID = 1, + OfferRowUID = "OFF250000000003", + Qty = 3.0, + RowNum = 3, + SellingItemID = 3, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", b => + { + b.Property("OrderID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OrderID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.HasIndex("OfferID"); + + b.ToTable("sales_order"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.Property("OrderRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OrderID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OrderRowID"); + + b.HasIndex("OrderID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_order_row"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.Property("StockMovID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); + + b.Property("CodDoc") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DtCreate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("DtMod") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); + + b.Property("MovCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyRec") + .HasColumnType("double"); + + b.Property("StockStatusId") + .HasColumnType("int"); + + b.Property("UnitVal") + .HasColumnType("double"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("StockMovID"); + + b.HasIndex("MovCod"); + + b.HasIndex("StockStatusId"); + + b.ToTable("stock_mov"); + + b.HasData( + new + { + StockMovID = 1, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8944), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8989), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 1, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 2, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8992), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8993), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 8.0, + StockStatusId = 2, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 3, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8995), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8997), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 3, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 4, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8999), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9000), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 4, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 5, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9003), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9004), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 10.0, + StockStatusId = 5, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 6, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9006), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9008), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 6, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 7, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9010), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9011), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 50.0, + StockStatusId = 7, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 8, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9013), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9015), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 8, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 9, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9017), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9018), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 9, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 10, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9021), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9023), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 10, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.Property("StockStatusId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("IsRemn") + .HasColumnType("tinyint(1)"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("Location") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyAvail") + .HasColumnType("double"); + + b.HasKey("StockStatusId"); + + b.HasIndex("ItemID"); + + b.ToTable("stock_status"); + + b.HasData( + new + { + StockStatusId = 1, + IsDeleted = false, + IsRemn = false, + ItemID = 1, + Location = "B001-001-003", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 2, + IsDeleted = false, + IsRemn = false, + ItemID = 2, + Location = "B001-001-002", + QtyAvail = 8.0 + }, + new + { + StockStatusId = 3, + IsDeleted = false, + IsRemn = false, + ItemID = 3, + Location = "B001-001-001", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 4, + IsDeleted = false, + IsRemn = false, + ItemID = 4, + Location = "V002-001-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 5, + IsDeleted = false, + IsRemn = false, + ItemID = 5, + Location = "V001-001-002", + QtyAvail = 10.0 + }, + new + { + StockStatusId = 6, + IsDeleted = false, + IsRemn = false, + ItemID = 6, + Location = "V001-001-003", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 7, + IsDeleted = false, + IsRemn = false, + ItemID = 8, + Location = "V001-001-003", + QtyAvail = 50.0 + }, + new + { + StockStatusId = 8, + IsDeleted = false, + IsRemn = false, + ItemID = 11, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 9, + IsDeleted = false, + IsRemn = false, + ItemID = 9, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 10, + IsDeleted = false, + IsRemn = false, + ItemID = 10, + Location = "S001-001-001", + QtyAvail = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => + { + b.Property("JobID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("JobID"); + + b.ToTable("task_job"); + + b.HasData( + new + { + JobID = 1, + Description = "Rivendita / servizi" + }, + new + { + JobID = 2, + Description = "Serramento Completo Legno su linea Saomad e installatore interno" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.Property("JobStepItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("JobStepID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.HasKey("JobStepItemID"); + + b.HasIndex("ItemID"); + + b.HasIndex("JobStepID"); + + b.ToTable("task_job_step_item"); + + b.HasData( + new + { + JobStepItemID = 1, + Description = "Grezzo legno abete", + Index = 1, + ItemID = 1, + JobStepID = 1, + Qty = 1.0 + }, + new + { + JobStepItemID = 2, + Description = "Vernice trasparente standard 1L", + Index = 2, + ItemID = 8, + JobStepID = 3, + Qty = 0.10000000000000001 + }, + new + { + JobStepItemID = 3, + Description = "Ferramenta AGB - rif. AGFD.00000.00000", + Index = 3, + ItemID = 9, + JobStepID = 4, + Qty = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.Property("JobStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProductivityRate") + .HasColumnType("decimal(65,30)"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.HasKey("JobStepID"); + + b.HasIndex("CostDriverID"); + + b.HasIndex("JobID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ResourceID"); + + b.ToTable("task_job_step"); + + b.HasData( + new + { + JobStepID = 1, + CostDriverID = 3, + Description = "", + Index = 1, + JobID = 2, + PhaseID = 1, + ProductivityRate = 1m, + ResourceID = 1 + }, + new + { + JobStepID = 2, + CostDriverID = 2, + Description = "", + Index = 2, + JobID = 2, + PhaseID = 2, + ProductivityRate = 1m, + ResourceID = 2 + }, + new + { + JobStepID = 3, + CostDriverID = 3, + Description = "", + Index = 3, + JobID = 2, + PhaseID = 3, + ProductivityRate = 1m, + ResourceID = 4 + }, + new + { + JobStepID = 4, + CostDriverID = 3, + Description = "", + Index = 4, + JobID = 2, + PhaseID = 4, + ProductivityRate = 1m, + ResourceID = 6 + }, + new + { + JobStepID = 5, + CostDriverID = 3, + Description = "", + Index = 5, + JobID = 2, + PhaseID = 6, + ProductivityRate = 1m, + ResourceID = 7 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", b => + { + b.Property("PhaseID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("PhaseID"); + + b.ToTable("task_phase"); + + b.HasData( + new + { + PhaseID = 1, + Description = "Taglio tronchetti" + }, + new + { + PhaseID = 2, + Description = "Lavorazione pezzi serramento" + }, + new + { + PhaseID = 3, + Description = "Verniciatura" + }, + new + { + PhaseID = 4, + Description = "Assemblaggio completo" + }, + new + { + PhaseID = 5, + Description = "Assemblaggio Ferramenta" + }, + new + { + PhaseID = 6, + Description = "Installazione e posa in opera" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.CounterModel", b => + { + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("CountName") + .HasColumnType("varchar(255)"); + + b.Property("Counter") + .HasColumnType("int"); + + b.HasKey("RefYear", "CountName"); + + b.ToTable("utils_counter"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Property("ClassCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ClassCod"); + + b.ToTable("utils_gen_class"); + + b.HasData( + new + { + ClassCod = "WoodMat", + Description = "Elenco Materiali Legno" + }, + new + { + ClassCod = "WoodCol", + Description = "Elenco Colori Legno" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.Property("GenValID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); + + b.Property("ClassCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Ordinal") + .HasColumnType("int"); + + b.Property("ValString") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("GenValID"); + + b.HasIndex("ClassCod"); + + b.ToTable("utils_gen_value"); + + 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 = "Legno" + }, + 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.Utils.MovTypeModel", b => + { + b.Property("MovCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("MovCod"); + + b.ToTable("utils_mov_type"); + + b.HasData( + new + { + MovCod = "CAR", + Description = "Carico a magazzino" + }, + new + { + MovCod = "MOV", + Description = "Movimento interno (spostamento)" + }, + new + { + MovCod = "ND", + Description = "Non Definito" + }, + new + { + MovCod = "OFOR", + Description = "Ordine Fornitore" + }, + new + { + MovCod = "RETT", + Description = "Rettifica magazzino" + }, + new + { + MovCod = "SCAR", + Description = "Scarico da magazzino" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", b => + { + b.Property("TagID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("TagID"); + + b.ToTable("utils_tags"); + + b.HasData( + new + { + TagID = 1, + Description = "Tag 01" + }, + new + { + TagID = 2, + Description = "Tag 02" + }, + new + { + TagID = 3, + Description = "Tag 03" + }, + new + { + TagID = 4, + Description = "Tag 04" + }, + new + { + TagID = 5, + Description = "Tag 05" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", "ItemGroupNav") + .WithMany() + .HasForeignKey("CodGroup") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemGroupNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") + .WithMany() + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("JobNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", "OrderRowNav") + .WithMany() + .HasForeignKey("OrderRowID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", "ProductionBatchNav") + .WithMany() + .HasForeignKey("ProductionBatchID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderRowNav"); + + b.Navigation("ProductionBatchNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", "ProdItemNav") + .WithMany() + .HasForeignKey("ProdItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("PhaseNav"); + + b.Navigation("ProdItemNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", 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.OfferRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany("OfferRowNav") + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OfferNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", 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.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany() + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CustomerNav"); + + b.Navigation("DealerNav"); + + b.Navigation("OfferNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", "OrderNav") + .WithMany() + .HasForeignKey("OrderID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", "MovTypeNav") + .WithMany() + .HasForeignKey("MovCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", "StockStatusNav") + .WithMany() + .HasForeignKey("StockStatusId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("MovTypeNav"); + + b.Navigation("StockStatusNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", "JobStepNav") + .WithMany() + .HasForeignKey("JobStepID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") + .WithMany("JobStepNav") + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + + b.Navigation("JobNav"); + + b.Navigation("PhaseNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", "GenClassNav") + .WithMany("GenValNav") + .HasForeignKey("ClassCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GenClassNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Navigation("OfferRowNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => + { + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Navigation("GenValNav"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251002134750_AddInitConfVal.cs b/EgwCoreLib.Lux.Data/Migrations/20251002134750_AddInitConfVal.cs new file mode 100644 index 00000000..a851e27a --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20251002134750_AddInitConfVal.cs @@ -0,0 +1,298 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional + +namespace EgwCoreLib.Lux.Data.Migrations +{ + /// + public partial class AddInitConfVal : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.InsertData( + table: "conf_glass", + columns: new[] { "GlassID", "Code", "Description", "Thickness" }, + values: new object[,] + { + { 1, "", "Vetro BE 2S 4/12/4", 20.0 }, + { 2, "", "Vetro BE 3S 4/12/4/12/4", 36.0 }, + { 3, "", "Vetro BE 3S 4/16/4/16/4", 44.0 } + }); + + migrationBuilder.InsertData( + table: "conf_profile", + columns: new[] { "ProfileID", "Code", "Description", "Thickness" }, + values: new object[,] + { + { 1, "", "Profilo 32", 32.0 }, + { 2, "", "Profilo 48", 48.0 }, + { 3, "", "Profilo 58", 58.0 } + }); + + migrationBuilder.InsertData( + table: "conf_wood", + columns: new[] { "WoodID", "Description", "ExtId", "Type" }, + values: new object[,] + { + { 1, "Abete", "", 1 }, + { 2, "Acero", "", 1 }, + { 3, "Pino", "", 2 }, + { 4, "Tek", "", 3 } + }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9241), new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9242), new DateTime(2025, 11, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9238) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9337), new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9339) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9350), new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9352) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9362), new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9364) }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8944)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8992)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8995)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8999)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9003)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9006)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9010)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9013)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9017)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9021)); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DeleteData( + table: "conf_glass", + keyColumn: "GlassID", + keyValue: 1); + + migrationBuilder.DeleteData( + table: "conf_glass", + keyColumn: "GlassID", + keyValue: 2); + + migrationBuilder.DeleteData( + table: "conf_glass", + keyColumn: "GlassID", + keyValue: 3); + + migrationBuilder.DeleteData( + table: "conf_profile", + keyColumn: "ProfileID", + keyValue: 1); + + migrationBuilder.DeleteData( + table: "conf_profile", + keyColumn: "ProfileID", + keyValue: 2); + + migrationBuilder.DeleteData( + table: "conf_profile", + keyColumn: "ProfileID", + keyValue: 3); + + migrationBuilder.DeleteData( + table: "conf_wood", + keyColumn: "WoodID", + keyValue: 1); + + migrationBuilder.DeleteData( + table: "conf_wood", + keyColumn: "WoodID", + keyValue: 2); + + migrationBuilder.DeleteData( + table: "conf_wood", + keyColumn: "WoodID", + keyValue: 3); + + migrationBuilder.DeleteData( + table: "conf_wood", + keyColumn: "WoodID", + keyValue: 4); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4627), new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4629), new DateTime(2025, 11, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4624) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4753), new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4755) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4768), new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4770) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4780), new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4782) }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4289)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4363)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4367)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4370)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4374)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4378)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4381)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4385)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4389)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4392)); + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs index 1fbe80cd..693e5a6a 100644 --- a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs +++ b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs @@ -22,6 +22,148 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.GlassModel", b => + { + b.Property("GlassID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GlassID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Thickness") + .HasColumnType("double"); + + b.HasKey("GlassID"); + + b.ToTable("conf_glass"); + + b.HasData( + new + { + GlassID = 1, + Code = "", + Description = "Vetro BE 2S 4/12/4", + Thickness = 20.0 + }, + new + { + GlassID = 2, + Code = "", + Description = "Vetro BE 3S 4/12/4/12/4", + Thickness = 36.0 + }, + new + { + GlassID = 3, + Code = "", + Description = "Vetro BE 3S 4/16/4/16/4", + Thickness = 44.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.ProfileModel", b => + { + b.Property("ProfileID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProfileID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Thickness") + .HasColumnType("double"); + + b.HasKey("ProfileID"); + + b.ToTable("conf_profile"); + + b.HasData( + new + { + ProfileID = 1, + Code = "", + Description = "Profilo 32", + Thickness = 32.0 + }, + new + { + ProfileID = 2, + Code = "", + Description = "Profilo 48", + Thickness = 48.0 + }, + new + { + ProfileID = 3, + Code = "", + Description = "Profilo 58", + Thickness = 58.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.WoodModel", b => + { + b.Property("WoodID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("WoodID")); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("ExtId") + .HasColumnType("longtext"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("WoodID"); + + b.ToTable("conf_wood"); + + b.HasData( + new + { + WoodID = 1, + Description = "Abete", + ExtId = "", + Type = 1 + }, + new + { + WoodID = 2, + Description = "Acero", + ExtId = "", + Type = 1 + }, + new + { + WoodID = 3, + Description = "Pino", + ExtId = "", + Type = 2 + }, + new + { + WoodID = 4, + Description = "Tek", + ExtId = "", + Type = 3 + }); + }); + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", b => { b.Property("CostDriverID") @@ -948,13 +1090,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta per tre serramenti", Discount = 0.0, Envir = 1, - Inserted = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4738), - Modified = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4739), + Inserted = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9241), + Modified = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9242), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 10, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4735) + ValidUntil = new DateTime(2025, 11, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9238) }); }); @@ -1049,11 +1191,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 950.0, Envir = 1, - Inserted = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4848), + Inserted = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9337), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4850), + Modified = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9339), Note = "Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000001", @@ -1073,11 +1215,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 200.0, Envir = 1, - Inserted = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4862), + Inserted = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9350), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4864), + Modified = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9352), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000002", @@ -1097,11 +1239,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 250.0, Envir = 1, - Inserted = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4874), + Inserted = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9362), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4875), + Modified = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9364), Note = "Installazione serramento", OfferID = 1, OfferRowUID = "OFF250000000003", @@ -1284,8 +1426,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 1, CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4416), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4472), + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8944), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8989), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1297,8 +1439,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4475), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4476), + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8992), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8993), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -1310,8 +1452,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4479), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4480), + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8995), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8997), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1323,8 +1465,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4482), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4484), + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8999), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9000), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1336,8 +1478,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4486), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4487), + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9003), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9004), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -1349,8 +1491,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4490), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4491), + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9006), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9008), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1362,8 +1504,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4493), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4495), + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9010), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9011), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -1375,8 +1517,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4497), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4498), + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9013), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9015), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1388,8 +1530,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4501), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4502), + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9017), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9018), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1401,8 +1543,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4504), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4506), + DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9021), + DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9023), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, diff --git a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs index c546538e..2c621f48 100644 --- a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs +++ b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs @@ -1,4 +1,5 @@ -using EgwCoreLib.Lux.Data.DbModel.Cost; +using EgwCoreLib.Lux.Data.DbModel.Config; +using EgwCoreLib.Lux.Data.DbModel.Cost; using EgwCoreLib.Lux.Data.DbModel.Items; using EgwCoreLib.Lux.Data.DbModel.Sales; using EgwCoreLib.Lux.Data.DbModel.Stock; @@ -43,6 +44,23 @@ namespace EgwCoreLib.Lux.Data new GenValueModel { GenValID = 6, Ordinal = 4, ClassCod = "WoodCol", ValString = "Nero" } ); + modelBuilder.Entity().HasData( + new GlassModel { GlassID = 1, Description = "Vetro BE 2S 4/12/4", Thickness = 20 }, + new GlassModel { GlassID = 2, Description = "Vetro BE 3S 4/12/4/12/4", Thickness = 36 }, + new GlassModel { GlassID = 3, Description = "Vetro BE 3S 4/16/4/16/4", Thickness = 44 } + ); + modelBuilder.Entity().HasData( + new ProfileModel { ProfileID = 1, Description = "Profilo 32", Thickness = 32 }, + new ProfileModel { ProfileID = 2, Description = "Profilo 48", Thickness = 48 }, + new ProfileModel { ProfileID = 3, Description = "Profilo 58", Thickness = 58 } + ); + modelBuilder.Entity().HasData( + new WoodModel { WoodID = 1, Description = "Abete", Type = 1 }, + new WoodModel { WoodID = 2, Description = "Acero", Type = 1 }, + new WoodModel { WoodID = 3, Description = "Pino", Type = 2 }, + new WoodModel { WoodID = 4, Description = "Tek", Type = 3 } + ); + // valori base classi generiche diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index efe7a9c3..c53cfd6a 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -17,6 +17,7 @@ using System.Threading.Tasks; using static EgwCoreLib.Lux.Core.Enums; using static System.Runtime.InteropServices.JavaScript.JSType; using EgwCoreLib.Lux.Data.DbModel.Items; +using EgwCoreLib.Lux.Data.DbModel.Config; namespace EgwCoreLib.Lux.Data.Services { @@ -46,6 +47,108 @@ namespace EgwCoreLib.Lux.Data.Services #region Public Methods + /// + /// Elenco completo Config Glass + /// + /// + public async Task> ConfGlassGetAllAsync() + { + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + List? result = new List(); + // cerco in redis... + string currKey = $"{redisBaseKey}:ConfGlass"; + RedisValue rawData = await redisDb.StringGetAsync(currKey); + if (rawData.HasValue) + { + result = JsonConvert.DeserializeObject>($"{rawData}"); + source = "REDIS"; + } + else + { + result = await dbController.ConfGlassGetAllAsync(); + // serializzo e salvo con config x evitare loop... + rawData = JsonConvert.SerializeObject(result, JSSettings); + await redisDb.StringSetAsync(currKey, rawData, LongCache); + } + if (result == null) + { + result = new List(); + } + sw.Stop(); + Log.Debug($"ConfGlassGetAllAsync | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } + + /// + /// Elenco completo Config Profile + /// + /// + public async Task> ConfProfileGetAllAsync() + { + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + List? result = new List(); + // cerco in redis... + string currKey = $"{redisBaseKey}:ConfProfile"; + RedisValue rawData = await redisDb.StringGetAsync(currKey); + if (rawData.HasValue) + { + result = JsonConvert.DeserializeObject>($"{rawData}"); + source = "REDIS"; + } + else + { + result = await dbController.ConfProfileGetAllAsync(); + // serializzo e salvo con config x evitare loop... + rawData = JsonConvert.SerializeObject(result, JSSettings); + await redisDb.StringSetAsync(currKey, rawData, LongCache); + } + if (result == null) + { + result = new List(); + } + sw.Stop(); + Log.Debug($"ConfProfileGetAllAsync | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } + + /// + /// Elenco completo Config Wood + /// + /// + public async Task> ConfWoodGetAllAsync() + { + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + List? result = new List(); + // cerco in redis... + string currKey = $"{redisBaseKey}:ConfWood"; + RedisValue rawData = await redisDb.StringGetAsync(currKey); + if (rawData.HasValue) + { + result = JsonConvert.DeserializeObject>($"{rawData}"); + source = "REDIS"; + } + else + { + result = await dbController.ConfWoodGetAllAsync(); + // serializzo e salvo con config x evitare loop... + rawData = JsonConvert.SerializeObject(result, JSSettings); + await redisDb.StringSetAsync(currKey, rawData, LongCache); + } + if (result == null) + { + result = new List(); + } + sw.Stop(); + Log.Debug($"ConfWoodGetAllAsync | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } + /// /// Elenco completo Customers /// @@ -158,6 +261,7 @@ namespace EgwCoreLib.Lux.Data.Services Log.Debug($"FlushCacheOffersAsync in {sw.Elapsed.TotalMilliseconds} ms"); return answ; } + /// /// Reset cache sistema x Ordini modalità async /// @@ -246,20 +350,6 @@ namespace EgwCoreLib.Lux.Data.Services return result; } - /// - /// Esegue spostamento nell'ordinamento relativo alla classe + refresh cache - /// - /// - /// - /// - public async Task GenValMoveAsync(GenValueModel selRec, bool moveUp) - { - bool result = await dbController.GenValMoveAsync(selRec, moveUp); - await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:GenClass"); - await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:GenVal:*"); - return result; - } - /// /// Elenco valori x classe richiesta /// @@ -295,6 +385,20 @@ namespace EgwCoreLib.Lux.Data.Services return result; } + /// + /// Esegue spostamento nell'ordinamento relativo alla classe + refresh cache + /// + /// + /// + /// + public async Task GenValMoveAsync(GenValueModel selRec, bool moveUp) + { + bool result = await dbController.GenValMoveAsync(selRec, moveUp); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:GenClass"); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:GenVal:*"); + return result; + } + /// /// Esegue Upsert del record ricevuto /// From 38646b2a1b574d42f748a309018f7c2fc24701a4 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 2 Oct 2025 15:48:55 +0200 Subject: [PATCH 35/65] Inizio gestione conf parametri --- .../EgwCoreLib.Lux.Core.csproj | 4 +- Lux.API/Lux.API.csproj | 2 +- Lux.UI/Components/Compo/ConfGlassMan.razor | 56 ++++++ Lux.UI/Components/Compo/ConfGlassMan.razor.cs | 173 ++++++++++++++++++ Lux.UI/Components/Compo/ConfProfileMan.razor | 5 + Lux.UI/Components/Compo/ConfWoodMan.razor | 5 + Lux.UI/Components/Layout/NavMenu.razor | 17 +- Lux.UI/Components/Pages/ConfList.razor | 38 ++++ Lux.UI/Components/Pages/ConfList.razor.cs | 36 ++++ Lux.UI/Components/Pages/Home.razor | 1 + Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 14 files changed, 333 insertions(+), 12 deletions(-) create mode 100644 Lux.UI/Components/Compo/ConfGlassMan.razor create mode 100644 Lux.UI/Components/Compo/ConfGlassMan.razor.cs create mode 100644 Lux.UI/Components/Compo/ConfProfileMan.razor create mode 100644 Lux.UI/Components/Compo/ConfWoodMan.razor create mode 100644 Lux.UI/Components/Pages/ConfList.razor create mode 100644 Lux.UI/Components/Pages/ConfList.razor.cs diff --git a/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj b/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj index 405277ae..c9e78400 100644 --- a/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj +++ b/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj @@ -21,7 +21,7 @@ - - + + diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index f2cb7dc7..31d0be54 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2509.3007 + 0.9.2510.0215 diff --git a/Lux.UI/Components/Compo/ConfGlassMan.razor b/Lux.UI/Components/Compo/ConfGlassMan.razor new file mode 100644 index 00000000..2c84b276 --- /dev/null +++ b/Lux.UI/Components/Compo/ConfGlassMan.razor @@ -0,0 +1,56 @@ + + +
      +
      +
      Conf. Vetri
      +
      +
      + @if (isLoading || ListRecords == null) + { + + } + else if (totalCount == 0) + { +
      Nessun record trovato
      + } + else + { + + + + + @* *@ + + + + + + + + @foreach (var item in ListRecords) + { } + + @if (totalCount >= numRecord) + { + + + + + + } +
      + + IDOrd.Valore + +
      + +
      + } +
      + +
      + + + diff --git a/Lux.UI/Components/Compo/ConfGlassMan.razor.cs b/Lux.UI/Components/Compo/ConfGlassMan.razor.cs new file mode 100644 index 00000000..0dd49261 --- /dev/null +++ b/Lux.UI/Components/Compo/ConfGlassMan.razor.cs @@ -0,0 +1,173 @@ +using Microsoft.AspNetCore.Components; +using Microsoft.JSInterop; +using EgwCoreLib.Lux.Data.DbModel.Config; +using EgwCoreLib.Lux.Data.Services; + +namespace Lux.UI.Components.Compo +{ + public partial class ConfGlassMan + { + #region Public Properties + + [Parameter] + public string SearchVal { get; set; } = string.Empty; + + #endregion Public Properties + + #region Protected Properties + + [Inject] + protected DataLayerServices DLService { get; set; } = null!; + + [Inject] + protected IJSRuntime JSRuntime { get; set; } = null!; + + #endregion Protected Properties + + #region Protected Methods + + /// + /// impossta record x eliminazione + /// + /// + protected async Task DoDelete(GlassModel selRec) + { + if (!await JSRuntime.InvokeAsync("confirm", $"Sicuro di voler eliminare il record? Dettagli: {selRec.GlassID} | {selRec.Description} | {selRec.Thickness}")) + return; + +#if false + // esegue eliminazione del record... + await DLService.GenValDeleteAsync(selRec); +#endif + + EditRecord = null; + SelRecord = null; + await ReloadData(); + UpdateTable(); + } + + /// + /// Edit articolo selezionato + /// + /// + protected void DoEdit(GlassModel curRec) + { + EditRecord = curRec; + } + + /// + /// Reset selezione + /// + protected void DoReset() + { + EditRecord = null; + } + + /// + /// Selezione articolo x display info + /// + /// + protected void DoSelect(GlassModel curRec) + { + SelRecord = curRec; + } + + protected void SaveNumRec(int newNum) + { + numRecord = newNum; + UpdateTable(); + } + + protected void SavePage(int newNum) + { + currPage = newNum; + UpdateTable(); + } + + #endregion Protected Methods + + #region Private Fields + + private List AllRecords = new(); + private int currPage = 1; + private GlassModel? EditRecord = null; + private bool isLoading = false; + private List ListRecords = new(); + private int numRecord = 10; + private GlassModel? SelRecord = null; + private int totalCount = 0; + + #endregion Private Fields + + #region Private Methods + + private async Task DoAdd() + { + // aggiungo un nuovo record in coda... + EditRecord = new GlassModel() + { + Description = "New Glass", + Code = "00000", + Thickness = 30 + }; + await DoSave(EditRecord); + } + + private async Task DoSave(GlassModel currRec) + { +#if false + // salvo + await DLService.GenValUpsertAsync(currRec); +#endif + await ResetEdit(); + UpdateTable(); + EditRecord = null; + SelRecord = null; + } + + private async Task ReloadData() + { + isLoading = true; + AllRecords = await DLService.ConfGlassGetAllAsync(); + // se ho ricerca testuale faccio filtro ulteriore... + if (string.IsNullOrEmpty(SearchVal)) + { + AllRecords = AllRecords + .OrderBy(x => x.Description) + .ToList(); + } + else + { + AllRecords = AllRecords + .Where(x => + x.Description.Contains(SearchVal, StringComparison.InvariantCultureIgnoreCase) || + x.Code.Contains(SearchVal, StringComparison.InvariantCultureIgnoreCase)) + .OrderBy(x => x.Description) + .ToList(); + } + totalCount = AllRecords.Count; + } + + private async Task ResetEdit() + { + // reset edit + EditRecord = null; + await ReloadData(); + } + + /// + /// Filtro e paginazione + /// + private void UpdateTable() + { + // fix paginazione + ListRecords = AllRecords + .Skip(numRecord * (currPage - 1)) + .Take(numRecord) + .ToList(); + isLoading = false; + } + + #endregion Private Methods + } +} \ No newline at end of file diff --git a/Lux.UI/Components/Compo/ConfProfileMan.razor b/Lux.UI/Components/Compo/ConfProfileMan.razor new file mode 100644 index 00000000..806610a5 --- /dev/null +++ b/Lux.UI/Components/Compo/ConfProfileMan.razor @@ -0,0 +1,5 @@ +

      ConfProfileMan

      + +@code { + +} diff --git a/Lux.UI/Components/Compo/ConfWoodMan.razor b/Lux.UI/Components/Compo/ConfWoodMan.razor new file mode 100644 index 00000000..b7638534 --- /dev/null +++ b/Lux.UI/Components/Compo/ConfWoodMan.razor @@ -0,0 +1,5 @@ +

      ConfWoodMan

      + +@code { + +} diff --git a/Lux.UI/Components/Layout/NavMenu.razor b/Lux.UI/Components/Layout/NavMenu.razor index e0e65482..9f9efb64 100644 --- a/Lux.UI/Components/Layout/NavMenu.razor +++ b/Lux.UI/Components/Layout/NavMenu.razor @@ -34,11 +34,6 @@ - + + @* *@ + +
    /// - public List ElencoHw(Constants.EXECENVIRONMENTS execEnvironment, string HwReq = "HW.AGB") + public List ElencoHw(Constants.EXECENVIRONMENTS execEnvironment, string HwReq = "HW.AGB") { - List result = new List(); + List result = new List(); // leggo obj da redis cache var currKey = $"{redisBaseKey}:{execEnvironment}:HML:{HwReq}"; RedisValue rawData = redisDb.StringGet(currKey); // prendo solo i valori validi (Description <> FamilyName) if (rawData.HasValue) { - var currList = JsonConvert.DeserializeObject>($"{rawData}"); - result = currList ?? new List(); + var currList = JsonConvert.DeserializeObject>($"{rawData}"); + result = currList ?? new List(); //var currList = JsonConvert.DeserializeObject($"{rawData}"); //if (currList != null && currList.ListItem != null) //{ diff --git a/Lux.API/Controllers/WindowController.cs b/Lux.API/Controllers/WindowController.cs index 745bd05e..19a05e9e 100644 --- a/Lux.API/Controllers/WindowController.cs +++ b/Lux.API/Controllers/WindowController.cs @@ -1,4 +1,5 @@ using EgwCoreLib.Lux.Core; +using EgwCoreLib.Lux.Data.DbModel.Config; using EgwCoreLib.Lux.Data.Services; using EgwMultiEngineManager.Data; using Microsoft.AspNetCore.Mvc; @@ -121,7 +122,7 @@ namespace Lux.API.Controllers /// nome del produttore, es HW.AGB (default) /// [HttpGet("hwlist/{id}")] - public async Task>> getHardwareList(string id) + public async Task>> getHardwareList(string id) { Stopwatch sw = new Stopwatch(); sw.Start(); @@ -130,7 +131,7 @@ namespace Lux.API.Controllers if (answ == null || answ.Count == 0) { await sendHwReq(); - answ = new List(); + answ = new List(); } // filtro quelli default/non significativi (famili=descript) else diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 484b7e6a..0bd6fb83 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2510.0218 + 0.9.2510.0219 diff --git a/Lux.UI/Components/Compo/ConfGlassMan.razor b/Lux.UI/Components/Compo/Config/GlassMan.razor similarity index 99% rename from Lux.UI/Components/Compo/ConfGlassMan.razor rename to Lux.UI/Components/Compo/Config/GlassMan.razor index 5646216b..fa003e7e 100644 --- a/Lux.UI/Components/Compo/ConfGlassMan.razor +++ b/Lux.UI/Components/Compo/Config/GlassMan.razor @@ -1,6 +1,6 @@ 
    -
    Conf. Vetri
    +
    Conf. Vetro
    @if (isLoading || ListRecords == null) diff --git a/Lux.UI/Components/Compo/ConfGlassMan.razor.cs b/Lux.UI/Components/Compo/Config/GlassMan.razor.cs similarity index 97% rename from Lux.UI/Components/Compo/ConfGlassMan.razor.cs rename to Lux.UI/Components/Compo/Config/GlassMan.razor.cs index 5991e26e..7dc7b291 100644 --- a/Lux.UI/Components/Compo/ConfGlassMan.razor.cs +++ b/Lux.UI/Components/Compo/Config/GlassMan.razor.cs @@ -3,9 +3,9 @@ using Microsoft.JSInterop; using EgwCoreLib.Lux.Data.DbModel.Config; using EgwCoreLib.Lux.Data.Services; -namespace Lux.UI.Components.Compo +namespace Lux.UI.Components.Compo.Config { - public partial class ConfGlassMan + public partial class GlassMan { #region Public Properties @@ -97,7 +97,7 @@ namespace Lux.UI.Components.Compo private GlassModel? EditRecord = null; private bool isLoading = false; private List ListRecords = new(); - private int numRecord = 10; + private int numRecord = 5; private GlassModel? SelRecord = null; private int totalCount = 0; diff --git a/Lux.UI/Components/Compo/Config/HardwareMan.razor b/Lux.UI/Components/Compo/Config/HardwareMan.razor new file mode 100644 index 00000000..40a2ddd5 --- /dev/null +++ b/Lux.UI/Components/Compo/Config/HardwareMan.razor @@ -0,0 +1,59 @@ +
    +
    +
    Conf. Hardware
    +
    +
    + @if (isLoading || ListRecords == null) + { + + } + else if (totalCount == 0) + { +
    Nessun record trovato
    + } + else + { + + + + + @* *@ + + + + @* *@ + + + + + @foreach (var item in ListRecords) + { + + + + + + + } + + @if (totalCount >= numRecord) + { + + + + + + } +
    + + IDFam.DescrizioneShape + +
    @item.Id@item.FamilyName@item.Description@item.Shape
    + +
    + } +
    +
    + + + diff --git a/Lux.UI/Components/Compo/Config/HardwareMan.razor.cs b/Lux.UI/Components/Compo/Config/HardwareMan.razor.cs new file mode 100644 index 00000000..9cd02d51 --- /dev/null +++ b/Lux.UI/Components/Compo/Config/HardwareMan.razor.cs @@ -0,0 +1,180 @@ +using EgwCoreLib.Lux.Data.DbModel.Config; +using EgwCoreLib.Lux.Data.Services; +using Microsoft.AspNetCore.Components; +using Microsoft.JSInterop; + +namespace Lux.UI.Components.Compo.Config +{ + public partial class HardwareMan + { + #region Public Properties + + [Parameter] + public string SearchVal { get; set; } = string.Empty; + + #endregion Public Properties + + #region Protected Properties + + [Inject] + protected ConfigDataService CDService { get; set; } = null!; + + [Inject] + protected IJSRuntime JSRuntime { get; set; } = null!; + + #endregion Protected Properties + +#if false + /// + /// impossta record x eliminazione + /// + /// + protected async Task DoDelete(HardwareModel selRec) + { + if (!await JSRuntime.InvokeAsync("confirm", $"Sicuro di voler eliminare il record? Dettagli: {selRec.HardwareID} | {selRec.Description} | {selRec.Thickness}")) + return; + + // esegue eliminazione del record... + await CDService.ConfHardwareDeleteAsync(selRec); + + EditRecord = null; + SelRecord = null; + await ReloadData(); + UpdateTable(); + } + + /// + /// Edit articolo selezionato + /// + /// + protected void DoEdit(HardwareModel curRec) + { + EditRecord = curRec; + } +#endif + + #region Protected Methods + + /// + /// Reset selezione + /// + protected void DoReset() + { + EditRecord = null; + SelRecord = null; + } + + /// + /// Selezione articolo x display info + /// + /// + protected void DoSelect(HardwareModel curRec) + { + SelRecord = curRec; + } + + protected override void OnParametersSet() + { + ReloadData(); + UpdateTable(); + } + + protected void SaveNumRec(int newNum) + { + numRecord = newNum; + UpdateTable(); + } + + protected void SavePage(int newNum) + { + currPage = newNum; + UpdateTable(); + } + + #endregion Protected Methods + + #region Private Fields + + private List AllRecords = new(); + private int currPage = 1; + private HardwareModel? EditRecord = null; + private bool isLoading = false; + private List ListRecords = new(); + private int numRecord = 5; + private HardwareModel? SelRecord = null; + private int totalCount = 0; + + #endregion Private Fields + +#if false + private async Task DoAdd() + { + // aggiungo un nuovo record in coda... + EditRecord = new HardwareModel() + { + Description = "New Glass", + Code = "", + Thickness = 30 + }; + await DoSave(EditRecord); + } + + private async Task DoSave(HardwareModel currRec) + { + // salvo + await CDService.ConfHardwareUpsertAsync(currRec); + await ResetEdit(); + UpdateTable(); + EditRecord = null; + SelRecord = null; + } +#endif + + #region Private Methods + + private void ReloadData() + { + isLoading = true; + AllRecords = CDService.ElencoHw(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, "HW.AGB"); + // se ho ricerca testuale faccio filtro ulteriore... + if (string.IsNullOrEmpty(SearchVal)) + { + AllRecords = AllRecords + .OrderBy(x => x.Description) + .ToList(); + } + else + { + AllRecords = AllRecords + .Where(x => + x.Description.Contains(SearchVal, StringComparison.InvariantCultureIgnoreCase) || + x.FamilyName.Contains(SearchVal, StringComparison.InvariantCultureIgnoreCase)) + .OrderBy(x => x.Description) + .ToList(); + } + totalCount = AllRecords.Count; + } + + private void ResetEdit() + { + // reset edit + EditRecord = null; + ReloadData(); + } + + /// + /// Filtro e paginazione + /// + private void UpdateTable() + { + // fix paginazione + ListRecords = AllRecords + .Skip(numRecord * (currPage - 1)) + .Take(numRecord) + .ToList(); + isLoading = false; + } + + #endregion Private Methods + } +} \ No newline at end of file diff --git a/Lux.UI/Components/Compo/ConfProfileMan.razor b/Lux.UI/Components/Compo/Config/ProfileMan.razor similarity index 98% rename from Lux.UI/Components/Compo/ConfProfileMan.razor rename to Lux.UI/Components/Compo/Config/ProfileMan.razor index c7581147..240e8dfa 100644 --- a/Lux.UI/Components/Compo/ConfProfileMan.razor +++ b/Lux.UI/Components/Compo/Config/ProfileMan.razor @@ -1,6 +1,6 @@ 
    -
    Conf. Profili
    +
    Conf. Profilo
    @if (isLoading || ListRecords == null) diff --git a/Lux.UI/Components/Compo/ConfProfileMan.razor.cs b/Lux.UI/Components/Compo/Config/ProfileMan.razor.cs similarity index 97% rename from Lux.UI/Components/Compo/ConfProfileMan.razor.cs rename to Lux.UI/Components/Compo/Config/ProfileMan.razor.cs index 86f22d6b..6ca1394d 100644 --- a/Lux.UI/Components/Compo/ConfProfileMan.razor.cs +++ b/Lux.UI/Components/Compo/Config/ProfileMan.razor.cs @@ -3,9 +3,9 @@ using EgwCoreLib.Lux.Data.Services; using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; -namespace Lux.UI.Components.Compo +namespace Lux.UI.Components.Compo.Config { - public partial class ConfProfileMan + public partial class ProfileMan { #region Public Properties @@ -97,7 +97,7 @@ namespace Lux.UI.Components.Compo private ProfileModel? EditRecord = null; private bool isLoading = false; private List ListRecords = new(); - private int numRecord = 10; + private int numRecord = 5; private ProfileModel? SelRecord = null; private int totalCount = 0; diff --git a/Lux.UI/Components/Compo/ConfWoodMan.razor b/Lux.UI/Components/Compo/Config/WoodMan.razor similarity index 97% rename from Lux.UI/Components/Compo/ConfWoodMan.razor rename to Lux.UI/Components/Compo/Config/WoodMan.razor index a7a101ae..cb851fbb 100644 --- a/Lux.UI/Components/Compo/ConfWoodMan.razor +++ b/Lux.UI/Components/Compo/Config/WoodMan.razor @@ -36,7 +36,7 @@ @item.WoodID @item.Code @item.Description - item.Type + @item.Type @if (false) { diff --git a/Lux.UI/Components/Compo/ConfWoodMan.razor.cs b/Lux.UI/Components/Compo/Config/WoodMan.razor.cs similarity index 97% rename from Lux.UI/Components/Compo/ConfWoodMan.razor.cs rename to Lux.UI/Components/Compo/Config/WoodMan.razor.cs index fb4edbeb..1a5c33b0 100644 --- a/Lux.UI/Components/Compo/ConfWoodMan.razor.cs +++ b/Lux.UI/Components/Compo/Config/WoodMan.razor.cs @@ -3,9 +3,9 @@ using EgwCoreLib.Lux.Data.Services; using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; -namespace Lux.UI.Components.Compo +namespace Lux.UI.Components.Compo.Config { - public partial class ConfWoodMan + public partial class WoodMan { #region Public Properties @@ -97,7 +97,7 @@ namespace Lux.UI.Components.Compo private WoodModel? EditRecord = null; private bool isLoading = false; private List ListRecords = new(); - private int numRecord = 10; + private int numRecord = 5; private WoodModel? SelRecord = null; private int totalCount = 0; diff --git a/Lux.UI/Components/Compo/ItemMan.razor.cs b/Lux.UI/Components/Compo/ItemMan.razor.cs index 7b469e54..07b8dbe5 100644 --- a/Lux.UI/Components/Compo/ItemMan.razor.cs +++ b/Lux.UI/Components/Compo/ItemMan.razor.cs @@ -117,7 +117,7 @@ namespace Lux.UI.Components.Compo if (!await JSRuntime.InvokeAsync("confirm", $"Sicuro di voler eliminare il record? Dettagli: {selRec.ItemID} | {selRec.CodGroup} | {selRec.ItemType} | {selRec.ExtItemCode}")) return; //// esegue eliminazione del record... - //await DLService.ItemDeleteAsync(selRec); + //await CDService.ItemDeleteAsync(selRec); editRecord = null; selRecord = null; diff --git a/Lux.UI/Components/Pages/ConfList.razor b/Lux.UI/Components/Pages/ConfList.razor index 28c63126..1a9466ba 100644 --- a/Lux.UI/Components/Pages/ConfList.razor +++ b/Lux.UI/Components/Pages/ConfList.razor @@ -17,16 +17,19 @@
    -
    +
    -
    - +
    +
    -
    - +
    +
    -
    - +
    + +
    +
    +
    diff --git a/Lux.UI/Components/_Imports.razor b/Lux.UI/Components/_Imports.razor index 4a01418b..b070bd7f 100644 --- a/Lux.UI/Components/_Imports.razor +++ b/Lux.UI/Components/_Imports.razor @@ -17,3 +17,4 @@ @using Lux.UI.Client @using Lux.UI.Components @using Lux.UI.Components.Compo +@using Lux.UI.Components.Compo.Config diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 0fdd6915..98b858cf 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2510.0218 + 0.9.2510.0219 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 6c7db15b..13e197bb 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

    Versione: 0.9.2510.0218

    +

    Versione: 0.9.2510.0219


    Note di rilascio:
    • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 5a751d01..5fb787ad 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2510.0218 +0.9.2510.0219 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 0eabfeb9..f1a06b0b 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2510.0218 + 0.9.2510.0219 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From ed1d1cd1ddfab4f3fcd89e1caf7c31ded293aebb Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 2 Oct 2025 19:04:04 +0200 Subject: [PATCH 38/65] Fix colonna 2 conf --- Lux.UI/Components/Compo/Config/GlassMan.razor | 2 +- Lux.UI/Components/Compo/Config/HardwareMan.razor | 4 ++-- Lux.UI/Components/Compo/Config/ProfileMan.razor | 2 +- Lux.UI/Components/Compo/Config/WoodMan.razor | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Lux.UI/Components/Compo/Config/GlassMan.razor b/Lux.UI/Components/Compo/Config/GlassMan.razor index fa003e7e..d4f9d828 100644 --- a/Lux.UI/Components/Compo/Config/GlassMan.razor +++ b/Lux.UI/Components/Compo/Config/GlassMan.razor @@ -20,7 +20,7 @@ @* ID *@ - Cod. + Cod. Descrizione Size mm diff --git a/Lux.UI/Components/Compo/Config/HardwareMan.razor b/Lux.UI/Components/Compo/Config/HardwareMan.razor index 40a2ddd5..6fb9931d 100644 --- a/Lux.UI/Components/Compo/Config/HardwareMan.razor +++ b/Lux.UI/Components/Compo/Config/HardwareMan.razor @@ -20,7 +20,7 @@ @* ID *@ - Fam. + Fam. Descrizione Shape @* @@ -34,7 +34,7 @@ { @item.Id - @item.FamilyName + @item.FamilyName @item.Description @item.Shape diff --git a/Lux.UI/Components/Compo/Config/ProfileMan.razor b/Lux.UI/Components/Compo/Config/ProfileMan.razor index 240e8dfa..23f5f242 100644 --- a/Lux.UI/Components/Compo/Config/ProfileMan.razor +++ b/Lux.UI/Components/Compo/Config/ProfileMan.razor @@ -20,7 +20,7 @@ @* ID *@ - Cod. + Cod. Descrizione Size mm diff --git a/Lux.UI/Components/Compo/Config/WoodMan.razor b/Lux.UI/Components/Compo/Config/WoodMan.razor index cb851fbb..fd7a0f4b 100644 --- a/Lux.UI/Components/Compo/Config/WoodMan.razor +++ b/Lux.UI/Components/Compo/Config/WoodMan.razor @@ -20,7 +20,7 @@ @* ID *@ - Cod. + Cod. Descrizione Tipo From d5bf80e0d8369e9aaed8d6838f685d05fca7eed5 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 2 Oct 2025 19:07:44 +0200 Subject: [PATCH 39/65] Aggiunta search su hardwaware (da riportare) --- .../Components/Compo/Config/HardwareMan.razor | 17 +++- .../Compo/Config/HardwareMan.razor.cs | 90 +++++++++++-------- 2 files changed, 70 insertions(+), 37 deletions(-) diff --git a/Lux.UI/Components/Compo/Config/HardwareMan.razor b/Lux.UI/Components/Compo/Config/HardwareMan.razor index 6fb9931d..4b250fb1 100644 --- a/Lux.UI/Components/Compo/Config/HardwareMan.razor +++ b/Lux.UI/Components/Compo/Config/HardwareMan.razor @@ -1,6 +1,21 @@ 
      -
      Conf. Hardware
      +
      +
      +
      Conf. Hardware
      +
      +
      +
      +
      +
      + + + +
      +
      +
      +
      +
      @if (isLoading || ListRecords == null) diff --git a/Lux.UI/Components/Compo/Config/HardwareMan.razor.cs b/Lux.UI/Components/Compo/Config/HardwareMan.razor.cs index 9cd02d51..7ee1744b 100644 --- a/Lux.UI/Components/Compo/Config/HardwareMan.razor.cs +++ b/Lux.UI/Components/Compo/Config/HardwareMan.razor.cs @@ -7,13 +7,6 @@ namespace Lux.UI.Components.Compo.Config { public partial class HardwareMan { - #region Public Properties - - [Parameter] - public string SearchVal { get; set; } = string.Empty; - - #endregion Public Properties - #region Protected Properties [Inject] @@ -24,35 +17,6 @@ namespace Lux.UI.Components.Compo.Config #endregion Protected Properties -#if false - /// - /// impossta record x eliminazione - /// - /// - protected async Task DoDelete(HardwareModel selRec) - { - if (!await JSRuntime.InvokeAsync("confirm", $"Sicuro di voler eliminare il record? Dettagli: {selRec.HardwareID} | {selRec.Description} | {selRec.Thickness}")) - return; - - // esegue eliminazione del record... - await CDService.ConfHardwareDeleteAsync(selRec); - - EditRecord = null; - SelRecord = null; - await ReloadData(); - UpdateTable(); - } - - /// - /// Edit articolo selezionato - /// - /// - protected void DoEdit(HardwareModel curRec) - { - EditRecord = curRec; - } -#endif - #region Protected Methods /// @@ -79,6 +43,11 @@ namespace Lux.UI.Components.Compo.Config UpdateTable(); } + protected void ResetSearch() + { + SearchVal = ""; + } + protected void SaveNumRec(int newNum) { numRecord = newNum; @@ -106,6 +75,53 @@ namespace Lux.UI.Components.Compo.Config #endregion Private Fields + #region Private Properties + + protected string SearchVal + { + get => searchVal; + set + { + if (searchVal != value) + { + searchVal = value; + ReloadData(); + UpdateTable(); + } + } + } + private string searchVal { get; set; } = string.Empty; + + #endregion Private Properties + +#if false + /// + /// impossta record x eliminazione + /// + /// + protected async Task DoDelete(HardwareModel selRec) + { + if (!await JSRuntime.InvokeAsync("confirm", $"Sicuro di voler eliminare il record? Dettagli: {selRec.HardwareID} | {selRec.Description} | {selRec.Thickness}")) + return; + + // esegue eliminazione del record... + await CDService.ConfHardwareDeleteAsync(selRec); + + EditRecord = null; + SelRecord = null; + await ReloadData(); + UpdateTable(); + } + + /// + /// Edit articolo selezionato + /// + /// + protected void DoEdit(HardwareModel curRec) + { + EditRecord = curRec; + } +#endif #if false private async Task DoAdd() { @@ -155,12 +171,14 @@ namespace Lux.UI.Components.Compo.Config totalCount = AllRecords.Count; } +#if false private void ResetEdit() { // reset edit EditRecord = null; ReloadData(); } +#endif /// /// Filtro e paginazione From f473c830ddc5d6a56f6279c02c804f9b0f2a61e7 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 3 Oct 2025 10:42:29 +0200 Subject: [PATCH 40/65] Fix ricerca in ogni pagina confData --- Lux.API/Lux.API.csproj | 2 +- Lux.UI/Components/Compo/Config/GlassMan.razor | 17 ++++++++++- .../Components/Compo/Config/GlassMan.razor.cs | 30 ++++++++++++++++++- .../Components/Compo/Config/ProfileMan.razor | 17 ++++++++++- .../Compo/Config/ProfileMan.razor.cs | 30 ++++++++++++++++++- Lux.UI/Components/Compo/Config/WoodMan.razor | 17 ++++++++++- .../Components/Compo/Config/WoodMan.razor.cs | 30 ++++++++++++++++++- Lux.UI/Components/Pages/ConfList.razor | 4 +-- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 12 files changed, 142 insertions(+), 13 deletions(-) diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 0bd6fb83..2e81b9ec 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2510.0219 + 0.9.2510.0310 diff --git a/Lux.UI/Components/Compo/Config/GlassMan.razor b/Lux.UI/Components/Compo/Config/GlassMan.razor index d4f9d828..11b57793 100644 --- a/Lux.UI/Components/Compo/Config/GlassMan.razor +++ b/Lux.UI/Components/Compo/Config/GlassMan.razor @@ -1,6 +1,21 @@ 
      -
      Conf. Vetro
      +
      +
      +
      Conf. Vetro
      +
      +
      +
      +
      +
      + + + +
      +
      +
      +
      +
      @if (isLoading || ListRecords == null) diff --git a/Lux.UI/Components/Compo/Config/GlassMan.razor.cs b/Lux.UI/Components/Compo/Config/GlassMan.razor.cs index 7dc7b291..6e32a11f 100644 --- a/Lux.UI/Components/Compo/Config/GlassMan.razor.cs +++ b/Lux.UI/Components/Compo/Config/GlassMan.razor.cs @@ -9,11 +9,39 @@ namespace Lux.UI.Components.Compo.Config { #region Public Properties +#if false [Parameter] - public string SearchVal { get; set; } = string.Empty; + public string SearchVal { get; set; } = string.Empty; +#endif #endregion Public Properties + protected void ResetSearch() + { + SearchVal = ""; + } + + protected string SearchVal + { + get => searchVal; + set + { + if (searchVal != value) + { + searchVal = value; + _ = FullUpdate(); + } + } + } + private string searchVal { get; set; } = string.Empty; + + private async Task FullUpdate() + { + await ReloadData(); + UpdateTable(); + await InvokeAsync(StateHasChanged); + } + #region Protected Properties [Inject] diff --git a/Lux.UI/Components/Compo/Config/ProfileMan.razor b/Lux.UI/Components/Compo/Config/ProfileMan.razor index 23f5f242..7830abbc 100644 --- a/Lux.UI/Components/Compo/Config/ProfileMan.razor +++ b/Lux.UI/Components/Compo/Config/ProfileMan.razor @@ -1,6 +1,21 @@ 
      -
      Conf. Profilo
      +
      +
      +
      Conf. Profilo
      +
      +
      +
      +
      +
      + + + +
      +
      +
      +
      +
      @if (isLoading || ListRecords == null) diff --git a/Lux.UI/Components/Compo/Config/ProfileMan.razor.cs b/Lux.UI/Components/Compo/Config/ProfileMan.razor.cs index 6ca1394d..b51fab6e 100644 --- a/Lux.UI/Components/Compo/Config/ProfileMan.razor.cs +++ b/Lux.UI/Components/Compo/Config/ProfileMan.razor.cs @@ -9,8 +9,36 @@ namespace Lux.UI.Components.Compo.Config { #region Public Properties +#if false [Parameter] - public string SearchVal { get; set; } = string.Empty; + public string SearchVal { get; set; } = string.Empty; +#endif + + protected void ResetSearch() + { + SearchVal = ""; + } + + protected string SearchVal + { + get => searchVal; + set + { + if (searchVal != value) + { + searchVal = value; + _ = FullUpdate(); + } + } + } + private string searchVal { get; set; } = string.Empty; + + private async Task FullUpdate() + { + await ReloadData(); + UpdateTable(); + await InvokeAsync(StateHasChanged); + } #endregion Public Properties diff --git a/Lux.UI/Components/Compo/Config/WoodMan.razor b/Lux.UI/Components/Compo/Config/WoodMan.razor index fd7a0f4b..546274c0 100644 --- a/Lux.UI/Components/Compo/Config/WoodMan.razor +++ b/Lux.UI/Components/Compo/Config/WoodMan.razor @@ -1,6 +1,21 @@ 
      -
      Conf. Legno
      +
      +
      +
      Conf. Legno
      +
      +
      +
      +
      +
      + + + +
      +
      +
      +
      +
      @if (isLoading || ListRecords == null) diff --git a/Lux.UI/Components/Compo/Config/WoodMan.razor.cs b/Lux.UI/Components/Compo/Config/WoodMan.razor.cs index 1a5c33b0..52e7143a 100644 --- a/Lux.UI/Components/Compo/Config/WoodMan.razor.cs +++ b/Lux.UI/Components/Compo/Config/WoodMan.razor.cs @@ -9,8 +9,36 @@ namespace Lux.UI.Components.Compo.Config { #region Public Properties +#if false [Parameter] - public string SearchVal { get; set; } = string.Empty; + public string SearchVal { get; set; } = string.Empty; +#endif + + protected void ResetSearch() + { + SearchVal = ""; + } + + protected string SearchVal + { + get => searchVal; + set + { + if (searchVal != value) + { + searchVal = value; + _ = FullUpdate(); + } + } + } + private string searchVal { get; set; } = string.Empty; + + private async Task FullUpdate() + { + await ReloadData(); + UpdateTable(); + await InvokeAsync(StateHasChanged); + } #endregion Public Properties diff --git a/Lux.UI/Components/Pages/ConfList.razor b/Lux.UI/Components/Pages/ConfList.razor index 1a9466ba..cdcfa327 100644 --- a/Lux.UI/Components/Pages/ConfList.razor +++ b/Lux.UI/Components/Pages/ConfList.razor @@ -6,7 +6,7 @@
      Configurazioni
      -
      + @*
      @@ -14,7 +14,7 @@
      -
      +
      *@
      diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 98b858cf..bc4bd619 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2510.0219 + 0.9.2510.0310 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 13e197bb..b6f2d299 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

      Versione: 0.9.2510.0219

      +

      Versione: 0.9.2510.0310


      Note di rilascio:
      • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 5fb787ad..89aefbcd 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2510.0219 +0.9.2510.0310 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index f1a06b0b..3d4fe62f 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2510.0219 + 0.9.2510.0310 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 294462e98c6718d6d7ea271bf249d43643177ab4 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 3 Oct 2025 10:43:21 +0200 Subject: [PATCH 41/65] cleanup + reorg codice --- .../Components/Compo/Config/GlassMan.razor.cs | 50 +++++++++---------- .../Compo/Config/HardwareMan.razor.cs | 27 +++++----- .../Compo/Config/ProfileMan.razor.cs | 50 +++++++++---------- .../Components/Compo/Config/WoodMan.razor.cs | 50 +++++++++---------- 4 files changed, 83 insertions(+), 94 deletions(-) diff --git a/Lux.UI/Components/Compo/Config/GlassMan.razor.cs b/Lux.UI/Components/Compo/Config/GlassMan.razor.cs index 6e32a11f..dd33bb6a 100644 --- a/Lux.UI/Components/Compo/Config/GlassMan.razor.cs +++ b/Lux.UI/Components/Compo/Config/GlassMan.razor.cs @@ -7,19 +7,13 @@ namespace Lux.UI.Components.Compo.Config { public partial class GlassMan { - #region Public Properties + #region Protected Properties -#if false - [Parameter] - public string SearchVal { get; set; } = string.Empty; -#endif + [Inject] + protected DataLayerServices DLService { get; set; } = null!; - #endregion Public Properties - - protected void ResetSearch() - { - SearchVal = ""; - } + [Inject] + protected IJSRuntime JSRuntime { get; set; } = null!; protected string SearchVal { @@ -33,22 +27,6 @@ namespace Lux.UI.Components.Compo.Config } } } - private string searchVal { get; set; } = string.Empty; - - private async Task FullUpdate() - { - await ReloadData(); - UpdateTable(); - await InvokeAsync(StateHasChanged); - } - - #region Protected Properties - - [Inject] - protected DataLayerServices DLService { get; set; } = null!; - - [Inject] - protected IJSRuntime JSRuntime { get; set; } = null!; #endregion Protected Properties @@ -104,6 +82,11 @@ namespace Lux.UI.Components.Compo.Config UpdateTable(); } + protected void ResetSearch() + { + SearchVal = ""; + } + protected void SaveNumRec(int newNum) { numRecord = newNum; @@ -131,6 +114,12 @@ namespace Lux.UI.Components.Compo.Config #endregion Private Fields + #region Private Properties + + private string searchVal { get; set; } = string.Empty; + + #endregion Private Properties + #region Private Methods private async Task DoAdd() @@ -155,6 +144,13 @@ namespace Lux.UI.Components.Compo.Config SelRecord = null; } + private async Task FullUpdate() + { + await ReloadData(); + UpdateTable(); + await InvokeAsync(StateHasChanged); + } + private async Task ReloadData() { isLoading = true; diff --git a/Lux.UI/Components/Compo/Config/HardwareMan.razor.cs b/Lux.UI/Components/Compo/Config/HardwareMan.razor.cs index 7ee1744b..475beebb 100644 --- a/Lux.UI/Components/Compo/Config/HardwareMan.razor.cs +++ b/Lux.UI/Components/Compo/Config/HardwareMan.razor.cs @@ -15,6 +15,20 @@ namespace Lux.UI.Components.Compo.Config [Inject] protected IJSRuntime JSRuntime { get; set; } = null!; + protected string SearchVal + { + get => searchVal; + set + { + if (searchVal != value) + { + searchVal = value; + ReloadData(); + UpdateTable(); + } + } + } + #endregion Protected Properties #region Protected Methods @@ -77,19 +91,6 @@ namespace Lux.UI.Components.Compo.Config #region Private Properties - protected string SearchVal - { - get => searchVal; - set - { - if (searchVal != value) - { - searchVal = value; - ReloadData(); - UpdateTable(); - } - } - } private string searchVal { get; set; } = string.Empty; #endregion Private Properties diff --git a/Lux.UI/Components/Compo/Config/ProfileMan.razor.cs b/Lux.UI/Components/Compo/Config/ProfileMan.razor.cs index b51fab6e..dd879512 100644 --- a/Lux.UI/Components/Compo/Config/ProfileMan.razor.cs +++ b/Lux.UI/Components/Compo/Config/ProfileMan.razor.cs @@ -7,17 +7,13 @@ namespace Lux.UI.Components.Compo.Config { public partial class ProfileMan { - #region Public Properties + #region Protected Properties -#if false - [Parameter] - public string SearchVal { get; set; } = string.Empty; -#endif + [Inject] + protected DataLayerServices DLService { get; set; } = null!; - protected void ResetSearch() - { - SearchVal = ""; - } + [Inject] + protected IJSRuntime JSRuntime { get; set; } = null!; protected string SearchVal { @@ -31,24 +27,6 @@ namespace Lux.UI.Components.Compo.Config } } } - private string searchVal { get; set; } = string.Empty; - - private async Task FullUpdate() - { - await ReloadData(); - UpdateTable(); - await InvokeAsync(StateHasChanged); - } - - #endregion Public Properties - - #region Protected Properties - - [Inject] - protected DataLayerServices DLService { get; set; } = null!; - - [Inject] - protected IJSRuntime JSRuntime { get; set; } = null!; #endregion Protected Properties @@ -104,6 +82,11 @@ namespace Lux.UI.Components.Compo.Config UpdateTable(); } + protected void ResetSearch() + { + SearchVal = ""; + } + protected void SaveNumRec(int newNum) { numRecord = newNum; @@ -131,6 +114,12 @@ namespace Lux.UI.Components.Compo.Config #endregion Private Fields + #region Private Properties + + private string searchVal { get; set; } = string.Empty; + + #endregion Private Properties + #region Private Methods private async Task DoAdd() @@ -155,6 +144,13 @@ namespace Lux.UI.Components.Compo.Config SelRecord = null; } + private async Task FullUpdate() + { + await ReloadData(); + UpdateTable(); + await InvokeAsync(StateHasChanged); + } + private async Task ReloadData() { isLoading = true; diff --git a/Lux.UI/Components/Compo/Config/WoodMan.razor.cs b/Lux.UI/Components/Compo/Config/WoodMan.razor.cs index 52e7143a..b6ccb252 100644 --- a/Lux.UI/Components/Compo/Config/WoodMan.razor.cs +++ b/Lux.UI/Components/Compo/Config/WoodMan.razor.cs @@ -7,17 +7,13 @@ namespace Lux.UI.Components.Compo.Config { public partial class WoodMan { - #region Public Properties + #region Protected Properties -#if false - [Parameter] - public string SearchVal { get; set; } = string.Empty; -#endif + [Inject] + protected DataLayerServices DLService { get; set; } = null!; - protected void ResetSearch() - { - SearchVal = ""; - } + [Inject] + protected IJSRuntime JSRuntime { get; set; } = null!; protected string SearchVal { @@ -31,24 +27,6 @@ namespace Lux.UI.Components.Compo.Config } } } - private string searchVal { get; set; } = string.Empty; - - private async Task FullUpdate() - { - await ReloadData(); - UpdateTable(); - await InvokeAsync(StateHasChanged); - } - - #endregion Public Properties - - #region Protected Properties - - [Inject] - protected DataLayerServices DLService { get; set; } = null!; - - [Inject] - protected IJSRuntime JSRuntime { get; set; } = null!; #endregion Protected Properties @@ -104,6 +82,11 @@ namespace Lux.UI.Components.Compo.Config UpdateTable(); } + protected void ResetSearch() + { + SearchVal = ""; + } + protected void SaveNumRec(int newNum) { numRecord = newNum; @@ -131,6 +114,12 @@ namespace Lux.UI.Components.Compo.Config #endregion Private Fields + #region Private Properties + + private string searchVal { get; set; } = string.Empty; + + #endregion Private Properties + #region Private Methods private async Task DoAdd() @@ -155,6 +144,13 @@ namespace Lux.UI.Components.Compo.Config SelRecord = null; } + private async Task FullUpdate() + { + await ReloadData(); + UpdateTable(); + await InvokeAsync(StateHasChanged); + } + private async Task ReloadData() { isLoading = true; From 937b31e145258cae91e0a80f528da7438a809989 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 3 Oct 2025 16:43:25 +0200 Subject: [PATCH 42/65] Update display durante ricalcolo BOM --- .../Controllers/LuxController.cs | 53 +++++++++++++++++-- .../Services/DataLayerServices.cs | 27 ++++++++++ Lux.API/Lux.API.csproj | 2 +- Lux.API/Services/ExternalMessageProcessor.cs | 1 + Lux.UI/Components/Compo/OfferRowMan.razor | 20 +++++-- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 25 ++++++++- Lux.UI/Components/Pages/Offers.razor | 5 +- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 11 files changed, 126 insertions(+), 15 deletions(-) diff --git a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs index dba36320..2ce75f05 100644 --- a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs +++ b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs @@ -1265,7 +1265,8 @@ namespace EgwCoreLib.Lux.Data.Controllers dbCtx.Entry(currRec).State = EntityState.Modified; } // salvo modifiche... - await dbCtx.SaveChangesAsync(); + var result = await dbCtx.SaveChangesAsync(); + answ = result > 0; } catch (Exception exc) { @@ -1275,6 +1276,47 @@ namespace EgwCoreLib.Lux.Data.Controllers return answ; } + /// + /// Effettua update stato await BOM/PRICE per l'offerta indicata + /// + /// ID singola riga offerta + /// Se non nullo è il nuovo stato await BOM + /// Se non nullo è stato await Price + /// + internal async Task OffertUpdateAwaitState(int offerRowID, bool? awaitBom, bool? awaitPrice) + { + bool answ = false; + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + // recupero righe offerta... + var currRec = dbCtx + .DbSetOfferRow + .Where(x => x.OfferRowID == offerRowID) + .FirstOrDefault(); + + // aggiorno parametri (se inviati) + if (currRec != null) + { + currRec.AwaitBom = awaitBom ?? currRec.AwaitBom; + currRec.AwaitPrice = awaitPrice ?? currRec.AwaitPrice; + dbCtx.Entry(currRec).State = EntityState.Modified; + } + + // salvo i cambiamenti... + var result = await dbCtx.SaveChangesAsync(); + answ = result > 0; + } + catch (Exception exc) + { + Log.Error($"Eccezione durante OffertUpdateAwait{Environment.NewLine}{exc}"); + } + } + return answ; + } + /// /// Effettua update dei costi di tutte le righe dell'offerta indicata /// @@ -1338,7 +1380,8 @@ namespace EgwCoreLib.Lux.Data.Controllers } // salvo TUTTI i cambiamenti... - await dbCtx.SaveChangesAsync(); + var result = await dbCtx.SaveChangesAsync(); + answ = result > 0; } catch (Exception exc) { @@ -1399,11 +1442,15 @@ namespace EgwCoreLib.Lux.Data.Controllers currRec.BomPrice = Math.Round(totPrice, 3); currRec.BomOk = numElems == numGroupOk; currRec.ItemOk = numElems == numItemOk; + // setto ok await di BOM e Price + currRec.AwaitBom = false; + currRec.AwaitPrice = false; dbCtx.Entry(currRec).State = EntityState.Modified; } // salvo... - dbCtx.SaveChanges(); + var result = dbCtx.SaveChanges(); + answ = result > 0; } catch (Exception exc) { diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index 8ccfc7e1..62529702 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -760,6 +760,33 @@ namespace EgwCoreLib.Lux.Data.Services return fatto; } + /// + /// Effettua update stato await BOM/PRICE per l'offerta indicata + /// + /// ID singola riga offerta + /// Se non nullo è il nuovo stato await BOM + /// Se non nullo è stato await Price + /// Indica se svuotare la cache + /// + public async Task OffertUpdateAwaitState(int offerRowID, bool? awaitBom, bool? awaitPrice, bool flushCache = false) + { + Stopwatch sw = new Stopwatch(); + sw.Start(); + // aggiorno + bool fatto = await dbController.OffertUpdateAwaitState(offerRowID, awaitBom, awaitPrice); + if (flushCache) + { + // svuoto cache... +#if false + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Offers:*"); +#endif + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:OfferRows:*"); + } + sw.Stop(); + Log.Debug($"OffertUpdateAwaitState in {sw.Elapsed.TotalMilliseconds} ms"); + return fatto; + } + /// /// Effettua update dei costi di tutte le righe dell'offerta indicata /// diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 2e81b9ec..384baf85 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2510.0310 + 0.9.2510.0316 diff --git a/Lux.API/Services/ExternalMessageProcessor.cs b/Lux.API/Services/ExternalMessageProcessor.cs index 0ea50ac0..dd41589f 100644 --- a/Lux.API/Services/ExternalMessageProcessor.cs +++ b/Lux.API/Services/ExternalMessageProcessor.cs @@ -59,6 +59,7 @@ namespace Lux.API.Services await cacheService.SaveBomAsync(UID, retData.ExecEnvironment, newBom); // salvo la BOM completa con i dati recuperati dal DB await dbService.SaveBomAsync(UID, retData.ExecEnvironment, newBom); + // pubblico refresh info così da segnalare richeista di update conseguente await cacheService.PublishUpdateAsync(UID, retData.ExecEnvironment); } diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index 9c14c323..d6bed9b5 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -8,7 +8,7 @@ EC_OnSelectedTemplate="SetTemplate" LiveSVG="@currSvg"> *@ -@* - + }
        @item.OfferRowUID
        @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit && !string.IsNullOrEmpty(item.SerStruct) && item.SerStruct.Length > 2) { - + } @item.Note @@ -106,12 +112,20 @@ else { } + @if (item.AwaitPrice) + { + + } @($"{item.UnitPrice:C2}")
      (@item.UnitCost.ToString("C2"))
      + @if (item.AwaitPrice) + { + + } @($"{item.TotalPrice:C2}")
      (@item.TotalCost.ToString("C2"))
      diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index 8596254c..0d82ba77 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -123,8 +123,14 @@ namespace Lux.UI.Components.Compo if (!await JSRuntime.InvokeAsync("confirm", $"Confermi di voler ricalcolare la BOM?")) return; + // salvo richiesta BOM su record + currRec.AwaitBom = true; + currRec.AwaitPrice = true; + await DLService.OffertUpdateAwaitState(currRec.OfferRowID, true, true); +#if false // devo recuperare da ofgferta environment corrente, ora cablato - EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS currEnv = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW; + EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS currEnv = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW; +#endif // preparo la domanda serializzata Dictionary DictExec = new Dictionary(); // cablata la BOM @@ -135,10 +141,13 @@ namespace Lux.UI.Components.Compo CalcRequestDTO req = new CalcRequestDTO() { - EnvType = currEnv, + EnvType = currRec.Envir, + //EnvType = currEnv, DictExec = DictExec }; + await InvokeAsync(StateHasChanged); + // chiamo la chiamata POST alla API, che manda la richiesta via REDIS await CService.CallRestPost($"{apiUrl}/{genBasePath}", $"{calcTag}/{currRec.OfferRowUID}", req); #if false @@ -189,14 +198,26 @@ namespace Lux.UI.Components.Compo private async Task DoRecalcOffer() { isLoading = true; + // ciclo sulle righe... + await setAwaitPrice(true, false); + await Task.Delay(50); await DLService.OffertUpdateCost(OfferID); await Task.Delay(50); + await setAwaitPrice(false, true); await ReloadData(); UpdateTable(); isLoading = false; await EC_Updated.InvokeAsync(true); } + private async Task setAwaitPrice(bool awaitPrice, bool flushCache) + { + foreach (var item in AllRecords) + { + await DLService.OffertUpdateAwaitState(item.OfferRowID, false, awaitPrice, flushCache); + } + } + /// /// Svuota cache corrente + rilegge dati /// diff --git a/Lux.UI/Components/Pages/Offers.razor b/Lux.UI/Components/Pages/Offers.razor index 363aa615..ac18123f 100644 --- a/Lux.UI/Components/Pages/Offers.razor +++ b/Lux.UI/Components/Pages/Offers.razor @@ -143,8 +143,9 @@ else @* *@ @item.OfferID - @item.OfferCode -
      @item.Envir
      + + @item.OfferCode +
      @item.Envir
      @if (item.DealerNav != null) diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index bc4bd619..72d73ce5 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2510.0310 + 0.9.2510.0316 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index b6f2d299..27fd557f 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

      Versione: 0.9.2510.0310

      +

      Versione: 0.9.2510.0316


      Note di rilascio:
      • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 89aefbcd..4d14d050 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2510.0310 +0.9.2510.0316 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 3d4fe62f..9d1184df 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2510.0310 + 0.9.2510.0316 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 13fbe83e61c3c133853737bf2f2f35042243150c Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 3 Oct 2025 17:35:27 +0200 Subject: [PATCH 43/65] inizio integrazione componente window aggiornato --- Lux.API/Lux.API.csproj | 2 +- Lux.UI/Components/Compo/OfferRowMan.razor | 28 +++---- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 77 +++++++++++++++----- Lux.UI/Lux.UI.csproj | 6 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 7 files changed, 81 insertions(+), 38 deletions(-) diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 384baf85..a78b8047 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2510.0316 + 0.9.2510.0317 diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index d6bed9b5..3a3c7cd6 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -2,27 +2,27 @@ {

        EDITING

        @EditRecord.OfferRowUID

        - @* - *@ - @* - *@ + EC_OnSelectedTemplate="SetTemplate" + + LiveSVG="@currSvg" *@ + > + } else { diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index 0d82ba77..596cb34f 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -1,7 +1,9 @@ using EgwCoreLib.Lux.Core; using EgwCoreLib.Lux.Core.RestPayload; using EgwCoreLib.Lux.Data; +using EgwCoreLib.Lux.Data.DbModel.Config; using EgwCoreLib.Lux.Data.DbModel.Sales; +using EgwCoreLib.Lux.Data.DbModel.Utils; using EgwCoreLib.Lux.Data.Services; using EgwMultiEngineManager.Data; using Microsoft.AspNetCore.Components; @@ -93,13 +95,15 @@ namespace Lux.UI.Components.Compo /// /// init obj /// - protected override void OnInitialized() + protected override async Task OnInitializedAsync() { apiUrl = Config.GetValue("ServerConf:Prog.ApiUrl") ?? ""; imgBasePath = Config.GetValue("ServerConf:ImageBaseUrl") ?? ""; + await ReloadBaseList(); DLService.UpdatePipe.EA_NewMessage += UpdatePipe_EA_NewMessage; } + protected override async Task OnParametersSetAsync() { await ReloadData(); @@ -129,7 +133,7 @@ namespace Lux.UI.Components.Compo await DLService.OffertUpdateAwaitState(currRec.OfferRowID, true, true); #if false // devo recuperare da ofgferta environment corrente, ora cablato - EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS currEnv = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW; + EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS currEnv = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW; #endif // preparo la domanda serializzata Dictionary DictExec = new Dictionary(); @@ -150,13 +154,6 @@ namespace Lux.UI.Components.Compo // chiamo la chiamata POST alla API, che manda la richiesta via REDIS await CService.CallRestPost($"{apiUrl}/{genBasePath}", $"{calcTag}/{currRec.OfferRowUID}", req); -#if false - isLoading = true; - // aspetta 1 sec - await Task.Delay(1000); - // ...e poi rilegge i dati, ricalcolando offerta... - await DoRecalcOffer(); -#endif } #endregion Protected Methods @@ -210,14 +207,6 @@ namespace Lux.UI.Components.Compo await EC_Updated.InvokeAsync(true); } - private async Task setAwaitPrice(bool awaitPrice, bool flushCache) - { - foreach (var item in AllRecords) - { - await DLService.OffertUpdateAwaitState(item.OfferRowID, false, awaitPrice, flushCache); - } - } - /// /// Svuota cache corrente + rilegge dati /// @@ -244,6 +233,14 @@ namespace Lux.UI.Components.Compo } } + private async Task setAwaitPrice(bool awaitPrice, bool flushCache) + { + foreach (var item in AllRecords) + { + await DLService.OffertUpdateAwaitState(item.OfferRowID, false, awaitPrice, flushCache); + } + } + /// /// salva nel record corrente la BOM aggiornata e poi ricalcola importo... /// @@ -307,5 +304,51 @@ namespace Lux.UI.Components.Compo } #endregion Private Methods + + + [Inject] + protected ConfigDataService CDService { get; set; } = null!; + + private List AllConfGlass = new(); + private List AllConfHardware = new(); + private List AllConfProfile = new(); + private List AllConfWood = new(); + private List AllColors = new(); + + private List AvailGlassList = new List(); + private List AvailMaterialList = new List(); + private List AvailColorMaterialList = new List(); + + private List AvailHardwareList = new(); + + /// + /// init classi configurazione + /// + /// + private async Task ReloadBaseList() + { + // lettura conf da DB/Cache Redis + AllConfGlass = await DLService.ConfGlassGetAllAsync(); + AllConfHardware = CDService.ElencoHw(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, "HW.AGB"); + AllConfProfile = await DLService.ConfProfileGetAllAsync(); + AllConfWood = await DLService.ConfWoodGetAllAsync(); + AllColors = await DLService.GenValGetFiltAsync("WoodCol"); + // conversione tipi + AvailGlassList = AllConfGlass + .Select(x => x.Description) + .ToList(); + AvailHardwareList = AllConfHardware + .Select(x => new Egw.Window.Data.Hardware(x.Id, x.FamilyName, x.Description, x.OpeningType, x.Shape, x.SashQty, x.SashPosition)) + .ToList(); + AvailMaterialList = AllConfWood + .Select(x => x.Description) + .ToList(); + // FixMe Todo: aggiunta profili (manca anche nel costruttore...) + AvailColorMaterialList = AllColors + .OrderBy(x => x.Ordinal) + .Select(x => x.ValString) + .ToList(); + } + } } \ No newline at end of file diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 72d73ce5..9cb224bd 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2510.0316 + 0.9.2510.0317 @@ -17,8 +17,8 @@ - - + + diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 27fd557f..4231ab41 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

        Versione: 0.9.2510.0316

        +

        Versione: 0.9.2510.0317


        Note di rilascio:
        • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 4d14d050..51b71852 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2510.0316 +0.9.2510.0317 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 9d1184df..2989ae19 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2510.0316 + 0.9.2510.0317 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 1d7d3ac999dcfb2ae50c45e3eb8ed52b002d6d9d Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 3 Oct 2025 18:09:43 +0200 Subject: [PATCH 44/65] Update gestione editing JWD --- .../Controllers/LuxController.cs | 42 ++++- .../Services/DataLayerServices.cs | 22 ++- Lux.API/Lux.API.csproj | 2 +- Lux.UI/Components/Compo/Component.razor | 0 Lux.UI/Components/Compo/OfferRowMan.razor | 21 +-- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 175 +++++++++++++----- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 10 files changed, 203 insertions(+), 67 deletions(-) create mode 100644 Lux.UI/Components/Compo/Component.razor diff --git a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs index 2ce75f05..aed8bbf6 100644 --- a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs +++ b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs @@ -1276,6 +1276,46 @@ namespace EgwCoreLib.Lux.Data.Controllers return answ; } + /// + /// Effettua update serStruct per l'offerta indicata + /// + /// ID singola riga offerta + /// Se non nullo è il nuovo stato await BOM + /// Se non nullo è stato await Price + /// + internal async Task OffertRowUpdateSerStruct(int offerRowID, string serStruct) + { + bool answ = false; + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + // recupero righe offerta... + var currRec = dbCtx + .DbSetOfferRow + .Where(x => x.OfferRowID == offerRowID) + .FirstOrDefault(); + + // aggiorno parametri (se inviati) + if (currRec != null) + { + currRec.SerStruct = serStruct; + dbCtx.Entry(currRec).State = EntityState.Modified; + } + + // salvo i cambiamenti... + var result = await dbCtx.SaveChangesAsync(); + answ = result > 0; + } + catch (Exception exc) + { + Log.Error($"Eccezione durante OffertRowUpdateSerStruct{Environment.NewLine}{exc}"); + } + } + return answ; + } + /// /// Effettua update stato await BOM/PRICE per l'offerta indicata /// @@ -1442,7 +1482,7 @@ namespace EgwCoreLib.Lux.Data.Controllers currRec.BomPrice = Math.Round(totPrice, 3); currRec.BomOk = numElems == numGroupOk; currRec.ItemOk = numElems == numItemOk; - // setto ok await di BOM e Price + // setto ok await di BOM e Price currRec.AwaitBom = false; currRec.AwaitPrice = false; dbCtx.Entry(currRec).State = EntityState.Modified; diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index 62529702..b6a0022b 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -741,7 +741,7 @@ namespace EgwCoreLib.Lux.Data.Services } /// - /// Effettua update dei costi di tutte le righe dell'offerta indicata + /// Effettua update della BOM (e dei costi) di tutte le righe dell'offerta indicata /// /// ID riga offerta da aggiornare /// Bom aggiornata da salvare @@ -760,6 +760,26 @@ namespace EgwCoreLib.Lux.Data.Services return fatto; } + /// + /// Effettua update del valore serializzato della riga offerta + /// + /// ID riga offerta da aggiornare + /// Serializzazione oggetto (es JWD) + /// + public async Task OffertRowUpdateSerStruct(int OfferRowID, string serStruct) + { + Stopwatch sw = new Stopwatch(); + sw.Start(); + // calcolo + bool fatto = await dbController.OffertRowUpdateSerStruct(OfferRowID, serStruct); + // svuoto cache... + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Offers:*"); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:OfferRows:*"); + sw.Stop(); + Log.Debug($"OffertRowUpdateSerStruct in {sw.Elapsed.TotalMilliseconds} ms"); + return fatto; + } + /// /// Effettua update stato await BOM/PRICE per l'offerta indicata /// diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index a78b8047..2be66653 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2510.0317 + 0.9.2510.0318 diff --git a/Lux.UI/Components/Compo/Component.razor b/Lux.UI/Components/Compo/Component.razor new file mode 100644 index 00000000..e69de29b diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index 3a3c7cd6..6dab660c 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -3,26 +3,25 @@

          EDITING

          @EditRecord.OfferRowUID

          - + + @* + IN_TemplateDTOList="@AvailTemplateList" + IN_SelTemplate="@SelTemplate" IN_SelFamilyHardware="@SelFamilyHardware" IN_SelColorMaterial="@SelColorMaterial" IN_SelMaterial="@SelMaterial" IN_SelGlass="@SelGlass" - - EC_OnUpdate="SaveJWD" - EC_OnSelectedTemplate="SetTemplate" - - LiveSVG="@currSvg" *@ - > - + *@ } else { diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index 596cb34f..4b486e2c 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -35,12 +35,16 @@ namespace Lux.UI.Components.Compo public void Dispose() { DLService.UpdatePipe.EA_NewMessage -= UpdatePipe_EA_NewMessage; + DLService.CalcDonePipe.EA_NewMessage -= CalcDonePipe_EA_NewMessage; } #endregion Public Methods #region Protected Properties + [Inject] + protected ConfigDataService CDService { get; set; } = null!; + [Inject] protected IConfiguration Config { get; set; } = null!; @@ -97,13 +101,12 @@ namespace Lux.UI.Components.Compo ///
      protected override async Task OnInitializedAsync() { - apiUrl = Config.GetValue("ServerConf:Prog.ApiUrl") ?? ""; - imgBasePath = Config.GetValue("ServerConf:ImageBaseUrl") ?? ""; + ConfInit(); await ReloadBaseList(); DLService.UpdatePipe.EA_NewMessage += UpdatePipe_EA_NewMessage; + DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage; } - protected override async Task OnParametersSetAsync() { await ReloadData(); @@ -160,22 +163,46 @@ namespace Lux.UI.Components.Compo #region Private Fields + private List AllColors = new(); + + private List AllConfGlass = new(); + + private List AllConfHardware = new(); + + private List AllConfProfile = new(); + + private List AllConfWood = new(); + private List AllRecords = new List(); private string apiUrl = ""; + private List AvailColorMaterialList = new List(); + + private List AvailGlassList = new List(); + + private List AvailHardwareList = new(); + + private List AvailMaterialList = new List(); + private List AvailFamilyHardwareList = new List(); + + private string calcTag = "calc"; private List? CurrBomList = null; private int currPage = 1; + private string currSvg = ""; + private OfferRowModel? EditBomRecord = null; private OfferRowModel? EditRecord = null; private string genBasePath = "generic"; + private string GenericBasePath = ""; + private string imgBasePath = ""; private bool isLoading = false; @@ -186,12 +213,47 @@ namespace Lux.UI.Components.Compo private bool showChangeMat = false; + private string subChannel = ""; + private int totalCount = 0; #endregion Private Fields #region Private Methods + /// + /// Ricevuto SVG, se è il mio lo aggiorno... + /// + /// + /// + private async void CalcDonePipe_EA_NewMessage(object? sender, EventArgs e) + { + // vale SOLO SE sono in editing... + if (EditRecord != null) + { + // aggiorno visualizzazione + PubSubEventArgs currArgs = (PubSubEventArgs)e; + // conversione on-the-fly SVG da mostrare + if (!string.IsNullOrEmpty(currArgs.newMessage)) + { + if (currArgs.msgUid.Equals($"{subChannel}:{EditRecord.OfferRowUID}")) + { + currSvg = currArgs.newMessage; + } + await InvokeAsync(StateHasChanged); + } + } + } + + private void ConfInit() + { + apiUrl = Config.GetValue("ServerConf:Prog.ApiUrl") ?? ""; + imgBasePath = Config.GetValue("ServerConf:ImageBaseUrl") ?? ""; + GenericBasePath = Config.GetValue("ServerConf:GenericBaseUrl") ?? ""; + calcTag = Config.GetValue("ServerConf:CalcTag") ?? ""; + subChannel = Config.GetValue("ServerConf:SvgChannel") ?? ""; + } + private async Task DoRecalcOffer() { isLoading = true; @@ -221,6 +283,44 @@ namespace Lux.UI.Components.Compo isLoading = false; } + /// + /// init classi configurazione + /// + /// + private async Task ReloadBaseList() + { + // lettura conf da DB/Cache Redis + AllConfGlass = await DLService.ConfGlassGetAllAsync(); + var rawHw = CDService.ElencoHw(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, "HW.AGB"); + // hw filtro solo validi... + AllConfHardware = rawHw + .Where(x => !x.FamilyName.Equals(x.Description, StringComparison.OrdinalIgnoreCase)) + .ToList(); + AllConfProfile = await DLService.ConfProfileGetAllAsync(); + AllConfWood = await DLService.ConfWoodGetAllAsync(); + AllColors = await DLService.GenValGetFiltAsync("WoodCol"); + // conversione tipi + AvailGlassList = AllConfGlass + .Select(x => x.Description) + .ToList(); + AvailFamilyHardwareList = AllConfHardware + .DistinctBy(x => x.FamilyName) + .OrderBy(x => x.FamilyName) + .Select(x => x.FamilyName) + .ToList(); + AvailHardwareList = AllConfHardware + .Select(x => new Egw.Window.Data.Hardware(x.Id, x.FamilyName, x.Description, x.OpeningType, x.Shape, x.SashQty, x.SashPosition)) + .ToList(); + AvailMaterialList = AllConfWood + .Select(x => x.Description) + .ToList(); + // FixMe Todo: aggiunta profili (manca anche nel costruttore...) + AvailColorMaterialList = AllColors + .OrderBy(x => x.Ordinal) + .Select(x => x.ValString) + .ToList(); + } + /// /// Legge i dati dei record completi /// @@ -233,6 +333,25 @@ namespace Lux.UI.Components.Compo } } + /// + /// Salvataggio del JWD aggiornato nella mia riga di offerta + /// + /// + private async void SaveJWD(Dictionary args) + { + // ...se ho editing + if (EditRecord != null) + { + // SE contiene il mio JWD... + if (args.ContainsKey("JWD")) + { + string serStruct = args["JWD"]; + // salvo! + await DLService.OffertRowUpdateSerStruct(EditRecord.OfferRowID, serStruct); + } + } + } + private async Task setAwaitPrice(bool awaitPrice, bool flushCache) { foreach (var item in AllRecords) @@ -241,6 +360,10 @@ namespace Lux.UI.Components.Compo } } + private void SetTemplate(WebWindowComplex.DTO.TemplateSelectDTO args) + { + } + /// /// salva nel record corrente la BOM aggiornata e poi ricalcola importo... /// @@ -304,51 +427,5 @@ namespace Lux.UI.Components.Compo } #endregion Private Methods - - - [Inject] - protected ConfigDataService CDService { get; set; } = null!; - - private List AllConfGlass = new(); - private List AllConfHardware = new(); - private List AllConfProfile = new(); - private List AllConfWood = new(); - private List AllColors = new(); - - private List AvailGlassList = new List(); - private List AvailMaterialList = new List(); - private List AvailColorMaterialList = new List(); - - private List AvailHardwareList = new(); - - /// - /// init classi configurazione - /// - /// - private async Task ReloadBaseList() - { - // lettura conf da DB/Cache Redis - AllConfGlass = await DLService.ConfGlassGetAllAsync(); - AllConfHardware = CDService.ElencoHw(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, "HW.AGB"); - AllConfProfile = await DLService.ConfProfileGetAllAsync(); - AllConfWood = await DLService.ConfWoodGetAllAsync(); - AllColors = await DLService.GenValGetFiltAsync("WoodCol"); - // conversione tipi - AvailGlassList = AllConfGlass - .Select(x => x.Description) - .ToList(); - AvailHardwareList = AllConfHardware - .Select(x => new Egw.Window.Data.Hardware(x.Id, x.FamilyName, x.Description, x.OpeningType, x.Shape, x.SashQty, x.SashPosition)) - .ToList(); - AvailMaterialList = AllConfWood - .Select(x => x.Description) - .ToList(); - // FixMe Todo: aggiunta profili (manca anche nel costruttore...) - AvailColorMaterialList = AllColors - .OrderBy(x => x.Ordinal) - .Select(x => x.ValString) - .ToList(); - } - } } \ No newline at end of file diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 9cb224bd..f825de26 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2510.0317 + 0.9.2510.0318 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 4231ab41..4d2ccef0 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

      Versione: 0.9.2510.0317

      +

      Versione: 0.9.2510.0318


      Note di rilascio:
      • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 51b71852..3a428e3d 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2510.0317 +0.9.2510.0318 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 2989ae19..44f6491e 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2510.0317 + 0.9.2510.0318 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 3faa1b252f8688a19f50642662470b684014c87e Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 3 Oct 2025 18:47:42 +0200 Subject: [PATCH 45/65] Update migration --- .../20251003164608_AddShapeList.Designer.cs | 2442 +++++++++++++++++ .../Migrations/20251003164608_AddShapeList.cs | 364 +++ .../DataLayerContextModelSnapshot.cs | 138 +- EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs | 20 +- 4 files changed, 2909 insertions(+), 55 deletions(-) create mode 100644 EgwCoreLib.Lux.Data/Migrations/20251003164608_AddShapeList.Designer.cs create mode 100644 EgwCoreLib.Lux.Data/Migrations/20251003164608_AddShapeList.cs diff --git a/EgwCoreLib.Lux.Data/Migrations/20251003164608_AddShapeList.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20251003164608_AddShapeList.Designer.cs new file mode 100644 index 00000000..5982a8ec --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20251003164608_AddShapeList.Designer.cs @@ -0,0 +1,2442 @@ +// +using System; +using EgwCoreLib.Lux.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace EgwCoreLib.Lux.Data.Migrations +{ + [DbContext(typeof(DataLayerContext))] + [Migration("20251003164608_AddShapeList")] + partial class AddShapeList + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.17") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.GlassModel", b => + { + b.Property("GlassID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GlassID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Thickness") + .HasColumnType("double"); + + b.HasKey("GlassID"); + + b.ToTable("conf_glass"); + + b.HasData( + new + { + GlassID = 1, + Code = "0001", + Description = "Vetro BE 2S 4/12/4", + Thickness = 20.0 + }, + new + { + GlassID = 2, + Code = "0002", + Description = "Vetro BE 3S 4/12/4/12/4", + Thickness = 36.0 + }, + new + { + GlassID = 3, + Code = "0003", + Description = "Vetro BE 3S 4/16/4/16/4", + Thickness = 44.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.ProfileModel", b => + { + b.Property("ProfileID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProfileID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Thickness") + .HasColumnType("double"); + + b.HasKey("ProfileID"); + + b.ToTable("conf_profile"); + + b.HasData( + new + { + ProfileID = 1, + Code = "0001", + Description = "Profilo 32", + Thickness = 32.0 + }, + new + { + ProfileID = 2, + Code = "0002", + Description = "Profilo 48", + Thickness = 48.0 + }, + new + { + ProfileID = 3, + Code = "0003", + Description = "Profilo 58", + Thickness = 58.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.WoodModel", b => + { + b.Property("WoodID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("WoodID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("WoodID"); + + b.ToTable("conf_wood"); + + b.HasData( + new + { + WoodID = 1, + Code = "0001", + Description = "Abete", + Type = 1 + }, + new + { + WoodID = 2, + Code = "0002", + Description = "Acero", + Type = 1 + }, + new + { + WoodID = 3, + Code = "0003", + Description = "Pino", + Type = 2 + }, + new + { + WoodID = 4, + Code = "0004", + Description = "Tek", + Type = 3 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", b => + { + b.Property("CostDriverID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CostDriverID")); + + b.Property("Descript") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Unit") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CostDriverID"); + + b.ToTable("cost_driver"); + + b.HasData( + new + { + CostDriverID = 1, + Descript = "Ore lavorate per step/fase", + Name = "WorkHour", + Unit = "h" + }, + new + { + CostDriverID = 2, + Descript = "Metri prodotti per step/fase", + Name = "Meter", + Unit = "m" + }, + new + { + CostDriverID = 3, + Descript = "Numero unità prodotte (lavorate) per step/fase", + Name = "Unit", + Unit = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.Property("ResourceID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); + + b.Property("CostDriverBudget") + .HasColumnType("decimal(65,30)"); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("EBTPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("FixedCost") + .HasColumnType("decimal(65,30)"); + + b.Property("LaborCost") + .HasColumnType("decimal(65,30)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OverHeadCost") + .HasColumnType("decimal(65,30)"); + + b.Property("OverHeadPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("PriceMargin") + .HasColumnType("decimal(65,30)"); + + b.Property("VariableCost") + .HasColumnType("decimal(65,30)"); + + b.HasKey("ResourceID"); + + b.HasIndex("CostDriverID"); + + b.ToTable("cost_resource"); + + b.HasData( + new + { + ResourceID = 1, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 12000m, + LaborCost = 30m, + Name = "Sezionatrice", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 2, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 100000m, + LaborCost = 40m, + Name = "Linea SAOMAD WoodPecker Just 3500", + OverHeadCost = 15000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 30000m + }, + new + { + ResourceID = 3, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 35m, + Name = "Linea Pantografo", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 4, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 30m, + Name = "Stazione Verniciatura", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 5, + CostDriverBudget = 220m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 6000m, + LaborCost = 30m, + Name = "Verniciatura Manuale", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 2000m + }, + new + { + ResourceID = 6, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 500m, + LaborCost = 30m, + Name = "Montaggio Manuale", + OverHeadCost = 500m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 500m + }, + new + { + ResourceID = 7, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 0m, + LaborCost = 40m, + Name = "Installatore", + OverHeadCost = 0m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 3000m + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", b => + { + b.Property("CodGroup") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CodGroup"); + + b.ToTable("item_group"); + + b.HasData( + new + { + CodGroup = "WindowTrunk", + Description = "Barre legno per lavorazione" + }, + new + { + CodGroup = "WindowGlass", + Description = "Vetri serramento" + }, + new + { + CodGroup = "WindowVarnish", + Description = "Vernici per legno" + }, + new + { + CodGroup = "WindowHardware", + Description = "Ferramenta serramento" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.Property("ItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); + + b.Property("CodGroup") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemIDParent") + .HasColumnType("int"); + + b.Property("ItemType") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("QtyMax") + .HasColumnType("double"); + + b.Property("QtyMin") + .HasColumnType("double"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ItemID"); + + b.HasIndex("CodGroup"); + + b.ToTable("item_item"); + + b.HasData( + new + { + ItemID = 1, + CodGroup = "WindowTrunk", + Cost = 20.0, + Description = "BARRA-60x80 generica", + ExtItemCode = "", + IsService = false, + ItemCode = 1001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.29999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "BARR.001", + UM = "#" + }, + new + { + ItemID = 2, + CodGroup = "WindowTrunk", + Cost = 16.5, + Description = "Barra 60x80, lunghezza 12m", + ExtItemCode = "BARRA-60x80x12000", + IsService = false, + ItemCode = 1002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.12000", + UM = "#" + }, + new + { + ItemID = 3, + CodGroup = "WindowTrunk", + Cost = 17.5, + Description = "Barra 60x80, lunghezza 8m", + ExtItemCode = "BARRA-60x80x8000", + IsService = false, + ItemCode = 1003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.22, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.8000", + UM = "#" + }, + new + { + ItemID = 4, + CodGroup = "WindowTrunk", + Cost = 15.5, + Description = "Barra 60x80, lunghezza 16m", + ExtItemCode = "BARRA-60x80x16000", + IsService = false, + ItemCode = 1004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.16000", + UM = "#" + }, + new + { + ItemID = 5, + CodGroup = "WindowGlass", + Cost = 300.0, + Description = "Vetro triplo, basso indice termico, 800x1000", + ExtItemCode = "VETRO-3L-THERMO-800x1000", + IsService = false, + ItemCode = 2001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3T.800.1000", + UM = "m2" + }, + new + { + ItemID = 6, + CodGroup = "WindowGlass", + Cost = 200.0, + Description = "Vetro doppio, 800x1000", + ExtItemCode = "VETRO-2L-800x1000", + IsService = false, + ItemCode = 2002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.14999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V2.800.1000", + UM = "m2" + }, + new + { + ItemID = 7, + CodGroup = "WindowGlass", + Cost = 250.0, + Description = "Vetro triplo, 800x1000", + ExtItemCode = "VETRO-3L-800x1000", + IsService = false, + ItemCode = 2003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.17999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3.800.1000", + UM = "m2" + }, + new + { + ItemID = 8, + CodGroup = "WindowVarnish", + Cost = 20.0, + Description = "Vernice trasparente", + ExtItemCode = "VERN-TRASP", + IsService = false, + ItemCode = 3001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "VT.STD", + UM = "l" + }, + new + { + ItemID = 9, + CodGroup = "WindowHardware", + Cost = 65.0, + Description = "Kit standard completo AGB tipo 001", + ExtItemCode = "KIT-001", + IsService = false, + ItemCode = 5001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-KIT-001", + UM = "#" + }, + new + { + ItemID = 10, + CodGroup = "WindowHardware", + Cost = 10.0, + Description = "Cerniera AGB tipo 001", + ExtItemCode = "CERN-001", + IsService = false, + ItemCode = 5002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-CERN-001", + UM = "#" + }, + new + { + ItemID = 11, + CodGroup = "WindowHardware", + Cost = 15.0, + Description = "Serratura AGB tipo 001", + ExtItemCode = "SERR-001", + IsService = false, + ItemCode = 5003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-SERR-001", + UM = "#" + }, + new + { + ItemID = 12, + CodGroup = "WindowHardware", + Cost = 25.0, + Description = "Maniglia AGB tipo 001", + ExtItemCode = "MAN-001", + IsService = false, + ItemCode = 5004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-MAN-001", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.Property("SellingItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SellingItemID"); + + b.HasIndex("JobID"); + + b.ToTable("item_selling_item"); + + b.HasData( + new + { + SellingItemID = 1, + Cost = 820.0, + Description = "Finestra anta Singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 2, + Margin = 0.20000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 2, + Cost = 150.0, + Description = "Persiana anta singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.10000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 3, + Cost = 200.0, + Description = "Installazione", + ExtItemCode = "", + IsService = true, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SupplierModel", b => + { + b.Property("SupplierID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SupplierID"); + + b.ToTable("item_supplier"); + + b.HasData( + new + { + SupplierID = 1, + CompanyName = "Company One", + FirstName = "Supplier A", + LastName = "Egalware", + VAT = "7294857103879254" + }, + new + { + SupplierID = 2, + CompanyName = "Company Two", + FirstName = "Supplier B", + LastName = "User", + VAT = "7294857103879254" + }, + new + { + SupplierID = 3, + CompanyName = "Company Two", + FirstName = "Supplier C", + LastName = "User Test", + VAT = "7294857103879254" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", b => + { + b.Property("ProductionBatchID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DueDate") + .HasColumnType("datetime(6)"); + + b.HasKey("ProductionBatchID"); + + b.ToTable("production_batch"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.Property("ProdItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("OrderRowID") + .HasColumnType("int"); + + b.Property("ProductionBatchID") + .HasColumnType("int"); + + b.HasKey("ProdItemID"); + + b.HasIndex("OrderRowID"); + + b.HasIndex("ProductionBatchID"); + + b.ToTable("production_item"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.Property("ProdItemStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProdItemID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.Property("WorkTime") + .HasColumnType("double"); + + b.HasKey("ProdItemStepID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ProdItemID"); + + b.HasIndex("ResourceID"); + + b.ToTable("production_item_step"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", b => + { + b.Property("CustomerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CustomerID"); + + b.ToTable("sales_customer"); + + b.HasData( + new + { + CustomerID = 1, + CompanyName = "", + FirstName = "Customer A", + LastName = "Egalware", + VAT = "1234567890123456" + }, + new + { + CustomerID = 2, + CompanyName = "", + FirstName = "Customer B", + LastName = "User", + VAT = "1234567890123456" + }, + new + { + CustomerID = 3, + CompanyName = "", + FirstName = "Customer C", + LastName = "User Test", + VAT = "1234567890123456" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", b => + { + b.Property("DealerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("DealerID"); + + b.ToTable("sales_dealer"); + + b.HasData( + new + { + DealerID = 1, + CompanyName = "Company First", + FirstName = "Dealer A", + LastName = "Egalware", + VAT = "9587362514671527" + }, + new + { + DealerID = 2, + CompanyName = "Company First", + FirstName = "Dealer B", + LastName = "User", + VAT = "9587362514671527" + }, + new + { + DealerID = 3, + CompanyName = "Company Second", + FirstName = "Dealer C", + LastName = "User Test", + VAT = "9587362514671527" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Property("OfferID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Discount") + .HasColumnType("double"); + + b.Property("Envir") + .HasColumnType("int"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OfferID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.ToTable("sales_offer"); + + b.HasData( + new + { + OfferID = 1, + CustomerID = 2, + DealerID = 2, + Description = "Offerta per tre serramenti", + Discount = 0.0, + Envir = 1, + Inserted = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6885), + Modified = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6886), + OffertState = 0, + RefNum = 1, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6881) + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferRowModel", b => + { + b.Property("OfferRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); + + b.Property("AwaitBom") + .HasColumnType("tinyint(1)"); + + b.Property("AwaitPrice") + .HasColumnType("tinyint(1)"); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomOk") + .HasColumnType("tinyint(1)"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Envir") + .HasColumnType("int"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemBOM") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemOk") + .HasColumnType("tinyint(1)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OfferRowUID") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OfferRowID"); + + b.HasIndex("OfferID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_offer_row"); + + b.HasData( + new + { + OfferRowID = 1, + AwaitBom = false, + AwaitPrice = false, + BomCost = 900.0, + BomOk = true, + BomPrice = 950.0, + Envir = 1, + Inserted = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7005), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7010), + Note = "Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000000001", + Qty = 3.0, + RowNum = 1, + SellingItemID = 1, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 2, + AwaitBom = false, + AwaitPrice = false, + BomCost = 160.0, + BomOk = true, + BomPrice = 200.0, + Envir = 1, + Inserted = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7035), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7037), + Note = "Persiana per Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000000002", + Qty = 3.0, + RowNum = 2, + SellingItemID = 2, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 3, + AwaitBom = false, + AwaitPrice = false, + BomCost = 200.0, + BomOk = true, + BomPrice = 250.0, + Envir = 1, + Inserted = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7047), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7049), + Note = "Installazione serramento", + OfferID = 1, + OfferRowUID = "OFF250000000003", + Qty = 3.0, + RowNum = 3, + SellingItemID = 3, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", b => + { + b.Property("OrderID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OrderID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.HasIndex("OfferID"); + + b.ToTable("sales_order"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.Property("OrderRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OrderID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OrderRowID"); + + b.HasIndex("OrderID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_order_row"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.Property("StockMovID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); + + b.Property("CodDoc") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DtCreate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("DtMod") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); + + b.Property("MovCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyRec") + .HasColumnType("double"); + + b.Property("StockStatusId") + .HasColumnType("int"); + + b.Property("UnitVal") + .HasColumnType("double"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("StockMovID"); + + b.HasIndex("MovCod"); + + b.HasIndex("StockStatusId"); + + b.ToTable("stock_mov"); + + b.HasData( + new + { + StockMovID = 1, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6573), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6630), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 1, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 2, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6633), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6635), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 8.0, + StockStatusId = 2, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 3, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6637), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6638), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 3, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 4, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6641), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6642), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 4, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 5, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6644), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6646), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 10.0, + StockStatusId = 5, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 6, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6648), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6650), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 6, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 7, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6652), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6653), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 50.0, + StockStatusId = 7, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 8, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6656), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6657), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 8, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 9, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6659), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6661), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 9, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 10, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6663), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6664), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 10, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.Property("StockStatusId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("IsRemn") + .HasColumnType("tinyint(1)"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("Location") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyAvail") + .HasColumnType("double"); + + b.HasKey("StockStatusId"); + + b.HasIndex("ItemID"); + + b.ToTable("stock_status"); + + b.HasData( + new + { + StockStatusId = 1, + IsDeleted = false, + IsRemn = false, + ItemID = 1, + Location = "B001-001-003", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 2, + IsDeleted = false, + IsRemn = false, + ItemID = 2, + Location = "B001-001-002", + QtyAvail = 8.0 + }, + new + { + StockStatusId = 3, + IsDeleted = false, + IsRemn = false, + ItemID = 3, + Location = "B001-001-001", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 4, + IsDeleted = false, + IsRemn = false, + ItemID = 4, + Location = "V002-001-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 5, + IsDeleted = false, + IsRemn = false, + ItemID = 5, + Location = "V001-001-002", + QtyAvail = 10.0 + }, + new + { + StockStatusId = 6, + IsDeleted = false, + IsRemn = false, + ItemID = 6, + Location = "V001-001-003", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 7, + IsDeleted = false, + IsRemn = false, + ItemID = 8, + Location = "V001-001-003", + QtyAvail = 50.0 + }, + new + { + StockStatusId = 8, + IsDeleted = false, + IsRemn = false, + ItemID = 11, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 9, + IsDeleted = false, + IsRemn = false, + ItemID = 9, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 10, + IsDeleted = false, + IsRemn = false, + ItemID = 10, + Location = "S001-001-001", + QtyAvail = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => + { + b.Property("JobID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("JobID"); + + b.ToTable("task_job"); + + b.HasData( + new + { + JobID = 1, + Description = "Rivendita / servizi" + }, + new + { + JobID = 2, + Description = "Serramento Completo Legno su linea Saomad e installatore interno" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.Property("JobStepItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("JobStepID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.HasKey("JobStepItemID"); + + b.HasIndex("ItemID"); + + b.HasIndex("JobStepID"); + + b.ToTable("task_job_step_item"); + + b.HasData( + new + { + JobStepItemID = 1, + Description = "Grezzo legno abete", + Index = 1, + ItemID = 1, + JobStepID = 1, + Qty = 1.0 + }, + new + { + JobStepItemID = 2, + Description = "Vernice trasparente standard 1L", + Index = 2, + ItemID = 8, + JobStepID = 3, + Qty = 0.10000000000000001 + }, + new + { + JobStepItemID = 3, + Description = "Ferramenta AGB - rif. AGFD.00000.00000", + Index = 3, + ItemID = 9, + JobStepID = 4, + Qty = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.Property("JobStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProductivityRate") + .HasColumnType("decimal(65,30)"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.HasKey("JobStepID"); + + b.HasIndex("CostDriverID"); + + b.HasIndex("JobID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ResourceID"); + + b.ToTable("task_job_step"); + + b.HasData( + new + { + JobStepID = 1, + CostDriverID = 3, + Description = "", + Index = 1, + JobID = 2, + PhaseID = 1, + ProductivityRate = 1m, + ResourceID = 1 + }, + new + { + JobStepID = 2, + CostDriverID = 2, + Description = "", + Index = 2, + JobID = 2, + PhaseID = 2, + ProductivityRate = 1m, + ResourceID = 2 + }, + new + { + JobStepID = 3, + CostDriverID = 3, + Description = "", + Index = 3, + JobID = 2, + PhaseID = 3, + ProductivityRate = 1m, + ResourceID = 4 + }, + new + { + JobStepID = 4, + CostDriverID = 3, + Description = "", + Index = 4, + JobID = 2, + PhaseID = 4, + ProductivityRate = 1m, + ResourceID = 6 + }, + new + { + JobStepID = 5, + CostDriverID = 3, + Description = "", + Index = 5, + JobID = 2, + PhaseID = 6, + ProductivityRate = 1m, + ResourceID = 7 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", b => + { + b.Property("PhaseID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("PhaseID"); + + b.ToTable("task_phase"); + + b.HasData( + new + { + PhaseID = 1, + Description = "Taglio tronchetti" + }, + new + { + PhaseID = 2, + Description = "Lavorazione pezzi serramento" + }, + new + { + PhaseID = 3, + Description = "Verniciatura" + }, + new + { + PhaseID = 4, + Description = "Assemblaggio completo" + }, + new + { + PhaseID = 5, + Description = "Assemblaggio Ferramenta" + }, + new + { + PhaseID = 6, + Description = "Installazione e posa in opera" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.CounterModel", b => + { + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("CountName") + .HasColumnType("varchar(255)"); + + b.Property("Counter") + .HasColumnType("int"); + + b.HasKey("RefYear", "CountName"); + + b.ToTable("utils_counter"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Property("ClassCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ClassCod"); + + b.ToTable("utils_gen_class"); + + b.HasData( + new + { + ClassCod = "ShapeList", + Description = "Elenco Shape Gestite" + }, + new + { + ClassCod = "WoodCol", + Description = "Elenco Colori Legno" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.Property("GenValID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); + + b.Property("ClassCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Ordinal") + .HasColumnType("int"); + + b.Property("ValString") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("GenValID"); + + b.HasIndex("ClassCod"); + + b.ToTable("utils_gen_value"); + + b.HasData( + new + { + GenValID = 1, + ClassCod = "WoodCol", + Ordinal = 1, + ValString = "Legno" + }, + new + { + GenValID = 2, + ClassCod = "WoodCol", + Ordinal = 2, + ValString = "Bianco" + }, + new + { + GenValID = 3, + ClassCod = "WoodCol", + Ordinal = 3, + ValString = "Rosso" + }, + new + { + GenValID = 4, + ClassCod = "WoodCol", + Ordinal = 4, + ValString = "Nero" + }, + new + { + GenValID = 5, + ClassCod = "ShapeList", + Ordinal = 1, + ValString = "Rectangular" + }, + new + { + GenValID = 6, + ClassCod = "ShapeList", + Ordinal = 2, + ValString = "Trapezoidal" + }, + new + { + GenValID = 7, + ClassCod = "ShapeList", + Ordinal = 3, + ValString = "Triangular" + }, + new + { + GenValID = 8, + ClassCod = "ShapeList", + Ordinal = 4, + ValString = "Arc" + }, + new + { + GenValID = 9, + ClassCod = "ShapeList", + Ordinal = 5, + ValString = "FullArc" + }, + new + { + GenValID = 10, + ClassCod = "ShapeList", + Ordinal = 6, + ValString = "SemiFullArc" + }, + new + { + GenValID = 11, + ClassCod = "ShapeList", + Ordinal = 7, + ValString = "SemiArc" + }, + new + { + GenValID = 12, + ClassCod = "ShapeList", + Ordinal = 8, + ValString = "Circular" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", b => + { + b.Property("MovCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("MovCod"); + + b.ToTable("utils_mov_type"); + + b.HasData( + new + { + MovCod = "CAR", + Description = "Carico a magazzino" + }, + new + { + MovCod = "MOV", + Description = "Movimento interno (spostamento)" + }, + new + { + MovCod = "ND", + Description = "Non Definito" + }, + new + { + MovCod = "OFOR", + Description = "Ordine Fornitore" + }, + new + { + MovCod = "RETT", + Description = "Rettifica magazzino" + }, + new + { + MovCod = "SCAR", + Description = "Scarico da magazzino" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", b => + { + b.Property("TagID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("TagID"); + + b.ToTable("utils_tags"); + + b.HasData( + new + { + TagID = 1, + Description = "Tag 01" + }, + new + { + TagID = 2, + Description = "Tag 02" + }, + new + { + TagID = 3, + Description = "Tag 03" + }, + new + { + TagID = 4, + Description = "Tag 04" + }, + new + { + TagID = 5, + Description = "Tag 05" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", "ItemGroupNav") + .WithMany() + .HasForeignKey("CodGroup") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemGroupNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") + .WithMany() + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("JobNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", "OrderRowNav") + .WithMany() + .HasForeignKey("OrderRowID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", "ProductionBatchNav") + .WithMany() + .HasForeignKey("ProductionBatchID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderRowNav"); + + b.Navigation("ProductionBatchNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", "ProdItemNav") + .WithMany() + .HasForeignKey("ProdItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("PhaseNav"); + + b.Navigation("ProdItemNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", 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.OfferRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany("OfferRowNav") + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OfferNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", 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.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany() + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CustomerNav"); + + b.Navigation("DealerNav"); + + b.Navigation("OfferNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", "OrderNav") + .WithMany() + .HasForeignKey("OrderID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", "MovTypeNav") + .WithMany() + .HasForeignKey("MovCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", "StockStatusNav") + .WithMany() + .HasForeignKey("StockStatusId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("MovTypeNav"); + + b.Navigation("StockStatusNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", "JobStepNav") + .WithMany() + .HasForeignKey("JobStepID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") + .WithMany("JobStepNav") + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + + b.Navigation("JobNav"); + + b.Navigation("PhaseNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", "GenClassNav") + .WithMany("GenValNav") + .HasForeignKey("ClassCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GenClassNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Navigation("OfferRowNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => + { + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Navigation("GenValNav"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251003164608_AddShapeList.cs b/EgwCoreLib.Lux.Data/Migrations/20251003164608_AddShapeList.cs new file mode 100644 index 00000000..d75e04c9 --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20251003164608_AddShapeList.cs @@ -0,0 +1,364 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional + +namespace EgwCoreLib.Lux.Data.Migrations +{ + /// + public partial class AddShapeList : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DeleteData( + table: "utils_gen_class", + keyColumn: "ClassCod", + keyValue: "WoodMat"); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6885), new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6886), new DateTime(2025, 11, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6881) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7005), new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7010) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7035), new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7037) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7047), new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7049) }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6573)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6633)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6637)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6641)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6644)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6648)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6652)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6656)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6659)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6663)); + + migrationBuilder.InsertData( + table: "utils_gen_class", + columns: new[] { "ClassCod", "Description" }, + values: new object[] { "ShapeList", "Elenco Shape Gestite" }); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 1, + columns: new[] { "ClassCod", "ValString" }, + values: new object[] { "WoodCol", "Legno" }); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 2, + columns: new[] { "ClassCod", "ValString" }, + values: new object[] { "WoodCol", "Bianco" }); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 3, + columns: new[] { "Ordinal", "ValString" }, + values: new object[] { 3, "Rosso" }); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 4, + columns: new[] { "Ordinal", "ValString" }, + values: new object[] { 4, "Nero" }); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 5, + columns: new[] { "ClassCod", "Ordinal", "ValString" }, + values: new object[] { "ShapeList", 1, "Rectangular" }); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 6, + columns: new[] { "ClassCod", "Ordinal", "ValString" }, + values: new object[] { "ShapeList", 2, "Trapezoidal" }); + + migrationBuilder.InsertData( + table: "utils_gen_value", + columns: new[] { "GenValID", "ClassCod", "Ordinal", "ValString" }, + values: new object[,] + { + { 7, "ShapeList", 3, "Triangular" }, + { 8, "ShapeList", 4, "Arc" }, + { 9, "ShapeList", 5, "FullArc" }, + { 10, "ShapeList", 6, "SemiFullArc" }, + { 11, "ShapeList", 7, "SemiArc" }, + { 12, "ShapeList", 8, "Circular" } + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DeleteData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 7); + + migrationBuilder.DeleteData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 8); + + migrationBuilder.DeleteData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 9); + + migrationBuilder.DeleteData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 10); + + migrationBuilder.DeleteData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 11); + + migrationBuilder.DeleteData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 12); + + migrationBuilder.DeleteData( + table: "utils_gen_class", + keyColumn: "ClassCod", + keyValue: "ShapeList"); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(535), new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(537), new DateTime(2025, 11, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(530) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(636), new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(638) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(651), new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(652) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(662), new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(664) }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(180)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(236)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(240)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(243)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(247)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(250)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(254)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(257)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(318)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(322)); + + migrationBuilder.InsertData( + table: "utils_gen_class", + columns: new[] { "ClassCod", "Description" }, + values: new object[] { "WoodMat", "Elenco Materiali Legno" }); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 1, + columns: new[] { "ClassCod", "ValString" }, + values: new object[] { "WoodMat", "Pine" }); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 2, + columns: new[] { "ClassCod", "ValString" }, + values: new object[] { "WoodMat", "Maple" }); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 3, + columns: new[] { "Ordinal", "ValString" }, + values: new object[] { 1, "Legno" }); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 4, + columns: new[] { "Ordinal", "ValString" }, + values: new object[] { 2, "Bianco" }); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 5, + columns: new[] { "ClassCod", "Ordinal", "ValString" }, + values: new object[] { "WoodCol", 3, "Rosso" }); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 6, + columns: new[] { "ClassCod", "Ordinal", "ValString" }, + values: new object[] { "WoodCol", 4, "Nero" }); + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs index 300fabfa..31a0ff1f 100644 --- a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs +++ b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs @@ -1090,13 +1090,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta per tre serramenti", Discount = 0.0, Envir = 1, - Inserted = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(535), - Modified = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(537), + Inserted = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6885), + Modified = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6886), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(530) + ValidUntil = new DateTime(2025, 11, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6881) }); }); @@ -1191,11 +1191,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 950.0, Envir = 1, - Inserted = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(636), + Inserted = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7005), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(638), + Modified = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7010), Note = "Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000001", @@ -1215,11 +1215,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 200.0, Envir = 1, - Inserted = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(651), + Inserted = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7035), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(652), + Modified = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7037), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000002", @@ -1239,11 +1239,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 250.0, Envir = 1, - Inserted = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(662), + Inserted = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7047), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(664), + Modified = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7049), Note = "Installazione serramento", OfferID = 1, OfferRowUID = "OFF250000000003", @@ -1426,8 +1426,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 1, CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(180), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(233), + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6573), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6630), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1439,8 +1439,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(236), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(238), + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6633), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6635), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -1452,8 +1452,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(240), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(241), + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6637), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6638), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1465,8 +1465,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(243), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(245), + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6641), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6642), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1478,8 +1478,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(247), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(248), + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6644), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6646), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -1491,8 +1491,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(250), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(252), + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6648), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6650), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1504,8 +1504,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(254), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(255), + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6652), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6653), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -1517,8 +1517,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(257), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(258), + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6656), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6657), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1530,8 +1530,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(318), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(320), + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6659), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6661), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1543,8 +1543,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(322), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(324), + DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6663), + DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6664), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1949,8 +1949,8 @@ namespace EgwCoreLib.Lux.Data.Migrations b.HasData( new { - ClassCod = "WoodMat", - Description = "Elenco Materiali Legno" + ClassCod = "ShapeList", + Description = "Elenco Shape Gestite" }, new { @@ -1988,44 +1988,86 @@ namespace EgwCoreLib.Lux.Data.Migrations 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 = "Legno" }, new { - GenValID = 4, + GenValID = 2, ClassCod = "WoodCol", Ordinal = 2, ValString = "Bianco" }, new { - GenValID = 5, + GenValID = 3, ClassCod = "WoodCol", Ordinal = 3, ValString = "Rosso" }, new { - GenValID = 6, + GenValID = 4, ClassCod = "WoodCol", Ordinal = 4, ValString = "Nero" + }, + new + { + GenValID = 5, + ClassCod = "ShapeList", + Ordinal = 1, + ValString = "Rectangular" + }, + new + { + GenValID = 6, + ClassCod = "ShapeList", + Ordinal = 2, + ValString = "Trapezoidal" + }, + new + { + GenValID = 7, + ClassCod = "ShapeList", + Ordinal = 3, + ValString = "Triangular" + }, + new + { + GenValID = 8, + ClassCod = "ShapeList", + Ordinal = 4, + ValString = "Arc" + }, + new + { + GenValID = 9, + ClassCod = "ShapeList", + Ordinal = 5, + ValString = "FullArc" + }, + new + { + GenValID = 10, + ClassCod = "ShapeList", + Ordinal = 6, + ValString = "SemiFullArc" + }, + new + { + GenValID = 11, + ClassCod = "ShapeList", + Ordinal = 7, + ValString = "SemiArc" + }, + new + { + GenValID = 12, + ClassCod = "ShapeList", + Ordinal = 8, + ValString = "Circular" }); }); diff --git a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs index c681995b..77cd14bc 100644 --- a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs +++ b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs @@ -31,17 +31,23 @@ namespace EgwCoreLib.Lux.Data // init classi generiche x gestione liste modelBuilder.Entity().HasData( - new GenClassModel { ClassCod = "WoodMat", Description = "Elenco Materiali Legno" }, + new GenClassModel { ClassCod = "ShapeList", Description = "Elenco Shape Gestite" }, new GenClassModel { ClassCod = "WoodCol", Description = "Elenco Colori Legno" } ); modelBuilder.Entity().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 = "Legno" }, - 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" } + new GenValueModel { GenValID = 1, Ordinal = 1, ClassCod = "WoodCol", ValString = "Legno" }, + new GenValueModel { GenValID = 2, Ordinal = 2, ClassCod = "WoodCol", ValString = "Bianco" }, + new GenValueModel { GenValID = 3, Ordinal = 3, ClassCod = "WoodCol", ValString = "Rosso" }, + new GenValueModel { GenValID = 4, Ordinal = 4, ClassCod = "WoodCol", ValString = "Nero" }, + new GenValueModel { GenValID = 5, Ordinal = 1, ClassCod = "ShapeList", ValString = "Rectangular" }, + new GenValueModel { GenValID = 6, Ordinal = 2, ClassCod = "ShapeList", ValString = "Trapezoidal" }, + new GenValueModel { GenValID = 7, Ordinal = 3, ClassCod = "ShapeList", ValString = "Triangular" }, + new GenValueModel { GenValID = 8, Ordinal = 4, ClassCod = "ShapeList", ValString = "Arc" }, + new GenValueModel { GenValID = 9, Ordinal = 5, ClassCod = "ShapeList", ValString = "FullArc" }, + new GenValueModel { GenValID = 10, Ordinal = 6, ClassCod = "ShapeList", ValString = "SemiFullArc" }, + new GenValueModel { GenValID = 11, Ordinal = 7, ClassCod = "ShapeList", ValString = "SemiArc" }, + new GenValueModel { GenValID = 12, Ordinal = 8, ClassCod = "ShapeList", ValString = "Circular" } ); modelBuilder.Entity().HasData( From bbe275ea4a45d6de5336d3b931a8d4be8fd83b6f Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 3 Oct 2025 19:11:09 +0200 Subject: [PATCH 46/65] unica migrationx tutti gli step --- .../20250929142415_InitDb.Designer.cs | 2258 ---------------- ...0251002110150_AddConfTables_01.Designer.cs | 2324 ---------------- .../20251002110150_AddConfTables_01.cs | 279 -- .../20251002134750_AddInitConfVal.Designer.cs | 2400 ----------------- .../20251002134750_AddInitConfVal.cs | 298 -- .../20251002150430_UpdateConfVal.Designer.cs | 2400 ----------------- .../20251002150430_UpdateConfVal.cs | 365 --- .../Migrations/20251003164608_AddShapeList.cs | 364 --- ...r.cs => 20251003164814_InitDb.Designer.cs} | 62 +- ...415_InitDb.cs => 20251003164814_InitDb.cs} | 144 +- .../DataLayerContextModelSnapshot.cs | 58 +- 11 files changed, 182 insertions(+), 10770 deletions(-) delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20250929142415_InitDb.Designer.cs delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20251002110150_AddConfTables_01.Designer.cs delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20251002110150_AddConfTables_01.cs delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20251002134750_AddInitConfVal.Designer.cs delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20251002134750_AddInitConfVal.cs delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20251002150430_UpdateConfVal.Designer.cs delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20251002150430_UpdateConfVal.cs delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20251003164608_AddShapeList.cs rename EgwCoreLib.Lux.Data/Migrations/{20251003164608_AddShapeList.Designer.cs => 20251003164814_InitDb.Designer.cs} (98%) rename EgwCoreLib.Lux.Data/Migrations/{20250929142415_InitDb.cs => 20251003164814_InitDb.cs} (89%) diff --git a/EgwCoreLib.Lux.Data/Migrations/20250929142415_InitDb.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20250929142415_InitDb.Designer.cs deleted file mode 100644 index e17896ef..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20250929142415_InitDb.Designer.cs +++ /dev/null @@ -1,2258 +0,0 @@ -// -using System; -using EgwCoreLib.Lux.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace EgwCoreLib.Lux.Data.Migrations -{ - [DbContext(typeof(DataLayerContext))] - [Migration("20250929142415_InitDb")] - partial class InitDb - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.17") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", b => - { - b.Property("CostDriverID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CostDriverID")); - - b.Property("Descript") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Unit") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CostDriverID"); - - b.ToTable("cost_driver"); - - b.HasData( - new - { - CostDriverID = 1, - Descript = "Ore lavorate per step/fase", - Name = "WorkHour", - Unit = "h" - }, - new - { - CostDriverID = 2, - Descript = "Metri prodotti per step/fase", - Name = "Meter", - Unit = "m" - }, - new - { - CostDriverID = 3, - Descript = "Numero unità prodotte (lavorate) per step/fase", - Name = "Unit", - Unit = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => - { - b.Property("ResourceID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); - - b.Property("CostDriverBudget") - .HasColumnType("decimal(65,30)"); - - b.Property("CostDriverID") - .HasColumnType("int"); - - b.Property("EBTPerc") - .HasColumnType("decimal(65,30)"); - - b.Property("FixedCost") - .HasColumnType("decimal(65,30)"); - - b.Property("LaborCost") - .HasColumnType("decimal(65,30)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OverHeadCost") - .HasColumnType("decimal(65,30)"); - - b.Property("OverHeadPerc") - .HasColumnType("decimal(65,30)"); - - b.Property("PriceMargin") - .HasColumnType("decimal(65,30)"); - - b.Property("VariableCost") - .HasColumnType("decimal(65,30)"); - - b.HasKey("ResourceID"); - - b.HasIndex("CostDriverID"); - - b.ToTable("cost_resource"); - - b.HasData( - new - { - ResourceID = 1, - CostDriverBudget = 880m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 12000m, - LaborCost = 30m, - Name = "Sezionatrice", - OverHeadCost = 5000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 6000m - }, - new - { - ResourceID = 2, - CostDriverBudget = 1760m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 100000m, - LaborCost = 40m, - Name = "Linea SAOMAD WoodPecker Just 3500", - OverHeadCost = 15000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 30000m - }, - new - { - ResourceID = 3, - CostDriverBudget = 1760m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 24000m, - LaborCost = 35m, - Name = "Linea Pantografo", - OverHeadCost = 5000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 6000m - }, - new - { - ResourceID = 4, - CostDriverBudget = 880m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 24000m, - LaborCost = 30m, - Name = "Stazione Verniciatura", - OverHeadCost = 3000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 6000m - }, - new - { - ResourceID = 5, - CostDriverBudget = 220m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 6000m, - LaborCost = 30m, - Name = "Verniciatura Manuale", - OverHeadCost = 3000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 2000m - }, - new - { - ResourceID = 6, - CostDriverBudget = 3520m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 500m, - LaborCost = 30m, - Name = "Montaggio Manuale", - OverHeadCost = 500m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 500m - }, - new - { - ResourceID = 7, - CostDriverBudget = 3520m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 0m, - LaborCost = 40m, - Name = "Installatore", - OverHeadCost = 0m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 3000m - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", b => - { - b.Property("CodGroup") - .HasColumnType("varchar(255)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CodGroup"); - - b.ToTable("item_group"); - - b.HasData( - new - { - CodGroup = "WindowTrunk", - Description = "Barre legno per lavorazione" - }, - new - { - CodGroup = "WindowGlass", - Description = "Vetri serramento" - }, - new - { - CodGroup = "WindowVarnish", - Description = "Vernici per legno" - }, - new - { - CodGroup = "WindowHardware", - Description = "Ferramenta serramento" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => - { - b.Property("ItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); - - b.Property("CodGroup") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Cost") - .HasColumnType("double"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsService") - .HasColumnType("tinyint(1)"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("ItemIDParent") - .HasColumnType("int"); - - b.Property("ItemType") - .HasColumnType("int"); - - b.Property("Margin") - .HasColumnType("double"); - - b.Property("QtyMax") - .HasColumnType("double"); - - b.Property("QtyMin") - .HasColumnType("double"); - - b.Property("SupplCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UM") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("ItemID"); - - b.HasIndex("CodGroup"); - - b.ToTable("item_item"); - - b.HasData( - new - { - ItemID = 1, - CodGroup = "WindowTrunk", - Cost = 20.0, - Description = "BARRA-60x80 generica", - ExtItemCode = "", - IsService = false, - ItemCode = 1001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.29999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "BARR.001", - UM = "#" - }, - new - { - ItemID = 2, - CodGroup = "WindowTrunk", - Cost = 16.5, - Description = "Barra 60x80, lunghezza 12m", - ExtItemCode = "BARRA-60x80x12000", - IsService = false, - ItemCode = 1002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.12000", - UM = "#" - }, - new - { - ItemID = 3, - CodGroup = "WindowTrunk", - Cost = 17.5, - Description = "Barra 60x80, lunghezza 8m", - ExtItemCode = "BARRA-60x80x8000", - IsService = false, - ItemCode = 1003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.22, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.8000", - UM = "#" - }, - new - { - ItemID = 4, - CodGroup = "WindowTrunk", - Cost = 15.5, - Description = "Barra 60x80, lunghezza 16m", - ExtItemCode = "BARRA-60x80x16000", - IsService = false, - ItemCode = 1004, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.16000", - UM = "#" - }, - new - { - ItemID = 5, - CodGroup = "WindowGlass", - Cost = 300.0, - Description = "Vetro triplo, basso indice termico, 800x1000", - ExtItemCode = "VETRO-3L-THERMO-800x1000", - IsService = false, - ItemCode = 2001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V3T.800.1000", - UM = "m2" - }, - new - { - ItemID = 6, - CodGroup = "WindowGlass", - Cost = 200.0, - Description = "Vetro doppio, 800x1000", - ExtItemCode = "VETRO-2L-800x1000", - IsService = false, - ItemCode = 2002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.14999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V2.800.1000", - UM = "m2" - }, - new - { - ItemID = 7, - CodGroup = "WindowGlass", - Cost = 250.0, - Description = "Vetro triplo, 800x1000", - ExtItemCode = "VETRO-3L-800x1000", - IsService = false, - ItemCode = 2003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.17999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V3.800.1000", - UM = "m2" - }, - new - { - ItemID = 8, - CodGroup = "WindowVarnish", - Cost = 20.0, - Description = "Vernice trasparente", - ExtItemCode = "VERN-TRASP", - IsService = false, - ItemCode = 3001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "VT.STD", - UM = "l" - }, - new - { - ItemID = 9, - CodGroup = "WindowHardware", - Cost = 65.0, - Description = "Kit standard completo AGB tipo 001", - ExtItemCode = "KIT-001", - IsService = false, - ItemCode = 5001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-KIT-001", - UM = "#" - }, - new - { - ItemID = 10, - CodGroup = "WindowHardware", - Cost = 10.0, - Description = "Cerniera AGB tipo 001", - ExtItemCode = "CERN-001", - IsService = false, - ItemCode = 5002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-CERN-001", - UM = "#" - }, - new - { - ItemID = 11, - CodGroup = "WindowHardware", - Cost = 15.0, - Description = "Serratura AGB tipo 001", - ExtItemCode = "SERR-001", - IsService = false, - ItemCode = 5003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-SERR-001", - UM = "#" - }, - new - { - ItemID = 12, - CodGroup = "WindowHardware", - Cost = 25.0, - Description = "Maniglia AGB tipo 001", - ExtItemCode = "MAN-001", - IsService = false, - ItemCode = 5004, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-MAN-001", - UM = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => - { - b.Property("SellingItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); - - b.Property("Cost") - .HasColumnType("double"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsService") - .HasColumnType("tinyint(1)"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("JobID") - .HasColumnType("int"); - - b.Property("Margin") - .HasColumnType("double"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UM") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SellingItemID"); - - b.HasIndex("JobID"); - - b.ToTable("item_selling_item"); - - b.HasData( - new - { - SellingItemID = 1, - Cost = 820.0, - Description = "Finestra anta Singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSteps = "", - JobID = 2, - Margin = 0.20000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 2, - Cost = 150.0, - Description = "Persiana anta singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSteps = "", - JobID = 1, - Margin = 0.10000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 3, - Cost = 200.0, - Description = "Installazione", - ExtItemCode = "", - IsService = true, - ItemCode = 0, - ItemSteps = "", - JobID = 1, - Margin = 0.29999999999999999, - SerStruct = "", - SupplCode = "", - UM = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SupplierModel", b => - { - b.Property("SupplierID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SupplierID"); - - b.ToTable("item_supplier"); - - b.HasData( - new - { - SupplierID = 1, - CompanyName = "Company One", - FirstName = "Supplier A", - LastName = "Egalware", - VAT = "7294857103879254" - }, - new - { - SupplierID = 2, - CompanyName = "Company Two", - FirstName = "Supplier B", - LastName = "User", - VAT = "7294857103879254" - }, - new - { - SupplierID = 3, - CompanyName = "Company Two", - FirstName = "Supplier C", - LastName = "User Test", - VAT = "7294857103879254" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", b => - { - b.Property("ProductionBatchID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("DueDate") - .HasColumnType("datetime(6)"); - - b.HasKey("ProductionBatchID"); - - b.ToTable("production_batch"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => - { - b.Property("ProdItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("OrderRowID") - .HasColumnType("int"); - - b.Property("ProductionBatchID") - .HasColumnType("int"); - - b.HasKey("ProdItemID"); - - b.HasIndex("OrderRowID"); - - b.HasIndex("ProductionBatchID"); - - b.ToTable("production_item"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => - { - b.Property("ProdItemStepID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("PhaseID") - .HasColumnType("int"); - - b.Property("ProdItemID") - .HasColumnType("int"); - - b.Property("Qty") - .HasColumnType("double"); - - b.Property("ResourceID") - .HasColumnType("int"); - - b.Property("WorkTime") - .HasColumnType("double"); - - b.HasKey("ProdItemStepID"); - - b.HasIndex("PhaseID"); - - b.HasIndex("ProdItemID"); - - b.HasIndex("ResourceID"); - - b.ToTable("production_item_step"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", b => - { - b.Property("CustomerID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CustomerID"); - - b.ToTable("sales_customer"); - - b.HasData( - new - { - CustomerID = 1, - CompanyName = "", - FirstName = "Customer A", - LastName = "Egalware", - VAT = "1234567890123456" - }, - new - { - CustomerID = 2, - CompanyName = "", - FirstName = "Customer B", - LastName = "User", - VAT = "1234567890123456" - }, - new - { - CustomerID = 3, - CompanyName = "", - FirstName = "Customer C", - LastName = "User Test", - VAT = "1234567890123456" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", b => - { - b.Property("DealerID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("DealerID"); - - b.ToTable("sales_dealer"); - - b.HasData( - new - { - DealerID = 1, - CompanyName = "Company First", - FirstName = "Dealer A", - LastName = "Egalware", - VAT = "9587362514671527" - }, - new - { - DealerID = 2, - CompanyName = "Company First", - FirstName = "Dealer B", - LastName = "User", - VAT = "9587362514671527" - }, - new - { - DealerID = 3, - CompanyName = "Company Second", - FirstName = "Dealer C", - LastName = "User Test", - VAT = "9587362514671527" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => - { - b.Property("OfferID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); - - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Discount") - .HasColumnType("double"); - - b.Property("Envir") - .HasColumnType("int"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("OffertState") - .HasColumnType("int"); - - b.Property("RefNum") - .HasColumnType("int"); - - b.Property("RefRev") - .HasColumnType("int"); - - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("ValidUntil") - .HasColumnType("datetime(6)"); - - b.HasKey("OfferID"); - - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - - b.ToTable("sales_offer"); - - b.HasData( - new - { - OfferID = 1, - CustomerID = 2, - DealerID = 2, - Description = "Offerta per tre serramenti", - Discount = 0.0, - Envir = 1, - Inserted = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4738), - Modified = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4739), - OffertState = 0, - RefNum = 1, - RefRev = 1, - RefYear = 2024, - ValidUntil = new DateTime(2025, 10, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4735) - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferRowModel", b => - { - b.Property("OfferRowID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); - - b.Property("AwaitBom") - .HasColumnType("tinyint(1)"); - - b.Property("AwaitPrice") - .HasColumnType("tinyint(1)"); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("BomOk") - .HasColumnType("tinyint(1)"); - - b.Property("BomPrice") - .HasColumnType("double"); - - b.Property("Envir") - .HasColumnType("int"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("ItemBOM") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ItemOk") - .HasColumnType("tinyint(1)"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OfferID") - .HasColumnType("int"); - - b.Property("OfferRowUID") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Qty") - .HasColumnType("double"); - - b.Property("RowNum") - .HasColumnType("int"); - - b.Property("SellingItemID") - .HasColumnType("int"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StepCost") - .HasColumnType("double"); - - b.Property("StepPrice") - .HasColumnType("double"); - - b.HasKey("OfferRowID"); - - b.HasIndex("OfferID"); - - b.HasIndex("SellingItemID"); - - b.ToTable("sales_offer_row"); - - b.HasData( - new - { - OfferRowID = 1, - AwaitBom = false, - AwaitPrice = false, - BomCost = 900.0, - BomOk = true, - BomPrice = 950.0, - Envir = 1, - Inserted = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4848), - ItemBOM = "", - ItemOk = true, - ItemSteps = "{}", - Modified = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4850), - Note = "Finestra anta singola 2025", - OfferID = 1, - OfferRowUID = "OFF250000000001", - Qty = 3.0, - RowNum = 1, - SellingItemID = 1, - SerStruct = "{}", - StepCost = 0.0, - StepPrice = 0.0 - }, - new - { - OfferRowID = 2, - AwaitBom = false, - AwaitPrice = false, - BomCost = 160.0, - BomOk = true, - BomPrice = 200.0, - Envir = 1, - Inserted = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4862), - ItemBOM = "", - ItemOk = true, - ItemSteps = "{}", - Modified = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4864), - Note = "Persiana per Finestra anta singola 2025", - OfferID = 1, - OfferRowUID = "OFF250000000002", - Qty = 3.0, - RowNum = 2, - SellingItemID = 2, - SerStruct = "{}", - StepCost = 0.0, - StepPrice = 0.0 - }, - new - { - OfferRowID = 3, - AwaitBom = false, - AwaitPrice = false, - BomCost = 200.0, - BomOk = true, - BomPrice = 250.0, - Envir = 1, - Inserted = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4874), - ItemBOM = "", - ItemOk = true, - ItemSteps = "{}", - Modified = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4875), - Note = "Installazione serramento", - OfferID = 1, - OfferRowUID = "OFF250000000003", - Qty = 3.0, - RowNum = 3, - SellingItemID = 3, - SerStruct = "{}", - StepCost = 0.0, - StepPrice = 0.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", b => - { - b.Property("OrderID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); - - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("OfferID") - .HasColumnType("int"); - - b.Property("OffertState") - .HasColumnType("int"); - - b.Property("RefNum") - .HasColumnType("int"); - - b.Property("RefRev") - .HasColumnType("int"); - - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("ValidUntil") - .HasColumnType("datetime(6)"); - - b.HasKey("OrderID"); - - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - - b.HasIndex("OfferID"); - - b.ToTable("sales_order"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => - { - b.Property("OrderRowID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("BomPrice") - .HasColumnType("double"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrderID") - .HasColumnType("int"); - - b.Property("Qty") - .HasColumnType("double"); - - b.Property("RowNum") - .HasColumnType("int"); - - b.Property("SellingItemID") - .HasColumnType("int"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StepCost") - .HasColumnType("double"); - - b.Property("StepPrice") - .HasColumnType("double"); - - b.HasKey("OrderRowID"); - - b.HasIndex("OrderID"); - - b.HasIndex("SellingItemID"); - - b.ToTable("sales_order_row"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => - { - b.Property("StockMovID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); - - b.Property("CodDoc") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("DtCreate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DtMod") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); - - b.Property("MovCod") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QtyRec") - .HasColumnType("double"); - - b.Property("StockStatusId") - .HasColumnType("int"); - - b.Property("UnitVal") - .HasColumnType("double"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("StockMovID"); - - b.HasIndex("MovCod"); - - b.HasIndex("StockStatusId"); - - b.ToTable("stock_mov"); - - b.HasData( - new - { - StockMovID = 1, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4416), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4472), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 5.0, - StockStatusId = 1, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 2, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4475), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4476), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 8.0, - StockStatusId = 2, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 3, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4479), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4480), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 5.0, - StockStatusId = 3, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 4, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4482), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4484), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 4, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 5, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4486), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4487), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 10.0, - StockStatusId = 5, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 6, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4490), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4491), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 6, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 7, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4493), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4495), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 50.0, - StockStatusId = 7, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 8, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4497), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4498), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 8, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 9, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4501), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4502), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 9, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 10, - CodDoc = "", - DtCreate = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4504), - DtMod = new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4506), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 10, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => - { - b.Property("StockStatusId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); - - b.Property("IsDeleted") - .HasColumnType("tinyint(1)"); - - b.Property("IsRemn") - .HasColumnType("tinyint(1)"); - - b.Property("ItemID") - .HasColumnType("int"); - - b.Property("Location") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QtyAvail") - .HasColumnType("double"); - - b.HasKey("StockStatusId"); - - b.HasIndex("ItemID"); - - b.ToTable("stock_status"); - - b.HasData( - new - { - StockStatusId = 1, - IsDeleted = false, - IsRemn = false, - ItemID = 1, - Location = "B001-001-003", - QtyAvail = 5.0 - }, - new - { - StockStatusId = 2, - IsDeleted = false, - IsRemn = false, - ItemID = 2, - Location = "B001-001-002", - QtyAvail = 8.0 - }, - new - { - StockStatusId = 3, - IsDeleted = false, - IsRemn = false, - ItemID = 3, - Location = "B001-001-001", - QtyAvail = 5.0 - }, - new - { - StockStatusId = 4, - IsDeleted = false, - IsRemn = false, - ItemID = 4, - Location = "V002-001-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 5, - IsDeleted = false, - IsRemn = false, - ItemID = 5, - Location = "V001-001-002", - QtyAvail = 10.0 - }, - new - { - StockStatusId = 6, - IsDeleted = false, - IsRemn = false, - ItemID = 6, - Location = "V001-001-003", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 7, - IsDeleted = false, - IsRemn = false, - ItemID = 8, - Location = "V001-001-003", - QtyAvail = 50.0 - }, - new - { - StockStatusId = 8, - IsDeleted = false, - IsRemn = false, - ItemID = 11, - Location = "S001-002-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 9, - IsDeleted = false, - IsRemn = false, - ItemID = 9, - Location = "S001-002-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 10, - IsDeleted = false, - IsRemn = false, - ItemID = 10, - Location = "S001-001-001", - QtyAvail = 1.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => - { - b.Property("JobID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("JobID"); - - b.ToTable("task_job"); - - b.HasData( - new - { - JobID = 1, - Description = "Rivendita / servizi" - }, - new - { - JobID = 2, - Description = "Serramento Completo Legno su linea Saomad e installatore interno" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => - { - b.Property("JobStepItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("ItemID") - .HasColumnType("int"); - - b.Property("JobStepID") - .HasColumnType("int"); - - b.Property("Qty") - .HasColumnType("double"); - - b.HasKey("JobStepItemID"); - - b.HasIndex("ItemID"); - - b.HasIndex("JobStepID"); - - b.ToTable("task_job_step_item"); - - b.HasData( - new - { - JobStepItemID = 1, - Description = "Grezzo legno abete", - Index = 1, - ItemID = 1, - JobStepID = 1, - Qty = 1.0 - }, - new - { - JobStepItemID = 2, - Description = "Vernice trasparente standard 1L", - Index = 2, - ItemID = 8, - JobStepID = 3, - Qty = 0.10000000000000001 - }, - new - { - JobStepItemID = 3, - Description = "Ferramenta AGB - rif. AGFD.00000.00000", - Index = 3, - ItemID = 9, - JobStepID = 4, - Qty = 1.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => - { - b.Property("JobStepID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); - - b.Property("CostDriverID") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("JobID") - .HasColumnType("int"); - - b.Property("PhaseID") - .HasColumnType("int"); - - b.Property("ProductivityRate") - .HasColumnType("decimal(65,30)"); - - b.Property("ResourceID") - .HasColumnType("int"); - - b.HasKey("JobStepID"); - - b.HasIndex("CostDriverID"); - - b.HasIndex("JobID"); - - b.HasIndex("PhaseID"); - - b.HasIndex("ResourceID"); - - b.ToTable("task_job_step"); - - b.HasData( - new - { - JobStepID = 1, - CostDriverID = 3, - Description = "", - Index = 1, - JobID = 2, - PhaseID = 1, - ProductivityRate = 1m, - ResourceID = 1 - }, - new - { - JobStepID = 2, - CostDriverID = 2, - Description = "", - Index = 2, - JobID = 2, - PhaseID = 2, - ProductivityRate = 1m, - ResourceID = 2 - }, - new - { - JobStepID = 3, - CostDriverID = 3, - Description = "", - Index = 3, - JobID = 2, - PhaseID = 3, - ProductivityRate = 1m, - ResourceID = 4 - }, - new - { - JobStepID = 4, - CostDriverID = 3, - Description = "", - Index = 4, - JobID = 2, - PhaseID = 4, - ProductivityRate = 1m, - ResourceID = 6 - }, - new - { - JobStepID = 5, - CostDriverID = 3, - Description = "", - Index = 5, - JobID = 2, - PhaseID = 6, - ProductivityRate = 1m, - ResourceID = 7 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", b => - { - b.Property("PhaseID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("PhaseID"); - - b.ToTable("task_phase"); - - b.HasData( - new - { - PhaseID = 1, - Description = "Taglio tronchetti" - }, - new - { - PhaseID = 2, - Description = "Lavorazione pezzi serramento" - }, - new - { - PhaseID = 3, - Description = "Verniciatura" - }, - new - { - PhaseID = 4, - Description = "Assemblaggio completo" - }, - new - { - PhaseID = 5, - Description = "Assemblaggio Ferramenta" - }, - new - { - PhaseID = 6, - Description = "Installazione e posa in opera" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.CounterModel", b => - { - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("CountName") - .HasColumnType("varchar(255)"); - - b.Property("Counter") - .HasColumnType("int"); - - b.HasKey("RefYear", "CountName"); - - b.ToTable("utils_counter"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => - { - b.Property("ClassCod") - .HasColumnType("varchar(255)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("ClassCod"); - - b.ToTable("utils_gen_class"); - - b.HasData( - new - { - ClassCod = "WoodMat", - Description = "Elenco Materiali Legno" - }, - new - { - ClassCod = "WoodCol", - Description = "Elenco Colori Legno" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => - { - b.Property("GenValID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); - - b.Property("ClassCod") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Ordinal") - .HasColumnType("int"); - - b.Property("ValString") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("GenValID"); - - b.HasIndex("ClassCod"); - - b.ToTable("utils_gen_value"); - - 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 = "Legno" - }, - 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.Utils.MovTypeModel", b => - { - b.Property("MovCod") - .HasColumnType("varchar(255)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("MovCod"); - - b.ToTable("utils_mov_type"); - - b.HasData( - new - { - MovCod = "CAR", - Description = "Carico a magazzino" - }, - new - { - MovCod = "MOV", - Description = "Movimento interno (spostamento)" - }, - new - { - MovCod = "ND", - Description = "Non Definito" - }, - new - { - MovCod = "OFOR", - Description = "Ordine Fornitore" - }, - new - { - MovCod = "RETT", - Description = "Rettifica magazzino" - }, - new - { - MovCod = "SCAR", - Description = "Scarico da magazzino" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", b => - { - b.Property("TagID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("TagID"); - - b.ToTable("utils_tags"); - - b.HasData( - new - { - TagID = 1, - Description = "Tag 01" - }, - new - { - TagID = 2, - Description = "Tag 02" - }, - new - { - TagID = 3, - Description = "Tag 03" - }, - new - { - TagID = 4, - Description = "Tag 04" - }, - new - { - TagID = 5, - Description = "Tag 05" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") - .WithMany() - .HasForeignKey("CostDriverID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("DriverNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", "ItemGroupNav") - .WithMany() - .HasForeignKey("CodGroup") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemGroupNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") - .WithMany() - .HasForeignKey("JobID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("JobNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", "OrderRowNav") - .WithMany() - .HasForeignKey("OrderRowID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", "ProductionBatchNav") - .WithMany() - .HasForeignKey("ProductionBatchID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OrderRowNav"); - - b.Navigation("ProductionBatchNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") - .WithMany() - .HasForeignKey("PhaseID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", "ProdItemNav") - .WithMany() - .HasForeignKey("ProdItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") - .WithMany() - .HasForeignKey("ResourceID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("PhaseNav"); - - b.Navigation("ProdItemNav"); - - b.Navigation("ResourceNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", 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.OfferRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") - .WithMany("OfferRowNav") - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OfferNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", 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.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") - .WithMany() - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CustomerNav"); - - b.Navigation("DealerNav"); - - b.Navigation("OfferNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", "OrderNav") - .WithMany() - .HasForeignKey("OrderID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OrderNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", "MovTypeNav") - .WithMany() - .HasForeignKey("MovCod") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", "StockStatusNav") - .WithMany() - .HasForeignKey("StockStatusId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("MovTypeNav"); - - b.Navigation("StockStatusNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") - .WithMany() - .HasForeignKey("ItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") - .WithMany() - .HasForeignKey("ItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", "JobStepNav") - .WithMany() - .HasForeignKey("JobStepID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemNav"); - - b.Navigation("JobStepNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") - .WithMany() - .HasForeignKey("CostDriverID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") - .WithMany("JobStepNav") - .HasForeignKey("JobID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") - .WithMany() - .HasForeignKey("PhaseID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") - .WithMany() - .HasForeignKey("ResourceID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("DriverNav"); - - b.Navigation("JobNav"); - - b.Navigation("PhaseNav"); - - b.Navigation("ResourceNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", "GenClassNav") - .WithMany("GenValNav") - .HasForeignKey("ClassCod") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("GenClassNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => - { - b.Navigation("OfferRowNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => - { - b.Navigation("JobStepNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => - { - b.Navigation("GenValNav"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251002110150_AddConfTables_01.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20251002110150_AddConfTables_01.Designer.cs deleted file mode 100644 index dda2af9b..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20251002110150_AddConfTables_01.Designer.cs +++ /dev/null @@ -1,2324 +0,0 @@ -// -using System; -using EgwCoreLib.Lux.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace EgwCoreLib.Lux.Data.Migrations -{ - [DbContext(typeof(DataLayerContext))] - [Migration("20251002110150_AddConfTables_01")] - partial class AddConfTables_01 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.17") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.GlassModel", b => - { - b.Property("GlassID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GlassID")); - - b.Property("Code") - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Thickness") - .HasColumnType("double"); - - b.HasKey("GlassID"); - - b.ToTable("conf_glass"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.ProfileModel", b => - { - b.Property("ProfileID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProfileID")); - - b.Property("Code") - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Thickness") - .HasColumnType("double"); - - b.HasKey("ProfileID"); - - b.ToTable("conf_profile"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.WoodModel", b => - { - b.Property("WoodID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("WoodID")); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("ExtId") - .HasColumnType("longtext"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("WoodID"); - - b.ToTable("conf_wood"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", b => - { - b.Property("CostDriverID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CostDriverID")); - - b.Property("Descript") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Unit") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CostDriverID"); - - b.ToTable("cost_driver"); - - b.HasData( - new - { - CostDriverID = 1, - Descript = "Ore lavorate per step/fase", - Name = "WorkHour", - Unit = "h" - }, - new - { - CostDriverID = 2, - Descript = "Metri prodotti per step/fase", - Name = "Meter", - Unit = "m" - }, - new - { - CostDriverID = 3, - Descript = "Numero unità prodotte (lavorate) per step/fase", - Name = "Unit", - Unit = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => - { - b.Property("ResourceID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); - - b.Property("CostDriverBudget") - .HasColumnType("decimal(65,30)"); - - b.Property("CostDriverID") - .HasColumnType("int"); - - b.Property("EBTPerc") - .HasColumnType("decimal(65,30)"); - - b.Property("FixedCost") - .HasColumnType("decimal(65,30)"); - - b.Property("LaborCost") - .HasColumnType("decimal(65,30)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OverHeadCost") - .HasColumnType("decimal(65,30)"); - - b.Property("OverHeadPerc") - .HasColumnType("decimal(65,30)"); - - b.Property("PriceMargin") - .HasColumnType("decimal(65,30)"); - - b.Property("VariableCost") - .HasColumnType("decimal(65,30)"); - - b.HasKey("ResourceID"); - - b.HasIndex("CostDriverID"); - - b.ToTable("cost_resource"); - - b.HasData( - new - { - ResourceID = 1, - CostDriverBudget = 880m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 12000m, - LaborCost = 30m, - Name = "Sezionatrice", - OverHeadCost = 5000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 6000m - }, - new - { - ResourceID = 2, - CostDriverBudget = 1760m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 100000m, - LaborCost = 40m, - Name = "Linea SAOMAD WoodPecker Just 3500", - OverHeadCost = 15000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 30000m - }, - new - { - ResourceID = 3, - CostDriverBudget = 1760m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 24000m, - LaborCost = 35m, - Name = "Linea Pantografo", - OverHeadCost = 5000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 6000m - }, - new - { - ResourceID = 4, - CostDriverBudget = 880m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 24000m, - LaborCost = 30m, - Name = "Stazione Verniciatura", - OverHeadCost = 3000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 6000m - }, - new - { - ResourceID = 5, - CostDriverBudget = 220m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 6000m, - LaborCost = 30m, - Name = "Verniciatura Manuale", - OverHeadCost = 3000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 2000m - }, - new - { - ResourceID = 6, - CostDriverBudget = 3520m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 500m, - LaborCost = 30m, - Name = "Montaggio Manuale", - OverHeadCost = 500m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 500m - }, - new - { - ResourceID = 7, - CostDriverBudget = 3520m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 0m, - LaborCost = 40m, - Name = "Installatore", - OverHeadCost = 0m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 3000m - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", b => - { - b.Property("CodGroup") - .HasColumnType("varchar(255)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CodGroup"); - - b.ToTable("item_group"); - - b.HasData( - new - { - CodGroup = "WindowTrunk", - Description = "Barre legno per lavorazione" - }, - new - { - CodGroup = "WindowGlass", - Description = "Vetri serramento" - }, - new - { - CodGroup = "WindowVarnish", - Description = "Vernici per legno" - }, - new - { - CodGroup = "WindowHardware", - Description = "Ferramenta serramento" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => - { - b.Property("ItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); - - b.Property("CodGroup") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Cost") - .HasColumnType("double"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsService") - .HasColumnType("tinyint(1)"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("ItemIDParent") - .HasColumnType("int"); - - b.Property("ItemType") - .HasColumnType("int"); - - b.Property("Margin") - .HasColumnType("double"); - - b.Property("QtyMax") - .HasColumnType("double"); - - b.Property("QtyMin") - .HasColumnType("double"); - - b.Property("SupplCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UM") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("ItemID"); - - b.HasIndex("CodGroup"); - - b.ToTable("item_item"); - - b.HasData( - new - { - ItemID = 1, - CodGroup = "WindowTrunk", - Cost = 20.0, - Description = "BARRA-60x80 generica", - ExtItemCode = "", - IsService = false, - ItemCode = 1001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.29999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "BARR.001", - UM = "#" - }, - new - { - ItemID = 2, - CodGroup = "WindowTrunk", - Cost = 16.5, - Description = "Barra 60x80, lunghezza 12m", - ExtItemCode = "BARRA-60x80x12000", - IsService = false, - ItemCode = 1002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.12000", - UM = "#" - }, - new - { - ItemID = 3, - CodGroup = "WindowTrunk", - Cost = 17.5, - Description = "Barra 60x80, lunghezza 8m", - ExtItemCode = "BARRA-60x80x8000", - IsService = false, - ItemCode = 1003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.22, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.8000", - UM = "#" - }, - new - { - ItemID = 4, - CodGroup = "WindowTrunk", - Cost = 15.5, - Description = "Barra 60x80, lunghezza 16m", - ExtItemCode = "BARRA-60x80x16000", - IsService = false, - ItemCode = 1004, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.16000", - UM = "#" - }, - new - { - ItemID = 5, - CodGroup = "WindowGlass", - Cost = 300.0, - Description = "Vetro triplo, basso indice termico, 800x1000", - ExtItemCode = "VETRO-3L-THERMO-800x1000", - IsService = false, - ItemCode = 2001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V3T.800.1000", - UM = "m2" - }, - new - { - ItemID = 6, - CodGroup = "WindowGlass", - Cost = 200.0, - Description = "Vetro doppio, 800x1000", - ExtItemCode = "VETRO-2L-800x1000", - IsService = false, - ItemCode = 2002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.14999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V2.800.1000", - UM = "m2" - }, - new - { - ItemID = 7, - CodGroup = "WindowGlass", - Cost = 250.0, - Description = "Vetro triplo, 800x1000", - ExtItemCode = "VETRO-3L-800x1000", - IsService = false, - ItemCode = 2003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.17999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V3.800.1000", - UM = "m2" - }, - new - { - ItemID = 8, - CodGroup = "WindowVarnish", - Cost = 20.0, - Description = "Vernice trasparente", - ExtItemCode = "VERN-TRASP", - IsService = false, - ItemCode = 3001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "VT.STD", - UM = "l" - }, - new - { - ItemID = 9, - CodGroup = "WindowHardware", - Cost = 65.0, - Description = "Kit standard completo AGB tipo 001", - ExtItemCode = "KIT-001", - IsService = false, - ItemCode = 5001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-KIT-001", - UM = "#" - }, - new - { - ItemID = 10, - CodGroup = "WindowHardware", - Cost = 10.0, - Description = "Cerniera AGB tipo 001", - ExtItemCode = "CERN-001", - IsService = false, - ItemCode = 5002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-CERN-001", - UM = "#" - }, - new - { - ItemID = 11, - CodGroup = "WindowHardware", - Cost = 15.0, - Description = "Serratura AGB tipo 001", - ExtItemCode = "SERR-001", - IsService = false, - ItemCode = 5003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-SERR-001", - UM = "#" - }, - new - { - ItemID = 12, - CodGroup = "WindowHardware", - Cost = 25.0, - Description = "Maniglia AGB tipo 001", - ExtItemCode = "MAN-001", - IsService = false, - ItemCode = 5004, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-MAN-001", - UM = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => - { - b.Property("SellingItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); - - b.Property("Cost") - .HasColumnType("double"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsService") - .HasColumnType("tinyint(1)"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("JobID") - .HasColumnType("int"); - - b.Property("Margin") - .HasColumnType("double"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UM") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SellingItemID"); - - b.HasIndex("JobID"); - - b.ToTable("item_selling_item"); - - b.HasData( - new - { - SellingItemID = 1, - Cost = 820.0, - Description = "Finestra anta Singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSteps = "", - JobID = 2, - Margin = 0.20000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 2, - Cost = 150.0, - Description = "Persiana anta singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSteps = "", - JobID = 1, - Margin = 0.10000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 3, - Cost = 200.0, - Description = "Installazione", - ExtItemCode = "", - IsService = true, - ItemCode = 0, - ItemSteps = "", - JobID = 1, - Margin = 0.29999999999999999, - SerStruct = "", - SupplCode = "", - UM = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SupplierModel", b => - { - b.Property("SupplierID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SupplierID"); - - b.ToTable("item_supplier"); - - b.HasData( - new - { - SupplierID = 1, - CompanyName = "Company One", - FirstName = "Supplier A", - LastName = "Egalware", - VAT = "7294857103879254" - }, - new - { - SupplierID = 2, - CompanyName = "Company Two", - FirstName = "Supplier B", - LastName = "User", - VAT = "7294857103879254" - }, - new - { - SupplierID = 3, - CompanyName = "Company Two", - FirstName = "Supplier C", - LastName = "User Test", - VAT = "7294857103879254" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", b => - { - b.Property("ProductionBatchID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("DueDate") - .HasColumnType("datetime(6)"); - - b.HasKey("ProductionBatchID"); - - b.ToTable("production_batch"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => - { - b.Property("ProdItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("OrderRowID") - .HasColumnType("int"); - - b.Property("ProductionBatchID") - .HasColumnType("int"); - - b.HasKey("ProdItemID"); - - b.HasIndex("OrderRowID"); - - b.HasIndex("ProductionBatchID"); - - b.ToTable("production_item"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => - { - b.Property("ProdItemStepID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("PhaseID") - .HasColumnType("int"); - - b.Property("ProdItemID") - .HasColumnType("int"); - - b.Property("Qty") - .HasColumnType("double"); - - b.Property("ResourceID") - .HasColumnType("int"); - - b.Property("WorkTime") - .HasColumnType("double"); - - b.HasKey("ProdItemStepID"); - - b.HasIndex("PhaseID"); - - b.HasIndex("ProdItemID"); - - b.HasIndex("ResourceID"); - - b.ToTable("production_item_step"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", b => - { - b.Property("CustomerID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CustomerID"); - - b.ToTable("sales_customer"); - - b.HasData( - new - { - CustomerID = 1, - CompanyName = "", - FirstName = "Customer A", - LastName = "Egalware", - VAT = "1234567890123456" - }, - new - { - CustomerID = 2, - CompanyName = "", - FirstName = "Customer B", - LastName = "User", - VAT = "1234567890123456" - }, - new - { - CustomerID = 3, - CompanyName = "", - FirstName = "Customer C", - LastName = "User Test", - VAT = "1234567890123456" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", b => - { - b.Property("DealerID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("DealerID"); - - b.ToTable("sales_dealer"); - - b.HasData( - new - { - DealerID = 1, - CompanyName = "Company First", - FirstName = "Dealer A", - LastName = "Egalware", - VAT = "9587362514671527" - }, - new - { - DealerID = 2, - CompanyName = "Company First", - FirstName = "Dealer B", - LastName = "User", - VAT = "9587362514671527" - }, - new - { - DealerID = 3, - CompanyName = "Company Second", - FirstName = "Dealer C", - LastName = "User Test", - VAT = "9587362514671527" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => - { - b.Property("OfferID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); - - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Discount") - .HasColumnType("double"); - - b.Property("Envir") - .HasColumnType("int"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("OffertState") - .HasColumnType("int"); - - b.Property("RefNum") - .HasColumnType("int"); - - b.Property("RefRev") - .HasColumnType("int"); - - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("ValidUntil") - .HasColumnType("datetime(6)"); - - b.HasKey("OfferID"); - - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - - b.ToTable("sales_offer"); - - b.HasData( - new - { - OfferID = 1, - CustomerID = 2, - DealerID = 2, - Description = "Offerta per tre serramenti", - Discount = 0.0, - Envir = 1, - Inserted = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4627), - Modified = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4629), - OffertState = 0, - RefNum = 1, - RefRev = 1, - RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4624) - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferRowModel", b => - { - b.Property("OfferRowID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); - - b.Property("AwaitBom") - .HasColumnType("tinyint(1)"); - - b.Property("AwaitPrice") - .HasColumnType("tinyint(1)"); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("BomOk") - .HasColumnType("tinyint(1)"); - - b.Property("BomPrice") - .HasColumnType("double"); - - b.Property("Envir") - .HasColumnType("int"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("ItemBOM") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ItemOk") - .HasColumnType("tinyint(1)"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OfferID") - .HasColumnType("int"); - - b.Property("OfferRowUID") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Qty") - .HasColumnType("double"); - - b.Property("RowNum") - .HasColumnType("int"); - - b.Property("SellingItemID") - .HasColumnType("int"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StepCost") - .HasColumnType("double"); - - b.Property("StepPrice") - .HasColumnType("double"); - - b.HasKey("OfferRowID"); - - b.HasIndex("OfferID"); - - b.HasIndex("SellingItemID"); - - b.ToTable("sales_offer_row"); - - b.HasData( - new - { - OfferRowID = 1, - AwaitBom = false, - AwaitPrice = false, - BomCost = 900.0, - BomOk = true, - BomPrice = 950.0, - Envir = 1, - Inserted = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4753), - ItemBOM = "", - ItemOk = true, - ItemSteps = "{}", - Modified = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4755), - Note = "Finestra anta singola 2025", - OfferID = 1, - OfferRowUID = "OFF250000000001", - Qty = 3.0, - RowNum = 1, - SellingItemID = 1, - SerStruct = "{}", - StepCost = 0.0, - StepPrice = 0.0 - }, - new - { - OfferRowID = 2, - AwaitBom = false, - AwaitPrice = false, - BomCost = 160.0, - BomOk = true, - BomPrice = 200.0, - Envir = 1, - Inserted = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4768), - ItemBOM = "", - ItemOk = true, - ItemSteps = "{}", - Modified = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4770), - Note = "Persiana per Finestra anta singola 2025", - OfferID = 1, - OfferRowUID = "OFF250000000002", - Qty = 3.0, - RowNum = 2, - SellingItemID = 2, - SerStruct = "{}", - StepCost = 0.0, - StepPrice = 0.0 - }, - new - { - OfferRowID = 3, - AwaitBom = false, - AwaitPrice = false, - BomCost = 200.0, - BomOk = true, - BomPrice = 250.0, - Envir = 1, - Inserted = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4780), - ItemBOM = "", - ItemOk = true, - ItemSteps = "{}", - Modified = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4782), - Note = "Installazione serramento", - OfferID = 1, - OfferRowUID = "OFF250000000003", - Qty = 3.0, - RowNum = 3, - SellingItemID = 3, - SerStruct = "{}", - StepCost = 0.0, - StepPrice = 0.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", b => - { - b.Property("OrderID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); - - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("OfferID") - .HasColumnType("int"); - - b.Property("OffertState") - .HasColumnType("int"); - - b.Property("RefNum") - .HasColumnType("int"); - - b.Property("RefRev") - .HasColumnType("int"); - - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("ValidUntil") - .HasColumnType("datetime(6)"); - - b.HasKey("OrderID"); - - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - - b.HasIndex("OfferID"); - - b.ToTable("sales_order"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => - { - b.Property("OrderRowID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("BomPrice") - .HasColumnType("double"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrderID") - .HasColumnType("int"); - - b.Property("Qty") - .HasColumnType("double"); - - b.Property("RowNum") - .HasColumnType("int"); - - b.Property("SellingItemID") - .HasColumnType("int"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StepCost") - .HasColumnType("double"); - - b.Property("StepPrice") - .HasColumnType("double"); - - b.HasKey("OrderRowID"); - - b.HasIndex("OrderID"); - - b.HasIndex("SellingItemID"); - - b.ToTable("sales_order_row"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => - { - b.Property("StockMovID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); - - b.Property("CodDoc") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("DtCreate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DtMod") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); - - b.Property("MovCod") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QtyRec") - .HasColumnType("double"); - - b.Property("StockStatusId") - .HasColumnType("int"); - - b.Property("UnitVal") - .HasColumnType("double"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("StockMovID"); - - b.HasIndex("MovCod"); - - b.HasIndex("StockStatusId"); - - b.ToTable("stock_mov"); - - b.HasData( - new - { - StockMovID = 1, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4289), - DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4360), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 5.0, - StockStatusId = 1, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 2, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4363), - DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4364), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 8.0, - StockStatusId = 2, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 3, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4367), - DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4368), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 5.0, - StockStatusId = 3, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 4, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4370), - DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4372), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 4, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 5, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4374), - DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4375), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 10.0, - StockStatusId = 5, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 6, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4378), - DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4379), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 6, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 7, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4381), - DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4383), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 50.0, - StockStatusId = 7, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 8, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4385), - DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4386), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 8, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 9, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4389), - DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4390), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 9, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 10, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4392), - DtMod = new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4394), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 10, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => - { - b.Property("StockStatusId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); - - b.Property("IsDeleted") - .HasColumnType("tinyint(1)"); - - b.Property("IsRemn") - .HasColumnType("tinyint(1)"); - - b.Property("ItemID") - .HasColumnType("int"); - - b.Property("Location") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QtyAvail") - .HasColumnType("double"); - - b.HasKey("StockStatusId"); - - b.HasIndex("ItemID"); - - b.ToTable("stock_status"); - - b.HasData( - new - { - StockStatusId = 1, - IsDeleted = false, - IsRemn = false, - ItemID = 1, - Location = "B001-001-003", - QtyAvail = 5.0 - }, - new - { - StockStatusId = 2, - IsDeleted = false, - IsRemn = false, - ItemID = 2, - Location = "B001-001-002", - QtyAvail = 8.0 - }, - new - { - StockStatusId = 3, - IsDeleted = false, - IsRemn = false, - ItemID = 3, - Location = "B001-001-001", - QtyAvail = 5.0 - }, - new - { - StockStatusId = 4, - IsDeleted = false, - IsRemn = false, - ItemID = 4, - Location = "V002-001-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 5, - IsDeleted = false, - IsRemn = false, - ItemID = 5, - Location = "V001-001-002", - QtyAvail = 10.0 - }, - new - { - StockStatusId = 6, - IsDeleted = false, - IsRemn = false, - ItemID = 6, - Location = "V001-001-003", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 7, - IsDeleted = false, - IsRemn = false, - ItemID = 8, - Location = "V001-001-003", - QtyAvail = 50.0 - }, - new - { - StockStatusId = 8, - IsDeleted = false, - IsRemn = false, - ItemID = 11, - Location = "S001-002-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 9, - IsDeleted = false, - IsRemn = false, - ItemID = 9, - Location = "S001-002-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 10, - IsDeleted = false, - IsRemn = false, - ItemID = 10, - Location = "S001-001-001", - QtyAvail = 1.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => - { - b.Property("JobID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("JobID"); - - b.ToTable("task_job"); - - b.HasData( - new - { - JobID = 1, - Description = "Rivendita / servizi" - }, - new - { - JobID = 2, - Description = "Serramento Completo Legno su linea Saomad e installatore interno" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => - { - b.Property("JobStepItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("ItemID") - .HasColumnType("int"); - - b.Property("JobStepID") - .HasColumnType("int"); - - b.Property("Qty") - .HasColumnType("double"); - - b.HasKey("JobStepItemID"); - - b.HasIndex("ItemID"); - - b.HasIndex("JobStepID"); - - b.ToTable("task_job_step_item"); - - b.HasData( - new - { - JobStepItemID = 1, - Description = "Grezzo legno abete", - Index = 1, - ItemID = 1, - JobStepID = 1, - Qty = 1.0 - }, - new - { - JobStepItemID = 2, - Description = "Vernice trasparente standard 1L", - Index = 2, - ItemID = 8, - JobStepID = 3, - Qty = 0.10000000000000001 - }, - new - { - JobStepItemID = 3, - Description = "Ferramenta AGB - rif. AGFD.00000.00000", - Index = 3, - ItemID = 9, - JobStepID = 4, - Qty = 1.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => - { - b.Property("JobStepID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); - - b.Property("CostDriverID") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("JobID") - .HasColumnType("int"); - - b.Property("PhaseID") - .HasColumnType("int"); - - b.Property("ProductivityRate") - .HasColumnType("decimal(65,30)"); - - b.Property("ResourceID") - .HasColumnType("int"); - - b.HasKey("JobStepID"); - - b.HasIndex("CostDriverID"); - - b.HasIndex("JobID"); - - b.HasIndex("PhaseID"); - - b.HasIndex("ResourceID"); - - b.ToTable("task_job_step"); - - b.HasData( - new - { - JobStepID = 1, - CostDriverID = 3, - Description = "", - Index = 1, - JobID = 2, - PhaseID = 1, - ProductivityRate = 1m, - ResourceID = 1 - }, - new - { - JobStepID = 2, - CostDriverID = 2, - Description = "", - Index = 2, - JobID = 2, - PhaseID = 2, - ProductivityRate = 1m, - ResourceID = 2 - }, - new - { - JobStepID = 3, - CostDriverID = 3, - Description = "", - Index = 3, - JobID = 2, - PhaseID = 3, - ProductivityRate = 1m, - ResourceID = 4 - }, - new - { - JobStepID = 4, - CostDriverID = 3, - Description = "", - Index = 4, - JobID = 2, - PhaseID = 4, - ProductivityRate = 1m, - ResourceID = 6 - }, - new - { - JobStepID = 5, - CostDriverID = 3, - Description = "", - Index = 5, - JobID = 2, - PhaseID = 6, - ProductivityRate = 1m, - ResourceID = 7 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", b => - { - b.Property("PhaseID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("PhaseID"); - - b.ToTable("task_phase"); - - b.HasData( - new - { - PhaseID = 1, - Description = "Taglio tronchetti" - }, - new - { - PhaseID = 2, - Description = "Lavorazione pezzi serramento" - }, - new - { - PhaseID = 3, - Description = "Verniciatura" - }, - new - { - PhaseID = 4, - Description = "Assemblaggio completo" - }, - new - { - PhaseID = 5, - Description = "Assemblaggio Ferramenta" - }, - new - { - PhaseID = 6, - Description = "Installazione e posa in opera" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.CounterModel", b => - { - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("CountName") - .HasColumnType("varchar(255)"); - - b.Property("Counter") - .HasColumnType("int"); - - b.HasKey("RefYear", "CountName"); - - b.ToTable("utils_counter"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => - { - b.Property("ClassCod") - .HasColumnType("varchar(255)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("ClassCod"); - - b.ToTable("utils_gen_class"); - - b.HasData( - new - { - ClassCod = "WoodMat", - Description = "Elenco Materiali Legno" - }, - new - { - ClassCod = "WoodCol", - Description = "Elenco Colori Legno" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => - { - b.Property("GenValID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); - - b.Property("ClassCod") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Ordinal") - .HasColumnType("int"); - - b.Property("ValString") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("GenValID"); - - b.HasIndex("ClassCod"); - - b.ToTable("utils_gen_value"); - - 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 = "Legno" - }, - 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.Utils.MovTypeModel", b => - { - b.Property("MovCod") - .HasColumnType("varchar(255)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("MovCod"); - - b.ToTable("utils_mov_type"); - - b.HasData( - new - { - MovCod = "CAR", - Description = "Carico a magazzino" - }, - new - { - MovCod = "MOV", - Description = "Movimento interno (spostamento)" - }, - new - { - MovCod = "ND", - Description = "Non Definito" - }, - new - { - MovCod = "OFOR", - Description = "Ordine Fornitore" - }, - new - { - MovCod = "RETT", - Description = "Rettifica magazzino" - }, - new - { - MovCod = "SCAR", - Description = "Scarico da magazzino" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", b => - { - b.Property("TagID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("TagID"); - - b.ToTable("utils_tags"); - - b.HasData( - new - { - TagID = 1, - Description = "Tag 01" - }, - new - { - TagID = 2, - Description = "Tag 02" - }, - new - { - TagID = 3, - Description = "Tag 03" - }, - new - { - TagID = 4, - Description = "Tag 04" - }, - new - { - TagID = 5, - Description = "Tag 05" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") - .WithMany() - .HasForeignKey("CostDriverID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("DriverNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", "ItemGroupNav") - .WithMany() - .HasForeignKey("CodGroup") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemGroupNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") - .WithMany() - .HasForeignKey("JobID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("JobNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", "OrderRowNav") - .WithMany() - .HasForeignKey("OrderRowID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", "ProductionBatchNav") - .WithMany() - .HasForeignKey("ProductionBatchID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OrderRowNav"); - - b.Navigation("ProductionBatchNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") - .WithMany() - .HasForeignKey("PhaseID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", "ProdItemNav") - .WithMany() - .HasForeignKey("ProdItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") - .WithMany() - .HasForeignKey("ResourceID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("PhaseNav"); - - b.Navigation("ProdItemNav"); - - b.Navigation("ResourceNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", 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.OfferRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") - .WithMany("OfferRowNav") - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OfferNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", 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.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") - .WithMany() - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CustomerNav"); - - b.Navigation("DealerNav"); - - b.Navigation("OfferNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", "OrderNav") - .WithMany() - .HasForeignKey("OrderID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OrderNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", "MovTypeNav") - .WithMany() - .HasForeignKey("MovCod") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", "StockStatusNav") - .WithMany() - .HasForeignKey("StockStatusId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("MovTypeNav"); - - b.Navigation("StockStatusNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") - .WithMany() - .HasForeignKey("ItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") - .WithMany() - .HasForeignKey("ItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", "JobStepNav") - .WithMany() - .HasForeignKey("JobStepID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemNav"); - - b.Navigation("JobStepNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") - .WithMany() - .HasForeignKey("CostDriverID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") - .WithMany("JobStepNav") - .HasForeignKey("JobID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") - .WithMany() - .HasForeignKey("PhaseID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") - .WithMany() - .HasForeignKey("ResourceID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("DriverNav"); - - b.Navigation("JobNav"); - - b.Navigation("PhaseNav"); - - b.Navigation("ResourceNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", "GenClassNav") - .WithMany("GenValNav") - .HasForeignKey("ClassCod") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("GenClassNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => - { - b.Navigation("OfferRowNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => - { - b.Navigation("JobStepNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => - { - b.Navigation("GenValNav"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251002110150_AddConfTables_01.cs b/EgwCoreLib.Lux.Data/Migrations/20251002110150_AddConfTables_01.cs deleted file mode 100644 index b42e0a3d..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20251002110150_AddConfTables_01.cs +++ /dev/null @@ -1,279 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EgwCoreLib.Lux.Data.Migrations -{ - /// - public partial class AddConfTables_01 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "conf_glass", - columns: table => new - { - GlassID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Code = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Thickness = table.Column(type: "double", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_conf_glass", x => x.GlassID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "conf_profile", - columns: table => new - { - ProfileID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Code = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Thickness = table.Column(type: "double", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_conf_profile", x => x.ProfileID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "conf_wood", - columns: table => new - { - WoodID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - ExtId = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "longtext", nullable: true) - .Annotation("MySql:CharSet", "utf8mb4"), - Type = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_conf_wood", x => x.WoodID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 1, - columns: new[] { "Inserted", "Modified", "ValidUntil" }, - values: new object[] { new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4627), new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4629), new DateTime(2025, 11, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4624) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 1, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4753), new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4755) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 2, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4768), new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4770) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 3, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4780), new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4782) }); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 1, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4289)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 2, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4363)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 3, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4367)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 4, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4370)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 5, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4374)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 6, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4378)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 7, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4381)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 8, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4385)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 9, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4389)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 10, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4392)); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "conf_glass"); - - migrationBuilder.DropTable( - name: "conf_profile"); - - migrationBuilder.DropTable( - name: "conf_wood"); - - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 1, - columns: new[] { "Inserted", "Modified", "ValidUntil" }, - values: new object[] { new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4738), new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4739), new DateTime(2025, 10, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4735) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 1, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4848), new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4850) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 2, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4862), new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4864) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 3, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4874), new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4875) }); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 1, - column: "DtCreate", - value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4416)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 2, - column: "DtCreate", - value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4475)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 3, - column: "DtCreate", - value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4479)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 4, - column: "DtCreate", - value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4482)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 5, - column: "DtCreate", - value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4486)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 6, - column: "DtCreate", - value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4490)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 7, - column: "DtCreate", - value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4493)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 8, - column: "DtCreate", - value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4497)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 9, - column: "DtCreate", - value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4501)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 10, - column: "DtCreate", - value: new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4504)); - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251002134750_AddInitConfVal.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20251002134750_AddInitConfVal.Designer.cs deleted file mode 100644 index 98cfa909..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20251002134750_AddInitConfVal.Designer.cs +++ /dev/null @@ -1,2400 +0,0 @@ -// -using System; -using EgwCoreLib.Lux.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace EgwCoreLib.Lux.Data.Migrations -{ - [DbContext(typeof(DataLayerContext))] - [Migration("20251002134750_AddInitConfVal")] - partial class AddInitConfVal - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.17") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.GlassModel", b => - { - b.Property("GlassID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GlassID")); - - b.Property("Code") - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Thickness") - .HasColumnType("double"); - - b.HasKey("GlassID"); - - b.ToTable("conf_glass"); - - b.HasData( - new - { - GlassID = 1, - Code = "", - Description = "Vetro BE 2S 4/12/4", - Thickness = 20.0 - }, - new - { - GlassID = 2, - Code = "", - Description = "Vetro BE 3S 4/12/4/12/4", - Thickness = 36.0 - }, - new - { - GlassID = 3, - Code = "", - Description = "Vetro BE 3S 4/16/4/16/4", - Thickness = 44.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.ProfileModel", b => - { - b.Property("ProfileID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProfileID")); - - b.Property("Code") - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Thickness") - .HasColumnType("double"); - - b.HasKey("ProfileID"); - - b.ToTable("conf_profile"); - - b.HasData( - new - { - ProfileID = 1, - Code = "", - Description = "Profilo 32", - Thickness = 32.0 - }, - new - { - ProfileID = 2, - Code = "", - Description = "Profilo 48", - Thickness = 48.0 - }, - new - { - ProfileID = 3, - Code = "", - Description = "Profilo 58", - Thickness = 58.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.WoodModel", b => - { - b.Property("WoodID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("WoodID")); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("ExtId") - .HasColumnType("longtext"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("WoodID"); - - b.ToTable("conf_wood"); - - b.HasData( - new - { - WoodID = 1, - Description = "Abete", - ExtId = "", - Type = 1 - }, - new - { - WoodID = 2, - Description = "Acero", - ExtId = "", - Type = 1 - }, - new - { - WoodID = 3, - Description = "Pino", - ExtId = "", - Type = 2 - }, - new - { - WoodID = 4, - Description = "Tek", - ExtId = "", - Type = 3 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", b => - { - b.Property("CostDriverID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CostDriverID")); - - b.Property("Descript") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Unit") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CostDriverID"); - - b.ToTable("cost_driver"); - - b.HasData( - new - { - CostDriverID = 1, - Descript = "Ore lavorate per step/fase", - Name = "WorkHour", - Unit = "h" - }, - new - { - CostDriverID = 2, - Descript = "Metri prodotti per step/fase", - Name = "Meter", - Unit = "m" - }, - new - { - CostDriverID = 3, - Descript = "Numero unità prodotte (lavorate) per step/fase", - Name = "Unit", - Unit = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => - { - b.Property("ResourceID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); - - b.Property("CostDriverBudget") - .HasColumnType("decimal(65,30)"); - - b.Property("CostDriverID") - .HasColumnType("int"); - - b.Property("EBTPerc") - .HasColumnType("decimal(65,30)"); - - b.Property("FixedCost") - .HasColumnType("decimal(65,30)"); - - b.Property("LaborCost") - .HasColumnType("decimal(65,30)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OverHeadCost") - .HasColumnType("decimal(65,30)"); - - b.Property("OverHeadPerc") - .HasColumnType("decimal(65,30)"); - - b.Property("PriceMargin") - .HasColumnType("decimal(65,30)"); - - b.Property("VariableCost") - .HasColumnType("decimal(65,30)"); - - b.HasKey("ResourceID"); - - b.HasIndex("CostDriverID"); - - b.ToTable("cost_resource"); - - b.HasData( - new - { - ResourceID = 1, - CostDriverBudget = 880m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 12000m, - LaborCost = 30m, - Name = "Sezionatrice", - OverHeadCost = 5000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 6000m - }, - new - { - ResourceID = 2, - CostDriverBudget = 1760m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 100000m, - LaborCost = 40m, - Name = "Linea SAOMAD WoodPecker Just 3500", - OverHeadCost = 15000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 30000m - }, - new - { - ResourceID = 3, - CostDriverBudget = 1760m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 24000m, - LaborCost = 35m, - Name = "Linea Pantografo", - OverHeadCost = 5000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 6000m - }, - new - { - ResourceID = 4, - CostDriverBudget = 880m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 24000m, - LaborCost = 30m, - Name = "Stazione Verniciatura", - OverHeadCost = 3000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 6000m - }, - new - { - ResourceID = 5, - CostDriverBudget = 220m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 6000m, - LaborCost = 30m, - Name = "Verniciatura Manuale", - OverHeadCost = 3000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 2000m - }, - new - { - ResourceID = 6, - CostDriverBudget = 3520m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 500m, - LaborCost = 30m, - Name = "Montaggio Manuale", - OverHeadCost = 500m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 500m - }, - new - { - ResourceID = 7, - CostDriverBudget = 3520m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 0m, - LaborCost = 40m, - Name = "Installatore", - OverHeadCost = 0m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 3000m - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", b => - { - b.Property("CodGroup") - .HasColumnType("varchar(255)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CodGroup"); - - b.ToTable("item_group"); - - b.HasData( - new - { - CodGroup = "WindowTrunk", - Description = "Barre legno per lavorazione" - }, - new - { - CodGroup = "WindowGlass", - Description = "Vetri serramento" - }, - new - { - CodGroup = "WindowVarnish", - Description = "Vernici per legno" - }, - new - { - CodGroup = "WindowHardware", - Description = "Ferramenta serramento" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => - { - b.Property("ItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); - - b.Property("CodGroup") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Cost") - .HasColumnType("double"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsService") - .HasColumnType("tinyint(1)"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("ItemIDParent") - .HasColumnType("int"); - - b.Property("ItemType") - .HasColumnType("int"); - - b.Property("Margin") - .HasColumnType("double"); - - b.Property("QtyMax") - .HasColumnType("double"); - - b.Property("QtyMin") - .HasColumnType("double"); - - b.Property("SupplCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UM") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("ItemID"); - - b.HasIndex("CodGroup"); - - b.ToTable("item_item"); - - b.HasData( - new - { - ItemID = 1, - CodGroup = "WindowTrunk", - Cost = 20.0, - Description = "BARRA-60x80 generica", - ExtItemCode = "", - IsService = false, - ItemCode = 1001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.29999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "BARR.001", - UM = "#" - }, - new - { - ItemID = 2, - CodGroup = "WindowTrunk", - Cost = 16.5, - Description = "Barra 60x80, lunghezza 12m", - ExtItemCode = "BARRA-60x80x12000", - IsService = false, - ItemCode = 1002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.12000", - UM = "#" - }, - new - { - ItemID = 3, - CodGroup = "WindowTrunk", - Cost = 17.5, - Description = "Barra 60x80, lunghezza 8m", - ExtItemCode = "BARRA-60x80x8000", - IsService = false, - ItemCode = 1003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.22, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.8000", - UM = "#" - }, - new - { - ItemID = 4, - CodGroup = "WindowTrunk", - Cost = 15.5, - Description = "Barra 60x80, lunghezza 16m", - ExtItemCode = "BARRA-60x80x16000", - IsService = false, - ItemCode = 1004, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.16000", - UM = "#" - }, - new - { - ItemID = 5, - CodGroup = "WindowGlass", - Cost = 300.0, - Description = "Vetro triplo, basso indice termico, 800x1000", - ExtItemCode = "VETRO-3L-THERMO-800x1000", - IsService = false, - ItemCode = 2001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V3T.800.1000", - UM = "m2" - }, - new - { - ItemID = 6, - CodGroup = "WindowGlass", - Cost = 200.0, - Description = "Vetro doppio, 800x1000", - ExtItemCode = "VETRO-2L-800x1000", - IsService = false, - ItemCode = 2002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.14999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V2.800.1000", - UM = "m2" - }, - new - { - ItemID = 7, - CodGroup = "WindowGlass", - Cost = 250.0, - Description = "Vetro triplo, 800x1000", - ExtItemCode = "VETRO-3L-800x1000", - IsService = false, - ItemCode = 2003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.17999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V3.800.1000", - UM = "m2" - }, - new - { - ItemID = 8, - CodGroup = "WindowVarnish", - Cost = 20.0, - Description = "Vernice trasparente", - ExtItemCode = "VERN-TRASP", - IsService = false, - ItemCode = 3001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "VT.STD", - UM = "l" - }, - new - { - ItemID = 9, - CodGroup = "WindowHardware", - Cost = 65.0, - Description = "Kit standard completo AGB tipo 001", - ExtItemCode = "KIT-001", - IsService = false, - ItemCode = 5001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-KIT-001", - UM = "#" - }, - new - { - ItemID = 10, - CodGroup = "WindowHardware", - Cost = 10.0, - Description = "Cerniera AGB tipo 001", - ExtItemCode = "CERN-001", - IsService = false, - ItemCode = 5002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-CERN-001", - UM = "#" - }, - new - { - ItemID = 11, - CodGroup = "WindowHardware", - Cost = 15.0, - Description = "Serratura AGB tipo 001", - ExtItemCode = "SERR-001", - IsService = false, - ItemCode = 5003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-SERR-001", - UM = "#" - }, - new - { - ItemID = 12, - CodGroup = "WindowHardware", - Cost = 25.0, - Description = "Maniglia AGB tipo 001", - ExtItemCode = "MAN-001", - IsService = false, - ItemCode = 5004, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-MAN-001", - UM = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => - { - b.Property("SellingItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); - - b.Property("Cost") - .HasColumnType("double"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsService") - .HasColumnType("tinyint(1)"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("JobID") - .HasColumnType("int"); - - b.Property("Margin") - .HasColumnType("double"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UM") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SellingItemID"); - - b.HasIndex("JobID"); - - b.ToTable("item_selling_item"); - - b.HasData( - new - { - SellingItemID = 1, - Cost = 820.0, - Description = "Finestra anta Singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSteps = "", - JobID = 2, - Margin = 0.20000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 2, - Cost = 150.0, - Description = "Persiana anta singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSteps = "", - JobID = 1, - Margin = 0.10000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 3, - Cost = 200.0, - Description = "Installazione", - ExtItemCode = "", - IsService = true, - ItemCode = 0, - ItemSteps = "", - JobID = 1, - Margin = 0.29999999999999999, - SerStruct = "", - SupplCode = "", - UM = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SupplierModel", b => - { - b.Property("SupplierID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SupplierID"); - - b.ToTable("item_supplier"); - - b.HasData( - new - { - SupplierID = 1, - CompanyName = "Company One", - FirstName = "Supplier A", - LastName = "Egalware", - VAT = "7294857103879254" - }, - new - { - SupplierID = 2, - CompanyName = "Company Two", - FirstName = "Supplier B", - LastName = "User", - VAT = "7294857103879254" - }, - new - { - SupplierID = 3, - CompanyName = "Company Two", - FirstName = "Supplier C", - LastName = "User Test", - VAT = "7294857103879254" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", b => - { - b.Property("ProductionBatchID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("DueDate") - .HasColumnType("datetime(6)"); - - b.HasKey("ProductionBatchID"); - - b.ToTable("production_batch"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => - { - b.Property("ProdItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("OrderRowID") - .HasColumnType("int"); - - b.Property("ProductionBatchID") - .HasColumnType("int"); - - b.HasKey("ProdItemID"); - - b.HasIndex("OrderRowID"); - - b.HasIndex("ProductionBatchID"); - - b.ToTable("production_item"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => - { - b.Property("ProdItemStepID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("PhaseID") - .HasColumnType("int"); - - b.Property("ProdItemID") - .HasColumnType("int"); - - b.Property("Qty") - .HasColumnType("double"); - - b.Property("ResourceID") - .HasColumnType("int"); - - b.Property("WorkTime") - .HasColumnType("double"); - - b.HasKey("ProdItemStepID"); - - b.HasIndex("PhaseID"); - - b.HasIndex("ProdItemID"); - - b.HasIndex("ResourceID"); - - b.ToTable("production_item_step"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", b => - { - b.Property("CustomerID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CustomerID"); - - b.ToTable("sales_customer"); - - b.HasData( - new - { - CustomerID = 1, - CompanyName = "", - FirstName = "Customer A", - LastName = "Egalware", - VAT = "1234567890123456" - }, - new - { - CustomerID = 2, - CompanyName = "", - FirstName = "Customer B", - LastName = "User", - VAT = "1234567890123456" - }, - new - { - CustomerID = 3, - CompanyName = "", - FirstName = "Customer C", - LastName = "User Test", - VAT = "1234567890123456" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", b => - { - b.Property("DealerID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("DealerID"); - - b.ToTable("sales_dealer"); - - b.HasData( - new - { - DealerID = 1, - CompanyName = "Company First", - FirstName = "Dealer A", - LastName = "Egalware", - VAT = "9587362514671527" - }, - new - { - DealerID = 2, - CompanyName = "Company First", - FirstName = "Dealer B", - LastName = "User", - VAT = "9587362514671527" - }, - new - { - DealerID = 3, - CompanyName = "Company Second", - FirstName = "Dealer C", - LastName = "User Test", - VAT = "9587362514671527" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => - { - b.Property("OfferID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); - - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Discount") - .HasColumnType("double"); - - b.Property("Envir") - .HasColumnType("int"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("OffertState") - .HasColumnType("int"); - - b.Property("RefNum") - .HasColumnType("int"); - - b.Property("RefRev") - .HasColumnType("int"); - - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("ValidUntil") - .HasColumnType("datetime(6)"); - - b.HasKey("OfferID"); - - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - - b.ToTable("sales_offer"); - - b.HasData( - new - { - OfferID = 1, - CustomerID = 2, - DealerID = 2, - Description = "Offerta per tre serramenti", - Discount = 0.0, - Envir = 1, - Inserted = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9241), - Modified = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9242), - OffertState = 0, - RefNum = 1, - RefRev = 1, - RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9238) - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferRowModel", b => - { - b.Property("OfferRowID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); - - b.Property("AwaitBom") - .HasColumnType("tinyint(1)"); - - b.Property("AwaitPrice") - .HasColumnType("tinyint(1)"); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("BomOk") - .HasColumnType("tinyint(1)"); - - b.Property("BomPrice") - .HasColumnType("double"); - - b.Property("Envir") - .HasColumnType("int"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("ItemBOM") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ItemOk") - .HasColumnType("tinyint(1)"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OfferID") - .HasColumnType("int"); - - b.Property("OfferRowUID") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Qty") - .HasColumnType("double"); - - b.Property("RowNum") - .HasColumnType("int"); - - b.Property("SellingItemID") - .HasColumnType("int"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StepCost") - .HasColumnType("double"); - - b.Property("StepPrice") - .HasColumnType("double"); - - b.HasKey("OfferRowID"); - - b.HasIndex("OfferID"); - - b.HasIndex("SellingItemID"); - - b.ToTable("sales_offer_row"); - - b.HasData( - new - { - OfferRowID = 1, - AwaitBom = false, - AwaitPrice = false, - BomCost = 900.0, - BomOk = true, - BomPrice = 950.0, - Envir = 1, - Inserted = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9337), - ItemBOM = "", - ItemOk = true, - ItemSteps = "{}", - Modified = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9339), - Note = "Finestra anta singola 2025", - OfferID = 1, - OfferRowUID = "OFF250000000001", - Qty = 3.0, - RowNum = 1, - SellingItemID = 1, - SerStruct = "{}", - StepCost = 0.0, - StepPrice = 0.0 - }, - new - { - OfferRowID = 2, - AwaitBom = false, - AwaitPrice = false, - BomCost = 160.0, - BomOk = true, - BomPrice = 200.0, - Envir = 1, - Inserted = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9350), - ItemBOM = "", - ItemOk = true, - ItemSteps = "{}", - Modified = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9352), - Note = "Persiana per Finestra anta singola 2025", - OfferID = 1, - OfferRowUID = "OFF250000000002", - Qty = 3.0, - RowNum = 2, - SellingItemID = 2, - SerStruct = "{}", - StepCost = 0.0, - StepPrice = 0.0 - }, - new - { - OfferRowID = 3, - AwaitBom = false, - AwaitPrice = false, - BomCost = 200.0, - BomOk = true, - BomPrice = 250.0, - Envir = 1, - Inserted = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9362), - ItemBOM = "", - ItemOk = true, - ItemSteps = "{}", - Modified = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9364), - Note = "Installazione serramento", - OfferID = 1, - OfferRowUID = "OFF250000000003", - Qty = 3.0, - RowNum = 3, - SellingItemID = 3, - SerStruct = "{}", - StepCost = 0.0, - StepPrice = 0.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", b => - { - b.Property("OrderID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); - - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("OfferID") - .HasColumnType("int"); - - b.Property("OffertState") - .HasColumnType("int"); - - b.Property("RefNum") - .HasColumnType("int"); - - b.Property("RefRev") - .HasColumnType("int"); - - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("ValidUntil") - .HasColumnType("datetime(6)"); - - b.HasKey("OrderID"); - - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - - b.HasIndex("OfferID"); - - b.ToTable("sales_order"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => - { - b.Property("OrderRowID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("BomPrice") - .HasColumnType("double"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrderID") - .HasColumnType("int"); - - b.Property("Qty") - .HasColumnType("double"); - - b.Property("RowNum") - .HasColumnType("int"); - - b.Property("SellingItemID") - .HasColumnType("int"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StepCost") - .HasColumnType("double"); - - b.Property("StepPrice") - .HasColumnType("double"); - - b.HasKey("OrderRowID"); - - b.HasIndex("OrderID"); - - b.HasIndex("SellingItemID"); - - b.ToTable("sales_order_row"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => - { - b.Property("StockMovID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); - - b.Property("CodDoc") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("DtCreate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DtMod") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); - - b.Property("MovCod") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QtyRec") - .HasColumnType("double"); - - b.Property("StockStatusId") - .HasColumnType("int"); - - b.Property("UnitVal") - .HasColumnType("double"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("StockMovID"); - - b.HasIndex("MovCod"); - - b.HasIndex("StockStatusId"); - - b.ToTable("stock_mov"); - - b.HasData( - new - { - StockMovID = 1, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8944), - DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8989), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 5.0, - StockStatusId = 1, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 2, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8992), - DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8993), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 8.0, - StockStatusId = 2, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 3, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8995), - DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8997), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 5.0, - StockStatusId = 3, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 4, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8999), - DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9000), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 4, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 5, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9003), - DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9004), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 10.0, - StockStatusId = 5, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 6, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9006), - DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9008), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 6, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 7, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9010), - DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9011), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 50.0, - StockStatusId = 7, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 8, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9013), - DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9015), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 8, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 9, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9017), - DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9018), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 9, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 10, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9021), - DtMod = new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9023), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 10, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => - { - b.Property("StockStatusId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); - - b.Property("IsDeleted") - .HasColumnType("tinyint(1)"); - - b.Property("IsRemn") - .HasColumnType("tinyint(1)"); - - b.Property("ItemID") - .HasColumnType("int"); - - b.Property("Location") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QtyAvail") - .HasColumnType("double"); - - b.HasKey("StockStatusId"); - - b.HasIndex("ItemID"); - - b.ToTable("stock_status"); - - b.HasData( - new - { - StockStatusId = 1, - IsDeleted = false, - IsRemn = false, - ItemID = 1, - Location = "B001-001-003", - QtyAvail = 5.0 - }, - new - { - StockStatusId = 2, - IsDeleted = false, - IsRemn = false, - ItemID = 2, - Location = "B001-001-002", - QtyAvail = 8.0 - }, - new - { - StockStatusId = 3, - IsDeleted = false, - IsRemn = false, - ItemID = 3, - Location = "B001-001-001", - QtyAvail = 5.0 - }, - new - { - StockStatusId = 4, - IsDeleted = false, - IsRemn = false, - ItemID = 4, - Location = "V002-001-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 5, - IsDeleted = false, - IsRemn = false, - ItemID = 5, - Location = "V001-001-002", - QtyAvail = 10.0 - }, - new - { - StockStatusId = 6, - IsDeleted = false, - IsRemn = false, - ItemID = 6, - Location = "V001-001-003", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 7, - IsDeleted = false, - IsRemn = false, - ItemID = 8, - Location = "V001-001-003", - QtyAvail = 50.0 - }, - new - { - StockStatusId = 8, - IsDeleted = false, - IsRemn = false, - ItemID = 11, - Location = "S001-002-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 9, - IsDeleted = false, - IsRemn = false, - ItemID = 9, - Location = "S001-002-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 10, - IsDeleted = false, - IsRemn = false, - ItemID = 10, - Location = "S001-001-001", - QtyAvail = 1.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => - { - b.Property("JobID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("JobID"); - - b.ToTable("task_job"); - - b.HasData( - new - { - JobID = 1, - Description = "Rivendita / servizi" - }, - new - { - JobID = 2, - Description = "Serramento Completo Legno su linea Saomad e installatore interno" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => - { - b.Property("JobStepItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("ItemID") - .HasColumnType("int"); - - b.Property("JobStepID") - .HasColumnType("int"); - - b.Property("Qty") - .HasColumnType("double"); - - b.HasKey("JobStepItemID"); - - b.HasIndex("ItemID"); - - b.HasIndex("JobStepID"); - - b.ToTable("task_job_step_item"); - - b.HasData( - new - { - JobStepItemID = 1, - Description = "Grezzo legno abete", - Index = 1, - ItemID = 1, - JobStepID = 1, - Qty = 1.0 - }, - new - { - JobStepItemID = 2, - Description = "Vernice trasparente standard 1L", - Index = 2, - ItemID = 8, - JobStepID = 3, - Qty = 0.10000000000000001 - }, - new - { - JobStepItemID = 3, - Description = "Ferramenta AGB - rif. AGFD.00000.00000", - Index = 3, - ItemID = 9, - JobStepID = 4, - Qty = 1.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => - { - b.Property("JobStepID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); - - b.Property("CostDriverID") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("JobID") - .HasColumnType("int"); - - b.Property("PhaseID") - .HasColumnType("int"); - - b.Property("ProductivityRate") - .HasColumnType("decimal(65,30)"); - - b.Property("ResourceID") - .HasColumnType("int"); - - b.HasKey("JobStepID"); - - b.HasIndex("CostDriverID"); - - b.HasIndex("JobID"); - - b.HasIndex("PhaseID"); - - b.HasIndex("ResourceID"); - - b.ToTable("task_job_step"); - - b.HasData( - new - { - JobStepID = 1, - CostDriverID = 3, - Description = "", - Index = 1, - JobID = 2, - PhaseID = 1, - ProductivityRate = 1m, - ResourceID = 1 - }, - new - { - JobStepID = 2, - CostDriverID = 2, - Description = "", - Index = 2, - JobID = 2, - PhaseID = 2, - ProductivityRate = 1m, - ResourceID = 2 - }, - new - { - JobStepID = 3, - CostDriverID = 3, - Description = "", - Index = 3, - JobID = 2, - PhaseID = 3, - ProductivityRate = 1m, - ResourceID = 4 - }, - new - { - JobStepID = 4, - CostDriverID = 3, - Description = "", - Index = 4, - JobID = 2, - PhaseID = 4, - ProductivityRate = 1m, - ResourceID = 6 - }, - new - { - JobStepID = 5, - CostDriverID = 3, - Description = "", - Index = 5, - JobID = 2, - PhaseID = 6, - ProductivityRate = 1m, - ResourceID = 7 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", b => - { - b.Property("PhaseID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("PhaseID"); - - b.ToTable("task_phase"); - - b.HasData( - new - { - PhaseID = 1, - Description = "Taglio tronchetti" - }, - new - { - PhaseID = 2, - Description = "Lavorazione pezzi serramento" - }, - new - { - PhaseID = 3, - Description = "Verniciatura" - }, - new - { - PhaseID = 4, - Description = "Assemblaggio completo" - }, - new - { - PhaseID = 5, - Description = "Assemblaggio Ferramenta" - }, - new - { - PhaseID = 6, - Description = "Installazione e posa in opera" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.CounterModel", b => - { - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("CountName") - .HasColumnType("varchar(255)"); - - b.Property("Counter") - .HasColumnType("int"); - - b.HasKey("RefYear", "CountName"); - - b.ToTable("utils_counter"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => - { - b.Property("ClassCod") - .HasColumnType("varchar(255)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("ClassCod"); - - b.ToTable("utils_gen_class"); - - b.HasData( - new - { - ClassCod = "WoodMat", - Description = "Elenco Materiali Legno" - }, - new - { - ClassCod = "WoodCol", - Description = "Elenco Colori Legno" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => - { - b.Property("GenValID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); - - b.Property("ClassCod") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Ordinal") - .HasColumnType("int"); - - b.Property("ValString") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("GenValID"); - - b.HasIndex("ClassCod"); - - b.ToTable("utils_gen_value"); - - 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 = "Legno" - }, - 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.Utils.MovTypeModel", b => - { - b.Property("MovCod") - .HasColumnType("varchar(255)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("MovCod"); - - b.ToTable("utils_mov_type"); - - b.HasData( - new - { - MovCod = "CAR", - Description = "Carico a magazzino" - }, - new - { - MovCod = "MOV", - Description = "Movimento interno (spostamento)" - }, - new - { - MovCod = "ND", - Description = "Non Definito" - }, - new - { - MovCod = "OFOR", - Description = "Ordine Fornitore" - }, - new - { - MovCod = "RETT", - Description = "Rettifica magazzino" - }, - new - { - MovCod = "SCAR", - Description = "Scarico da magazzino" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", b => - { - b.Property("TagID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("TagID"); - - b.ToTable("utils_tags"); - - b.HasData( - new - { - TagID = 1, - Description = "Tag 01" - }, - new - { - TagID = 2, - Description = "Tag 02" - }, - new - { - TagID = 3, - Description = "Tag 03" - }, - new - { - TagID = 4, - Description = "Tag 04" - }, - new - { - TagID = 5, - Description = "Tag 05" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") - .WithMany() - .HasForeignKey("CostDriverID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("DriverNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", "ItemGroupNav") - .WithMany() - .HasForeignKey("CodGroup") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemGroupNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") - .WithMany() - .HasForeignKey("JobID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("JobNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", "OrderRowNav") - .WithMany() - .HasForeignKey("OrderRowID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", "ProductionBatchNav") - .WithMany() - .HasForeignKey("ProductionBatchID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OrderRowNav"); - - b.Navigation("ProductionBatchNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") - .WithMany() - .HasForeignKey("PhaseID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", "ProdItemNav") - .WithMany() - .HasForeignKey("ProdItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") - .WithMany() - .HasForeignKey("ResourceID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("PhaseNav"); - - b.Navigation("ProdItemNav"); - - b.Navigation("ResourceNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", 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.OfferRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") - .WithMany("OfferRowNav") - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OfferNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", 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.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") - .WithMany() - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CustomerNav"); - - b.Navigation("DealerNav"); - - b.Navigation("OfferNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", "OrderNav") - .WithMany() - .HasForeignKey("OrderID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OrderNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", "MovTypeNav") - .WithMany() - .HasForeignKey("MovCod") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", "StockStatusNav") - .WithMany() - .HasForeignKey("StockStatusId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("MovTypeNav"); - - b.Navigation("StockStatusNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") - .WithMany() - .HasForeignKey("ItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") - .WithMany() - .HasForeignKey("ItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", "JobStepNav") - .WithMany() - .HasForeignKey("JobStepID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemNav"); - - b.Navigation("JobStepNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") - .WithMany() - .HasForeignKey("CostDriverID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") - .WithMany("JobStepNav") - .HasForeignKey("JobID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") - .WithMany() - .HasForeignKey("PhaseID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") - .WithMany() - .HasForeignKey("ResourceID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("DriverNav"); - - b.Navigation("JobNav"); - - b.Navigation("PhaseNav"); - - b.Navigation("ResourceNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", "GenClassNav") - .WithMany("GenValNav") - .HasForeignKey("ClassCod") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("GenClassNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => - { - b.Navigation("OfferRowNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => - { - b.Navigation("JobStepNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => - { - b.Navigation("GenValNav"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251002134750_AddInitConfVal.cs b/EgwCoreLib.Lux.Data/Migrations/20251002134750_AddInitConfVal.cs deleted file mode 100644 index a851e27a..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20251002134750_AddInitConfVal.cs +++ /dev/null @@ -1,298 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional - -namespace EgwCoreLib.Lux.Data.Migrations -{ - /// - public partial class AddInitConfVal : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.InsertData( - table: "conf_glass", - columns: new[] { "GlassID", "Code", "Description", "Thickness" }, - values: new object[,] - { - { 1, "", "Vetro BE 2S 4/12/4", 20.0 }, - { 2, "", "Vetro BE 3S 4/12/4/12/4", 36.0 }, - { 3, "", "Vetro BE 3S 4/16/4/16/4", 44.0 } - }); - - migrationBuilder.InsertData( - table: "conf_profile", - columns: new[] { "ProfileID", "Code", "Description", "Thickness" }, - values: new object[,] - { - { 1, "", "Profilo 32", 32.0 }, - { 2, "", "Profilo 48", 48.0 }, - { 3, "", "Profilo 58", 58.0 } - }); - - migrationBuilder.InsertData( - table: "conf_wood", - columns: new[] { "WoodID", "Description", "ExtId", "Type" }, - values: new object[,] - { - { 1, "Abete", "", 1 }, - { 2, "Acero", "", 1 }, - { 3, "Pino", "", 2 }, - { 4, "Tek", "", 3 } - }); - - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 1, - columns: new[] { "Inserted", "Modified", "ValidUntil" }, - values: new object[] { new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9241), new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9242), new DateTime(2025, 11, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9238) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 1, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9337), new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9339) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 2, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9350), new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9352) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 3, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9362), new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9364) }); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 1, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8944)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 2, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8992)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 3, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8995)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 4, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8999)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 5, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9003)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 6, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9006)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 7, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9010)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 8, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9013)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 9, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9017)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 10, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9021)); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DeleteData( - table: "conf_glass", - keyColumn: "GlassID", - keyValue: 1); - - migrationBuilder.DeleteData( - table: "conf_glass", - keyColumn: "GlassID", - keyValue: 2); - - migrationBuilder.DeleteData( - table: "conf_glass", - keyColumn: "GlassID", - keyValue: 3); - - migrationBuilder.DeleteData( - table: "conf_profile", - keyColumn: "ProfileID", - keyValue: 1); - - migrationBuilder.DeleteData( - table: "conf_profile", - keyColumn: "ProfileID", - keyValue: 2); - - migrationBuilder.DeleteData( - table: "conf_profile", - keyColumn: "ProfileID", - keyValue: 3); - - migrationBuilder.DeleteData( - table: "conf_wood", - keyColumn: "WoodID", - keyValue: 1); - - migrationBuilder.DeleteData( - table: "conf_wood", - keyColumn: "WoodID", - keyValue: 2); - - migrationBuilder.DeleteData( - table: "conf_wood", - keyColumn: "WoodID", - keyValue: 3); - - migrationBuilder.DeleteData( - table: "conf_wood", - keyColumn: "WoodID", - keyValue: 4); - - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 1, - columns: new[] { "Inserted", "Modified", "ValidUntil" }, - values: new object[] { new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4627), new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4629), new DateTime(2025, 11, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4624) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 1, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4753), new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4755) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 2, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4768), new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4770) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 3, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4780), new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4782) }); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 1, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4289)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 2, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4363)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 3, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4367)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 4, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4370)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 5, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4374)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 6, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4378)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 7, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4381)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 8, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4385)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 9, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4389)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 10, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 13, 1, 49, 436, DateTimeKind.Local).AddTicks(4392)); - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251002150430_UpdateConfVal.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20251002150430_UpdateConfVal.Designer.cs deleted file mode 100644 index fa20bcbf..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20251002150430_UpdateConfVal.Designer.cs +++ /dev/null @@ -1,2400 +0,0 @@ -// -using System; -using EgwCoreLib.Lux.Data; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace EgwCoreLib.Lux.Data.Migrations -{ - [DbContext(typeof(DataLayerContext))] - [Migration("20251002150430_UpdateConfVal")] - partial class UpdateConfVal - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.17") - .HasAnnotation("Relational:MaxIdentifierLength", 64); - - MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.GlassModel", b => - { - b.Property("GlassID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GlassID")); - - b.Property("Code") - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Thickness") - .HasColumnType("double"); - - b.HasKey("GlassID"); - - b.ToTable("conf_glass"); - - b.HasData( - new - { - GlassID = 1, - Code = "0001", - Description = "Vetro BE 2S 4/12/4", - Thickness = 20.0 - }, - new - { - GlassID = 2, - Code = "0002", - Description = "Vetro BE 3S 4/12/4/12/4", - Thickness = 36.0 - }, - new - { - GlassID = 3, - Code = "0003", - Description = "Vetro BE 3S 4/16/4/16/4", - Thickness = 44.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.ProfileModel", b => - { - b.Property("ProfileID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProfileID")); - - b.Property("Code") - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Thickness") - .HasColumnType("double"); - - b.HasKey("ProfileID"); - - b.ToTable("conf_profile"); - - b.HasData( - new - { - ProfileID = 1, - Code = "0001", - Description = "Profilo 32", - Thickness = 32.0 - }, - new - { - ProfileID = 2, - Code = "0002", - Description = "Profilo 48", - Thickness = 48.0 - }, - new - { - ProfileID = 3, - Code = "0003", - Description = "Profilo 58", - Thickness = 58.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.WoodModel", b => - { - b.Property("WoodID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("WoodID")); - - b.Property("Code") - .HasColumnType("longtext"); - - b.Property("Description") - .HasColumnType("longtext"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("WoodID"); - - b.ToTable("conf_wood"); - - b.HasData( - new - { - WoodID = 1, - Code = "0001", - Description = "Abete", - Type = 1 - }, - new - { - WoodID = 2, - Code = "0002", - Description = "Acero", - Type = 1 - }, - new - { - WoodID = 3, - Code = "0003", - Description = "Pino", - Type = 2 - }, - new - { - WoodID = 4, - Code = "0004", - Description = "Tek", - Type = 3 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", b => - { - b.Property("CostDriverID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CostDriverID")); - - b.Property("Descript") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Unit") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CostDriverID"); - - b.ToTable("cost_driver"); - - b.HasData( - new - { - CostDriverID = 1, - Descript = "Ore lavorate per step/fase", - Name = "WorkHour", - Unit = "h" - }, - new - { - CostDriverID = 2, - Descript = "Metri prodotti per step/fase", - Name = "Meter", - Unit = "m" - }, - new - { - CostDriverID = 3, - Descript = "Numero unità prodotte (lavorate) per step/fase", - Name = "Unit", - Unit = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => - { - b.Property("ResourceID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); - - b.Property("CostDriverBudget") - .HasColumnType("decimal(65,30)"); - - b.Property("CostDriverID") - .HasColumnType("int"); - - b.Property("EBTPerc") - .HasColumnType("decimal(65,30)"); - - b.Property("FixedCost") - .HasColumnType("decimal(65,30)"); - - b.Property("LaborCost") - .HasColumnType("decimal(65,30)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OverHeadCost") - .HasColumnType("decimal(65,30)"); - - b.Property("OverHeadPerc") - .HasColumnType("decimal(65,30)"); - - b.Property("PriceMargin") - .HasColumnType("decimal(65,30)"); - - b.Property("VariableCost") - .HasColumnType("decimal(65,30)"); - - b.HasKey("ResourceID"); - - b.HasIndex("CostDriverID"); - - b.ToTable("cost_resource"); - - b.HasData( - new - { - ResourceID = 1, - CostDriverBudget = 880m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 12000m, - LaborCost = 30m, - Name = "Sezionatrice", - OverHeadCost = 5000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 6000m - }, - new - { - ResourceID = 2, - CostDriverBudget = 1760m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 100000m, - LaborCost = 40m, - Name = "Linea SAOMAD WoodPecker Just 3500", - OverHeadCost = 15000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 30000m - }, - new - { - ResourceID = 3, - CostDriverBudget = 1760m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 24000m, - LaborCost = 35m, - Name = "Linea Pantografo", - OverHeadCost = 5000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 6000m - }, - new - { - ResourceID = 4, - CostDriverBudget = 880m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 24000m, - LaborCost = 30m, - Name = "Stazione Verniciatura", - OverHeadCost = 3000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 6000m - }, - new - { - ResourceID = 5, - CostDriverBudget = 220m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 6000m, - LaborCost = 30m, - Name = "Verniciatura Manuale", - OverHeadCost = 3000m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 2000m - }, - new - { - ResourceID = 6, - CostDriverBudget = 3520m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 500m, - LaborCost = 30m, - Name = "Montaggio Manuale", - OverHeadCost = 500m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 500m - }, - new - { - ResourceID = 7, - CostDriverBudget = 3520m, - CostDriverID = 1, - EBTPerc = 0.15m, - FixedCost = 0m, - LaborCost = 40m, - Name = "Installatore", - OverHeadCost = 0m, - OverHeadPerc = 0.15m, - PriceMargin = 0.2m, - VariableCost = 3000m - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", b => - { - b.Property("CodGroup") - .HasColumnType("varchar(255)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CodGroup"); - - b.ToTable("item_group"); - - b.HasData( - new - { - CodGroup = "WindowTrunk", - Description = "Barre legno per lavorazione" - }, - new - { - CodGroup = "WindowGlass", - Description = "Vetri serramento" - }, - new - { - CodGroup = "WindowVarnish", - Description = "Vernici per legno" - }, - new - { - CodGroup = "WindowHardware", - Description = "Ferramenta serramento" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => - { - b.Property("ItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); - - b.Property("CodGroup") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Cost") - .HasColumnType("double"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsService") - .HasColumnType("tinyint(1)"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("ItemIDParent") - .HasColumnType("int"); - - b.Property("ItemType") - .HasColumnType("int"); - - b.Property("Margin") - .HasColumnType("double"); - - b.Property("QtyMax") - .HasColumnType("double"); - - b.Property("QtyMin") - .HasColumnType("double"); - - b.Property("SupplCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UM") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("ItemID"); - - b.HasIndex("CodGroup"); - - b.ToTable("item_item"); - - b.HasData( - new - { - ItemID = 1, - CodGroup = "WindowTrunk", - Cost = 20.0, - Description = "BARRA-60x80 generica", - ExtItemCode = "", - IsService = false, - ItemCode = 1001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.29999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "BARR.001", - UM = "#" - }, - new - { - ItemID = 2, - CodGroup = "WindowTrunk", - Cost = 16.5, - Description = "Barra 60x80, lunghezza 12m", - ExtItemCode = "BARRA-60x80x12000", - IsService = false, - ItemCode = 1002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.12000", - UM = "#" - }, - new - { - ItemID = 3, - CodGroup = "WindowTrunk", - Cost = 17.5, - Description = "Barra 60x80, lunghezza 8m", - ExtItemCode = "BARRA-60x80x8000", - IsService = false, - ItemCode = 1003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.22, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.8000", - UM = "#" - }, - new - { - ItemID = 4, - CodGroup = "WindowTrunk", - Cost = 15.5, - Description = "Barra 60x80, lunghezza 16m", - ExtItemCode = "BARRA-60x80x16000", - IsService = false, - ItemCode = 1004, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "ABC.00123.16000", - UM = "#" - }, - new - { - ItemID = 5, - CodGroup = "WindowGlass", - Cost = 300.0, - Description = "Vetro triplo, basso indice termico, 800x1000", - ExtItemCode = "VETRO-3L-THERMO-800x1000", - IsService = false, - ItemCode = 2001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V3T.800.1000", - UM = "m2" - }, - new - { - ItemID = 6, - CodGroup = "WindowGlass", - Cost = 200.0, - Description = "Vetro doppio, 800x1000", - ExtItemCode = "VETRO-2L-800x1000", - IsService = false, - ItemCode = 2002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.14999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V2.800.1000", - UM = "m2" - }, - new - { - ItemID = 7, - CodGroup = "WindowGlass", - Cost = 250.0, - Description = "Vetro triplo, 800x1000", - ExtItemCode = "VETRO-3L-800x1000", - IsService = false, - ItemCode = 2003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.17999999999999999, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "V3.800.1000", - UM = "m2" - }, - new - { - ItemID = 8, - CodGroup = "WindowVarnish", - Cost = 20.0, - Description = "Vernice trasparente", - ExtItemCode = "VERN-TRASP", - IsService = false, - ItemCode = 3001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "VT.STD", - UM = "l" - }, - new - { - ItemID = 9, - CodGroup = "WindowHardware", - Cost = 65.0, - Description = "Kit standard completo AGB tipo 001", - ExtItemCode = "KIT-001", - IsService = false, - ItemCode = 5001, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-KIT-001", - UM = "#" - }, - new - { - ItemID = 10, - CodGroup = "WindowHardware", - Cost = 10.0, - Description = "Cerniera AGB tipo 001", - ExtItemCode = "CERN-001", - IsService = false, - ItemCode = 5002, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-CERN-001", - UM = "#" - }, - new - { - ItemID = 11, - CodGroup = "WindowHardware", - Cost = 15.0, - Description = "Serratura AGB tipo 001", - ExtItemCode = "SERR-001", - IsService = false, - ItemCode = 5003, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-SERR-001", - UM = "#" - }, - new - { - ItemID = 12, - CodGroup = "WindowHardware", - Cost = 25.0, - Description = "Maniglia AGB tipo 001", - ExtItemCode = "MAN-001", - IsService = false, - ItemCode = 5004, - ItemIDParent = 0, - ItemType = 1, - Margin = 0.20000000000000001, - QtyMax = 0.0, - QtyMin = 0.0, - SupplCode = "AGB-MAN-001", - UM = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => - { - b.Property("SellingItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); - - b.Property("Cost") - .HasColumnType("double"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("IsService") - .HasColumnType("tinyint(1)"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("JobID") - .HasColumnType("int"); - - b.Property("Margin") - .HasColumnType("double"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("SupplCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("UM") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SellingItemID"); - - b.HasIndex("JobID"); - - b.ToTable("item_selling_item"); - - b.HasData( - new - { - SellingItemID = 1, - Cost = 820.0, - Description = "Finestra anta Singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSteps = "", - JobID = 2, - Margin = 0.20000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 2, - Cost = 150.0, - Description = "Persiana anta singola", - ExtItemCode = "", - IsService = false, - ItemCode = 0, - ItemSteps = "", - JobID = 1, - Margin = 0.10000000000000001, - SerStruct = "", - SupplCode = "", - UM = "#" - }, - new - { - SellingItemID = 3, - Cost = 200.0, - Description = "Installazione", - ExtItemCode = "", - IsService = true, - ItemCode = 0, - ItemSteps = "", - JobID = 1, - Margin = 0.29999999999999999, - SerStruct = "", - SupplCode = "", - UM = "#" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SupplierModel", b => - { - b.Property("SupplierID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("SupplierID"); - - b.ToTable("item_supplier"); - - b.HasData( - new - { - SupplierID = 1, - CompanyName = "Company One", - FirstName = "Supplier A", - LastName = "Egalware", - VAT = "7294857103879254" - }, - new - { - SupplierID = 2, - CompanyName = "Company Two", - FirstName = "Supplier B", - LastName = "User", - VAT = "7294857103879254" - }, - new - { - SupplierID = 3, - CompanyName = "Company Two", - FirstName = "Supplier C", - LastName = "User Test", - VAT = "7294857103879254" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", b => - { - b.Property("ProductionBatchID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("DueDate") - .HasColumnType("datetime(6)"); - - b.HasKey("ProductionBatchID"); - - b.ToTable("production_batch"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => - { - b.Property("ProdItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); - - b.Property("ExtItemCode") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ItemCode") - .HasColumnType("int"); - - b.Property("OrderRowID") - .HasColumnType("int"); - - b.Property("ProductionBatchID") - .HasColumnType("int"); - - b.HasKey("ProdItemID"); - - b.HasIndex("OrderRowID"); - - b.HasIndex("ProductionBatchID"); - - b.ToTable("production_item"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => - { - b.Property("ProdItemStepID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); - - b.Property("DateEnd") - .HasColumnType("datetime(6)"); - - b.Property("DateStart") - .HasColumnType("datetime(6)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("PhaseID") - .HasColumnType("int"); - - b.Property("ProdItemID") - .HasColumnType("int"); - - b.Property("Qty") - .HasColumnType("double"); - - b.Property("ResourceID") - .HasColumnType("int"); - - b.Property("WorkTime") - .HasColumnType("double"); - - b.HasKey("ProdItemStepID"); - - b.HasIndex("PhaseID"); - - b.HasIndex("ProdItemID"); - - b.HasIndex("ResourceID"); - - b.ToTable("production_item_step"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", b => - { - b.Property("CustomerID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("CustomerID"); - - b.ToTable("sales_customer"); - - b.HasData( - new - { - CustomerID = 1, - CompanyName = "", - FirstName = "Customer A", - LastName = "Egalware", - VAT = "1234567890123456" - }, - new - { - CustomerID = 2, - CompanyName = "", - FirstName = "Customer B", - LastName = "User", - VAT = "1234567890123456" - }, - new - { - CustomerID = 3, - CompanyName = "", - FirstName = "Customer C", - LastName = "User Test", - VAT = "1234567890123456" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", b => - { - b.Property("DealerID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); - - b.Property("CompanyName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("FirstName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("LastName") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("VAT") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("DealerID"); - - b.ToTable("sales_dealer"); - - b.HasData( - new - { - DealerID = 1, - CompanyName = "Company First", - FirstName = "Dealer A", - LastName = "Egalware", - VAT = "9587362514671527" - }, - new - { - DealerID = 2, - CompanyName = "Company First", - FirstName = "Dealer B", - LastName = "User", - VAT = "9587362514671527" - }, - new - { - DealerID = 3, - CompanyName = "Company Second", - FirstName = "Dealer C", - LastName = "User Test", - VAT = "9587362514671527" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => - { - b.Property("OfferID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); - - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Discount") - .HasColumnType("double"); - - b.Property("Envir") - .HasColumnType("int"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("OffertState") - .HasColumnType("int"); - - b.Property("RefNum") - .HasColumnType("int"); - - b.Property("RefRev") - .HasColumnType("int"); - - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("ValidUntil") - .HasColumnType("datetime(6)"); - - b.HasKey("OfferID"); - - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - - b.ToTable("sales_offer"); - - b.HasData( - new - { - OfferID = 1, - CustomerID = 2, - DealerID = 2, - Description = "Offerta per tre serramenti", - Discount = 0.0, - Envir = 1, - Inserted = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(535), - Modified = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(537), - OffertState = 0, - RefNum = 1, - RefRev = 1, - RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(530) - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferRowModel", b => - { - b.Property("OfferRowID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); - - b.Property("AwaitBom") - .HasColumnType("tinyint(1)"); - - b.Property("AwaitPrice") - .HasColumnType("tinyint(1)"); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("BomOk") - .HasColumnType("tinyint(1)"); - - b.Property("BomPrice") - .HasColumnType("double"); - - b.Property("Envir") - .HasColumnType("int"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("ItemBOM") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("ItemOk") - .HasColumnType("tinyint(1)"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OfferID") - .HasColumnType("int"); - - b.Property("OfferRowUID") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Qty") - .HasColumnType("double"); - - b.Property("RowNum") - .HasColumnType("int"); - - b.Property("SellingItemID") - .HasColumnType("int"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StepCost") - .HasColumnType("double"); - - b.Property("StepPrice") - .HasColumnType("double"); - - b.HasKey("OfferRowID"); - - b.HasIndex("OfferID"); - - b.HasIndex("SellingItemID"); - - b.ToTable("sales_offer_row"); - - b.HasData( - new - { - OfferRowID = 1, - AwaitBom = false, - AwaitPrice = false, - BomCost = 900.0, - BomOk = true, - BomPrice = 950.0, - Envir = 1, - Inserted = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(636), - ItemBOM = "", - ItemOk = true, - ItemSteps = "{}", - Modified = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(638), - Note = "Finestra anta singola 2025", - OfferID = 1, - OfferRowUID = "OFF250000000001", - Qty = 3.0, - RowNum = 1, - SellingItemID = 1, - SerStruct = "{}", - StepCost = 0.0, - StepPrice = 0.0 - }, - new - { - OfferRowID = 2, - AwaitBom = false, - AwaitPrice = false, - BomCost = 160.0, - BomOk = true, - BomPrice = 200.0, - Envir = 1, - Inserted = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(651), - ItemBOM = "", - ItemOk = true, - ItemSteps = "{}", - Modified = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(652), - Note = "Persiana per Finestra anta singola 2025", - OfferID = 1, - OfferRowUID = "OFF250000000002", - Qty = 3.0, - RowNum = 2, - SellingItemID = 2, - SerStruct = "{}", - StepCost = 0.0, - StepPrice = 0.0 - }, - new - { - OfferRowID = 3, - AwaitBom = false, - AwaitPrice = false, - BomCost = 200.0, - BomOk = true, - BomPrice = 250.0, - Envir = 1, - Inserted = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(662), - ItemBOM = "", - ItemOk = true, - ItemSteps = "{}", - Modified = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(664), - Note = "Installazione serramento", - OfferID = 1, - OfferRowUID = "OFF250000000003", - Qty = 3.0, - RowNum = 3, - SellingItemID = 3, - SerStruct = "{}", - StepCost = 0.0, - StepPrice = 0.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", b => - { - b.Property("OrderID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); - - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("OfferID") - .HasColumnType("int"); - - b.Property("OffertState") - .HasColumnType("int"); - - b.Property("RefNum") - .HasColumnType("int"); - - b.Property("RefRev") - .HasColumnType("int"); - - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("ValidUntil") - .HasColumnType("datetime(6)"); - - b.HasKey("OrderID"); - - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - - b.HasIndex("OfferID"); - - b.ToTable("sales_order"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => - { - b.Property("OrderRowID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); - - b.Property("BomCost") - .HasColumnType("double"); - - b.Property("BomPrice") - .HasColumnType("double"); - - b.Property("Inserted") - .HasColumnType("datetime(6)"); - - b.Property("ItemSteps") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Modified") - .HasColumnType("datetime(6)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("OrderID") - .HasColumnType("int"); - - b.Property("Qty") - .HasColumnType("double"); - - b.Property("RowNum") - .HasColumnType("int"); - - b.Property("SellingItemID") - .HasColumnType("int"); - - b.Property("SerStruct") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("StepCost") - .HasColumnType("double"); - - b.Property("StepPrice") - .HasColumnType("double"); - - b.HasKey("OrderRowID"); - - b.HasIndex("OrderID"); - - b.HasIndex("SellingItemID"); - - b.ToTable("sales_order_row"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => - { - b.Property("StockMovID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); - - b.Property("CodDoc") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("DtCreate") - .ValueGeneratedOnAdd() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - b.Property("DtMod") - .ValueGeneratedOnAddOrUpdate() - .HasColumnType("timestamp") - .HasDefaultValueSql("CURRENT_TIMESTAMP"); - - MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); - - b.Property("MovCod") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Note") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QtyRec") - .HasColumnType("double"); - - b.Property("StockStatusId") - .HasColumnType("int"); - - b.Property("UnitVal") - .HasColumnType("double"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("StockMovID"); - - b.HasIndex("MovCod"); - - b.HasIndex("StockStatusId"); - - b.ToTable("stock_mov"); - - b.HasData( - new - { - StockMovID = 1, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(180), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(233), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 5.0, - StockStatusId = 1, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 2, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(236), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(238), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 8.0, - StockStatusId = 2, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 3, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(240), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(241), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 5.0, - StockStatusId = 3, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 4, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(243), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(245), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 4, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 5, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(247), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(248), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 10.0, - StockStatusId = 5, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 6, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(250), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(252), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 6, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 7, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(254), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(255), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 50.0, - StockStatusId = 7, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 8, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(257), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(258), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 8, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 9, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(318), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(320), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 9, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }, - new - { - StockMovID = 10, - CodDoc = "", - DtCreate = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(322), - DtMod = new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(324), - MovCod = "CAR", - Note = "DEMO", - QtyRec = 1.0, - StockStatusId = 10, - UnitVal = 0.0, - UserId = "samuele.locatelli@egalware.com" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => - { - b.Property("StockStatusId") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); - - b.Property("IsDeleted") - .HasColumnType("tinyint(1)"); - - b.Property("IsRemn") - .HasColumnType("tinyint(1)"); - - b.Property("ItemID") - .HasColumnType("int"); - - b.Property("Location") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("QtyAvail") - .HasColumnType("double"); - - b.HasKey("StockStatusId"); - - b.HasIndex("ItemID"); - - b.ToTable("stock_status"); - - b.HasData( - new - { - StockStatusId = 1, - IsDeleted = false, - IsRemn = false, - ItemID = 1, - Location = "B001-001-003", - QtyAvail = 5.0 - }, - new - { - StockStatusId = 2, - IsDeleted = false, - IsRemn = false, - ItemID = 2, - Location = "B001-001-002", - QtyAvail = 8.0 - }, - new - { - StockStatusId = 3, - IsDeleted = false, - IsRemn = false, - ItemID = 3, - Location = "B001-001-001", - QtyAvail = 5.0 - }, - new - { - StockStatusId = 4, - IsDeleted = false, - IsRemn = false, - ItemID = 4, - Location = "V002-001-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 5, - IsDeleted = false, - IsRemn = false, - ItemID = 5, - Location = "V001-001-002", - QtyAvail = 10.0 - }, - new - { - StockStatusId = 6, - IsDeleted = false, - IsRemn = false, - ItemID = 6, - Location = "V001-001-003", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 7, - IsDeleted = false, - IsRemn = false, - ItemID = 8, - Location = "V001-001-003", - QtyAvail = 50.0 - }, - new - { - StockStatusId = 8, - IsDeleted = false, - IsRemn = false, - ItemID = 11, - Location = "S001-002-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 9, - IsDeleted = false, - IsRemn = false, - ItemID = 9, - Location = "S001-002-001", - QtyAvail = 1.0 - }, - new - { - StockStatusId = 10, - IsDeleted = false, - IsRemn = false, - ItemID = 10, - Location = "S001-001-001", - QtyAvail = 1.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => - { - b.Property("JobID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("JobID"); - - b.ToTable("task_job"); - - b.HasData( - new - { - JobID = 1, - Description = "Rivendita / servizi" - }, - new - { - JobID = 2, - Description = "Serramento Completo Legno su linea Saomad e installatore interno" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => - { - b.Property("JobStepItemID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("ItemID") - .HasColumnType("int"); - - b.Property("JobStepID") - .HasColumnType("int"); - - b.Property("Qty") - .HasColumnType("double"); - - b.HasKey("JobStepItemID"); - - b.HasIndex("ItemID"); - - b.HasIndex("JobStepID"); - - b.ToTable("task_job_step_item"); - - b.HasData( - new - { - JobStepItemID = 1, - Description = "Grezzo legno abete", - Index = 1, - ItemID = 1, - JobStepID = 1, - Qty = 1.0 - }, - new - { - JobStepItemID = 2, - Description = "Vernice trasparente standard 1L", - Index = 2, - ItemID = 8, - JobStepID = 3, - Qty = 0.10000000000000001 - }, - new - { - JobStepItemID = 3, - Description = "Ferramenta AGB - rif. AGFD.00000.00000", - Index = 3, - ItemID = 9, - JobStepID = 4, - Qty = 1.0 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => - { - b.Property("JobStepID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); - - b.Property("CostDriverID") - .HasColumnType("int"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.Property("Index") - .HasColumnType("int"); - - b.Property("JobID") - .HasColumnType("int"); - - b.Property("PhaseID") - .HasColumnType("int"); - - b.Property("ProductivityRate") - .HasColumnType("decimal(65,30)"); - - b.Property("ResourceID") - .HasColumnType("int"); - - b.HasKey("JobStepID"); - - b.HasIndex("CostDriverID"); - - b.HasIndex("JobID"); - - b.HasIndex("PhaseID"); - - b.HasIndex("ResourceID"); - - b.ToTable("task_job_step"); - - b.HasData( - new - { - JobStepID = 1, - CostDriverID = 3, - Description = "", - Index = 1, - JobID = 2, - PhaseID = 1, - ProductivityRate = 1m, - ResourceID = 1 - }, - new - { - JobStepID = 2, - CostDriverID = 2, - Description = "", - Index = 2, - JobID = 2, - PhaseID = 2, - ProductivityRate = 1m, - ResourceID = 2 - }, - new - { - JobStepID = 3, - CostDriverID = 3, - Description = "", - Index = 3, - JobID = 2, - PhaseID = 3, - ProductivityRate = 1m, - ResourceID = 4 - }, - new - { - JobStepID = 4, - CostDriverID = 3, - Description = "", - Index = 4, - JobID = 2, - PhaseID = 4, - ProductivityRate = 1m, - ResourceID = 6 - }, - new - { - JobStepID = 5, - CostDriverID = 3, - Description = "", - Index = 5, - JobID = 2, - PhaseID = 6, - ProductivityRate = 1m, - ResourceID = 7 - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", b => - { - b.Property("PhaseID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("PhaseID"); - - b.ToTable("task_phase"); - - b.HasData( - new - { - PhaseID = 1, - Description = "Taglio tronchetti" - }, - new - { - PhaseID = 2, - Description = "Lavorazione pezzi serramento" - }, - new - { - PhaseID = 3, - Description = "Verniciatura" - }, - new - { - PhaseID = 4, - Description = "Assemblaggio completo" - }, - new - { - PhaseID = 5, - Description = "Assemblaggio Ferramenta" - }, - new - { - PhaseID = 6, - Description = "Installazione e posa in opera" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.CounterModel", b => - { - b.Property("RefYear") - .HasColumnType("int"); - - b.Property("CountName") - .HasColumnType("varchar(255)"); - - b.Property("Counter") - .HasColumnType("int"); - - b.HasKey("RefYear", "CountName"); - - b.ToTable("utils_counter"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => - { - b.Property("ClassCod") - .HasColumnType("varchar(255)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("ClassCod"); - - b.ToTable("utils_gen_class"); - - b.HasData( - new - { - ClassCod = "WoodMat", - Description = "Elenco Materiali Legno" - }, - new - { - ClassCod = "WoodCol", - Description = "Elenco Colori Legno" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => - { - b.Property("GenValID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); - - b.Property("ClassCod") - .IsRequired() - .HasColumnType("varchar(255)"); - - b.Property("Ordinal") - .HasColumnType("int"); - - b.Property("ValString") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("GenValID"); - - b.HasIndex("ClassCod"); - - b.ToTable("utils_gen_value"); - - 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 = "Legno" - }, - 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.Utils.MovTypeModel", b => - { - b.Property("MovCod") - .HasColumnType("varchar(255)"); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("MovCod"); - - b.ToTable("utils_mov_type"); - - b.HasData( - new - { - MovCod = "CAR", - Description = "Carico a magazzino" - }, - new - { - MovCod = "MOV", - Description = "Movimento interno (spostamento)" - }, - new - { - MovCod = "ND", - Description = "Non Definito" - }, - new - { - MovCod = "OFOR", - Description = "Ordine Fornitore" - }, - new - { - MovCod = "RETT", - Description = "Rettifica magazzino" - }, - new - { - MovCod = "SCAR", - Description = "Scarico da magazzino" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", b => - { - b.Property("TagID") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); - - b.Property("Description") - .IsRequired() - .HasColumnType("longtext"); - - b.HasKey("TagID"); - - b.ToTable("utils_tags"); - - b.HasData( - new - { - TagID = 1, - Description = "Tag 01" - }, - new - { - TagID = 2, - Description = "Tag 02" - }, - new - { - TagID = 3, - Description = "Tag 03" - }, - new - { - TagID = 4, - Description = "Tag 04" - }, - new - { - TagID = 5, - Description = "Tag 05" - }); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") - .WithMany() - .HasForeignKey("CostDriverID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("DriverNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", "ItemGroupNav") - .WithMany() - .HasForeignKey("CodGroup") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemGroupNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") - .WithMany() - .HasForeignKey("JobID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("JobNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", "OrderRowNav") - .WithMany() - .HasForeignKey("OrderRowID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", "ProductionBatchNav") - .WithMany() - .HasForeignKey("ProductionBatchID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OrderRowNav"); - - b.Navigation("ProductionBatchNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") - .WithMany() - .HasForeignKey("PhaseID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", "ProdItemNav") - .WithMany() - .HasForeignKey("ProdItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") - .WithMany() - .HasForeignKey("ResourceID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("PhaseNav"); - - b.Navigation("ProdItemNav"); - - b.Navigation("ResourceNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", 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.OfferRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") - .WithMany("OfferRowNav") - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OfferNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", 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.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") - .WithMany() - .HasForeignKey("OfferID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CustomerNav"); - - b.Navigation("DealerNav"); - - b.Navigation("OfferNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", "OrderNav") - .WithMany() - .HasForeignKey("OrderID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") - .WithMany() - .HasForeignKey("SellingItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OrderNav"); - - b.Navigation("SellingItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", "MovTypeNav") - .WithMany() - .HasForeignKey("MovCod") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", "StockStatusNav") - .WithMany() - .HasForeignKey("StockStatusId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("MovTypeNav"); - - b.Navigation("StockStatusNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") - .WithMany() - .HasForeignKey("ItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") - .WithMany() - .HasForeignKey("ItemID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", "JobStepNav") - .WithMany() - .HasForeignKey("JobStepID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ItemNav"); - - b.Navigation("JobStepNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") - .WithMany() - .HasForeignKey("CostDriverID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") - .WithMany("JobStepNav") - .HasForeignKey("JobID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") - .WithMany() - .HasForeignKey("PhaseID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") - .WithMany() - .HasForeignKey("ResourceID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("DriverNav"); - - b.Navigation("JobNav"); - - b.Navigation("PhaseNav"); - - b.Navigation("ResourceNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", "GenClassNav") - .WithMany("GenValNav") - .HasForeignKey("ClassCod") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("GenClassNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => - { - b.Navigation("OfferRowNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => - { - b.Navigation("JobStepNav"); - }); - - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => - { - b.Navigation("GenValNav"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251002150430_UpdateConfVal.cs b/EgwCoreLib.Lux.Data/Migrations/20251002150430_UpdateConfVal.cs deleted file mode 100644 index 20fd5bc2..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20251002150430_UpdateConfVal.cs +++ /dev/null @@ -1,365 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EgwCoreLib.Lux.Data.Migrations -{ - /// - public partial class UpdateConfVal : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "ExtId", - table: "conf_wood", - newName: "Code"); - - migrationBuilder.UpdateData( - table: "conf_glass", - keyColumn: "GlassID", - keyValue: 1, - column: "Code", - value: "0001"); - - migrationBuilder.UpdateData( - table: "conf_glass", - keyColumn: "GlassID", - keyValue: 2, - column: "Code", - value: "0002"); - - migrationBuilder.UpdateData( - table: "conf_glass", - keyColumn: "GlassID", - keyValue: 3, - column: "Code", - value: "0003"); - - migrationBuilder.UpdateData( - table: "conf_profile", - keyColumn: "ProfileID", - keyValue: 1, - column: "Code", - value: "0001"); - - migrationBuilder.UpdateData( - table: "conf_profile", - keyColumn: "ProfileID", - keyValue: 2, - column: "Code", - value: "0002"); - - migrationBuilder.UpdateData( - table: "conf_profile", - keyColumn: "ProfileID", - keyValue: 3, - column: "Code", - value: "0003"); - - migrationBuilder.UpdateData( - table: "conf_wood", - keyColumn: "WoodID", - keyValue: 1, - column: "Code", - value: "0001"); - - migrationBuilder.UpdateData( - table: "conf_wood", - keyColumn: "WoodID", - keyValue: 2, - column: "Code", - value: "0002"); - - migrationBuilder.UpdateData( - table: "conf_wood", - keyColumn: "WoodID", - keyValue: 3, - column: "Code", - value: "0003"); - - migrationBuilder.UpdateData( - table: "conf_wood", - keyColumn: "WoodID", - keyValue: 4, - column: "Code", - value: "0004"); - - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 1, - columns: new[] { "Inserted", "Modified", "ValidUntil" }, - values: new object[] { new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(535), new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(537), new DateTime(2025, 11, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(530) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 1, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(636), new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(638) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 2, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(651), new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(652) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 3, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(662), new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(664) }); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 1, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(180)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 2, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(236)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 3, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(240)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 4, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(243)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 5, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(247)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 6, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(250)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 7, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(254)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 8, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(257)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 9, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(318)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 10, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(322)); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.RenameColumn( - name: "Code", - table: "conf_wood", - newName: "ExtId"); - - migrationBuilder.UpdateData( - table: "conf_glass", - keyColumn: "GlassID", - keyValue: 1, - column: "Code", - value: ""); - - migrationBuilder.UpdateData( - table: "conf_glass", - keyColumn: "GlassID", - keyValue: 2, - column: "Code", - value: ""); - - migrationBuilder.UpdateData( - table: "conf_glass", - keyColumn: "GlassID", - keyValue: 3, - column: "Code", - value: ""); - - migrationBuilder.UpdateData( - table: "conf_profile", - keyColumn: "ProfileID", - keyValue: 1, - column: "Code", - value: ""); - - migrationBuilder.UpdateData( - table: "conf_profile", - keyColumn: "ProfileID", - keyValue: 2, - column: "Code", - value: ""); - - migrationBuilder.UpdateData( - table: "conf_profile", - keyColumn: "ProfileID", - keyValue: 3, - column: "Code", - value: ""); - - migrationBuilder.UpdateData( - table: "conf_wood", - keyColumn: "WoodID", - keyValue: 1, - column: "ExtId", - value: ""); - - migrationBuilder.UpdateData( - table: "conf_wood", - keyColumn: "WoodID", - keyValue: 2, - column: "ExtId", - value: ""); - - migrationBuilder.UpdateData( - table: "conf_wood", - keyColumn: "WoodID", - keyValue: 3, - column: "ExtId", - value: ""); - - migrationBuilder.UpdateData( - table: "conf_wood", - keyColumn: "WoodID", - keyValue: 4, - column: "ExtId", - value: ""); - - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 1, - columns: new[] { "Inserted", "Modified", "ValidUntil" }, - values: new object[] { new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9241), new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9242), new DateTime(2025, 11, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9238) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 1, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9337), new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9339) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 2, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9350), new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9352) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 3, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9362), new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9364) }); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 1, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8944)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 2, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8992)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 3, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8995)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 4, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(8999)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 5, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9003)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 6, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9006)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 7, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9010)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 8, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9013)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 9, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9017)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 10, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 15, 47, 49, 911, DateTimeKind.Local).AddTicks(9021)); - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251003164608_AddShapeList.cs b/EgwCoreLib.Lux.Data/Migrations/20251003164608_AddShapeList.cs deleted file mode 100644 index d75e04c9..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20251003164608_AddShapeList.cs +++ /dev/null @@ -1,364 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional - -namespace EgwCoreLib.Lux.Data.Migrations -{ - /// - public partial class AddShapeList : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DeleteData( - table: "utils_gen_class", - keyColumn: "ClassCod", - keyValue: "WoodMat"); - - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 1, - columns: new[] { "Inserted", "Modified", "ValidUntil" }, - values: new object[] { new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6885), new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6886), new DateTime(2025, 11, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6881) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 1, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7005), new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7010) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 2, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7035), new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7037) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 3, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7047), new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7049) }); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 1, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6573)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 2, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6633)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 3, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6637)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 4, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6641)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 5, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6644)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 6, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6648)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 7, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6652)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 8, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6656)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 9, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6659)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 10, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6663)); - - migrationBuilder.InsertData( - table: "utils_gen_class", - columns: new[] { "ClassCod", "Description" }, - values: new object[] { "ShapeList", "Elenco Shape Gestite" }); - - migrationBuilder.UpdateData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 1, - columns: new[] { "ClassCod", "ValString" }, - values: new object[] { "WoodCol", "Legno" }); - - migrationBuilder.UpdateData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 2, - columns: new[] { "ClassCod", "ValString" }, - values: new object[] { "WoodCol", "Bianco" }); - - migrationBuilder.UpdateData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 3, - columns: new[] { "Ordinal", "ValString" }, - values: new object[] { 3, "Rosso" }); - - migrationBuilder.UpdateData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 4, - columns: new[] { "Ordinal", "ValString" }, - values: new object[] { 4, "Nero" }); - - migrationBuilder.UpdateData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 5, - columns: new[] { "ClassCod", "Ordinal", "ValString" }, - values: new object[] { "ShapeList", 1, "Rectangular" }); - - migrationBuilder.UpdateData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 6, - columns: new[] { "ClassCod", "Ordinal", "ValString" }, - values: new object[] { "ShapeList", 2, "Trapezoidal" }); - - migrationBuilder.InsertData( - table: "utils_gen_value", - columns: new[] { "GenValID", "ClassCod", "Ordinal", "ValString" }, - values: new object[,] - { - { 7, "ShapeList", 3, "Triangular" }, - { 8, "ShapeList", 4, "Arc" }, - { 9, "ShapeList", 5, "FullArc" }, - { 10, "ShapeList", 6, "SemiFullArc" }, - { 11, "ShapeList", 7, "SemiArc" }, - { 12, "ShapeList", 8, "Circular" } - }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DeleteData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 7); - - migrationBuilder.DeleteData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 8); - - migrationBuilder.DeleteData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 9); - - migrationBuilder.DeleteData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 10); - - migrationBuilder.DeleteData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 11); - - migrationBuilder.DeleteData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 12); - - migrationBuilder.DeleteData( - table: "utils_gen_class", - keyColumn: "ClassCod", - keyValue: "ShapeList"); - - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 1, - columns: new[] { "Inserted", "Modified", "ValidUntil" }, - values: new object[] { new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(535), new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(537), new DateTime(2025, 11, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(530) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 1, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(636), new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(638) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 2, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(651), new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(652) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 3, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(662), new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(664) }); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 1, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(180)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 2, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(236)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 3, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(240)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 4, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(243)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 5, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(247)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 6, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(250)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 7, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(254)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 8, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(257)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 9, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(318)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 10, - column: "DtCreate", - value: new DateTime(2025, 10, 2, 17, 4, 30, 175, DateTimeKind.Local).AddTicks(322)); - - migrationBuilder.InsertData( - table: "utils_gen_class", - columns: new[] { "ClassCod", "Description" }, - values: new object[] { "WoodMat", "Elenco Materiali Legno" }); - - migrationBuilder.UpdateData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 1, - columns: new[] { "ClassCod", "ValString" }, - values: new object[] { "WoodMat", "Pine" }); - - migrationBuilder.UpdateData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 2, - columns: new[] { "ClassCod", "ValString" }, - values: new object[] { "WoodMat", "Maple" }); - - migrationBuilder.UpdateData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 3, - columns: new[] { "Ordinal", "ValString" }, - values: new object[] { 1, "Legno" }); - - migrationBuilder.UpdateData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 4, - columns: new[] { "Ordinal", "ValString" }, - values: new object[] { 2, "Bianco" }); - - migrationBuilder.UpdateData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 5, - columns: new[] { "ClassCod", "Ordinal", "ValString" }, - values: new object[] { "WoodCol", 3, "Rosso" }); - - migrationBuilder.UpdateData( - table: "utils_gen_value", - keyColumn: "GenValID", - keyValue: 6, - columns: new[] { "ClassCod", "Ordinal", "ValString" }, - values: new object[] { "WoodCol", 4, "Nero" }); - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251003164608_AddShapeList.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20251003164814_InitDb.Designer.cs similarity index 98% rename from EgwCoreLib.Lux.Data/Migrations/20251003164608_AddShapeList.Designer.cs rename to EgwCoreLib.Lux.Data/Migrations/20251003164814_InitDb.Designer.cs index 5982a8ec..59235f23 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20251003164608_AddShapeList.Designer.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20251003164814_InitDb.Designer.cs @@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace EgwCoreLib.Lux.Data.Migrations { [DbContext(typeof(DataLayerContext))] - [Migration("20251003164608_AddShapeList")] - partial class AddShapeList + [Migration("20251003164814_InitDb")] + partial class InitDb { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -1093,13 +1093,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta per tre serramenti", Discount = 0.0, Envir = 1, - Inserted = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6885), - Modified = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6886), + Inserted = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5340), + Modified = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5341), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6881) + ValidUntil = new DateTime(2025, 11, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5337) }); }); @@ -1194,11 +1194,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 950.0, Envir = 1, - Inserted = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7005), + Inserted = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5462), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7010), + Modified = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5464), Note = "Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000001", @@ -1218,11 +1218,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 200.0, Envir = 1, - Inserted = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7035), + Inserted = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5476), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7037), + Modified = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5478), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000002", @@ -1242,11 +1242,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 250.0, Envir = 1, - Inserted = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7047), + Inserted = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5489), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7049), + Modified = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5491), Note = "Installazione serramento", OfferID = 1, OfferRowUID = "OFF250000000003", @@ -1429,8 +1429,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 1, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6573), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6630), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5013), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5075), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1442,8 +1442,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6633), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6635), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5079), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5080), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -1455,8 +1455,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6637), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6638), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5082), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5083), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1468,8 +1468,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6641), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6642), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5085), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5087), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1481,8 +1481,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6644), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6646), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5089), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5090), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -1494,8 +1494,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6648), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6650), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5092), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5094), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1507,8 +1507,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6652), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6653), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5096), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5097), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -1520,8 +1520,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6656), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6657), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5099), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5101), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1533,8 +1533,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6659), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6661), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5103), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5104), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1546,8 +1546,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6663), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6664), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5106), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5108), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, diff --git a/EgwCoreLib.Lux.Data/Migrations/20250929142415_InitDb.cs b/EgwCoreLib.Lux.Data/Migrations/20251003164814_InitDb.cs similarity index 89% rename from EgwCoreLib.Lux.Data/Migrations/20250929142415_InitDb.cs rename to EgwCoreLib.Lux.Data/Migrations/20251003164814_InitDb.cs index e89697d0..9966b67a 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20250929142415_InitDb.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20251003164814_InitDb.cs @@ -17,6 +17,60 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.AlterDatabase() .Annotation("MySql:CharSet", "utf8mb4"); + migrationBuilder.CreateTable( + name: "conf_glass", + columns: table => new + { + GlassID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Code = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Thickness = table.Column(type: "double", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_conf_glass", x => x.GlassID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "conf_profile", + columns: table => new + { + ProfileID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Code = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Thickness = table.Column(type: "double", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_conf_profile", x => x.ProfileID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "conf_wood", + columns: table => new + { + WoodID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Code = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "longtext", nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"), + Type = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_conf_wood", x => x.WoodID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + migrationBuilder.CreateTable( name: "cost_driver", columns: table => new @@ -732,6 +786,37 @@ namespace EgwCoreLib.Lux.Data.Migrations }) .Annotation("MySql:CharSet", "utf8mb4"); + migrationBuilder.InsertData( + table: "conf_glass", + columns: new[] { "GlassID", "Code", "Description", "Thickness" }, + values: new object[,] + { + { 1, "0001", "Vetro BE 2S 4/12/4", 20.0 }, + { 2, "0002", "Vetro BE 3S 4/12/4/12/4", 36.0 }, + { 3, "0003", "Vetro BE 3S 4/16/4/16/4", 44.0 } + }); + + migrationBuilder.InsertData( + table: "conf_profile", + columns: new[] { "ProfileID", "Code", "Description", "Thickness" }, + values: new object[,] + { + { 1, "0001", "Profilo 32", 32.0 }, + { 2, "0002", "Profilo 48", 48.0 }, + { 3, "0003", "Profilo 58", 58.0 } + }); + + migrationBuilder.InsertData( + table: "conf_wood", + columns: new[] { "WoodID", "Code", "Description", "Type" }, + values: new object[,] + { + { 1, "0001", "Abete", 1 }, + { 2, "0002", "Acero", 1 }, + { 3, "0003", "Pino", 2 }, + { 4, "0004", "Tek", 3 } + }); + migrationBuilder.InsertData( table: "cost_driver", columns: new[] { "CostDriverID", "Descript", "Name", "Unit" }, @@ -810,8 +895,8 @@ namespace EgwCoreLib.Lux.Data.Migrations columns: new[] { "ClassCod", "Description" }, values: new object[,] { - { "WoodCol", "Elenco Colori Legno" }, - { "WoodMat", "Elenco Materiali Legno" } + { "ShapeList", "Elenco Shape Gestite" }, + { "WoodCol", "Elenco Colori Legno" } }); migrationBuilder.InsertData( @@ -885,19 +970,25 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.InsertData( table: "sales_offer", columns: new[] { "OfferID", "CustomerID", "DealerID", "Description", "Discount", "Envir", "Inserted", "Modified", "OffertState", "RefNum", "RefRev", "RefYear", "ValidUntil" }, - values: new object[] { 1, 2, 2, "Offerta per tre serramenti", 0.0, 1, new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4738), new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4739), 0, 1, 1, 2024, new DateTime(2025, 10, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4735) }); + values: new object[] { 1, 2, 2, "Offerta per tre serramenti", 0.0, 1, new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5340), new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5341), 0, 1, 1, 2024, new DateTime(2025, 11, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5337) }); migrationBuilder.InsertData( table: "utils_gen_value", columns: new[] { "GenValID", "ClassCod", "Ordinal", "ValString" }, values: new object[,] { - { 1, "WoodMat", 1, "Pine" }, - { 2, "WoodMat", 2, "Maple" }, - { 3, "WoodCol", 1, "Legno" }, - { 4, "WoodCol", 2, "Bianco" }, - { 5, "WoodCol", 3, "Rosso" }, - { 6, "WoodCol", 4, "Nero" } + { 1, "WoodCol", 1, "Legno" }, + { 2, "WoodCol", 2, "Bianco" }, + { 3, "WoodCol", 3, "Rosso" }, + { 4, "WoodCol", 4, "Nero" }, + { 5, "ShapeList", 1, "Rectangular" }, + { 6, "ShapeList", 2, "Trapezoidal" }, + { 7, "ShapeList", 3, "Triangular" }, + { 8, "ShapeList", 4, "Arc" }, + { 9, "ShapeList", 5, "FullArc" }, + { 10, "ShapeList", 6, "SemiFullArc" }, + { 11, "ShapeList", 7, "SemiArc" }, + { 12, "ShapeList", 8, "Circular" } }); migrationBuilder.InsertData( @@ -905,9 +996,9 @@ namespace EgwCoreLib.Lux.Data.Migrations columns: new[] { "OfferRowID", "AwaitBom", "AwaitPrice", "BomCost", "BomOk", "BomPrice", "Envir", "Inserted", "ItemBOM", "ItemOk", "ItemSteps", "Modified", "Note", "OfferID", "OfferRowUID", "Qty", "RowNum", "SellingItemID", "SerStruct", "StepCost", "StepPrice" }, values: new object[,] { - { 1, false, false, 900.0, true, 950.0, 1, new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4848), "", true, "{}", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4850), "Finestra anta singola 2025", 1, "OFF250000000001", 3.0, 1, 1, "{}", 0.0, 0.0 }, - { 2, false, false, 160.0, true, 200.0, 1, new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4862), "", true, "{}", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4864), "Persiana per Finestra anta singola 2025", 1, "OFF250000000002", 3.0, 2, 2, "{}", 0.0, 0.0 }, - { 3, false, false, 200.0, true, 250.0, 1, new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4874), "", true, "{}", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4875), "Installazione serramento", 1, "OFF250000000003", 3.0, 3, 3, "{}", 0.0, 0.0 } + { 1, false, false, 900.0, true, 950.0, 1, new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5462), "", true, "{}", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5464), "Finestra anta singola 2025", 1, "OFF250000000001", 3.0, 1, 1, "{}", 0.0, 0.0 }, + { 2, false, false, 160.0, true, 200.0, 1, new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5476), "", true, "{}", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5478), "Persiana per Finestra anta singola 2025", 1, "OFF250000000002", 3.0, 2, 2, "{}", 0.0, 0.0 }, + { 3, false, false, 200.0, true, 250.0, 1, new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5489), "", true, "{}", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5491), "Installazione serramento", 1, "OFF250000000003", 3.0, 3, 3, "{}", 0.0, 0.0 } }); migrationBuilder.InsertData( @@ -944,16 +1035,16 @@ namespace EgwCoreLib.Lux.Data.Migrations columns: new[] { "StockMovID", "CodDoc", "DtCreate", "MovCod", "Note", "QtyRec", "StockStatusId", "UnitVal", "UserId" }, values: new object[,] { - { 1, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4416), "CAR", "DEMO", 5.0, 1, 0.0, "samuele.locatelli@egalware.com" }, - { 2, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4475), "CAR", "DEMO", 8.0, 2, 0.0, "samuele.locatelli@egalware.com" }, - { 3, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4479), "CAR", "DEMO", 5.0, 3, 0.0, "samuele.locatelli@egalware.com" }, - { 4, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4482), "CAR", "DEMO", 1.0, 4, 0.0, "samuele.locatelli@egalware.com" }, - { 5, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4486), "CAR", "DEMO", 10.0, 5, 0.0, "samuele.locatelli@egalware.com" }, - { 6, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4490), "CAR", "DEMO", 1.0, 6, 0.0, "samuele.locatelli@egalware.com" }, - { 7, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4493), "CAR", "DEMO", 50.0, 7, 0.0, "samuele.locatelli@egalware.com" }, - { 8, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4497), "CAR", "DEMO", 1.0, 8, 0.0, "samuele.locatelli@egalware.com" }, - { 9, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4501), "CAR", "DEMO", 1.0, 9, 0.0, "samuele.locatelli@egalware.com" }, - { 10, "", new DateTime(2025, 9, 29, 16, 24, 15, 212, DateTimeKind.Local).AddTicks(4504), "CAR", "DEMO", 1.0, 10, 0.0, "samuele.locatelli@egalware.com" } + { 1, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5013), "CAR", "DEMO", 5.0, 1, 0.0, "samuele.locatelli@egalware.com" }, + { 2, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5079), "CAR", "DEMO", 8.0, 2, 0.0, "samuele.locatelli@egalware.com" }, + { 3, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5082), "CAR", "DEMO", 5.0, 3, 0.0, "samuele.locatelli@egalware.com" }, + { 4, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5085), "CAR", "DEMO", 1.0, 4, 0.0, "samuele.locatelli@egalware.com" }, + { 5, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5089), "CAR", "DEMO", 10.0, 5, 0.0, "samuele.locatelli@egalware.com" }, + { 6, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5092), "CAR", "DEMO", 1.0, 6, 0.0, "samuele.locatelli@egalware.com" }, + { 7, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5096), "CAR", "DEMO", 50.0, 7, 0.0, "samuele.locatelli@egalware.com" }, + { 8, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5099), "CAR", "DEMO", 1.0, 8, 0.0, "samuele.locatelli@egalware.com" }, + { 9, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5103), "CAR", "DEMO", 1.0, 9, 0.0, "samuele.locatelli@egalware.com" }, + { 10, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5106), "CAR", "DEMO", 1.0, 10, 0.0, "samuele.locatelli@egalware.com" } }); migrationBuilder.InsertData( @@ -1105,6 +1196,15 @@ namespace EgwCoreLib.Lux.Data.Migrations /// protected override void Down(MigrationBuilder migrationBuilder) { + migrationBuilder.DropTable( + name: "conf_glass"); + + migrationBuilder.DropTable( + name: "conf_profile"); + + migrationBuilder.DropTable( + name: "conf_wood"); + migrationBuilder.DropTable( name: "item_supplier"); diff --git a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs index 31a0ff1f..142914be 100644 --- a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs +++ b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs @@ -1090,13 +1090,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta per tre serramenti", Discount = 0.0, Envir = 1, - Inserted = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6885), - Modified = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6886), + Inserted = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5340), + Modified = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5341), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6881) + ValidUntil = new DateTime(2025, 11, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5337) }); }); @@ -1191,11 +1191,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 950.0, Envir = 1, - Inserted = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7005), + Inserted = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5462), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7010), + Modified = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5464), Note = "Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000001", @@ -1215,11 +1215,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 200.0, Envir = 1, - Inserted = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7035), + Inserted = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5476), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7037), + Modified = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5478), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000000002", @@ -1239,11 +1239,11 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 250.0, Envir = 1, - Inserted = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7047), + Inserted = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5489), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(7049), + Modified = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5491), Note = "Installazione serramento", OfferID = 1, OfferRowUID = "OFF250000000003", @@ -1426,8 +1426,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 1, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6573), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6630), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5013), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5075), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1439,8 +1439,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6633), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6635), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5079), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5080), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -1452,8 +1452,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6637), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6638), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5082), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5083), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1465,8 +1465,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6641), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6642), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5085), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5087), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1478,8 +1478,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6644), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6646), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5089), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5090), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -1491,8 +1491,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6648), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6650), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5092), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5094), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1504,8 +1504,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6652), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6653), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5096), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5097), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -1517,8 +1517,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6656), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6657), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5099), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5101), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1530,8 +1530,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6659), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6661), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5103), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5104), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1543,8 +1543,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6663), - DtMod = new DateTime(2025, 10, 3, 18, 46, 8, 197, DateTimeKind.Local).AddTicks(6664), + DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5106), + DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5108), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, From ffd71408ee5ac429213b93de35d70ce65ac595c5 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 3 Oct 2025 19:11:17 +0200 Subject: [PATCH 47/65] Update componenti, nuovi test da completare --- Lux.API/Lux.API.csproj | 4 ++-- Lux.UI.Client/Lux.UI.Client.csproj | 4 ++-- Lux.UI/Components/Compo/OfferRowMan.razor | 4 ++-- Lux.UI/Lux.UI.csproj | 6 +++--- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 2be66653..f224943f 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2510.0318 + 0.9.2510.0319 @@ -65,7 +65,7 @@ - + diff --git a/Lux.UI.Client/Lux.UI.Client.csproj b/Lux.UI.Client/Lux.UI.Client.csproj index b453c04a..b2ca5ab6 100644 --- a/Lux.UI.Client/Lux.UI.Client.csproj +++ b/Lux.UI.Client/Lux.UI.Client.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index 6dab660c..0f3752ec 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -4,11 +4,11 @@

        @EditRecord.OfferRowUID

        enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2510.0318 + 0.9.2510.0319 @@ -17,8 +17,8 @@ - - + + diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 4d2ccef0..3d7a768b 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

        Versione: 0.9.2510.0318

        +

        Versione: 0.9.2510.0319


        Note di rilascio:
        • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 3a428e3d..f38026c1 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2510.0318 +0.9.2510.0319 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 44f6491e..ef8e4b60 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2510.0318 + 0.9.2510.0319 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From bca1562060d3a14fe0f365b292d3e4a940889d18 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Sat, 4 Oct 2025 10:45:43 +0200 Subject: [PATCH 48/65] Aggiunto DB init x altri environments (BEAM, WALL, CABINET) da completare --- EgwCoreLib.Lux.Data/DataLayerContext.cs | 1 + .../DbModel/Config/EnvirParamModel.cs | 26 + .../DbModel/Sales/OfferRowModel.cs | 29 +- .../20251004083638_AddNewOffers.Designer.cs | 2768 +++++++++++++++++ .../Migrations/20251004083638_AddNewOffers.cs | 396 +++ .../DataLayerContextModelSnapshot.cs | 390 ++- EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs | 51 +- Lux.API/Lux.API.csproj | 2 +- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 5 +- Lux.UI/Lux.UI.csproj | 3 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 13 files changed, 3616 insertions(+), 61 deletions(-) create mode 100644 EgwCoreLib.Lux.Data/DbModel/Config/EnvirParamModel.cs create mode 100644 EgwCoreLib.Lux.Data/Migrations/20251004083638_AddNewOffers.Designer.cs create mode 100644 EgwCoreLib.Lux.Data/Migrations/20251004083638_AddNewOffers.cs diff --git a/EgwCoreLib.Lux.Data/DataLayerContext.cs b/EgwCoreLib.Lux.Data/DataLayerContext.cs index 87568d8b..eba62547 100644 --- a/EgwCoreLib.Lux.Data/DataLayerContext.cs +++ b/EgwCoreLib.Lux.Data/DataLayerContext.cs @@ -50,6 +50,7 @@ namespace EgwCoreLib.Lux.Data public virtual DbSet DbSetConfGlass { get; set; } public virtual DbSet DbSetConfProfile { get; set; } public virtual DbSet DbSetConfWood { get; set; } + public virtual DbSet DbSetEnvirPar { get; set; } public virtual DbSet DbSetItemGroup { get; set; } public virtual DbSet DbSetItem { get; set; } diff --git a/EgwCoreLib.Lux.Data/DbModel/Config/EnvirParamModel.cs b/EgwCoreLib.Lux.Data/DbModel/Config/EnvirParamModel.cs new file mode 100644 index 00000000..aef7f46a --- /dev/null +++ b/EgwCoreLib.Lux.Data/DbModel/Config/EnvirParamModel.cs @@ -0,0 +1,26 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace EgwCoreLib.Lux.Data.DbModel.Config +{ + /// + /// Risorsa tipo di Glass x EF + /// + [Table("conf_envir")] + public class EnvirParamModel + { + /// + /// ID / Environment definito + /// + [Key] + public EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS EnvirID { get; set; } = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW; + + /// + /// Chiave da impiegare nel dizionario x inviare la struttura serializzata da calcolare + /// + public string SerStrucKey { get; set; } = "SerStr"; + } +} diff --git a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs index 1c9e9cdf..16f4963d 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs @@ -1,19 +1,12 @@ using EgwCoreLib.Lux.Data.DbModel.Items; -using Microsoft.EntityFrameworkCore; -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; -using static EgwCoreLib.Lux.Core.Enums; +// +// This is here so CodeMaid doesn't reorganize this document +// namespace EgwCoreLib.Lux.Data.DbModel.Sales { - // - // This is here so CodeMaid doesn't reorganize this document - // [Table("sales_offer_row")] public class OfferRowModel @@ -134,6 +127,22 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales ///
      public string SerStruct { get; set; } = ""; + /// + /// Nomi risorsa file associato alla riga offerta (es per BTL) + /// URI come risorsa dentro folder offerta/riga-offerta/guid + /// + public string FileResource { get; set; } = ""; + + /// + /// Nomi file originale associato alla riga offerta (es per BTL) + /// + public string FileName { get; set; } = ""; + + /// + /// Dimensione del file (per visualizzazione rapida) + /// + public long FileSize { get; set; } = 0; + /// /// Elenco StepDTO (Fasi) per la stima tempi / costi /// potrebbe contenere anche altre info accessorie x definire dati logistico/gestionali diff --git a/EgwCoreLib.Lux.Data/Migrations/20251004083638_AddNewOffers.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20251004083638_AddNewOffers.Designer.cs new file mode 100644 index 00000000..19ca533d --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20251004083638_AddNewOffers.Designer.cs @@ -0,0 +1,2768 @@ +// +using System; +using EgwCoreLib.Lux.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace EgwCoreLib.Lux.Data.Migrations +{ + [DbContext(typeof(DataLayerContext))] + [Migration("20251004083638_AddNewOffers")] + partial class AddNewOffers + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.17") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.EnvirParamModel", b => + { + b.Property("EnvirID") + .HasColumnType("int"); + + b.Property("SerStrucKey") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("EnvirID"); + + b.ToTable("conf_envir"); + + b.HasData( + new + { + EnvirID = 1, + SerStrucKey = "Jwd" + }, + new + { + EnvirID = 2, + SerStrucKey = "Btl" + }, + new + { + EnvirID = 4, + SerStrucKey = "Btl" + }, + new + { + EnvirID = 3, + SerStrucKey = "Btl" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.GlassModel", b => + { + b.Property("GlassID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GlassID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Thickness") + .HasColumnType("double"); + + b.HasKey("GlassID"); + + b.ToTable("conf_glass"); + + b.HasData( + new + { + GlassID = 1, + Code = "0001", + Description = "Vetro BE 2S 4/12/4", + Thickness = 20.0 + }, + new + { + GlassID = 2, + Code = "0002", + Description = "Vetro BE 3S 4/12/4/12/4", + Thickness = 36.0 + }, + new + { + GlassID = 3, + Code = "0003", + Description = "Vetro BE 3S 4/16/4/16/4", + Thickness = 44.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.ProfileModel", b => + { + b.Property("ProfileID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProfileID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Thickness") + .HasColumnType("double"); + + b.HasKey("ProfileID"); + + b.ToTable("conf_profile"); + + b.HasData( + new + { + ProfileID = 1, + Code = "0001", + Description = "Profilo 32", + Thickness = 32.0 + }, + new + { + ProfileID = 2, + Code = "0002", + Description = "Profilo 48", + Thickness = 48.0 + }, + new + { + ProfileID = 3, + Code = "0003", + Description = "Profilo 58", + Thickness = 58.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.WoodModel", b => + { + b.Property("WoodID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("WoodID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("WoodID"); + + b.ToTable("conf_wood"); + + b.HasData( + new + { + WoodID = 1, + Code = "0001", + Description = "Abete", + Type = 1 + }, + new + { + WoodID = 2, + Code = "0002", + Description = "Acero", + Type = 1 + }, + new + { + WoodID = 3, + Code = "0003", + Description = "Pino", + Type = 2 + }, + new + { + WoodID = 4, + Code = "0004", + Description = "Tek", + Type = 3 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", b => + { + b.Property("CostDriverID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CostDriverID")); + + b.Property("Descript") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Unit") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CostDriverID"); + + b.ToTable("cost_driver"); + + b.HasData( + new + { + CostDriverID = 1, + Descript = "Ore lavorate per step/fase", + Name = "WorkHour", + Unit = "h" + }, + new + { + CostDriverID = 2, + Descript = "Metri prodotti per step/fase", + Name = "Meter", + Unit = "m" + }, + new + { + CostDriverID = 3, + Descript = "Numero unità prodotte (lavorate) per step/fase", + Name = "Unit", + Unit = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.Property("ResourceID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); + + b.Property("CostDriverBudget") + .HasColumnType("decimal(65,30)"); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("EBTPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("FixedCost") + .HasColumnType("decimal(65,30)"); + + b.Property("LaborCost") + .HasColumnType("decimal(65,30)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OverHeadCost") + .HasColumnType("decimal(65,30)"); + + b.Property("OverHeadPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("PriceMargin") + .HasColumnType("decimal(65,30)"); + + b.Property("VariableCost") + .HasColumnType("decimal(65,30)"); + + b.HasKey("ResourceID"); + + b.HasIndex("CostDriverID"); + + b.ToTable("cost_resource"); + + b.HasData( + new + { + ResourceID = 1, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 12000m, + LaborCost = 30m, + Name = "Sezionatrice", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 2, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 100000m, + LaborCost = 40m, + Name = "Linea SAOMAD WoodPecker Just 3500", + OverHeadCost = 15000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 30000m + }, + new + { + ResourceID = 3, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 35m, + Name = "Linea Pantografo", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 4, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 30m, + Name = "Stazione Verniciatura", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 5, + CostDriverBudget = 220m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 6000m, + LaborCost = 30m, + Name = "Verniciatura Manuale", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 2000m + }, + new + { + ResourceID = 6, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 500m, + LaborCost = 30m, + Name = "Montaggio Manuale", + OverHeadCost = 500m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 500m + }, + new + { + ResourceID = 7, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 0m, + LaborCost = 40m, + Name = "Installatore", + OverHeadCost = 0m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 3000m + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", b => + { + b.Property("CodGroup") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CodGroup"); + + b.ToTable("item_group"); + + b.HasData( + new + { + CodGroup = "WindowTrunk", + Description = "Barre legno per lavorazione" + }, + new + { + CodGroup = "WindowGlass", + Description = "Vetri serramento" + }, + new + { + CodGroup = "WindowVarnish", + Description = "Vernici per legno" + }, + new + { + CodGroup = "WindowHardware", + Description = "Ferramenta serramento" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.Property("ItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); + + b.Property("CodGroup") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemIDParent") + .HasColumnType("int"); + + b.Property("ItemType") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("QtyMax") + .HasColumnType("double"); + + b.Property("QtyMin") + .HasColumnType("double"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ItemID"); + + b.HasIndex("CodGroup"); + + b.ToTable("item_item"); + + b.HasData( + new + { + ItemID = 1, + CodGroup = "WindowTrunk", + Cost = 20.0, + Description = "BARRA-60x80 generica", + ExtItemCode = "", + IsService = false, + ItemCode = 1001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.29999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "BARR.001", + UM = "#" + }, + new + { + ItemID = 2, + CodGroup = "WindowTrunk", + Cost = 16.5, + Description = "Barra 60x80, lunghezza 12m", + ExtItemCode = "BARRA-60x80x12000", + IsService = false, + ItemCode = 1002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.12000", + UM = "#" + }, + new + { + ItemID = 3, + CodGroup = "WindowTrunk", + Cost = 17.5, + Description = "Barra 60x80, lunghezza 8m", + ExtItemCode = "BARRA-60x80x8000", + IsService = false, + ItemCode = 1003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.22, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.8000", + UM = "#" + }, + new + { + ItemID = 4, + CodGroup = "WindowTrunk", + Cost = 15.5, + Description = "Barra 60x80, lunghezza 16m", + ExtItemCode = "BARRA-60x80x16000", + IsService = false, + ItemCode = 1004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.16000", + UM = "#" + }, + new + { + ItemID = 5, + CodGroup = "WindowGlass", + Cost = 300.0, + Description = "Vetro triplo, basso indice termico, 800x1000", + ExtItemCode = "VETRO-3L-THERMO-800x1000", + IsService = false, + ItemCode = 2001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3T.800.1000", + UM = "m2" + }, + new + { + ItemID = 6, + CodGroup = "WindowGlass", + Cost = 200.0, + Description = "Vetro doppio, 800x1000", + ExtItemCode = "VETRO-2L-800x1000", + IsService = false, + ItemCode = 2002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.14999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V2.800.1000", + UM = "m2" + }, + new + { + ItemID = 7, + CodGroup = "WindowGlass", + Cost = 250.0, + Description = "Vetro triplo, 800x1000", + ExtItemCode = "VETRO-3L-800x1000", + IsService = false, + ItemCode = 2003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.17999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3.800.1000", + UM = "m2" + }, + new + { + ItemID = 8, + CodGroup = "WindowVarnish", + Cost = 20.0, + Description = "Vernice trasparente", + ExtItemCode = "VERN-TRASP", + IsService = false, + ItemCode = 3001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "VT.STD", + UM = "l" + }, + new + { + ItemID = 9, + CodGroup = "WindowHardware", + Cost = 65.0, + Description = "Kit standard completo AGB tipo 001", + ExtItemCode = "KIT-001", + IsService = false, + ItemCode = 5001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-KIT-001", + UM = "#" + }, + new + { + ItemID = 10, + CodGroup = "WindowHardware", + Cost = 10.0, + Description = "Cerniera AGB tipo 001", + ExtItemCode = "CERN-001", + IsService = false, + ItemCode = 5002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-CERN-001", + UM = "#" + }, + new + { + ItemID = 11, + CodGroup = "WindowHardware", + Cost = 15.0, + Description = "Serratura AGB tipo 001", + ExtItemCode = "SERR-001", + IsService = false, + ItemCode = 5003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-SERR-001", + UM = "#" + }, + new + { + ItemID = 12, + CodGroup = "WindowHardware", + Cost = 25.0, + Description = "Maniglia AGB tipo 001", + ExtItemCode = "MAN-001", + IsService = false, + ItemCode = 5004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-MAN-001", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.Property("SellingItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SellingItemID"); + + b.HasIndex("JobID"); + + b.ToTable("item_selling_item"); + + b.HasData( + new + { + SellingItemID = 1, + Cost = 820.0, + Description = "Finestra anta Singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 2, + Margin = 0.20000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 2, + Cost = 150.0, + Description = "Persiana anta singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.10000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 3, + Cost = 200.0, + Description = "Installazione", + ExtItemCode = "", + IsService = true, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 4, + Cost = 1000.0, + Description = "Trave lamellare", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 3, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 5, + Cost = 500.0, + Description = "Cabinet", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 4, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 6, + Cost = 2000.0, + Description = "Parete", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 5, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SupplierModel", b => + { + b.Property("SupplierID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SupplierID"); + + b.ToTable("item_supplier"); + + b.HasData( + new + { + SupplierID = 1, + CompanyName = "Company One", + FirstName = "Supplier A", + LastName = "Egalware", + VAT = "7294857103879254" + }, + new + { + SupplierID = 2, + CompanyName = "Company Two", + FirstName = "Supplier B", + LastName = "User", + VAT = "7294857103879254" + }, + new + { + SupplierID = 3, + CompanyName = "Company Two", + FirstName = "Supplier C", + LastName = "User Test", + VAT = "7294857103879254" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", b => + { + b.Property("ProductionBatchID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DueDate") + .HasColumnType("datetime(6)"); + + b.HasKey("ProductionBatchID"); + + b.ToTable("production_batch"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.Property("ProdItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("OrderRowID") + .HasColumnType("int"); + + b.Property("ProductionBatchID") + .HasColumnType("int"); + + b.HasKey("ProdItemID"); + + b.HasIndex("OrderRowID"); + + b.HasIndex("ProductionBatchID"); + + b.ToTable("production_item"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.Property("ProdItemStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProdItemID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.Property("WorkTime") + .HasColumnType("double"); + + b.HasKey("ProdItemStepID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ProdItemID"); + + b.HasIndex("ResourceID"); + + b.ToTable("production_item_step"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", b => + { + b.Property("CustomerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CustomerID"); + + b.ToTable("sales_customer"); + + b.HasData( + new + { + CustomerID = 1, + CompanyName = "", + FirstName = "Customer A", + LastName = "Egalware", + VAT = "1234567890123456" + }, + new + { + CustomerID = 2, + CompanyName = "", + FirstName = "Customer B", + LastName = "User", + VAT = "1234567890123456" + }, + new + { + CustomerID = 3, + CompanyName = "", + FirstName = "Customer C", + LastName = "User Test", + VAT = "1234567890123456" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", b => + { + b.Property("DealerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("DealerID"); + + b.ToTable("sales_dealer"); + + b.HasData( + new + { + DealerID = 1, + CompanyName = "Company First", + FirstName = "Dealer A", + LastName = "Egalware", + VAT = "9587362514671527" + }, + new + { + DealerID = 2, + CompanyName = "Company First", + FirstName = "Dealer B", + LastName = "User", + VAT = "9587362514671527" + }, + new + { + DealerID = 3, + CompanyName = "Company Second", + FirstName = "Dealer C", + LastName = "User Test", + VAT = "9587362514671527" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Property("OfferID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Discount") + .HasColumnType("double"); + + b.Property("Envir") + .HasColumnType("int"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OfferID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.ToTable("sales_offer"); + + b.HasData( + new + { + OfferID = 1, + CustomerID = 2, + DealerID = 2, + Description = "Offerta per tre serramenti", + Discount = 0.0, + Envir = 1, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2171), + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2172), + OffertState = 0, + RefNum = 1, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2167) + }, + new + { + OfferID = 2, + CustomerID = 2, + DealerID = 2, + Description = "Offerta BEAM", + Discount = 0.0, + Envir = 2, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2179), + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2181), + OffertState = 0, + RefNum = 2, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2178) + }, + new + { + OfferID = 3, + CustomerID = 2, + DealerID = 2, + Description = "Offerta Cabinet", + Discount = 0.0, + Envir = 4, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2186), + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2187), + OffertState = 0, + RefNum = 3, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2184) + }, + new + { + OfferID = 4, + CustomerID = 2, + DealerID = 2, + Description = "Offerta Wall", + Discount = 0.0, + Envir = 3, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2192), + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2193), + OffertState = 0, + RefNum = 4, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2191) + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferRowModel", b => + { + b.Property("OfferRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); + + b.Property("AwaitBom") + .HasColumnType("tinyint(1)"); + + b.Property("AwaitPrice") + .HasColumnType("tinyint(1)"); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomOk") + .HasColumnType("tinyint(1)"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Envir") + .HasColumnType("int"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FileResource") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemBOM") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemOk") + .HasColumnType("tinyint(1)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OfferRowUID") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OfferRowID"); + + b.HasIndex("OfferID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_offer_row"); + + b.HasData( + new + { + OfferRowID = 1, + AwaitBom = false, + AwaitPrice = false, + BomCost = 900.0, + BomOk = true, + BomPrice = 950.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2339), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2341), + Note = "Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000010001", + Qty = 3.0, + RowNum = 1, + SellingItemID = 1, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 2, + AwaitBom = false, + AwaitPrice = false, + BomCost = 160.0, + BomOk = true, + BomPrice = 200.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2355), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2357), + Note = "Persiana per Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000010002", + Qty = 3.0, + RowNum = 2, + SellingItemID = 2, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 3, + AwaitBom = false, + AwaitPrice = false, + BomCost = 200.0, + BomOk = true, + BomPrice = 250.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2369), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2371), + Note = "Installazione serramento", + OfferID = 1, + OfferRowUID = "OFF250000010003", + Qty = 3.0, + RowNum = 3, + SellingItemID = 3, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 4, + AwaitBom = false, + AwaitPrice = false, + BomCost = 800.0, + BomOk = true, + BomPrice = 1150.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2403), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2405), + Note = "Demo file 01", + OfferID = 2, + OfferRowUID = "OFF250000020001", + Qty = 10.0, + RowNum = 1, + SellingItemID = 4, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 5, + AwaitBom = false, + AwaitPrice = false, + BomCost = 600.0, + BomOk = true, + BomPrice = 950.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2417), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2419), + Note = "Demo file 02", + OfferID = 2, + OfferRowUID = "OFF250000020002", + Qty = 4.0, + RowNum = 1, + SellingItemID = 4, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 6, + AwaitBom = false, + AwaitPrice = false, + BomCost = 200.0, + BomOk = true, + BomPrice = 250.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2450), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2451), + Note = "Demo file 01", + OfferID = 2, + OfferRowUID = "OFF250000030001", + Qty = 4.0, + RowNum = 1, + SellingItemID = 5, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 7, + AwaitBom = false, + AwaitPrice = false, + BomCost = 50.0, + BomOk = true, + BomPrice = 80.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2464), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2465), + Note = "Demo file 02", + OfferID = 2, + OfferRowUID = "OFF250000030002", + Qty = 12.0, + RowNum = 1, + SellingItemID = 5, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 8, + AwaitBom = false, + AwaitPrice = false, + BomCost = 800.0, + BomOk = true, + BomPrice = 1150.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2497), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2499), + Note = "Demo file 01", + OfferID = 4, + OfferRowUID = "OFF250000040001", + Qty = 6.0, + RowNum = 1, + SellingItemID = 6, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 9, + AwaitBom = false, + AwaitPrice = false, + BomCost = 600.0, + BomOk = true, + BomPrice = 950.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2511), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2513), + Note = "Demo file 02", + OfferID = 4, + OfferRowUID = "OFF250000040002", + Qty = 4.0, + RowNum = 1, + SellingItemID = 6, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", b => + { + b.Property("OrderID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OrderID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.HasIndex("OfferID"); + + b.ToTable("sales_order"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.Property("OrderRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OrderID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OrderRowID"); + + b.HasIndex("OrderID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_order_row"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.Property("StockMovID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); + + b.Property("CodDoc") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DtCreate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("DtMod") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); + + b.Property("MovCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyRec") + .HasColumnType("double"); + + b.Property("StockStatusId") + .HasColumnType("int"); + + b.Property("UnitVal") + .HasColumnType("double"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("StockMovID"); + + b.HasIndex("MovCod"); + + b.HasIndex("StockStatusId"); + + b.ToTable("stock_mov"); + + b.HasData( + new + { + StockMovID = 1, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1829), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1893), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 1, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 2, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1898), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1899), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 8.0, + StockStatusId = 2, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 3, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1902), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1903), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 3, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 4, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1905), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1906), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 4, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 5, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1908), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1910), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 10.0, + StockStatusId = 5, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 6, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1912), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1913), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 6, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 7, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1915), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1917), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 50.0, + StockStatusId = 7, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 8, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1919), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1920), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 8, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 9, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1922), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1924), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 9, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 10, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1926), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1927), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 10, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.Property("StockStatusId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("IsRemn") + .HasColumnType("tinyint(1)"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("Location") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyAvail") + .HasColumnType("double"); + + b.HasKey("StockStatusId"); + + b.HasIndex("ItemID"); + + b.ToTable("stock_status"); + + b.HasData( + new + { + StockStatusId = 1, + IsDeleted = false, + IsRemn = false, + ItemID = 1, + Location = "B001-001-003", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 2, + IsDeleted = false, + IsRemn = false, + ItemID = 2, + Location = "B001-001-002", + QtyAvail = 8.0 + }, + new + { + StockStatusId = 3, + IsDeleted = false, + IsRemn = false, + ItemID = 3, + Location = "B001-001-001", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 4, + IsDeleted = false, + IsRemn = false, + ItemID = 4, + Location = "V002-001-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 5, + IsDeleted = false, + IsRemn = false, + ItemID = 5, + Location = "V001-001-002", + QtyAvail = 10.0 + }, + new + { + StockStatusId = 6, + IsDeleted = false, + IsRemn = false, + ItemID = 6, + Location = "V001-001-003", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 7, + IsDeleted = false, + IsRemn = false, + ItemID = 8, + Location = "V001-001-003", + QtyAvail = 50.0 + }, + new + { + StockStatusId = 8, + IsDeleted = false, + IsRemn = false, + ItemID = 11, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 9, + IsDeleted = false, + IsRemn = false, + ItemID = 9, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 10, + IsDeleted = false, + IsRemn = false, + ItemID = 10, + Location = "S001-001-001", + QtyAvail = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => + { + b.Property("JobID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("JobID"); + + b.ToTable("task_job"); + + b.HasData( + new + { + JobID = 1, + Description = "Rivendita / servizi" + }, + new + { + JobID = 2, + Description = "Serramento Completo Legno su linea Saomad e installatore interno" + }, + new + { + JobID = 3, + Description = "Realizzazione Trave" + }, + new + { + JobID = 4, + Description = "Realizzazione Cabinet" + }, + new + { + JobID = 5, + Description = "Realizzazione Parete" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.Property("JobStepItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("JobStepID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.HasKey("JobStepItemID"); + + b.HasIndex("ItemID"); + + b.HasIndex("JobStepID"); + + b.ToTable("task_job_step_item"); + + b.HasData( + new + { + JobStepItemID = 1, + Description = "Grezzo legno abete", + Index = 1, + ItemID = 1, + JobStepID = 1, + Qty = 1.0 + }, + new + { + JobStepItemID = 2, + Description = "Vernice trasparente standard 1L", + Index = 2, + ItemID = 8, + JobStepID = 3, + Qty = 0.10000000000000001 + }, + new + { + JobStepItemID = 3, + Description = "Ferramenta AGB - rif. AGFD.00000.00000", + Index = 3, + ItemID = 9, + JobStepID = 4, + Qty = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.Property("JobStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProductivityRate") + .HasColumnType("decimal(65,30)"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.HasKey("JobStepID"); + + b.HasIndex("CostDriverID"); + + b.HasIndex("JobID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ResourceID"); + + b.ToTable("task_job_step"); + + b.HasData( + new + { + JobStepID = 1, + CostDriverID = 3, + Description = "", + Index = 1, + JobID = 2, + PhaseID = 1, + ProductivityRate = 1m, + ResourceID = 1 + }, + new + { + JobStepID = 2, + CostDriverID = 2, + Description = "", + Index = 2, + JobID = 2, + PhaseID = 2, + ProductivityRate = 1m, + ResourceID = 2 + }, + new + { + JobStepID = 3, + CostDriverID = 3, + Description = "", + Index = 3, + JobID = 2, + PhaseID = 3, + ProductivityRate = 1m, + ResourceID = 4 + }, + new + { + JobStepID = 4, + CostDriverID = 3, + Description = "", + Index = 4, + JobID = 2, + PhaseID = 4, + ProductivityRate = 1m, + ResourceID = 6 + }, + new + { + JobStepID = 5, + CostDriverID = 3, + Description = "", + Index = 5, + JobID = 2, + PhaseID = 6, + ProductivityRate = 1m, + ResourceID = 7 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", b => + { + b.Property("PhaseID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("PhaseID"); + + b.ToTable("task_phase"); + + b.HasData( + new + { + PhaseID = 1, + Description = "Taglio tronchetti" + }, + new + { + PhaseID = 2, + Description = "Lavorazione pezzi serramento" + }, + new + { + PhaseID = 3, + Description = "Verniciatura" + }, + new + { + PhaseID = 4, + Description = "Assemblaggio completo" + }, + new + { + PhaseID = 5, + Description = "Assemblaggio Ferramenta" + }, + new + { + PhaseID = 6, + Description = "Installazione e posa in opera" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.CounterModel", b => + { + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("CountName") + .HasColumnType("varchar(255)"); + + b.Property("Counter") + .HasColumnType("int"); + + b.HasKey("RefYear", "CountName"); + + b.ToTable("utils_counter"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Property("ClassCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ClassCod"); + + b.ToTable("utils_gen_class"); + + b.HasData( + new + { + ClassCod = "ShapeList", + Description = "Elenco Shape Gestite" + }, + new + { + ClassCod = "WoodCol", + Description = "Elenco Colori Legno" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.Property("GenValID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); + + b.Property("ClassCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Ordinal") + .HasColumnType("int"); + + b.Property("ValString") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("GenValID"); + + b.HasIndex("ClassCod"); + + b.ToTable("utils_gen_value"); + + b.HasData( + new + { + GenValID = 1, + ClassCod = "WoodCol", + Ordinal = 1, + ValString = "Legno" + }, + new + { + GenValID = 2, + ClassCod = "WoodCol", + Ordinal = 2, + ValString = "Bianco" + }, + new + { + GenValID = 3, + ClassCod = "WoodCol", + Ordinal = 3, + ValString = "Rosso" + }, + new + { + GenValID = 4, + ClassCod = "WoodCol", + Ordinal = 4, + ValString = "Nero" + }, + new + { + GenValID = 5, + ClassCod = "ShapeList", + Ordinal = 1, + ValString = "Rectangular" + }, + new + { + GenValID = 6, + ClassCod = "ShapeList", + Ordinal = 2, + ValString = "Trapezoidal" + }, + new + { + GenValID = 7, + ClassCod = "ShapeList", + Ordinal = 3, + ValString = "Triangular" + }, + new + { + GenValID = 8, + ClassCod = "ShapeList", + Ordinal = 4, + ValString = "Arc" + }, + new + { + GenValID = 9, + ClassCod = "ShapeList", + Ordinal = 5, + ValString = "FullArc" + }, + new + { + GenValID = 10, + ClassCod = "ShapeList", + Ordinal = 6, + ValString = "SemiFullArc" + }, + new + { + GenValID = 11, + ClassCod = "ShapeList", + Ordinal = 7, + ValString = "SemiArc" + }, + new + { + GenValID = 12, + ClassCod = "ShapeList", + Ordinal = 8, + ValString = "Circular" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", b => + { + b.Property("MovCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("MovCod"); + + b.ToTable("utils_mov_type"); + + b.HasData( + new + { + MovCod = "CAR", + Description = "Carico a magazzino" + }, + new + { + MovCod = "MOV", + Description = "Movimento interno (spostamento)" + }, + new + { + MovCod = "ND", + Description = "Non Definito" + }, + new + { + MovCod = "OFOR", + Description = "Ordine Fornitore" + }, + new + { + MovCod = "RETT", + Description = "Rettifica magazzino" + }, + new + { + MovCod = "SCAR", + Description = "Scarico da magazzino" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", b => + { + b.Property("TagID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("TagID"); + + b.ToTable("utils_tags"); + + b.HasData( + new + { + TagID = 1, + Description = "Tag 01" + }, + new + { + TagID = 2, + Description = "Tag 02" + }, + new + { + TagID = 3, + Description = "Tag 03" + }, + new + { + TagID = 4, + Description = "Tag 04" + }, + new + { + TagID = 5, + Description = "Tag 05" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", "ItemGroupNav") + .WithMany() + .HasForeignKey("CodGroup") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemGroupNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") + .WithMany() + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("JobNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", "OrderRowNav") + .WithMany() + .HasForeignKey("OrderRowID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", "ProductionBatchNav") + .WithMany() + .HasForeignKey("ProductionBatchID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderRowNav"); + + b.Navigation("ProductionBatchNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", "ProdItemNav") + .WithMany() + .HasForeignKey("ProdItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("PhaseNav"); + + b.Navigation("ProdItemNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", 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.OfferRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany("OfferRowNav") + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OfferNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", 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.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany() + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CustomerNav"); + + b.Navigation("DealerNav"); + + b.Navigation("OfferNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", "OrderNav") + .WithMany() + .HasForeignKey("OrderID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", "MovTypeNav") + .WithMany() + .HasForeignKey("MovCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", "StockStatusNav") + .WithMany() + .HasForeignKey("StockStatusId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("MovTypeNav"); + + b.Navigation("StockStatusNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", "JobStepNav") + .WithMany() + .HasForeignKey("JobStepID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") + .WithMany("JobStepNav") + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + + b.Navigation("JobNav"); + + b.Navigation("PhaseNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", "GenClassNav") + .WithMany("GenValNav") + .HasForeignKey("ClassCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GenClassNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Navigation("OfferRowNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => + { + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Navigation("GenValNav"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251004083638_AddNewOffers.cs b/EgwCoreLib.Lux.Data/Migrations/20251004083638_AddNewOffers.cs new file mode 100644 index 00000000..6229ca8d --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20251004083638_AddNewOffers.cs @@ -0,0 +1,396 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional + +namespace EgwCoreLib.Lux.Data.Migrations +{ + /// + public partial class AddNewOffers : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "FileName", + table: "sales_offer_row", + type: "longtext", + nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "FileResource", + table: "sales_offer_row", + type: "longtext", + nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "FileSize", + table: "sales_offer_row", + type: "bigint", + nullable: false, + defaultValue: 0L); + + migrationBuilder.CreateTable( + name: "conf_envir", + columns: table => new + { + EnvirID = table.Column(type: "int", nullable: false), + SerStrucKey = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_conf_envir", x => x.EnvirID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.InsertData( + table: "conf_envir", + columns: new[] { "EnvirID", "SerStrucKey" }, + values: new object[,] + { + { 1, "Jwd" }, + { 2, "Btl" }, + { 3, "Btl" }, + { 4, "Btl" } + }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2171), new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2172), new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2167) }); + + migrationBuilder.InsertData( + table: "sales_offer", + columns: new[] { "OfferID", "CustomerID", "DealerID", "Description", "Discount", "Envir", "Inserted", "Modified", "OffertState", "RefNum", "RefRev", "RefYear", "ValidUntil" }, + values: new object[,] + { + { 2, 2, 2, "Offerta BEAM", 0.0, 2, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2179), new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2181), 0, 2, 1, 2024, new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2178) }, + { 3, 2, 2, "Offerta Cabinet", 0.0, 4, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2186), new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2187), 0, 3, 1, 2024, new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2184) }, + { 4, 2, 2, "Offerta Wall", 0.0, 3, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2192), new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2193), 0, 4, 1, 2024, new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2191) } + }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "FileName", "FileResource", "FileSize", "Inserted", "Modified", "OfferRowUID" }, + values: new object[] { "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2339), new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2341), "OFF250000010001" }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "FileName", "FileResource", "FileSize", "Inserted", "Modified", "OfferRowUID" }, + values: new object[] { "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2355), new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2357), "OFF250000010002" }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "FileName", "FileResource", "FileSize", "Inserted", "Modified", "OfferRowUID" }, + values: new object[] { "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2369), new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2371), "OFF250000010003" }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1829)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1898)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1902)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1905)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1908)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1912)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1915)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1919)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1922)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1926)); + + migrationBuilder.InsertData( + table: "task_job", + columns: new[] { "JobID", "Description" }, + values: new object[,] + { + { 3, "Realizzazione Trave" }, + { 4, "Realizzazione Cabinet" }, + { 5, "Realizzazione Parete" } + }); + + migrationBuilder.InsertData( + table: "item_selling_item", + columns: new[] { "SellingItemID", "Cost", "Description", "ExtItemCode", "IsService", "ItemCode", "ItemSteps", "JobID", "Margin", "SerStruct", "SupplCode", "UM" }, + values: new object[,] + { + { 4, 1000.0, "Trave lamellare", "", false, 0, "", 3, 0.29999999999999999, "", "", "#" }, + { 5, 500.0, "Cabinet", "", false, 0, "", 4, 0.29999999999999999, "", "", "#" }, + { 6, 2000.0, "Parete", "", false, 0, "", 5, 0.29999999999999999, "", "", "#" } + }); + + migrationBuilder.InsertData( + table: "sales_offer_row", + columns: new[] { "OfferRowID", "AwaitBom", "AwaitPrice", "BomCost", "BomOk", "BomPrice", "Envir", "FileName", "FileResource", "FileSize", "Inserted", "ItemBOM", "ItemOk", "ItemSteps", "Modified", "Note", "OfferID", "OfferRowUID", "Qty", "RowNum", "SellingItemID", "SerStruct", "StepCost", "StepPrice" }, + values: new object[,] + { + { 4, false, false, 800.0, true, 1150.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2403), "", true, "{}", new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2405), "Demo file 01", 2, "OFF250000020001", 10.0, 1, 4, "", 0.0, 0.0 }, + { 5, false, false, 600.0, true, 950.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2417), "", true, "{}", new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2419), "Demo file 02", 2, "OFF250000020002", 4.0, 1, 4, "", 0.0, 0.0 }, + { 6, false, false, 200.0, true, 250.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2450), "", true, "{}", new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2451), "Demo file 01", 2, "OFF250000030001", 4.0, 1, 5, "", 0.0, 0.0 }, + { 7, false, false, 50.0, true, 80.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2464), "", true, "{}", new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2465), "Demo file 02", 2, "OFF250000030002", 12.0, 1, 5, "", 0.0, 0.0 }, + { 8, false, false, 800.0, true, 1150.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2497), "", true, "{}", new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2499), "Demo file 01", 4, "OFF250000040001", 6.0, 1, 6, "", 0.0, 0.0 }, + { 9, false, false, 600.0, true, 950.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2511), "", true, "{}", new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2513), "Demo file 02", 4, "OFF250000040002", 4.0, 1, 6, "", 0.0, 0.0 } + }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "conf_envir"); + + migrationBuilder.DeleteData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 3); + + migrationBuilder.DeleteData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 4); + + migrationBuilder.DeleteData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 5); + + migrationBuilder.DeleteData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 6); + + migrationBuilder.DeleteData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 7); + + migrationBuilder.DeleteData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 8); + + migrationBuilder.DeleteData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 9); + + migrationBuilder.DeleteData( + table: "item_selling_item", + keyColumn: "SellingItemID", + keyValue: 4); + + migrationBuilder.DeleteData( + table: "item_selling_item", + keyColumn: "SellingItemID", + keyValue: 5); + + migrationBuilder.DeleteData( + table: "item_selling_item", + keyColumn: "SellingItemID", + keyValue: 6); + + migrationBuilder.DeleteData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 2); + + migrationBuilder.DeleteData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 4); + + migrationBuilder.DeleteData( + table: "task_job", + keyColumn: "JobID", + keyValue: 3); + + migrationBuilder.DeleteData( + table: "task_job", + keyColumn: "JobID", + keyValue: 4); + + migrationBuilder.DeleteData( + table: "task_job", + keyColumn: "JobID", + keyValue: 5); + + migrationBuilder.DropColumn( + name: "FileName", + table: "sales_offer_row"); + + migrationBuilder.DropColumn( + name: "FileResource", + table: "sales_offer_row"); + + migrationBuilder.DropColumn( + name: "FileSize", + table: "sales_offer_row"); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5340), new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5341), new DateTime(2025, 11, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5337) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "Inserted", "Modified", "OfferRowUID" }, + values: new object[] { new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5462), new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5464), "OFF250000000001" }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "Inserted", "Modified", "OfferRowUID" }, + values: new object[] { new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5476), new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5478), "OFF250000000002" }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "Inserted", "Modified", "OfferRowUID" }, + values: new object[] { new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5489), new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5491), "OFF250000000003" }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5013)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5079)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5082)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5085)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5089)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5092)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5096)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5099)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5103)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5106)); + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs index 142914be..3d2aa38c 100644 --- a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs +++ b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs @@ -22,6 +22,42 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.EnvirParamModel", b => + { + b.Property("EnvirID") + .HasColumnType("int"); + + b.Property("SerStrucKey") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("EnvirID"); + + b.ToTable("conf_envir"); + + b.HasData( + new + { + EnvirID = 1, + SerStrucKey = "Jwd" + }, + new + { + EnvirID = 2, + SerStrucKey = "Btl" + }, + new + { + EnvirID = 4, + SerStrucKey = "Btl" + }, + new + { + EnvirID = 3, + SerStrucKey = "Btl" + }); + }); + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.GlassModel", b => { b.Property("GlassID") @@ -757,6 +793,51 @@ namespace EgwCoreLib.Lux.Data.Migrations SerStruct = "", SupplCode = "", UM = "#" + }, + new + { + SellingItemID = 4, + Cost = 1000.0, + Description = "Trave lamellare", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 3, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 5, + Cost = 500.0, + Description = "Cabinet", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 4, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 6, + Cost = 2000.0, + Description = "Parete", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 5, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" }); }); @@ -1090,13 +1171,61 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta per tre serramenti", Discount = 0.0, Envir = 1, - Inserted = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5340), - Modified = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5341), + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2171), + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2172), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5337) + ValidUntil = new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2167) + }, + new + { + OfferID = 2, + CustomerID = 2, + DealerID = 2, + Description = "Offerta BEAM", + Discount = 0.0, + Envir = 2, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2179), + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2181), + OffertState = 0, + RefNum = 2, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2178) + }, + new + { + OfferID = 3, + CustomerID = 2, + DealerID = 2, + Description = "Offerta Cabinet", + Discount = 0.0, + Envir = 4, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2186), + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2187), + OffertState = 0, + RefNum = 3, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2184) + }, + new + { + OfferID = 4, + CustomerID = 2, + DealerID = 2, + Description = "Offerta Wall", + Discount = 0.0, + Envir = 3, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2192), + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2193), + OffertState = 0, + RefNum = 4, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2191) }); }); @@ -1126,6 +1255,17 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("Envir") .HasColumnType("int"); + b.Property("FileName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FileResource") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FileSize") + .HasColumnType("bigint"); + b.Property("Inserted") .HasColumnType("datetime(6)"); @@ -1191,14 +1331,17 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 950.0, Envir = 1, - Inserted = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5462), + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2339), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5464), + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2341), Note = "Finestra anta singola 2025", OfferID = 1, - OfferRowUID = "OFF250000000001", + OfferRowUID = "OFF250000010001", Qty = 3.0, RowNum = 1, SellingItemID = 1, @@ -1215,14 +1358,17 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 200.0, Envir = 1, - Inserted = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5476), + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2355), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5478), + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2357), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, - OfferRowUID = "OFF250000000002", + OfferRowUID = "OFF250000010002", Qty = 3.0, RowNum = 2, SellingItemID = 2, @@ -1239,20 +1385,185 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 250.0, Envir = 1, - Inserted = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5489), + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2369), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5491), + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2371), Note = "Installazione serramento", OfferID = 1, - OfferRowUID = "OFF250000000003", + OfferRowUID = "OFF250000010003", Qty = 3.0, RowNum = 3, SellingItemID = 3, SerStruct = "{}", StepCost = 0.0, StepPrice = 0.0 + }, + new + { + OfferRowID = 4, + AwaitBom = false, + AwaitPrice = false, + BomCost = 800.0, + BomOk = true, + BomPrice = 1150.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2403), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2405), + Note = "Demo file 01", + OfferID = 2, + OfferRowUID = "OFF250000020001", + Qty = 10.0, + RowNum = 1, + SellingItemID = 4, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 5, + AwaitBom = false, + AwaitPrice = false, + BomCost = 600.0, + BomOk = true, + BomPrice = 950.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2417), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2419), + Note = "Demo file 02", + OfferID = 2, + OfferRowUID = "OFF250000020002", + Qty = 4.0, + RowNum = 1, + SellingItemID = 4, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 6, + AwaitBom = false, + AwaitPrice = false, + BomCost = 200.0, + BomOk = true, + BomPrice = 250.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2450), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2451), + Note = "Demo file 01", + OfferID = 2, + OfferRowUID = "OFF250000030001", + Qty = 4.0, + RowNum = 1, + SellingItemID = 5, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 7, + AwaitBom = false, + AwaitPrice = false, + BomCost = 50.0, + BomOk = true, + BomPrice = 80.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2464), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2465), + Note = "Demo file 02", + OfferID = 2, + OfferRowUID = "OFF250000030002", + Qty = 12.0, + RowNum = 1, + SellingItemID = 5, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 8, + AwaitBom = false, + AwaitPrice = false, + BomCost = 800.0, + BomOk = true, + BomPrice = 1150.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2497), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2499), + Note = "Demo file 01", + OfferID = 4, + OfferRowUID = "OFF250000040001", + Qty = 6.0, + RowNum = 1, + SellingItemID = 6, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 9, + AwaitBom = false, + AwaitPrice = false, + BomCost = 600.0, + BomOk = true, + BomPrice = 950.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2511), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2513), + Note = "Demo file 02", + OfferID = 4, + OfferRowUID = "OFF250000040002", + Qty = 4.0, + RowNum = 1, + SellingItemID = 6, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 }); }); @@ -1426,8 +1737,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 1, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5013), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5075), + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1829), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1893), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1439,8 +1750,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5079), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5080), + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1898), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1899), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -1452,8 +1763,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5082), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5083), + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1902), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1903), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1465,8 +1776,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5085), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5087), + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1905), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1906), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1478,8 +1789,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5089), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5090), + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1908), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1910), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -1491,8 +1802,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5092), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5094), + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1912), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1913), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1504,8 +1815,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5096), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5097), + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1915), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1917), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -1517,8 +1828,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5099), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5101), + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1919), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1920), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1530,8 +1841,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5103), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5104), + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1922), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1924), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1543,8 +1854,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5106), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5108), + DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1926), + DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1927), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1703,6 +2014,21 @@ namespace EgwCoreLib.Lux.Data.Migrations { JobID = 2, Description = "Serramento Completo Legno su linea Saomad e installatore interno" + }, + new + { + JobID = 3, + Description = "Realizzazione Trave" + }, + new + { + JobID = 4, + Description = "Realizzazione Cabinet" + }, + new + { + JobID = 5, + Description = "Realizzazione Parete" }); }); diff --git a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs index 77cd14bc..0abd7c3a 100644 --- a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs +++ b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs @@ -35,6 +35,14 @@ namespace EgwCoreLib.Lux.Data new GenClassModel { ClassCod = "WoodCol", Description = "Elenco Colori Legno" } ); + // init dati x invio serializzazioni da environment + modelBuilder.Entity().HasData( + new EnvirParamModel { EnvirID = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, SerStrucKey = "Jwd" }, + new EnvirParamModel { EnvirID = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM, SerStrucKey = "Btl" }, + new EnvirParamModel { EnvirID = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.CABINET, SerStrucKey = "Btl" }, + new EnvirParamModel { EnvirID = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WALL, SerStrucKey = "Btl" } + ); + modelBuilder.Entity().HasData( new GenValueModel { GenValID = 1, Ordinal = 1, ClassCod = "WoodCol", ValString = "Legno" }, new GenValueModel { GenValID = 2, Ordinal = 2, ClassCod = "WoodCol", ValString = "Bianco" }, @@ -207,10 +215,10 @@ namespace EgwCoreLib.Lux.Data // inizializzazione cicli di lavoro modelBuilder.Entity().HasData( new JobModel { JobID = 1, Description = "Rivendita / servizi" }, - new JobModel { JobID = 2, Description = "Serramento Completo Legno su linea Saomad e installatore interno" }//, - //new JobModel { JobID = 2, Name = "Serramento Completo Legno/Alluminio" }, - //new JobModel { JobID = 3, Name = "Persiana Legno" }, - //new JobModel { JobID = 4, Name = "restauro Persiana Esistente" } + new JobModel { JobID = 2, Description = "Serramento Completo Legno su linea Saomad e installatore interno" }, + new JobModel { JobID = 3, Description= "Realizzazione Trave" }, + new JobModel { JobID = 4, Description= "Realizzazione Cabinet" }, + new JobModel { JobID = 5, Description= "Realizzazione Parete" } ); // init righe ciclo (fasi di ciclo) @@ -241,24 +249,47 @@ namespace EgwCoreLib.Lux.Data modelBuilder.Entity().HasData( new SellingItemModel { SellingItemID = 1, IsService = false, Description = "Finestra anta Singola", Cost = 820, Margin = 0.2, JobID = 2 }, new SellingItemModel { SellingItemID = 2, IsService = false, Description = "Persiana anta singola", Cost = 150, Margin = 0.1, JobID = 1 }, - new SellingItemModel { SellingItemID = 3, IsService = true, Description = "Installazione", Cost = 200, Margin = 0.3, JobID = 1 } + new SellingItemModel { SellingItemID = 3, IsService = true, Description = "Installazione", Cost = 200, Margin = 0.3, JobID = 1 }, + new SellingItemModel { SellingItemID = 4, IsService = false, Description = "Trave lamellare", Cost = 1000, Margin = 0.3, JobID = 3 }, + new SellingItemModel { SellingItemID = 5, IsService = false, Description = "Cabinet", Cost = 500, Margin = 0.3, JobID = 4 }, + new SellingItemModel { SellingItemID = 6, IsService = false, Description = "Parete", Cost = 2000, Margin = 0.3, JobID = 5 } ); // inizializzazione dei valori di default x Offer modelBuilder.Entity().HasData( - new OfferModel { OfferID = 1, RefYear = 2024, RefNum = 1, RefRev = 1, Description = "Offerta per tre serramenti", CustomerID = 2, DealerID = 2 } + new OfferModel { OfferID = 1, RefYear = 2024, RefNum = 1, RefRev = 1, Description = "Offerta per tre serramenti", CustomerID = 2, DealerID = 2, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW }, + new OfferModel { OfferID = 2, RefYear = 2024, RefNum = 2, RefRev = 1, Description = "Offerta BEAM", CustomerID = 2, DealerID = 2, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM }, + new OfferModel { OfferID = 3, RefYear = 2024, RefNum = 3, RefRev = 1, Description = "Offerta Cabinet", CustomerID = 2, DealerID = 2, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.CABINET }, + new OfferModel { OfferID = 4, RefYear = 2024, RefNum = 4, RefRev = 1, Description = "Offerta Wall", CustomerID = 2, DealerID = 2, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WALL } //new OfferModel { OfferID = 2, RefYear = 2025, RefNum = 2, RefRev = 1, Name = "Offerta per un serramento + installazione", CustomerID = 1, DealerID = 1 }, //new OfferModel { OfferID = 3, RefYear = 2025, RefNum = 3, RefRev = 1, Name = "Offerta per tre serramenti", CustomerID = 2, DealerID = 1 }, //new OfferModel { OfferID = 5, RefYear = 2025, RefNum = 4, RefRev = 2, Name = "Offerta per cinque serramenti + installazione", CustomerID = 3, DealerID = 2 } ); - // inizializzazione dei valori di default x OfferRow + // inizializzazione dei valori di default x Offerta 1 = WINDOW modelBuilder.Entity().HasData( - new OfferRowModel { OfferRowID = 1, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}0000000001", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 900, BomPrice = 950, SellingItemID = 1, Qty = 3, RowNum = 1, SerStruct = "{}", Note = "Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true }, - new OfferRowModel { OfferRowID = 2, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}0000000002", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 160, BomPrice = 200, SellingItemID = 2, Qty = 3, RowNum = 2, SerStruct = "{}", Note = "Persiana per Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true }, - new OfferRowModel { OfferRowID = 3, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}0000000003", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 200, BomPrice = 250, SellingItemID = 3, Qty = 3, RowNum = 3, SerStruct = "{}", Note = "Installazione serramento", ItemSteps = "{}", BomOk = true, ItemOk = true } + new OfferRowModel { OfferRowID = 1, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}{1:000000}{1:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 900, BomPrice = 950, SellingItemID = 1, Qty = 3, RowNum = 1, SerStruct = "{}", Note = "Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true }, + new OfferRowModel { OfferRowID = 2, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}{1:000000}{2:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 160, BomPrice = 200, SellingItemID = 2, Qty = 3, RowNum = 2, SerStruct = "{}", Note = "Persiana per Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true }, + new OfferRowModel { OfferRowID = 3, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}{1:000000}{3:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 200, BomPrice = 250, SellingItemID = 3, Qty = 3, RowNum = 3, SerStruct = "{}", Note = "Installazione serramento", ItemSteps = "{}", BomOk = true, ItemOk = true } ); + // inizializzazione dei valori di default x Offerta 2 = BEAM + modelBuilder.Entity().HasData( + new OfferRowModel { OfferRowID = 4, OfferID = 2, OfferRowUID = $"OFF{DateTime.Today:yy}{2:000000}{1:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 800, BomPrice = 1150, SellingItemID = 4, Qty = 10, RowNum = 1, SerStruct = "", Note = "Demo file 01", ItemSteps = "{}", BomOk = true, ItemOk = true }, + new OfferRowModel { OfferRowID = 5, OfferID = 2, OfferRowUID = $"OFF{DateTime.Today:yy}{2:000000}{2:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 600, BomPrice = 950, SellingItemID = 4, Qty = 4, RowNum = 1, SerStruct = "", Note = "Demo file 02", ItemSteps = "{}", BomOk = true, ItemOk = true } + ); + + // inizializzazione dei valori di default x Offerta 3 = CABINET + modelBuilder.Entity().HasData( + new OfferRowModel { OfferRowID = 6, OfferID = 2, OfferRowUID = $"OFF{DateTime.Today:yy}{3:000000}{1:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 200, BomPrice = 250, SellingItemID = 5, Qty = 4, RowNum = 1, SerStruct = "", Note = "Demo file 01", ItemSteps = "{}", BomOk = true, ItemOk = true }, + new OfferRowModel { OfferRowID = 7, OfferID = 2, OfferRowUID = $"OFF{DateTime.Today:yy}{3:000000}{2:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 50, BomPrice = 80, SellingItemID = 5, Qty = 12, RowNum = 1, SerStruct = "", Note = "Demo file 02", ItemSteps = "{}", BomOk = true, ItemOk = true } + ); + + // inizializzazione dei valori di default x Offerta 4 = WALL + modelBuilder.Entity().HasData( + new OfferRowModel { OfferRowID = 8, OfferID = 4, OfferRowUID = $"OFF{DateTime.Today:yy}{4:000000}{1:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 800, BomPrice = 1150, SellingItemID = 6, Qty = 6, RowNum = 1, SerStruct = "", Note = "Demo file 01", ItemSteps = "{}", BomOk = true, ItemOk = true }, + new OfferRowModel { OfferRowID = 9, OfferID = 4, OfferRowUID = $"OFF{DateTime.Today:yy}{4:000000}{2:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 600, BomPrice = 950, SellingItemID = 6, Qty = 4, RowNum = 1, SerStruct = "", Note = "Demo file 02", ItemSteps = "{}", BomOk = true, ItemOk = true } + ); } diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index f224943f..3bc00bc7 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2510.0319 + 0.9.2510.0410 diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index 4b486e2c..aed5d7e5 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -134,10 +134,7 @@ namespace Lux.UI.Components.Compo currRec.AwaitBom = true; currRec.AwaitPrice = true; await DLService.OffertUpdateAwaitState(currRec.OfferRowID, true, true); -#if false - // devo recuperare da ofgferta environment corrente, ora cablato - EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS currEnv = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW; -#endif + // preparo la domanda serializzata Dictionary DictExec = new Dictionary(); // cablata la BOM diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index d687e2c6..7300810f 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2510.0319 + 0.9.2510.0410 @@ -44,6 +44,7 @@ + diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 3d7a768b..e78e075c 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

      Versione: 0.9.2510.0319

      +

      Versione: 0.9.2510.0410


      Note di rilascio:
      • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index f38026c1..12b052e8 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2510.0319 +0.9.2510.0410 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index ef8e4b60..d73d803a 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2510.0319 + 0.9.2510.0410 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From a31ea8172acd8f0c3bd9deefde60be4f0f0dcfd8 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Sat, 4 Oct 2025 10:58:15 +0200 Subject: [PATCH 49/65] Correzioni init migration --- ...> 20251004085645_AddNewOffers.Designer.cs} | 108 +++++++++--------- ...fers.cs => 20251004085645_AddNewOffers.cs} | 62 +++++----- .../DataLayerContextModelSnapshot.cs | 106 ++++++++--------- EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs | 9 +- 4 files changed, 144 insertions(+), 141 deletions(-) rename EgwCoreLib.Lux.Data/Migrations/{20251004083638_AddNewOffers.Designer.cs => 20251004085645_AddNewOffers.Designer.cs} (96%) rename EgwCoreLib.Lux.Data/Migrations/{20251004083638_AddNewOffers.cs => 20251004085645_AddNewOffers.cs} (75%) diff --git a/EgwCoreLib.Lux.Data/Migrations/20251004083638_AddNewOffers.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20251004085645_AddNewOffers.Designer.cs similarity index 96% rename from EgwCoreLib.Lux.Data/Migrations/20251004083638_AddNewOffers.Designer.cs rename to EgwCoreLib.Lux.Data/Migrations/20251004085645_AddNewOffers.Designer.cs index 19ca533d..8f0c2e1d 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20251004083638_AddNewOffers.Designer.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20251004085645_AddNewOffers.Designer.cs @@ -12,7 +12,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace EgwCoreLib.Lux.Data.Migrations { [DbContext(typeof(DataLayerContext))] - [Migration("20251004083638_AddNewOffers")] + [Migration("20251004085645_AddNewOffers")] partial class AddNewOffers { /// @@ -1174,13 +1174,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta per tre serramenti", Discount = 0.0, Envir = 1, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2171), - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2172), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3416), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3418), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2167) + ValidUntil = new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3413) }, new { @@ -1190,13 +1190,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta BEAM", Discount = 0.0, Envir = 2, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2179), - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2181), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3424), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3425), OffertState = 0, RefNum = 2, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2178) + ValidUntil = new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3422) }, new { @@ -1206,13 +1206,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta Cabinet", Discount = 0.0, Envir = 4, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2186), - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2187), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3430), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3432), OffertState = 0, RefNum = 3, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2184) + ValidUntil = new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3429) }, new { @@ -1222,13 +1222,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta Wall", Discount = 0.0, Envir = 3, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2192), - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2193), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3437), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3438), OffertState = 0, RefNum = 4, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2191) + ValidUntil = new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3435) }); }); @@ -1337,18 +1337,18 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2339), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3585), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2341), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3587), Note = "Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000010001", Qty = 3.0, RowNum = 1, SellingItemID = 1, - SerStruct = "{}", + SerStruct = "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Pine\",\"ColorMaterial\":\"Black\",\"Glass\":\"4T/16/4T\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"IdGroup\":1,\"AreaList\":[{\"bIsSashVertical\":true,\"SashList\":[{\"nSashId\":1,\"OpeningType\":\"TILTTURN_LEFT\",\"bHasHandle\":true,\"dDimension\":100.0}],\"SashType\":\"NULL\",\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"Hardware\":\"000558\",\"IdGroup\":2,\"AreaList\":[{\"FillType\":\"GLASS\",\"IdGroup\":3,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"SASH\"}],\"AreaType\":\"FRAME\"}]}", StepCost = 0.0, StepPrice = 0.0 }, @@ -1364,11 +1364,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2355), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3601), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2357), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3603), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000010002", @@ -1391,11 +1391,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2369), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3623), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2371), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3624), Note = "Installazione serramento", OfferID = 1, OfferRowUID = "OFF250000010003", @@ -1418,11 +1418,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2403), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3657), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2405), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3659), Note = "Demo file 01", OfferID = 2, OfferRowUID = "OFF250000020001", @@ -1445,11 +1445,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2417), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3671), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2419), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3673), Note = "Demo file 02", OfferID = 2, OfferRowUID = "OFF250000020002", @@ -1472,13 +1472,13 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2450), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3704), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2451), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3705), Note = "Demo file 01", - OfferID = 2, + OfferID = 3, OfferRowUID = "OFF250000030001", Qty = 4.0, RowNum = 1, @@ -1499,13 +1499,13 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2464), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3717), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2465), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3719), Note = "Demo file 02", - OfferID = 2, + OfferID = 3, OfferRowUID = "OFF250000030002", Qty = 12.0, RowNum = 1, @@ -1526,11 +1526,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2497), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3749), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2499), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3751), Note = "Demo file 01", OfferID = 4, OfferRowUID = "OFF250000040001", @@ -1553,11 +1553,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2511), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3763), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2513), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3765), Note = "Demo file 02", OfferID = 4, OfferRowUID = "OFF250000040002", @@ -1740,8 +1740,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 1, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1829), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1893), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3114), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3164), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1753,8 +1753,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1898), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1899), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3167), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3168), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -1766,8 +1766,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1902), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1903), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3170), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3172), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1779,8 +1779,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1905), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1906), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3174), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3175), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1792,8 +1792,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1908), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1910), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3177), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3178), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -1805,8 +1805,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1912), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1913), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3180), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3182), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1818,8 +1818,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1915), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1917), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3184), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3185), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -1831,8 +1831,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1919), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1920), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3187), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3189), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1844,8 +1844,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1922), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1924), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3191), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3192), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1857,8 +1857,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1926), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1927), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3194), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3195), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, diff --git a/EgwCoreLib.Lux.Data/Migrations/20251004083638_AddNewOffers.cs b/EgwCoreLib.Lux.Data/Migrations/20251004085645_AddNewOffers.cs similarity index 75% rename from EgwCoreLib.Lux.Data/Migrations/20251004083638_AddNewOffers.cs rename to EgwCoreLib.Lux.Data/Migrations/20251004085645_AddNewOffers.cs index 6229ca8d..2d078e86 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20251004083638_AddNewOffers.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20251004085645_AddNewOffers.cs @@ -64,108 +64,108 @@ namespace EgwCoreLib.Lux.Data.Migrations keyColumn: "OfferID", keyValue: 1, columns: new[] { "Inserted", "Modified", "ValidUntil" }, - values: new object[] { new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2171), new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2172), new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2167) }); + values: new object[] { new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3416), new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3418), new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3413) }); migrationBuilder.InsertData( table: "sales_offer", columns: new[] { "OfferID", "CustomerID", "DealerID", "Description", "Discount", "Envir", "Inserted", "Modified", "OffertState", "RefNum", "RefRev", "RefYear", "ValidUntil" }, values: new object[,] { - { 2, 2, 2, "Offerta BEAM", 0.0, 2, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2179), new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2181), 0, 2, 1, 2024, new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2178) }, - { 3, 2, 2, "Offerta Cabinet", 0.0, 4, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2186), new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2187), 0, 3, 1, 2024, new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2184) }, - { 4, 2, 2, "Offerta Wall", 0.0, 3, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2192), new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2193), 0, 4, 1, 2024, new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2191) } + { 2, 2, 2, "Offerta BEAM", 0.0, 2, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3424), new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3425), 0, 2, 1, 2024, new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3422) }, + { 3, 2, 2, "Offerta Cabinet", 0.0, 4, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3430), new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3432), 0, 3, 1, 2024, new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3429) }, + { 4, 2, 2, "Offerta Wall", 0.0, 3, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3437), new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3438), 0, 4, 1, 2024, new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3435) } }); migrationBuilder.UpdateData( table: "sales_offer_row", keyColumn: "OfferRowID", keyValue: 1, - columns: new[] { "FileName", "FileResource", "FileSize", "Inserted", "Modified", "OfferRowUID" }, - values: new object[] { "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2339), new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2341), "OFF250000010001" }); + columns: new[] { "FileName", "FileResource", "FileSize", "Inserted", "Modified", "OfferRowUID", "SerStruct" }, + values: new object[] { "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3585), new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3587), "OFF250000010001", "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Pine\",\"ColorMaterial\":\"Black\",\"Glass\":\"4T/16/4T\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"IdGroup\":1,\"AreaList\":[{\"bIsSashVertical\":true,\"SashList\":[{\"nSashId\":1,\"OpeningType\":\"TILTTURN_LEFT\",\"bHasHandle\":true,\"dDimension\":100.0}],\"SashType\":\"NULL\",\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"Hardware\":\"000558\",\"IdGroup\":2,\"AreaList\":[{\"FillType\":\"GLASS\",\"IdGroup\":3,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"SASH\"}],\"AreaType\":\"FRAME\"}]}" }); migrationBuilder.UpdateData( table: "sales_offer_row", keyColumn: "OfferRowID", keyValue: 2, columns: new[] { "FileName", "FileResource", "FileSize", "Inserted", "Modified", "OfferRowUID" }, - values: new object[] { "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2355), new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2357), "OFF250000010002" }); + values: new object[] { "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3601), new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3603), "OFF250000010002" }); migrationBuilder.UpdateData( table: "sales_offer_row", keyColumn: "OfferRowID", keyValue: 3, columns: new[] { "FileName", "FileResource", "FileSize", "Inserted", "Modified", "OfferRowUID" }, - values: new object[] { "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2369), new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2371), "OFF250000010003" }); + values: new object[] { "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3623), new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3624), "OFF250000010003" }); migrationBuilder.UpdateData( table: "stock_mov", keyColumn: "StockMovID", keyValue: 1, column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1829)); + value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3114)); migrationBuilder.UpdateData( table: "stock_mov", keyColumn: "StockMovID", keyValue: 2, column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1898)); + value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3167)); migrationBuilder.UpdateData( table: "stock_mov", keyColumn: "StockMovID", keyValue: 3, column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1902)); + value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3170)); migrationBuilder.UpdateData( table: "stock_mov", keyColumn: "StockMovID", keyValue: 4, column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1905)); + value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3174)); migrationBuilder.UpdateData( table: "stock_mov", keyColumn: "StockMovID", keyValue: 5, column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1908)); + value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3177)); migrationBuilder.UpdateData( table: "stock_mov", keyColumn: "StockMovID", keyValue: 6, column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1912)); + value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3180)); migrationBuilder.UpdateData( table: "stock_mov", keyColumn: "StockMovID", keyValue: 7, column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1915)); + value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3184)); migrationBuilder.UpdateData( table: "stock_mov", keyColumn: "StockMovID", keyValue: 8, column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1919)); + value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3187)); migrationBuilder.UpdateData( table: "stock_mov", keyColumn: "StockMovID", keyValue: 9, column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1922)); + value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3191)); migrationBuilder.UpdateData( table: "stock_mov", keyColumn: "StockMovID", keyValue: 10, column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1926)); + value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3194)); migrationBuilder.InsertData( table: "task_job", @@ -192,12 +192,12 @@ namespace EgwCoreLib.Lux.Data.Migrations columns: new[] { "OfferRowID", "AwaitBom", "AwaitPrice", "BomCost", "BomOk", "BomPrice", "Envir", "FileName", "FileResource", "FileSize", "Inserted", "ItemBOM", "ItemOk", "ItemSteps", "Modified", "Note", "OfferID", "OfferRowUID", "Qty", "RowNum", "SellingItemID", "SerStruct", "StepCost", "StepPrice" }, values: new object[,] { - { 4, false, false, 800.0, true, 1150.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2403), "", true, "{}", new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2405), "Demo file 01", 2, "OFF250000020001", 10.0, 1, 4, "", 0.0, 0.0 }, - { 5, false, false, 600.0, true, 950.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2417), "", true, "{}", new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2419), "Demo file 02", 2, "OFF250000020002", 4.0, 1, 4, "", 0.0, 0.0 }, - { 6, false, false, 200.0, true, 250.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2450), "", true, "{}", new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2451), "Demo file 01", 2, "OFF250000030001", 4.0, 1, 5, "", 0.0, 0.0 }, - { 7, false, false, 50.0, true, 80.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2464), "", true, "{}", new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2465), "Demo file 02", 2, "OFF250000030002", 12.0, 1, 5, "", 0.0, 0.0 }, - { 8, false, false, 800.0, true, 1150.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2497), "", true, "{}", new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2499), "Demo file 01", 4, "OFF250000040001", 6.0, 1, 6, "", 0.0, 0.0 }, - { 9, false, false, 600.0, true, 950.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2511), "", true, "{}", new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2513), "Demo file 02", 4, "OFF250000040002", 4.0, 1, 6, "", 0.0, 0.0 } + { 4, false, false, 800.0, true, 1150.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3657), "", true, "{}", new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3659), "Demo file 01", 2, "OFF250000020001", 10.0, 1, 4, "", 0.0, 0.0 }, + { 5, false, false, 600.0, true, 950.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3671), "", true, "{}", new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3673), "Demo file 02", 2, "OFF250000020002", 4.0, 1, 4, "", 0.0, 0.0 }, + { 6, false, false, 200.0, true, 250.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3704), "", true, "{}", new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3705), "Demo file 01", 3, "OFF250000030001", 4.0, 1, 5, "", 0.0, 0.0 }, + { 7, false, false, 50.0, true, 80.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3717), "", true, "{}", new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3719), "Demo file 02", 3, "OFF250000030002", 12.0, 1, 5, "", 0.0, 0.0 }, + { 8, false, false, 800.0, true, 1150.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3749), "", true, "{}", new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3751), "Demo file 01", 4, "OFF250000040001", 6.0, 1, 6, "", 0.0, 0.0 }, + { 9, false, false, 600.0, true, 950.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3763), "", true, "{}", new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3765), "Demo file 02", 4, "OFF250000040002", 4.0, 1, 6, "", 0.0, 0.0 } }); } @@ -207,11 +207,6 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.DropTable( name: "conf_envir"); - migrationBuilder.DeleteData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 3); - migrationBuilder.DeleteData( table: "sales_offer_row", keyColumn: "OfferRowID", @@ -262,6 +257,11 @@ namespace EgwCoreLib.Lux.Data.Migrations keyColumn: "OfferID", keyValue: 2); + migrationBuilder.DeleteData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 3); + migrationBuilder.DeleteData( table: "sales_offer", keyColumn: "OfferID", @@ -305,8 +305,8 @@ namespace EgwCoreLib.Lux.Data.Migrations table: "sales_offer_row", keyColumn: "OfferRowID", keyValue: 1, - columns: new[] { "Inserted", "Modified", "OfferRowUID" }, - values: new object[] { new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5462), new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5464), "OFF250000000001" }); + columns: new[] { "Inserted", "Modified", "OfferRowUID", "SerStruct" }, + values: new object[] { new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5462), new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5464), "OFF250000000001", "{}" }); migrationBuilder.UpdateData( table: "sales_offer_row", diff --git a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs index 3d2aa38c..8510bc45 100644 --- a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs +++ b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs @@ -1171,13 +1171,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta per tre serramenti", Discount = 0.0, Envir = 1, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2171), - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2172), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3416), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3418), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2167) + ValidUntil = new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3413) }, new { @@ -1187,13 +1187,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta BEAM", Discount = 0.0, Envir = 2, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2179), - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2181), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3424), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3425), OffertState = 0, RefNum = 2, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2178) + ValidUntil = new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3422) }, new { @@ -1203,13 +1203,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta Cabinet", Discount = 0.0, Envir = 4, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2186), - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2187), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3430), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3432), OffertState = 0, RefNum = 3, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2184) + ValidUntil = new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3429) }, new { @@ -1219,13 +1219,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta Wall", Discount = 0.0, Envir = 3, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2192), - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2193), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3437), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3438), OffertState = 0, RefNum = 4, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2191) + ValidUntil = new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3435) }); }); @@ -1334,18 +1334,18 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2339), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3585), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2341), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3587), Note = "Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000010001", Qty = 3.0, RowNum = 1, SellingItemID = 1, - SerStruct = "{}", + SerStruct = "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Pine\",\"ColorMaterial\":\"Black\",\"Glass\":\"4T/16/4T\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"IdGroup\":1,\"AreaList\":[{\"bIsSashVertical\":true,\"SashList\":[{\"nSashId\":1,\"OpeningType\":\"TILTTURN_LEFT\",\"bHasHandle\":true,\"dDimension\":100.0}],\"SashType\":\"NULL\",\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"Hardware\":\"000558\",\"IdGroup\":2,\"AreaList\":[{\"FillType\":\"GLASS\",\"IdGroup\":3,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"SASH\"}],\"AreaType\":\"FRAME\"}]}", StepCost = 0.0, StepPrice = 0.0 }, @@ -1361,11 +1361,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2355), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3601), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2357), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3603), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000010002", @@ -1388,11 +1388,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2369), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3623), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2371), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3624), Note = "Installazione serramento", OfferID = 1, OfferRowUID = "OFF250000010003", @@ -1415,11 +1415,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2403), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3657), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2405), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3659), Note = "Demo file 01", OfferID = 2, OfferRowUID = "OFF250000020001", @@ -1442,11 +1442,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2417), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3671), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2419), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3673), Note = "Demo file 02", OfferID = 2, OfferRowUID = "OFF250000020002", @@ -1469,13 +1469,13 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2450), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3704), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2451), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3705), Note = "Demo file 01", - OfferID = 2, + OfferID = 3, OfferRowUID = "OFF250000030001", Qty = 4.0, RowNum = 1, @@ -1496,13 +1496,13 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2464), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3717), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2465), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3719), Note = "Demo file 02", - OfferID = 2, + OfferID = 3, OfferRowUID = "OFF250000030002", Qty = 12.0, RowNum = 1, @@ -1523,11 +1523,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2497), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3749), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2499), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3751), Note = "Demo file 01", OfferID = 4, OfferRowUID = "OFF250000040001", @@ -1550,11 +1550,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2511), + Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3763), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(2513), + Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3765), Note = "Demo file 02", OfferID = 4, OfferRowUID = "OFF250000040002", @@ -1737,8 +1737,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 1, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1829), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1893), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3114), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3164), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1750,8 +1750,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1898), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1899), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3167), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3168), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -1763,8 +1763,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1902), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1903), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3170), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3172), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1776,8 +1776,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1905), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1906), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3174), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3175), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1789,8 +1789,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1908), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1910), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3177), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3178), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -1802,8 +1802,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1912), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1913), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3180), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3182), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1815,8 +1815,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1915), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1917), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3184), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3185), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -1828,8 +1828,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1919), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1920), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3187), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3189), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1841,8 +1841,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1922), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1924), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3191), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3192), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1854,8 +1854,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1926), - DtMod = new DateTime(2025, 10, 4, 10, 36, 37, 559, DateTimeKind.Local).AddTicks(1927), + DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3194), + DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3195), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, diff --git a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs index 0abd7c3a..d295419b 100644 --- a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs +++ b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs @@ -266,9 +266,12 @@ namespace EgwCoreLib.Lux.Data //new OfferModel { OfferID = 5, RefYear = 2025, RefNum = 4, RefRev = 2, Name = "Offerta per cinque serramenti + installazione", CustomerID = 3, DealerID = 2 } ); + // JWD demo da inglobare + string demoJwd = "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Pine\",\"ColorMaterial\":\"Black\",\"Glass\":\"4T/16/4T\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"IdGroup\":1,\"AreaList\":[{\"bIsSashVertical\":true,\"SashList\":[{\"nSashId\":1,\"OpeningType\":\"TILTTURN_LEFT\",\"bHasHandle\":true,\"dDimension\":100.0}],\"SashType\":\"NULL\",\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"Hardware\":\"000558\",\"IdGroup\":2,\"AreaList\":[{\"FillType\":\"GLASS\",\"IdGroup\":3,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"SASH\"}],\"AreaType\":\"FRAME\"}]}"; + // inizializzazione dei valori di default x Offerta 1 = WINDOW modelBuilder.Entity().HasData( - new OfferRowModel { OfferRowID = 1, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}{1:000000}{1:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 900, BomPrice = 950, SellingItemID = 1, Qty = 3, RowNum = 1, SerStruct = "{}", Note = "Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true }, + new OfferRowModel { OfferRowID = 1, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}{1:000000}{1:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 900, BomPrice = 950, SellingItemID = 1, Qty = 3, RowNum = 1, SerStruct = demoJwd, Note = "Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true }, new OfferRowModel { OfferRowID = 2, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}{1:000000}{2:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 160, BomPrice = 200, SellingItemID = 2, Qty = 3, RowNum = 2, SerStruct = "{}", Note = "Persiana per Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true }, new OfferRowModel { OfferRowID = 3, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}{1:000000}{3:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 200, BomPrice = 250, SellingItemID = 3, Qty = 3, RowNum = 3, SerStruct = "{}", Note = "Installazione serramento", ItemSteps = "{}", BomOk = true, ItemOk = true } ); @@ -281,8 +284,8 @@ namespace EgwCoreLib.Lux.Data // inizializzazione dei valori di default x Offerta 3 = CABINET modelBuilder.Entity().HasData( - new OfferRowModel { OfferRowID = 6, OfferID = 2, OfferRowUID = $"OFF{DateTime.Today:yy}{3:000000}{1:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 200, BomPrice = 250, SellingItemID = 5, Qty = 4, RowNum = 1, SerStruct = "", Note = "Demo file 01", ItemSteps = "{}", BomOk = true, ItemOk = true }, - new OfferRowModel { OfferRowID = 7, OfferID = 2, OfferRowUID = $"OFF{DateTime.Today:yy}{3:000000}{2:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 50, BomPrice = 80, SellingItemID = 5, Qty = 12, RowNum = 1, SerStruct = "", Note = "Demo file 02", ItemSteps = "{}", BomOk = true, ItemOk = true } + new OfferRowModel { OfferRowID = 6, OfferID = 3, OfferRowUID = $"OFF{DateTime.Today:yy}{3:000000}{1:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 200, BomPrice = 250, SellingItemID = 5, Qty = 4, RowNum = 1, SerStruct = "", Note = "Demo file 01", ItemSteps = "{}", BomOk = true, ItemOk = true }, + new OfferRowModel { OfferRowID = 7, OfferID = 3, OfferRowUID = $"OFF{DateTime.Today:yy}{3:000000}{2:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 50, BomPrice = 80, SellingItemID = 5, Qty = 12, RowNum = 1, SerStruct = "", Note = "Demo file 02", ItemSteps = "{}", BomOk = true, ItemOk = true } ); // inizializzazione dei valori di default x Offerta 4 = WALL From 0f93d9189d2c13710595e104b20a274185526778 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 6 Oct 2025 18:36:31 +0200 Subject: [PATCH 50/65] Fix problema ricalcolo --- .../Controllers/LuxController.cs | 67 ++++++++++- EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs | 24 ++-- .../Services/DataLayerServices.cs | 61 +++++++++- Lux.API/Lux.API.csproj | 2 +- Lux.API/appsettings.json | 1 + Lux.UI.Client/Lux.UI.Client.csproj | 2 +- Lux.UI/Components/Compo/OfferRowMan.razor | 27 ++++- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 106 ++++++++++++++++-- Lux.UI/Lux.UI.csproj | 10 +- Lux.UI/Program.cs | 27 ++++- Lux.UI/appsettings.Development.json | 6 +- Lux.UI/appsettings.json | 3 + Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 15 files changed, 294 insertions(+), 48 deletions(-) diff --git a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs index aed8bbf6..124a9001 100644 --- a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs +++ b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs @@ -1,14 +1,13 @@ using EgwCoreLib.Lux.Core.RestPayload; -using EgwCoreLib.Lux.Data.DbModel.Utils; +using EgwCoreLib.Lux.Data.DbModel.Config; +using EgwCoreLib.Lux.Data.DbModel.Items; using EgwCoreLib.Lux.Data.DbModel.Sales; +using EgwCoreLib.Lux.Data.DbModel.Utils; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Newtonsoft.Json; using NLog; -using NLog.LayoutRenderers; using static EgwCoreLib.Lux.Core.Enums; -using EgwCoreLib.Lux.Data.DbModel.Items; -using EgwCoreLib.Lux.Data.DbModel.Config; namespace EgwCoreLib.Lux.Data.Controllers { @@ -18,6 +17,26 @@ namespace EgwCoreLib.Lux.Data.Controllers #region Internal Methods + internal async Task> ConfEnvirParamGetAllAsync() + { + List dbResult = new List(); + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + dbResult = await dbCtx + .DbSetEnvirPar + .ToListAsync(); + } + catch (Exception exc) + { + Log.Error($"Eccezione durante ConfEnvirParamGetAllAsync{Environment.NewLine}{exc}"); + } + } + return dbResult; + } + /// /// Esegue eliminazione /// @@ -1276,6 +1295,46 @@ namespace EgwCoreLib.Lux.Data.Controllers return answ; } + /// + /// Aggiorno sul DB i dati del file associato + /// + /// + /// + internal async Task OffertRowUpdateFileData(OfferRowModel updRec) + { + bool answ = false; + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + // recupero righe offerta... + var currRec = dbCtx + .DbSetOfferRow + .Where(x => x.OfferRowID == updRec.OfferRowID) + .FirstOrDefault(); + + // aggiorno parametri (se inviati) + if (currRec != null) + { + currRec.FileName = updRec.FileName; + currRec.FileResource = updRec.FileResource; + currRec.FileSize = updRec.FileSize; + dbCtx.Entry(currRec).State = EntityState.Modified; + } + + // salvo i cambiamenti... + var result = await dbCtx.SaveChangesAsync(); + answ = result > 0; + } + catch (Exception exc) + { + Log.Error($"Eccezione durante OffertRowUpdateFileData{Environment.NewLine}{exc}"); + } + } + return answ; + } + /// /// Effettua update serStruct per l'offerta indicata /// diff --git a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs index d295419b..fd6722d7 100644 --- a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs +++ b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs @@ -216,9 +216,9 @@ namespace EgwCoreLib.Lux.Data modelBuilder.Entity().HasData( new JobModel { JobID = 1, Description = "Rivendita / servizi" }, new JobModel { JobID = 2, Description = "Serramento Completo Legno su linea Saomad e installatore interno" }, - new JobModel { JobID = 3, Description= "Realizzazione Trave" }, - new JobModel { JobID = 4, Description= "Realizzazione Cabinet" }, - new JobModel { JobID = 5, Description= "Realizzazione Parete" } + new JobModel { JobID = 3, Description = "Realizzazione Trave" }, + new JobModel { JobID = 4, Description = "Realizzazione Cabinet" }, + new JobModel { JobID = 5, Description = "Realizzazione Parete" } ); // init righe ciclo (fasi di ciclo) @@ -271,27 +271,27 @@ namespace EgwCoreLib.Lux.Data // inizializzazione dei valori di default x Offerta 1 = WINDOW modelBuilder.Entity().HasData( - new OfferRowModel { OfferRowID = 1, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}{1:000000}{1:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 900, BomPrice = 950, SellingItemID = 1, Qty = 3, RowNum = 1, SerStruct = demoJwd, Note = "Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true }, - new OfferRowModel { OfferRowID = 2, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}{1:000000}{2:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 160, BomPrice = 200, SellingItemID = 2, Qty = 3, RowNum = 2, SerStruct = "{}", Note = "Persiana per Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true }, - new OfferRowModel { OfferRowID = 3, OfferID = 1, OfferRowUID = $"OFF{DateTime.Today:yy}{1:000000}{3:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 200, BomPrice = 250, SellingItemID = 3, Qty = 3, RowNum = 3, SerStruct = "{}", Note = "Installazione serramento", ItemSteps = "{}", BomOk = true, ItemOk = true } + new OfferRowModel { OfferRowID = 1, OfferID = 1, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, OfferRowUID = $"OFF{DateTime.Today:yy}{1:000000}{1:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 900, BomPrice = 950, SellingItemID = 1, Qty = 3, RowNum = 1, SerStruct = demoJwd, Note = "Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true }, + new OfferRowModel { OfferRowID = 2, OfferID = 1, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, OfferRowUID = $"OFF{DateTime.Today:yy}{1:000000}{2:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 160, BomPrice = 200, SellingItemID = 2, Qty = 3, RowNum = 2, SerStruct = "{}", Note = "Persiana per Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true }, + new OfferRowModel { OfferRowID = 3, OfferID = 1, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, OfferRowUID = $"OFF{DateTime.Today:yy}{1:000000}{3:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 200, BomPrice = 250, SellingItemID = 3, Qty = 3, RowNum = 3, SerStruct = "{}", Note = "Installazione serramento", ItemSteps = "{}", BomOk = true, ItemOk = true } ); // inizializzazione dei valori di default x Offerta 2 = BEAM modelBuilder.Entity().HasData( - new OfferRowModel { OfferRowID = 4, OfferID = 2, OfferRowUID = $"OFF{DateTime.Today:yy}{2:000000}{1:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 800, BomPrice = 1150, SellingItemID = 4, Qty = 10, RowNum = 1, SerStruct = "", Note = "Demo file 01", ItemSteps = "{}", BomOk = true, ItemOk = true }, - new OfferRowModel { OfferRowID = 5, OfferID = 2, OfferRowUID = $"OFF{DateTime.Today:yy}{2:000000}{2:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 600, BomPrice = 950, SellingItemID = 4, Qty = 4, RowNum = 1, SerStruct = "", Note = "Demo file 02", ItemSteps = "{}", BomOk = true, ItemOk = true } + new OfferRowModel { OfferRowID = 4, OfferID = 2, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM, OfferRowUID = $"OFF{DateTime.Today:yy}{2:000000}{1:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 800, BomPrice = 1150, SellingItemID = 4, Qty = 10, RowNum = 1, SerStruct = "", Note = "Demo file 01", ItemSteps = "{}", BomOk = true, ItemOk = true }, + new OfferRowModel { OfferRowID = 5, OfferID = 2, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM, OfferRowUID = $"OFF{DateTime.Today:yy}{2:000000}{2:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 600, BomPrice = 950, SellingItemID = 4, Qty = 4, RowNum = 1, SerStruct = "", Note = "Demo file 02", ItemSteps = "{}", BomOk = true, ItemOk = true } ); // inizializzazione dei valori di default x Offerta 3 = CABINET modelBuilder.Entity().HasData( - new OfferRowModel { OfferRowID = 6, OfferID = 3, OfferRowUID = $"OFF{DateTime.Today:yy}{3:000000}{1:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 200, BomPrice = 250, SellingItemID = 5, Qty = 4, RowNum = 1, SerStruct = "", Note = "Demo file 01", ItemSteps = "{}", BomOk = true, ItemOk = true }, - new OfferRowModel { OfferRowID = 7, OfferID = 3, OfferRowUID = $"OFF{DateTime.Today:yy}{3:000000}{2:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 50, BomPrice = 80, SellingItemID = 5, Qty = 12, RowNum = 1, SerStruct = "", Note = "Demo file 02", ItemSteps = "{}", BomOk = true, ItemOk = true } + new OfferRowModel { OfferRowID = 6, OfferID = 3, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WALL, OfferRowUID = $"OFF{DateTime.Today:yy}{3:000000}{1:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 200, BomPrice = 250, SellingItemID = 5, Qty = 4, RowNum = 1, SerStruct = "", Note = "Demo file 01", ItemSteps = "{}", BomOk = true, ItemOk = true }, + new OfferRowModel { OfferRowID = 7, OfferID = 3, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WALL, OfferRowUID = $"OFF{DateTime.Today:yy}{3:000000}{2:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 50, BomPrice = 80, SellingItemID = 5, Qty = 12, RowNum = 1, SerStruct = "", Note = "Demo file 02", ItemSteps = "{}", BomOk = true, ItemOk = true } ); // inizializzazione dei valori di default x Offerta 4 = WALL modelBuilder.Entity().HasData( - new OfferRowModel { OfferRowID = 8, OfferID = 4, OfferRowUID = $"OFF{DateTime.Today:yy}{4:000000}{1:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 800, BomPrice = 1150, SellingItemID = 6, Qty = 6, RowNum = 1, SerStruct = "", Note = "Demo file 01", ItemSteps = "{}", BomOk = true, ItemOk = true }, - new OfferRowModel { OfferRowID = 9, OfferID = 4, OfferRowUID = $"OFF{DateTime.Today:yy}{4:000000}{2:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 600, BomPrice = 950, SellingItemID = 6, Qty = 4, RowNum = 1, SerStruct = "", Note = "Demo file 02", ItemSteps = "{}", BomOk = true, ItemOk = true } + new OfferRowModel { OfferRowID = 8, OfferID = 4, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.CABINET, OfferRowUID = $"OFF{DateTime.Today:yy}{4:000000}{1:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 800, BomPrice = 1150, SellingItemID = 6, Qty = 6, RowNum = 1, SerStruct = "", Note = "Demo file 01", ItemSteps = "{}", BomOk = true, ItemOk = true }, + new OfferRowModel { OfferRowID = 9, OfferID = 4, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.CABINET, OfferRowUID = $"OFF{DateTime.Today:yy}{4:000000}{2:0000}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 600, BomPrice = 950, SellingItemID = 6, Qty = 4, RowNum = 1, SerStruct = "", Note = "Demo file 02", ItemSteps = "{}", BomOk = true, ItemOk = true } ); } diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index b6a0022b..bfda5bfd 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -47,6 +47,40 @@ namespace EgwCoreLib.Lux.Data.Services #region Public Methods + /// + /// Elenco completo Config Envir + /// + /// + public async Task> ConfEnvirParamGetAllAsync() + { + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + List? result = new List(); + // cerco in redis... + string currKey = $"{redisBaseKey}:ConfEnvir"; + RedisValue rawData = await redisDb.StringGetAsync(currKey); + if (rawData.HasValue) + { + result = JsonConvert.DeserializeObject>($"{rawData}"); + source = "REDIS"; + } + else + { + result = await dbController.ConfEnvirParamGetAllAsync(); + // serializzo e salvo con config x evitare loop... + rawData = JsonConvert.SerializeObject(result, JSSettings); + await redisDb.StringSetAsync(currKey, rawData, UltraLongCache); + } + if (result == null) + { + result = new List(); + } + sw.Stop(); + Log.Debug($"ConfEnvirParamGetAllAsync | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } + /// /// Esegue eliminazione + refresh cache /// @@ -82,7 +116,7 @@ namespace EgwCoreLib.Lux.Data.Services result = await dbController.ConfGlassGetAllAsync(); // serializzo e salvo con config x evitare loop... rawData = JsonConvert.SerializeObject(result, JSSettings); - await redisDb.StringSetAsync(currKey, rawData, LongCache); + await redisDb.StringSetAsync(currKey, rawData, UltraLongCache); } if (result == null) { @@ -140,7 +174,7 @@ namespace EgwCoreLib.Lux.Data.Services result = await dbController.ConfProfileGetAllAsync(); // serializzo e salvo con config x evitare loop... rawData = JsonConvert.SerializeObject(result, JSSettings); - await redisDb.StringSetAsync(currKey, rawData, LongCache); + await redisDb.StringSetAsync(currKey, rawData, UltraLongCache); } if (result == null) { @@ -198,7 +232,7 @@ namespace EgwCoreLib.Lux.Data.Services result = await dbController.ConfWoodGetAllAsync(); // serializzo e salvo con config x evitare loop... rawData = JsonConvert.SerializeObject(result, JSSettings); - await redisDb.StringSetAsync(currKey, rawData, LongCache); + await redisDb.StringSetAsync(currKey, rawData, UltraLongCache); } if (result == null) { @@ -244,7 +278,7 @@ namespace EgwCoreLib.Lux.Data.Services result = dbController.CustomersGetAll(); // serializzo e salvo... rawData = JsonConvert.SerializeObject(result); - redisDb.StringSet(currKey, rawData, LongCache); + redisDb.StringSet(currKey, rawData, UltraLongCache); } if (result == null) { @@ -760,6 +794,25 @@ namespace EgwCoreLib.Lux.Data.Services return fatto; } + /// + /// Effettua update delle info legate al file per la riga offerta + /// + /// IRiga offerta coin dati FILE da aggiornare + /// + public async Task OffertRowUpdateFileData(OfferRowModel updRec) + { + Stopwatch sw = new Stopwatch(); + sw.Start(); + // calcolo + bool fatto = await dbController.OffertRowUpdateFileData(updRec); + // svuoto cache... + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Offers:*"); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:OfferRows:*"); + sw.Stop(); + Log.Debug($"OffertRowUpdateFileData in {sw.Elapsed.TotalMilliseconds} ms"); + return fatto; + } + /// /// Effettua update del valore serializzato della riga offerta /// diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 3bc00bc7..6af2b9a4 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2510.0410 + 0.9.2510.0618 diff --git a/Lux.API/appsettings.json b/Lux.API/appsettings.json index 0a1193af..0beef624 100644 --- a/Lux.API/appsettings.json +++ b/Lux.API/appsettings.json @@ -55,6 +55,7 @@ "Redis": "redis.ufficio:26379, serviceName=devel, DefaultDatabase=6, keepAlive=180, connectTimeout=15000, syncTimeout=15000, asyncTimeout=15000, abortConnect=false, ssl=false, allowAdmin=true" }, "ServerConf": { + "CalcTag": "calc", "PubChannel": "EgwDevEngineInput", "SubChannel": "EgwDevEngineOutput", "SvgChannel": "Egw:svg:img", diff --git a/Lux.UI.Client/Lux.UI.Client.csproj b/Lux.UI.Client/Lux.UI.Client.csproj index b2ca5ab6..b6016145 100644 --- a/Lux.UI.Client/Lux.UI.Client.csproj +++ b/Lux.UI.Client/Lux.UI.Client.csproj @@ -10,7 +10,7 @@ - + diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index 0f3752ec..43dfbcb1 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -3,18 +3,16 @@

        EDITING

        @EditRecord.OfferRowUID

        - + LiveSVG="@currSvg" + CurrJwd="@EditRecord.SerStruct"> - @* + @* IN_TemplateDTOList="@AvailTemplateList" IN_SelTemplate="@SelTemplate" IN_SelFamilyHardware="@SelFamilyHardware" @@ -102,6 +100,23 @@ else } } + @if (item.Envir != EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW || !string.IsNullOrEmpty(item.FileName)) + { +
        + @if (EditFileRecord != null && EditFileRecord.OfferRowID == item.OfferRowID) + { + + + + + } + else + { + @item.FileName | @fSize(item.FileSize) + + } +
        + } @item.Note @item.Qty diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index aed5d7e5..7410ae73 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -6,7 +6,10 @@ using EgwCoreLib.Lux.Data.DbModel.Sales; using EgwCoreLib.Lux.Data.DbModel.Utils; using EgwCoreLib.Lux.Data.Services; using EgwMultiEngineManager.Data; +using Lux.UI.Components.Compo.Config; using Microsoft.AspNetCore.Components; +using Microsoft.AspNetCore.Components.Forms; +using Microsoft.EntityFrameworkCore.Storage.Json; using Microsoft.JSInterop; using static EgwCoreLib.Lux.Core.Enums; @@ -60,6 +63,9 @@ namespace Lux.UI.Components.Compo [Inject] protected IJSRuntime JSRuntime { get; set; } = null!; + [Inject] + protected IWebHostEnvironment HostEnv { get; set; } = null!; + #endregion Protected Properties #region Protected Methods @@ -137,11 +143,15 @@ namespace Lux.UI.Components.Compo // preparo la domanda serializzata Dictionary DictExec = new Dictionary(); + // verifico parametri da conf envir... + var envRec = AllConfEnvir.FirstOrDefault(x => x.EnvirID == currRec.Envir); + string serKey = envRec != null ? envRec.SerStrucKey : "Jwd"; // cablata la BOM - DictExec.Add("Mode", "2"); + DictExec.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.BOM}"); + //DictExec.Add("Mode", "2"); // UID cablato x ora... DictExec.Add("UID", currRec.OfferRowUID); - DictExec.Add("Jwd", currRec.SerStruct); + DictExec.Add(serKey, currRec.SerStruct); CalcRequestDTO req = new CalcRequestDTO() { @@ -162,6 +172,7 @@ namespace Lux.UI.Components.Compo private List AllColors = new(); + private List AllConfEnvir = new(); private List AllConfGlass = new(); private List AllConfHardware = new(); @@ -192,6 +203,7 @@ namespace Lux.UI.Components.Compo private string currSvg = ""; + private OfferRowModel? EditFileRecord = null; private OfferRowModel? EditBomRecord = null; private OfferRowModel? EditRecord = null; @@ -247,7 +259,7 @@ namespace Lux.UI.Components.Compo apiUrl = Config.GetValue("ServerConf:Prog.ApiUrl") ?? ""; imgBasePath = Config.GetValue("ServerConf:ImageBaseUrl") ?? ""; GenericBasePath = Config.GetValue("ServerConf:GenericBaseUrl") ?? ""; - calcTag = Config.GetValue("ServerConf:CalcTag") ?? ""; + calcTag = Config.GetValue("ServerConf:CalcTag") ?? "calc"; subChannel = Config.GetValue("ServerConf:SvgChannel") ?? ""; } @@ -286,7 +298,8 @@ namespace Lux.UI.Components.Compo /// private async Task ReloadBaseList() { - // lettura conf da DB/Cache Redis + // lettura config setup varie da DB/Cache Redis + AllConfEnvir = await DLService.ConfEnvirParamGetAllAsync(); AllConfGlass = await DLService.ConfGlassGetAllAsync(); var rawHw = CDService.ElencoHw(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, "HW.AGB"); // hw filtro solo validi... @@ -357,10 +370,6 @@ namespace Lux.UI.Components.Compo } } - private void SetTemplate(WebWindowComplex.DTO.TemplateSelectDTO args) - { - } - /// /// salva nel record corrente la BOM aggiornata e poi ricalcola importo... /// @@ -424,5 +433,86 @@ namespace Lux.UI.Components.Compo } #endregion Private Methods + + + /// + /// Esegue lettura file + invio richiesta specifica + /// + /// + /// + + private async Task UploadFile(InputFileChangeEventArgs e) + { + if (EditFileRecord != null) + { + Dictionary Args = new Dictionary(); + + // leggo il contenuto del PRIMO (singolo) file + IBrowserFile file = e.File; + // limite file size (al momento 10 MB) + var maxAllowedSize = 10 * 1024 * 1024; + + using var stream = file.OpenReadStream(maxAllowedSize); + using var reader = new StreamReader(stream); + string rawContent = await reader.ReadToEndAsync(); + + // calcolo il nome del file trusted... + string trustedFileName = Path.GetRandomFileName(); + EditFileRecord.FileResource = trustedFileName; + EditFileRecord.FileName = file.Name; + EditFileRecord.FileSize = rawContent.LongCount(); + // salvo sul DB i dati (nome, nome sicuro, size...) + await DLService.OffertRowUpdateFileData(EditFileRecord); + + // parametri richiesta + Args.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.PREVIEW}"); + Args.Add("Btl", rawContent); + // invio! + CalcRequestDTO calcRequestDTO = new CalcRequestDTO(); + calcRequestDTO.EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM; + calcRequestDTO.DictExec = Args; + await ICService.CallRestPost($"{apiUrl}/{GenericBasePath}", $"{calcTag}/{EditFileRecord.OfferRowUID}", calcRequestDTO); + +#if false + // salvo in locale il file: SISTEMARE PERMESSI + saveFileContent(EditFileRecord.OfferRowUID, trustedFileName, rawContent); +#endif + } + } + /// + /// Esegue salvataggio del file ricevuto + /// + /// Nome secure da impiegare + /// Contenuto file + private bool saveFileContent(string folderPath, string secureName, string content) + { + bool answ = false; + if (!string.IsNullOrEmpty(folderPath)) + { + // calcolo path file... + string filePath = Path.Combine("unsafe_uploads", folderPath, secureName); + File.WriteAllText(filePath, content); + } + return answ; + } + + /// + /// Display fileSize scalato + /// + /// + /// + protected string fSize(long size) + { + return EgwCoreLib.Utils.FileHelpers.SizeSuffix(size, 1); + } + + /// + /// Toggle visibilità modifica file indicando ID della OfferRow corrente (o zero se deselect) + /// + private void ToggleFileEdit(OfferRowModel? currRec) + { + EditFileRecord = currRec; + } + } } \ No newline at end of file diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 7300810f..68aab77a 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2510.0410 + 0.9.2510.0618 @@ -18,9 +18,9 @@ - - - + + + @@ -44,7 +44,7 @@ - + diff --git a/Lux.UI/Program.cs b/Lux.UI/Program.cs index 197158d0..47297a1a 100644 --- a/Lux.UI/Program.cs +++ b/Lux.UI/Program.cs @@ -7,13 +7,15 @@ using Microsoft.AspNetCore.Components.Authorization; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Localization; using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.FileProviders; using NLog; using NLog.Web; using StackExchange.Redis; using System.Globalization; var builder = WebApplication.CreateBuilder(args); - +// recupero env corrente +var env = builder.Environment; var logger = LogManager.Setup() .LoadConfigurationFromAppSettings() @@ -106,6 +108,29 @@ app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseAntiforgery(); +// gestione fileshare x uploads: verifico da conf se sia linux o windows x file da accedere... +if (configuration["ServerConf:HostOs"] == "Win") +{ + app.UseFileServer(new FileServerOptions + { + FileProvider = new PhysicalFileProvider(@"\\stor01\TEAM DRIVES\40_FileUpload\LuxUploads"), + RequestPath = new PathString("/unsafe_uploads"), + EnableDirectoryBrowsing = true + //EnableDirectoryBrowsing = false + }); +} +else +{ + app.UseFileServer(new FileServerOptions + { + FileProvider = new PhysicalFileProvider(Path.Combine(env.ContentRootPath, "unsafe_uploads")), + RequestPath = new PathString("/unsafe_uploads"), + EnableDirectoryBrowsing = true + //EnableDirectoryBrowsing = false + }); +} + + app.MapRazorComponents() .AddInteractiveServerRenderMode() .AddInteractiveWebAssemblyRenderMode() diff --git a/Lux.UI/appsettings.Development.json b/Lux.UI/appsettings.Development.json index 84b51424..b3bcab40 100644 --- a/Lux.UI/appsettings.Development.json +++ b/Lux.UI/appsettings.Development.json @@ -6,8 +6,8 @@ } }, "ServerConf": { - "PubChannel": "EgwEngineInput", - "SubChannel": "EgwEngineOutput", - //"Prog.ApiUrl": "https://iis01.egalware.com/lux/srv/api" + "PubChannel": "EgwDevEngineInput", + "SubChannel": "EgwDevEngineOutput", + "Prog.ApiUrl": "https://iis01.egalware.com/lux/srv/api" } } diff --git a/Lux.UI/appsettings.json b/Lux.UI/appsettings.json index b630a74c..5c755c52 100644 --- a/Lux.UI/appsettings.json +++ b/Lux.UI/appsettings.json @@ -56,7 +56,10 @@ "Redis": "redis.ufficio:26379, serviceName=devel, DefaultDatabase=6, keepAlive=180, connectTimeout=15000, syncTimeout=15000, asyncTimeout=15000, abortConnect=false, ssl=false, allowAdmin=true" }, "ServerConf": { + "HostOs": "Win", + "CalcTag": "calc", "ImageCalcTag": "svg-preview", + "GenericBaseUrl": "generic", //"Prog.ApiUrl": "https://office.egalware.com/lux/srv/api", "Prog.ApiUrl": "https://localhost:7135/api", "ImageBaseUrl": "window", diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index e78e075c..bbd05bfd 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

        Versione: 0.9.2510.0410

        +

        Versione: 0.9.2510.0618


        Note di rilascio:
        • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 12b052e8..b9966371 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2510.0410 +0.9.2510.0618 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index d73d803a..b167440a 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2510.0410 + 0.9.2510.0618 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 42a8d8fdc6a06296ae8030f328d2aaa5e16220dc Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 7 Oct 2025 16:14:15 +0200 Subject: [PATCH 51/65] Refresh componente --- EgwCoreLib.Lux.Data/DataLayerContext.cs | 1 + Lux.API/Lux.API.csproj | 4 +- Lux.API/appsettings.Development.json | 5 +- Lux.API/appsettings.Production.json | 3 +- Lux.API/appsettings.json | 4 +- Lux.UI.Client/Lux.UI.Client.csproj | 4 +- Lux.UI/Components/Compo/OfferRowMan.razor | 18 +- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 236 +++++++++++++++---- Lux.UI/Lux.UI.csproj | 10 +- Lux.UI/appsettings.json | 4 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 13 files changed, 212 insertions(+), 83 deletions(-) diff --git a/EgwCoreLib.Lux.Data/DataLayerContext.cs b/EgwCoreLib.Lux.Data/DataLayerContext.cs index eba62547..387f5a5e 100644 --- a/EgwCoreLib.Lux.Data/DataLayerContext.cs +++ b/EgwCoreLib.Lux.Data/DataLayerContext.cs @@ -89,6 +89,7 @@ namespace EgwCoreLib.Lux.Data if (string.IsNullOrEmpty(connString)) { #if DEBUG + //connString = "Server=mdb.ufficio;port=3306;database=Lux_000;uid=lux_user;pwd=Egal_pwd!;sslmode=None;"; connString = "Server=mdb.ufficio;port=3306;database=Lux_000_dev;uid=lux_user;pwd=Egal_pwd!;sslmode=None;"; #else connString = "Server=mdb.ufficio;port=3306;database=Lux_000;uid=lux_user;pwd=Egal_pwd!;sslmode=None;"; diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 6af2b9a4..4ddc20a2 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2510.0618 + 0.9.2510.0716 @@ -65,7 +65,7 @@ - + diff --git a/Lux.API/appsettings.Development.json b/Lux.API/appsettings.Development.json index c294297e..e186d4f6 100644 --- a/Lux.API/appsettings.Development.json +++ b/Lux.API/appsettings.Development.json @@ -7,7 +7,8 @@ }, "ServerConf": { "BaseUrl": "/lux/srv/", - "PubChannel": "EgwEngineInput", - "SubChannel": "EgwEngineOutput" + "PubChannel": "EgwDevEngineInput", + "SubChannel": "EgwDevEngineOutput", + "ImageBaseUrl": "https://iis01.egalware.com/lux/srv/api/window/" } } diff --git a/Lux.API/appsettings.Production.json b/Lux.API/appsettings.Production.json index c294297e..535094eb 100644 --- a/Lux.API/appsettings.Production.json +++ b/Lux.API/appsettings.Production.json @@ -8,6 +8,7 @@ "ServerConf": { "BaseUrl": "/lux/srv/", "PubChannel": "EgwEngineInput", - "SubChannel": "EgwEngineOutput" + "SubChannel": "EgwEngineOutput", + "ImageBaseUrl": "https://office.egalware.com/lux/srv/api/window/" } } diff --git a/Lux.API/appsettings.json b/Lux.API/appsettings.json index 0beef624..827253c5 100644 --- a/Lux.API/appsettings.json +++ b/Lux.API/appsettings.json @@ -56,8 +56,8 @@ }, "ServerConf": { "CalcTag": "calc", - "PubChannel": "EgwDevEngineInput", - "SubChannel": "EgwDevEngineOutput", + "PubChannel": "EgwEngineInput", + "SubChannel": "EgwEngineOutput", "SvgChannel": "Egw:svg:img", "BomChannel": "Egw:bom", "UpdateChannel": "Egw:update", diff --git a/Lux.UI.Client/Lux.UI.Client.csproj b/Lux.UI.Client/Lux.UI.Client.csproj index b6016145..ee438118 100644 --- a/Lux.UI.Client/Lux.UI.Client.csproj +++ b/Lux.UI.Client/Lux.UI.Client.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index 43dfbcb1..cded099c 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -3,23 +3,11 @@

          EDITING

          @EditRecord.OfferRowUID

          - + EC_OnClose="CloseEdit"> - @* - IN_TemplateDTOList="@AvailTemplateList" - IN_SelTemplate="@SelTemplate" - IN_SelFamilyHardware="@SelFamilyHardware" - IN_SelColorMaterial="@SelColorMaterial" - IN_SelMaterial="@SelMaterial" - IN_SelGlass="@SelGlass" - *@ } else { diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index 7410ae73..d18e4f03 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -11,6 +11,8 @@ using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Forms; using Microsoft.EntityFrameworkCore.Storage.Json; using Microsoft.JSInterop; +using NLog.LayoutRenderers; +using WebWindowComplex.DTO; using static EgwCoreLib.Lux.Core.Enums; namespace Lux.UI.Components.Compo @@ -43,6 +45,20 @@ namespace Lux.UI.Components.Compo #endregion Public Methods + #region Protected Fields + + /// + /// Predisposizione valori live SVG/JWD + /// + protected LivePayload CurrData = new LivePayload(); + + /// + /// Configurazione elenchi anagrafiche + /// + protected BaseListPayload SetupList = new BaseListPayload(); + + #endregion Protected Fields + #region Protected Properties [Inject] @@ -57,15 +73,15 @@ namespace Lux.UI.Components.Compo [Inject] protected DataLayerServices DLService { get; set; } = null!; + [Inject] + protected IWebHostEnvironment HostEnv { get; set; } = null!; + [Inject] protected ImageCacheService ICService { get; set; } = null!; [Inject] protected IJSRuntime JSRuntime { get; set; } = null!; - [Inject] - protected IWebHostEnvironment HostEnv { get; set; } = null!; - #endregion Protected Properties #region Protected Methods @@ -78,9 +94,24 @@ namespace Lux.UI.Components.Compo protected void DoEdit(OfferRowModel curRec) { + // preparazione dati da record corrente + PrepareWindowData(curRec.SerStruct); + // reset prev + prevJwd = ""; + // imposto edit record EditRecord = curRec; } + /// + /// Versione precedente JWD x test e confronto + /// + private string prevJwd = ""; + + /// + /// Versione originale (pre edit) + /// + private string origJwd = ""; + protected void DoSwapMat(OfferRowModel currRow) { showChangeMat = true; @@ -88,6 +119,16 @@ namespace Lux.UI.Components.Compo CurrBomList = DLService.OffertGetBomList(EditBomRecord); } + /// + /// Display fileSize scalato + /// + /// + /// + protected string fSize(long size) + { + return EgwCoreLib.Utils.FileHelpers.SizeSuffix(size, 1); + } + /// /// Calcolo URL immagine /// @@ -108,6 +149,7 @@ namespace Lux.UI.Components.Compo protected override async Task OnInitializedAsync() { ConfInit(); + prevJwd = ""; await ReloadBaseList(); DLService.UpdatePipe.EA_NewMessage += UpdatePipe_EA_NewMessage; DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage; @@ -136,6 +178,16 @@ namespace Lux.UI.Components.Compo if (!await JSRuntime.InvokeAsync("confirm", $"Confermi di voler ricalcolare la BOM?")) return; + await reqBomUpdate(currRec); + } + + /// + /// Effettua vera richiesta della BOM + /// + /// + /// + private async Task reqBomUpdate(OfferRowModel currRec) + { // salvo richiesta BOM su record currRec.AwaitBom = true; currRec.AwaitPrice = true; @@ -173,6 +225,7 @@ namespace Lux.UI.Components.Compo private List AllColors = new(); private List AllConfEnvir = new(); + private List AllConfGlass = new(); private List AllConfHardware = new(); @@ -187,13 +240,13 @@ namespace Lux.UI.Components.Compo private List AvailColorMaterialList = new List(); + private List AvailFamilyHardwareList = new List(); + private List AvailGlassList = new List(); private List AvailHardwareList = new(); private List AvailMaterialList = new List(); - private List AvailFamilyHardwareList = new List(); - private string calcTag = "calc"; @@ -203,9 +256,10 @@ namespace Lux.UI.Components.Compo private string currSvg = ""; - private OfferRowModel? EditFileRecord = null; private OfferRowModel? EditBomRecord = null; + private OfferRowModel? EditFileRecord = null; + private OfferRowModel? EditRecord = null; private string genBasePath = "generic"; @@ -248,6 +302,8 @@ namespace Lux.UI.Components.Compo if (currArgs.msgUid.Equals($"{subChannel}:{EditRecord.OfferRowUID}")) { currSvg = currArgs.newMessage; + // salvo in live data... + CurrData.SvgPreview = currSvg; } await InvokeAsync(StateHasChanged); } @@ -292,6 +348,29 @@ namespace Lux.UI.Components.Compo isLoading = false; } + /// + /// Preparazione dati x componente edit JWD + /// + /// + private void PrepareWindowData(string currJwd) + { + // preparo conf oggetti x controllo + SetupList = SetupList = new BaseListPayload() + { + ColorMaterial = AvailColorMaterialList, + FamilyHardware = AvailFamilyHardwareList, + Glass = AvailGlassList, + Hardware = AvailHardwareList, + Material = AvailMaterialList, + TemplateDTO = null + }; + CurrData = new LivePayload() + { + CurrJwd = currJwd, + SvgPreview = currSvg + }; + } + /// /// init classi configurazione /// @@ -343,6 +422,23 @@ namespace Lux.UI.Components.Compo } } + /// + /// Esegue salvataggio del file ricevuto + /// + /// Nome secure da impiegare + /// Contenuto file + private bool saveFileContent(string folderPath, string secureName, string content) + { + bool answ = false; + if (!string.IsNullOrEmpty(folderPath)) + { + // calcolo path file... + string filePath = Path.Combine("unsafe_uploads", folderPath, secureName); + File.WriteAllText(filePath, content); + } + return answ; + } + /// /// Salvataggio del JWD aggiornato nella mia riga di offerta /// @@ -352,16 +448,38 @@ namespace Lux.UI.Components.Compo // ...se ho editing if (EditRecord != null) { - // SE contiene il mio JWD... - if (args.ContainsKey("JWD")) + // SE contiene il mio Jwd... + if (args.ContainsKey("Jwd")) { - string serStruct = args["JWD"]; - // salvo! - await DLService.OffertRowUpdateSerStruct(EditRecord.OfferRowID, serStruct); + reqDict = args; + string serStruct = reqDict["Jwd"]; + // controllo SE variato... + if (!prevJwd.Equals(serStruct)) + { + // aggiorno val prev + prevJwd = serStruct; + // aggiorno live data + CurrData.CurrJwd = serStruct; + // chiamo richiesta update + CalcRequestDTO calcRequestDTO = new CalcRequestDTO(); + calcRequestDTO.EnvType = EditRecord.Envir; + calcRequestDTO.DictExec = reqDict; + // chiamo la chiamata POST alla API, che manda la richiesta via REDIS + await ICService.CallRestPost($"{apiUrl}/{GenericBasePath}", $"{calcTag}/{EditRecord.OfferRowUID}", calcRequestDTO); +#if false + // salvo su DB! + await DLService.OffertRowUpdateSerStruct(EditRecord.OfferRowID, serStruct); +#endif + } } } } + /// + /// Dizionario richieste + /// + private Dictionary reqDict = new Dictionary(); + private async Task setAwaitPrice(bool awaitPrice, bool flushCache) { foreach (var item in AllRecords) @@ -370,6 +488,14 @@ namespace Lux.UI.Components.Compo } } + /// + /// Toggle visibilità modifica file indicando ID della OfferRow corrente (o zero se deselect) + /// + private void ToggleFileEdit(OfferRowModel? currRec) + { + EditFileRecord = currRec; + } + /// /// salva nel record corrente la BOM aggiornata e poi ricalcola importo... /// @@ -432,9 +558,6 @@ namespace Lux.UI.Components.Compo isLoading = false; } - #endregion Private Methods - - /// /// Esegue lettura file + invio richiesta specifica /// @@ -445,9 +568,10 @@ namespace Lux.UI.Components.Compo { if (EditFileRecord != null) { - Dictionary Args = new Dictionary(); + // init dizionari arg richiesta update + Dictionary fileArgs = new Dictionary(); - // leggo il contenuto del PRIMO (singolo) file + // leggo il contenuto del PRIMO (singolo) file IBrowserFile file = e.File; // limite file size (al momento 10 MB) var maxAllowedSize = 10 * 1024 * 1024; @@ -464,55 +588,69 @@ namespace Lux.UI.Components.Compo // salvo sul DB i dati (nome, nome sicuro, size...) await DLService.OffertRowUpdateFileData(EditFileRecord); - // parametri richiesta - Args.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.PREVIEW}"); - Args.Add("Btl", rawContent); + // parametri richiesta + fileArgs.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.PREVIEW}"); + fileArgs.Add("Btl", rawContent); // invio! CalcRequestDTO calcRequestDTO = new CalcRequestDTO(); calcRequestDTO.EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM; - calcRequestDTO.DictExec = Args; + calcRequestDTO.DictExec = fileArgs; await ICService.CallRestPost($"{apiUrl}/{GenericBasePath}", $"{calcTag}/{EditFileRecord.OfferRowUID}", calcRequestDTO); #if false // salvo in locale il file: SISTEMARE PERMESSI - saveFileContent(EditFileRecord.OfferRowUID, trustedFileName, rawContent); + saveFileContent(EditFileRecord.OfferRowUID, trustedFileName, rawContent); #endif } } - /// - /// Esegue salvataggio del file ricevuto - /// - /// Nome secure da impiegare - /// Contenuto file - private bool saveFileContent(string folderPath, string secureName, string content) - { - bool answ = false; - if (!string.IsNullOrEmpty(folderPath)) - { - // calcolo path file... - string filePath = Path.Combine("unsafe_uploads", folderPath, secureName); - File.WriteAllText(filePath, content); - } - return answ; - } /// - /// Display fileSize scalato + /// Chiude edit andando eventualmente a salvare /// - /// + /// /// - protected string fSize(long size) + private async Task CloseEdit(bool doSave) { - return EgwCoreLib.Utils.FileHelpers.SizeSuffix(size, 1); - } - - /// - /// Toggle visibilità modifica file indicando ID della OfferRow corrente (o zero se deselect) - /// - private void ToggleFileEdit(OfferRowModel? currRec) - { - EditFileRecord = currRec; + // ...se ho editing + if (EditRecord != null) + { + bool updateBom = false; + // SE richiesto salvataggio... + if (doSave) + { + // salvo su DB! + await DLService.OffertRowUpdateSerStruct(EditRecord.OfferRowID, prevJwd); + updateBom = true; + } + else + // altrimenti ricalcolo valore salvato + { + prevJwd = EditRecord.SerStruct; + CurrData.CurrJwd = EditRecord.SerStruct; + } + if(updateBom) + { + await reqBomUpdate(EditRecord); + } + // aggiorno nel dizionari + if (reqDict.ContainsKey("Jwd")) + { + reqDict["Jwd"] = prevJwd; + } + + if (reqDict != null && reqDict.Count > 0) + { + // chiamo richiesta update + CalcRequestDTO calcRequestDTO = new CalcRequestDTO(); + calcRequestDTO.EnvType = EditRecord.Envir; + calcRequestDTO.DictExec = reqDict; + // chiamo la chiamata POST alla API, che manda la richiesta via REDIS + await ICService.CallRestPost($"{apiUrl}/{GenericBasePath}", $"{calcTag}/{EditRecord.OfferRowUID}", calcRequestDTO); + } + EditRecord = null; + } } + #endregion Private Methods } } \ No newline at end of file diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 68aab77a..5528f1e3 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2510.0618 + 0.9.2510.0716 @@ -17,8 +17,8 @@ - - + + @@ -44,8 +44,8 @@ - - + + diff --git a/Lux.UI/appsettings.json b/Lux.UI/appsettings.json index 5c755c52..fb0e4de4 100644 --- a/Lux.UI/appsettings.json +++ b/Lux.UI/appsettings.json @@ -64,8 +64,8 @@ "Prog.ApiUrl": "https://localhost:7135/api", "ImageBaseUrl": "window", "RouteBaseUrl": "window", - "PubChannel": "EgwDevEngineInput", - "SubChannel": "EgwDevEngineOutput", + "PubChannel": "EgwEngineInput", + "SubChannel": "EgwEngineOutput", "SvgChannel": "Egw:svg:img", "BomChannel": "Egw:bom", "UpdateChannel": "Egw:update", diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index bbd05bfd..3a0113c7 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

          Versione: 0.9.2510.0618

          +

          Versione: 0.9.2510.0716


          Note di rilascio:
          • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index b9966371..3500876c 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2510.0618 +0.9.2510.0716 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index b167440a..dcacd156 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2510.0618 + 0.9.2510.0716 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From f3a3adf8b70dc1ebe8647b85cf54e4affc2387d1 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 15 Oct 2025 11:49:18 +0200 Subject: [PATCH 52/65] Update migration dati --- EgwCoreLib.Lux.Data/DataLayerContext.cs | 4 +- .../DbModel/Config/HardwareModel.cs | 2 +- .../EgwCoreLib.Lux.Data.csproj | 1 + .../Migrations/20251004085645_AddNewOffers.cs | 396 -------------- ...r.cs => 20251015091632_initDb.Designer.cs} | 116 ++-- ...814_InitDb.cs => 20251015091632_initDb.cs} | 87 ++- ...251015094406_UpdateConfigData.Designer.cs} | 457 ++++++++++++++-- .../20251015094406_UpdateConfigData.cs | 506 ++++++++++++++++++ .../DataLayerContextModelSnapshot.cs | 173 +++--- EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs | 23 +- 10 files changed, 1164 insertions(+), 601 deletions(-) delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20251004085645_AddNewOffers.cs rename EgwCoreLib.Lux.Data/Migrations/{20251004085645_AddNewOffers.Designer.cs => 20251015091632_initDb.Designer.cs} (94%) rename EgwCoreLib.Lux.Data/Migrations/{20251003164814_InitDb.cs => 20251015091632_initDb.cs} (88%) rename EgwCoreLib.Lux.Data/Migrations/{20251003164814_InitDb.Designer.cs => 20251015094406_UpdateConfigData.Designer.cs} (80%) create mode 100644 EgwCoreLib.Lux.Data/Migrations/20251015094406_UpdateConfigData.cs diff --git a/EgwCoreLib.Lux.Data/DataLayerContext.cs b/EgwCoreLib.Lux.Data/DataLayerContext.cs index 387f5a5e..af58ebce 100644 --- a/EgwCoreLib.Lux.Data/DataLayerContext.cs +++ b/EgwCoreLib.Lux.Data/DataLayerContext.cs @@ -89,8 +89,8 @@ namespace EgwCoreLib.Lux.Data if (string.IsNullOrEmpty(connString)) { #if DEBUG - //connString = "Server=mdb.ufficio;port=3306;database=Lux_000;uid=lux_user;pwd=Egal_pwd!;sslmode=None;"; - connString = "Server=mdb.ufficio;port=3306;database=Lux_000_dev;uid=lux_user;pwd=Egal_pwd!;sslmode=None;"; + connString = "Server=mdb.ufficio;port=3306;database=Lux_000;uid=lux_user;pwd=Egal_pwd!;sslmode=None;"; + //connString = "Server=mdb.ufficio;port=3306;database=Lux_000_dev;uid=lux_user;pwd=Egal_pwd!;sslmode=None;"; #else connString = "Server=mdb.ufficio;port=3306;database=Lux_000;uid=lux_user;pwd=Egal_pwd!;sslmode=None;"; #endif diff --git a/EgwCoreLib.Lux.Data/DbModel/Config/HardwareModel.cs b/EgwCoreLib.Lux.Data/DbModel/Config/HardwareModel.cs index a56d21f4..59fb9cb7 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Config/HardwareModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Config/HardwareModel.cs @@ -17,7 +17,7 @@ namespace EgwCoreLib.Lux.Data.DbModel.Config [Table("conf_Hardware")] public class HardwareModel : Egw.Window.Data.Hardware { - public HardwareModel(string Id, string FamilyName, string Description, string OpeningType, string Shape, int SashQty, int SashPosition) : base(Id, FamilyName, Description, OpeningType, Shape, SashQty, SashPosition) + public HardwareModel(string Id, string FamilyName, string Description, Egw.Window.Data.Enums.OpeningTypes OpeningType, string Shape, int SashQty, int SashPosition) : base(Id, FamilyName, Description, OpeningType, Shape, SashQty, SashPosition) { } } diff --git a/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj b/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj index ee31d222..566d3fca 100644 --- a/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj +++ b/EgwCoreLib.Lux.Data/EgwCoreLib.Lux.Data.csproj @@ -27,6 +27,7 @@ + diff --git a/EgwCoreLib.Lux.Data/Migrations/20251004085645_AddNewOffers.cs b/EgwCoreLib.Lux.Data/Migrations/20251004085645_AddNewOffers.cs deleted file mode 100644 index 2d078e86..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20251004085645_AddNewOffers.cs +++ /dev/null @@ -1,396 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional - -namespace EgwCoreLib.Lux.Data.Migrations -{ - /// - public partial class AddNewOffers : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "FileName", - table: "sales_offer_row", - type: "longtext", - nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "FileResource", - table: "sales_offer_row", - type: "longtext", - nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.AddColumn( - name: "FileSize", - table: "sales_offer_row", - type: "bigint", - nullable: false, - defaultValue: 0L); - - migrationBuilder.CreateTable( - name: "conf_envir", - columns: table => new - { - EnvirID = table.Column(type: "int", nullable: false), - SerStrucKey = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4") - }, - constraints: table => - { - table.PrimaryKey("PK_conf_envir", x => x.EnvirID); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.InsertData( - table: "conf_envir", - columns: new[] { "EnvirID", "SerStrucKey" }, - values: new object[,] - { - { 1, "Jwd" }, - { 2, "Btl" }, - { 3, "Btl" }, - { 4, "Btl" } - }); - - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 1, - columns: new[] { "Inserted", "Modified", "ValidUntil" }, - values: new object[] { new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3416), new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3418), new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3413) }); - - migrationBuilder.InsertData( - table: "sales_offer", - columns: new[] { "OfferID", "CustomerID", "DealerID", "Description", "Discount", "Envir", "Inserted", "Modified", "OffertState", "RefNum", "RefRev", "RefYear", "ValidUntil" }, - values: new object[,] - { - { 2, 2, 2, "Offerta BEAM", 0.0, 2, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3424), new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3425), 0, 2, 1, 2024, new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3422) }, - { 3, 2, 2, "Offerta Cabinet", 0.0, 4, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3430), new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3432), 0, 3, 1, 2024, new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3429) }, - { 4, 2, 2, "Offerta Wall", 0.0, 3, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3437), new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3438), 0, 4, 1, 2024, new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3435) } - }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 1, - columns: new[] { "FileName", "FileResource", "FileSize", "Inserted", "Modified", "OfferRowUID", "SerStruct" }, - values: new object[] { "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3585), new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3587), "OFF250000010001", "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Pine\",\"ColorMaterial\":\"Black\",\"Glass\":\"4T/16/4T\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"IdGroup\":1,\"AreaList\":[{\"bIsSashVertical\":true,\"SashList\":[{\"nSashId\":1,\"OpeningType\":\"TILTTURN_LEFT\",\"bHasHandle\":true,\"dDimension\":100.0}],\"SashType\":\"NULL\",\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"Hardware\":\"000558\",\"IdGroup\":2,\"AreaList\":[{\"FillType\":\"GLASS\",\"IdGroup\":3,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"SASH\"}],\"AreaType\":\"FRAME\"}]}" }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 2, - columns: new[] { "FileName", "FileResource", "FileSize", "Inserted", "Modified", "OfferRowUID" }, - values: new object[] { "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3601), new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3603), "OFF250000010002" }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 3, - columns: new[] { "FileName", "FileResource", "FileSize", "Inserted", "Modified", "OfferRowUID" }, - values: new object[] { "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3623), new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3624), "OFF250000010003" }); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 1, - column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3114)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 2, - column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3167)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 3, - column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3170)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 4, - column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3174)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 5, - column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3177)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 6, - column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3180)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 7, - column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3184)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 8, - column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3187)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 9, - column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3191)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 10, - column: "DtCreate", - value: new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3194)); - - migrationBuilder.InsertData( - table: "task_job", - columns: new[] { "JobID", "Description" }, - values: new object[,] - { - { 3, "Realizzazione Trave" }, - { 4, "Realizzazione Cabinet" }, - { 5, "Realizzazione Parete" } - }); - - migrationBuilder.InsertData( - table: "item_selling_item", - columns: new[] { "SellingItemID", "Cost", "Description", "ExtItemCode", "IsService", "ItemCode", "ItemSteps", "JobID", "Margin", "SerStruct", "SupplCode", "UM" }, - values: new object[,] - { - { 4, 1000.0, "Trave lamellare", "", false, 0, "", 3, 0.29999999999999999, "", "", "#" }, - { 5, 500.0, "Cabinet", "", false, 0, "", 4, 0.29999999999999999, "", "", "#" }, - { 6, 2000.0, "Parete", "", false, 0, "", 5, 0.29999999999999999, "", "", "#" } - }); - - migrationBuilder.InsertData( - table: "sales_offer_row", - columns: new[] { "OfferRowID", "AwaitBom", "AwaitPrice", "BomCost", "BomOk", "BomPrice", "Envir", "FileName", "FileResource", "FileSize", "Inserted", "ItemBOM", "ItemOk", "ItemSteps", "Modified", "Note", "OfferID", "OfferRowUID", "Qty", "RowNum", "SellingItemID", "SerStruct", "StepCost", "StepPrice" }, - values: new object[,] - { - { 4, false, false, 800.0, true, 1150.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3657), "", true, "{}", new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3659), "Demo file 01", 2, "OFF250000020001", 10.0, 1, 4, "", 0.0, 0.0 }, - { 5, false, false, 600.0, true, 950.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3671), "", true, "{}", new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3673), "Demo file 02", 2, "OFF250000020002", 4.0, 1, 4, "", 0.0, 0.0 }, - { 6, false, false, 200.0, true, 250.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3704), "", true, "{}", new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3705), "Demo file 01", 3, "OFF250000030001", 4.0, 1, 5, "", 0.0, 0.0 }, - { 7, false, false, 50.0, true, 80.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3717), "", true, "{}", new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3719), "Demo file 02", 3, "OFF250000030002", 12.0, 1, 5, "", 0.0, 0.0 }, - { 8, false, false, 800.0, true, 1150.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3749), "", true, "{}", new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3751), "Demo file 01", 4, "OFF250000040001", 6.0, 1, 6, "", 0.0, 0.0 }, - { 9, false, false, 600.0, true, 950.0, 1, "", "", 0L, new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3763), "", true, "{}", new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3765), "Demo file 02", 4, "OFF250000040002", 4.0, 1, 6, "", 0.0, 0.0 } - }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "conf_envir"); - - migrationBuilder.DeleteData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 4); - - migrationBuilder.DeleteData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 5); - - migrationBuilder.DeleteData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 6); - - migrationBuilder.DeleteData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 7); - - migrationBuilder.DeleteData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 8); - - migrationBuilder.DeleteData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 9); - - migrationBuilder.DeleteData( - table: "item_selling_item", - keyColumn: "SellingItemID", - keyValue: 4); - - migrationBuilder.DeleteData( - table: "item_selling_item", - keyColumn: "SellingItemID", - keyValue: 5); - - migrationBuilder.DeleteData( - table: "item_selling_item", - keyColumn: "SellingItemID", - keyValue: 6); - - migrationBuilder.DeleteData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 2); - - migrationBuilder.DeleteData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 3); - - migrationBuilder.DeleteData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 4); - - migrationBuilder.DeleteData( - table: "task_job", - keyColumn: "JobID", - keyValue: 3); - - migrationBuilder.DeleteData( - table: "task_job", - keyColumn: "JobID", - keyValue: 4); - - migrationBuilder.DeleteData( - table: "task_job", - keyColumn: "JobID", - keyValue: 5); - - migrationBuilder.DropColumn( - name: "FileName", - table: "sales_offer_row"); - - migrationBuilder.DropColumn( - name: "FileResource", - table: "sales_offer_row"); - - migrationBuilder.DropColumn( - name: "FileSize", - table: "sales_offer_row"); - - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 1, - columns: new[] { "Inserted", "Modified", "ValidUntil" }, - values: new object[] { new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5340), new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5341), new DateTime(2025, 11, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5337) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 1, - columns: new[] { "Inserted", "Modified", "OfferRowUID", "SerStruct" }, - values: new object[] { new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5462), new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5464), "OFF250000000001", "{}" }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 2, - columns: new[] { "Inserted", "Modified", "OfferRowUID" }, - values: new object[] { new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5476), new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5478), "OFF250000000002" }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 3, - columns: new[] { "Inserted", "Modified", "OfferRowUID" }, - values: new object[] { new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5489), new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5491), "OFF250000000003" }); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 1, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5013)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 2, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5079)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 3, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5082)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 4, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5085)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 5, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5089)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 6, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5092)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 7, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5096)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 8, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5099)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 9, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5103)); - - migrationBuilder.UpdateData( - table: "stock_mov", - keyColumn: "StockMovID", - keyValue: 10, - column: "DtCreate", - value: new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5106)); - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251004085645_AddNewOffers.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20251015091632_initDb.Designer.cs similarity index 94% rename from EgwCoreLib.Lux.Data/Migrations/20251004085645_AddNewOffers.Designer.cs rename to EgwCoreLib.Lux.Data/Migrations/20251015091632_initDb.Designer.cs index 8f0c2e1d..cafbf185 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20251004085645_AddNewOffers.Designer.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20251015091632_initDb.Designer.cs @@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace EgwCoreLib.Lux.Data.Migrations { [DbContext(typeof(DataLayerContext))] - [Migration("20251004085645_AddNewOffers")] - partial class AddNewOffers + [Migration("20251015091632_initDb")] + partial class initDb { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -1174,13 +1174,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta per tre serramenti", Discount = 0.0, Envir = 1, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3416), - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3418), + Inserted = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8361), + Modified = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8362), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3413) + ValidUntil = new DateTime(2025, 11, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8357) }, new { @@ -1190,13 +1190,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta BEAM", Discount = 0.0, Envir = 2, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3424), - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3425), + Inserted = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8371), + Modified = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8372), OffertState = 0, RefNum = 2, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3422) + ValidUntil = new DateTime(2025, 11, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8369) }, new { @@ -1206,13 +1206,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta Cabinet", Discount = 0.0, Envir = 4, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3430), - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3432), + Inserted = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8377), + Modified = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8379), OffertState = 0, RefNum = 3, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3429) + ValidUntil = new DateTime(2025, 11, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8376) }, new { @@ -1222,13 +1222,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta Wall", Discount = 0.0, Envir = 3, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3437), - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3438), + Inserted = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8384), + Modified = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8385), OffertState = 0, RefNum = 4, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3435) + ValidUntil = new DateTime(2025, 11, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8383) }); }); @@ -1337,11 +1337,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3585), + Inserted = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8517), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3587), + Modified = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8519), Note = "Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000010001", @@ -1364,11 +1364,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3601), + Inserted = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8533), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3603), + Modified = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8535), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000010002", @@ -1391,11 +1391,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3623), + Inserted = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8548), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3624), + Modified = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8549), Note = "Installazione serramento", OfferID = 1, OfferRowUID = "OFF250000010003", @@ -1414,15 +1414,15 @@ namespace EgwCoreLib.Lux.Data.Migrations BomCost = 800.0, BomOk = true, BomPrice = 1150.0, - Envir = 1, + Envir = 2, FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3657), + Inserted = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8582), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3659), + Modified = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8584), Note = "Demo file 01", OfferID = 2, OfferRowUID = "OFF250000020001", @@ -1441,15 +1441,15 @@ namespace EgwCoreLib.Lux.Data.Migrations BomCost = 600.0, BomOk = true, BomPrice = 950.0, - Envir = 1, + Envir = 2, FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3671), + Inserted = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8596), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3673), + Modified = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8598), Note = "Demo file 02", OfferID = 2, OfferRowUID = "OFF250000020002", @@ -1468,15 +1468,15 @@ namespace EgwCoreLib.Lux.Data.Migrations BomCost = 200.0, BomOk = true, BomPrice = 250.0, - Envir = 1, + Envir = 3, FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3704), + Inserted = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8629), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3705), + Modified = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8631), Note = "Demo file 01", OfferID = 3, OfferRowUID = "OFF250000030001", @@ -1495,15 +1495,15 @@ namespace EgwCoreLib.Lux.Data.Migrations BomCost = 50.0, BomOk = true, BomPrice = 80.0, - Envir = 1, + Envir = 3, FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3717), + Inserted = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8643), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3719), + Modified = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8644), Note = "Demo file 02", OfferID = 3, OfferRowUID = "OFF250000030002", @@ -1522,15 +1522,15 @@ namespace EgwCoreLib.Lux.Data.Migrations BomCost = 800.0, BomOk = true, BomPrice = 1150.0, - Envir = 1, + Envir = 4, FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3749), + Inserted = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8673), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3751), + Modified = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8675), Note = "Demo file 01", OfferID = 4, OfferRowUID = "OFF250000040001", @@ -1549,15 +1549,15 @@ namespace EgwCoreLib.Lux.Data.Migrations BomCost = 600.0, BomOk = true, BomPrice = 950.0, - Envir = 1, + Envir = 4, FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3763), + Inserted = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8688), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3765), + Modified = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8689), Note = "Demo file 02", OfferID = 4, OfferRowUID = "OFF250000040002", @@ -1740,8 +1740,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 1, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3114), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3164), + DtCreate = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8060), + DtMod = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8102), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1753,8 +1753,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3167), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3168), + DtCreate = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8105), + DtMod = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8106), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -1766,8 +1766,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3170), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3172), + DtCreate = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8108), + DtMod = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8110), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1779,8 +1779,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3174), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3175), + DtCreate = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8112), + DtMod = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8113), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1792,8 +1792,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3177), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3178), + DtCreate = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8115), + DtMod = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8117), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -1805,8 +1805,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3180), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3182), + DtCreate = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8119), + DtMod = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8120), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1818,8 +1818,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3184), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3185), + DtCreate = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8122), + DtMod = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8124), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -1831,8 +1831,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3187), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3189), + DtCreate = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8126), + DtMod = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8127), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1844,8 +1844,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3191), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3192), + DtCreate = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8129), + DtMod = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8130), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1857,8 +1857,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3194), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3195), + DtCreate = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8132), + DtMod = new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8134), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, diff --git a/EgwCoreLib.Lux.Data/Migrations/20251003164814_InitDb.cs b/EgwCoreLib.Lux.Data/Migrations/20251015091632_initDb.cs similarity index 88% rename from EgwCoreLib.Lux.Data/Migrations/20251003164814_InitDb.cs rename to EgwCoreLib.Lux.Data/Migrations/20251015091632_initDb.cs index 9966b67a..78aa3ec0 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20251003164814_InitDb.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20251015091632_initDb.cs @@ -9,7 +9,7 @@ using Microsoft.EntityFrameworkCore.Migrations; namespace EgwCoreLib.Lux.Data.Migrations { /// - public partial class InitDb : Migration + public partial class initDb : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) @@ -17,6 +17,20 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.AlterDatabase() .Annotation("MySql:CharSet", "utf8mb4"); + migrationBuilder.CreateTable( + name: "conf_envir", + columns: table => new + { + EnvirID = table.Column(type: "int", nullable: false), + SerStrucKey = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_conf_envir", x => x.EnvirID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + migrationBuilder.CreateTable( name: "conf_glass", columns: table => new @@ -573,6 +587,11 @@ namespace EgwCoreLib.Lux.Data.Migrations StepPrice = table.Column(type: "double", nullable: false), SerStruct = table.Column(type: "longtext", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), + FileResource = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FileName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FileSize = table.Column(type: "bigint", nullable: false), ItemSteps = table.Column(type: "longtext", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), ItemBOM = table.Column(type: "longtext", nullable: false) @@ -786,6 +805,17 @@ namespace EgwCoreLib.Lux.Data.Migrations }) .Annotation("MySql:CharSet", "utf8mb4"); + migrationBuilder.InsertData( + table: "conf_envir", + columns: new[] { "EnvirID", "SerStrucKey" }, + values: new object[,] + { + { 1, "Jwd" }, + { 2, "Btl" }, + { 3, "Btl" }, + { 4, "Btl" } + }); + migrationBuilder.InsertData( table: "conf_glass", columns: new[] { "GlassID", "Code", "Description", "Thickness" }, @@ -874,7 +904,10 @@ namespace EgwCoreLib.Lux.Data.Migrations values: new object[,] { { 1, "Rivendita / servizi" }, - { 2, "Serramento Completo Legno su linea Saomad e installatore interno" } + { 2, "Serramento Completo Legno su linea Saomad e installatore interno" }, + { 3, "Realizzazione Trave" }, + { 4, "Realizzazione Cabinet" }, + { 5, "Realizzazione Parete" } }); migrationBuilder.InsertData( @@ -964,13 +997,22 @@ namespace EgwCoreLib.Lux.Data.Migrations { { 1, 820.0, "Finestra anta Singola", "", false, 0, "", 2, 0.20000000000000001, "", "", "#" }, { 2, 150.0, "Persiana anta singola", "", false, 0, "", 1, 0.10000000000000001, "", "", "#" }, - { 3, 200.0, "Installazione", "", true, 0, "", 1, 0.29999999999999999, "", "", "#" } + { 3, 200.0, "Installazione", "", true, 0, "", 1, 0.29999999999999999, "", "", "#" }, + { 4, 1000.0, "Trave lamellare", "", false, 0, "", 3, 0.29999999999999999, "", "", "#" }, + { 5, 500.0, "Cabinet", "", false, 0, "", 4, 0.29999999999999999, "", "", "#" }, + { 6, 2000.0, "Parete", "", false, 0, "", 5, 0.29999999999999999, "", "", "#" } }); migrationBuilder.InsertData( table: "sales_offer", columns: new[] { "OfferID", "CustomerID", "DealerID", "Description", "Discount", "Envir", "Inserted", "Modified", "OffertState", "RefNum", "RefRev", "RefYear", "ValidUntil" }, - values: new object[] { 1, 2, 2, "Offerta per tre serramenti", 0.0, 1, new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5340), new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5341), 0, 1, 1, 2024, new DateTime(2025, 11, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5337) }); + values: new object[,] + { + { 1, 2, 2, "Offerta per tre serramenti", 0.0, 1, new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8361), new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8362), 0, 1, 1, 2024, new DateTime(2025, 11, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8357) }, + { 2, 2, 2, "Offerta BEAM", 0.0, 2, new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8371), new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8372), 0, 2, 1, 2024, new DateTime(2025, 11, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8369) }, + { 3, 2, 2, "Offerta Cabinet", 0.0, 4, new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8377), new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8379), 0, 3, 1, 2024, new DateTime(2025, 11, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8376) }, + { 4, 2, 2, "Offerta Wall", 0.0, 3, new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8384), new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8385), 0, 4, 1, 2024, new DateTime(2025, 11, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8383) } + }); migrationBuilder.InsertData( table: "utils_gen_value", @@ -993,12 +1035,18 @@ namespace EgwCoreLib.Lux.Data.Migrations migrationBuilder.InsertData( table: "sales_offer_row", - columns: new[] { "OfferRowID", "AwaitBom", "AwaitPrice", "BomCost", "BomOk", "BomPrice", "Envir", "Inserted", "ItemBOM", "ItemOk", "ItemSteps", "Modified", "Note", "OfferID", "OfferRowUID", "Qty", "RowNum", "SellingItemID", "SerStruct", "StepCost", "StepPrice" }, + columns: new[] { "OfferRowID", "AwaitBom", "AwaitPrice", "BomCost", "BomOk", "BomPrice", "Envir", "FileName", "FileResource", "FileSize", "Inserted", "ItemBOM", "ItemOk", "ItemSteps", "Modified", "Note", "OfferID", "OfferRowUID", "Qty", "RowNum", "SellingItemID", "SerStruct", "StepCost", "StepPrice" }, values: new object[,] { - { 1, false, false, 900.0, true, 950.0, 1, new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5462), "", true, "{}", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5464), "Finestra anta singola 2025", 1, "OFF250000000001", 3.0, 1, 1, "{}", 0.0, 0.0 }, - { 2, false, false, 160.0, true, 200.0, 1, new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5476), "", true, "{}", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5478), "Persiana per Finestra anta singola 2025", 1, "OFF250000000002", 3.0, 2, 2, "{}", 0.0, 0.0 }, - { 3, false, false, 200.0, true, 250.0, 1, new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5489), "", true, "{}", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5491), "Installazione serramento", 1, "OFF250000000003", 3.0, 3, 3, "{}", 0.0, 0.0 } + { 1, false, false, 900.0, true, 950.0, 1, "", "", 0L, new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8517), "", true, "{}", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8519), "Finestra anta singola 2025", 1, "OFF250000010001", 3.0, 1, 1, "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Pine\",\"ColorMaterial\":\"Black\",\"Glass\":\"4T/16/4T\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"IdGroup\":1,\"AreaList\":[{\"bIsSashVertical\":true,\"SashList\":[{\"nSashId\":1,\"OpeningType\":\"TILTTURN_LEFT\",\"bHasHandle\":true,\"dDimension\":100.0}],\"SashType\":\"NULL\",\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"Hardware\":\"000558\",\"IdGroup\":2,\"AreaList\":[{\"FillType\":\"GLASS\",\"IdGroup\":3,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"SASH\"}],\"AreaType\":\"FRAME\"}]}", 0.0, 0.0 }, + { 2, false, false, 160.0, true, 200.0, 1, "", "", 0L, new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8533), "", true, "{}", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8535), "Persiana per Finestra anta singola 2025", 1, "OFF250000010002", 3.0, 2, 2, "{}", 0.0, 0.0 }, + { 3, false, false, 200.0, true, 250.0, 1, "", "", 0L, new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8548), "", true, "{}", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8549), "Installazione serramento", 1, "OFF250000010003", 3.0, 3, 3, "{}", 0.0, 0.0 }, + { 4, false, false, 800.0, true, 1150.0, 2, "", "", 0L, new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8582), "", true, "{}", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8584), "Demo file 01", 2, "OFF250000020001", 10.0, 1, 4, "", 0.0, 0.0 }, + { 5, false, false, 600.0, true, 950.0, 2, "", "", 0L, new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8596), "", true, "{}", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8598), "Demo file 02", 2, "OFF250000020002", 4.0, 1, 4, "", 0.0, 0.0 }, + { 6, false, false, 200.0, true, 250.0, 3, "", "", 0L, new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8629), "", true, "{}", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8631), "Demo file 01", 3, "OFF250000030001", 4.0, 1, 5, "", 0.0, 0.0 }, + { 7, false, false, 50.0, true, 80.0, 3, "", "", 0L, new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8643), "", true, "{}", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8644), "Demo file 02", 3, "OFF250000030002", 12.0, 1, 5, "", 0.0, 0.0 }, + { 8, false, false, 800.0, true, 1150.0, 4, "", "", 0L, new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8673), "", true, "{}", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8675), "Demo file 01", 4, "OFF250000040001", 6.0, 1, 6, "", 0.0, 0.0 }, + { 9, false, false, 600.0, true, 950.0, 4, "", "", 0L, new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8688), "", true, "{}", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8689), "Demo file 02", 4, "OFF250000040002", 4.0, 1, 6, "", 0.0, 0.0 } }); migrationBuilder.InsertData( @@ -1035,16 +1083,16 @@ namespace EgwCoreLib.Lux.Data.Migrations columns: new[] { "StockMovID", "CodDoc", "DtCreate", "MovCod", "Note", "QtyRec", "StockStatusId", "UnitVal", "UserId" }, values: new object[,] { - { 1, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5013), "CAR", "DEMO", 5.0, 1, 0.0, "samuele.locatelli@egalware.com" }, - { 2, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5079), "CAR", "DEMO", 8.0, 2, 0.0, "samuele.locatelli@egalware.com" }, - { 3, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5082), "CAR", "DEMO", 5.0, 3, 0.0, "samuele.locatelli@egalware.com" }, - { 4, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5085), "CAR", "DEMO", 1.0, 4, 0.0, "samuele.locatelli@egalware.com" }, - { 5, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5089), "CAR", "DEMO", 10.0, 5, 0.0, "samuele.locatelli@egalware.com" }, - { 6, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5092), "CAR", "DEMO", 1.0, 6, 0.0, "samuele.locatelli@egalware.com" }, - { 7, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5096), "CAR", "DEMO", 50.0, 7, 0.0, "samuele.locatelli@egalware.com" }, - { 8, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5099), "CAR", "DEMO", 1.0, 8, 0.0, "samuele.locatelli@egalware.com" }, - { 9, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5103), "CAR", "DEMO", 1.0, 9, 0.0, "samuele.locatelli@egalware.com" }, - { 10, "", new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5106), "CAR", "DEMO", 1.0, 10, 0.0, "samuele.locatelli@egalware.com" } + { 1, "", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8060), "CAR", "DEMO", 5.0, 1, 0.0, "samuele.locatelli@egalware.com" }, + { 2, "", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8105), "CAR", "DEMO", 8.0, 2, 0.0, "samuele.locatelli@egalware.com" }, + { 3, "", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8108), "CAR", "DEMO", 5.0, 3, 0.0, "samuele.locatelli@egalware.com" }, + { 4, "", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8112), "CAR", "DEMO", 1.0, 4, 0.0, "samuele.locatelli@egalware.com" }, + { 5, "", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8115), "CAR", "DEMO", 10.0, 5, 0.0, "samuele.locatelli@egalware.com" }, + { 6, "", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8119), "CAR", "DEMO", 1.0, 6, 0.0, "samuele.locatelli@egalware.com" }, + { 7, "", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8122), "CAR", "DEMO", 50.0, 7, 0.0, "samuele.locatelli@egalware.com" }, + { 8, "", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8126), "CAR", "DEMO", 1.0, 8, 0.0, "samuele.locatelli@egalware.com" }, + { 9, "", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8129), "CAR", "DEMO", 1.0, 9, 0.0, "samuele.locatelli@egalware.com" }, + { 10, "", new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8132), "CAR", "DEMO", 1.0, 10, 0.0, "samuele.locatelli@egalware.com" } }); migrationBuilder.InsertData( @@ -1196,6 +1244,9 @@ namespace EgwCoreLib.Lux.Data.Migrations /// protected override void Down(MigrationBuilder migrationBuilder) { + migrationBuilder.DropTable( + name: "conf_envir"); + migrationBuilder.DropTable( name: "conf_glass"); diff --git a/EgwCoreLib.Lux.Data/Migrations/20251003164814_InitDb.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20251015094406_UpdateConfigData.Designer.cs similarity index 80% rename from EgwCoreLib.Lux.Data/Migrations/20251003164814_InitDb.Designer.cs rename to EgwCoreLib.Lux.Data/Migrations/20251015094406_UpdateConfigData.Designer.cs index 59235f23..bfcddb0b 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20251003164814_InitDb.Designer.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20251015094406_UpdateConfigData.Designer.cs @@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace EgwCoreLib.Lux.Data.Migrations { [DbContext(typeof(DataLayerContext))] - [Migration("20251003164814_InitDb")] - partial class InitDb + [Migration("20251015094406_UpdateConfigData")] + partial class UpdateConfigData { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -25,6 +25,42 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.EnvirParamModel", b => + { + b.Property("EnvirID") + .HasColumnType("int"); + + b.Property("SerStrucKey") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("EnvirID"); + + b.ToTable("conf_envir"); + + b.HasData( + new + { + EnvirID = 1, + SerStrucKey = "Jwd" + }, + new + { + EnvirID = 2, + SerStrucKey = "Btl" + }, + new + { + EnvirID = 4, + SerStrucKey = "Btl" + }, + new + { + EnvirID = 3, + SerStrucKey = "Btl" + }); + }); + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.GlassModel", b => { b.Property("GlassID") @@ -58,14 +94,49 @@ namespace EgwCoreLib.Lux.Data.Migrations { GlassID = 2, Code = "0002", - Description = "Vetro BE 3S 4/12/4/12/4", - Thickness = 36.0 + Description = "Vetro BE 2S 4/16/4", + Thickness = 24.0 }, new { GlassID = 3, Code = "0003", - Description = "Vetro BE 3S 4/16/4/16/4", + Description = "Vetro BE 3S 4/12/4/12/4", + Thickness = 36.0 + }, + new + { + GlassID = 4, + Code = "0004", + Description = "Vetro BE 3S 4/16/4/16/4", + Thickness = 44.0 + }, + new + { + GlassID = 5, + Code = "0005", + Description = "Vetro BE 2S 4T/12/4T", + Thickness = 20.0 + }, + new + { + GlassID = 6, + Code = "0006", + Description = "Vetro BE 2S 4T/16/4T", + Thickness = 24.0 + }, + new + { + GlassID = 7, + Code = "0007", + Description = "Vetro BE 3S 4T/12/4T/12/4T", + Thickness = 36.0 + }, + new + { + GlassID = 8, + Code = "0008", + Description = "Vetro BE 3S 4T/16/4T/16/4T", Thickness = 44.0 }); }); @@ -96,22 +167,22 @@ namespace EgwCoreLib.Lux.Data.Migrations { ProfileID = 1, Code = "0001", - Description = "Profilo 32", - Thickness = 32.0 + Description = "Profilo60", + Thickness = 60.0 }, new { ProfileID = 2, Code = "0002", - Description = "Profilo 48", - Thickness = 48.0 + Description = "Profilo78", + Thickness = 78.0 }, new { ProfileID = 3, Code = "0003", - Description = "Profilo 58", - Thickness = 58.0 + Description = "Profilo90", + Thickness = 90.0 }); }); @@ -760,6 +831,51 @@ namespace EgwCoreLib.Lux.Data.Migrations SerStruct = "", SupplCode = "", UM = "#" + }, + new + { + SellingItemID = 4, + Cost = 1000.0, + Description = "Trave lamellare", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 3, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 5, + Cost = 500.0, + Description = "Cabinet", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 4, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 6, + Cost = 2000.0, + Description = "Parete", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 5, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" }); }); @@ -1093,13 +1209,61 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta per tre serramenti", Discount = 0.0, Envir = 1, - Inserted = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5340), - Modified = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5341), + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6797), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6798), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5337) + ValidUntil = new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6794) + }, + new + { + OfferID = 2, + CustomerID = 2, + DealerID = 2, + Description = "Offerta BEAM", + Discount = 0.0, + Envir = 2, + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6804), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6806), + OffertState = 0, + RefNum = 2, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6803) + }, + new + { + OfferID = 3, + CustomerID = 2, + DealerID = 2, + Description = "Offerta Cabinet", + Discount = 0.0, + Envir = 4, + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6811), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6812), + OffertState = 0, + RefNum = 3, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6809) + }, + new + { + OfferID = 4, + CustomerID = 2, + DealerID = 2, + Description = "Offerta Wall", + Discount = 0.0, + Envir = 3, + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6817), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6818), + OffertState = 0, + RefNum = 4, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6816) }); }); @@ -1129,6 +1293,17 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Property("Envir") .HasColumnType("int"); + b.Property("FileName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FileResource") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FileSize") + .HasColumnType("bigint"); + b.Property("Inserted") .HasColumnType("datetime(6)"); @@ -1194,18 +1369,21 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 950.0, Envir = 1, - Inserted = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5462), + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6960), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5464), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6962), Note = "Finestra anta singola 2025", OfferID = 1, - OfferRowUID = "OFF250000000001", + OfferRowUID = "OFF250000010001", Qty = 3.0, RowNum = 1, SellingItemID = 1, - SerStruct = "{}", + SerStruct = "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Pine\",\"ColorMaterial\":\"Black\",\"Glass\":\"4T/16/4T\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"IdGroup\":1,\"AreaList\":[{\"bIsSashVertical\":true,\"SashList\":[{\"nSashId\":1,\"OpeningType\":\"TILTTURN_LEFT\",\"bHasHandle\":true,\"dDimension\":100.0}],\"SashType\":\"NULL\",\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"Hardware\":\"000558\",\"IdGroup\":2,\"AreaList\":[{\"FillType\":\"GLASS\",\"IdGroup\":3,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"SASH\"}],\"AreaType\":\"FRAME\"}]}", StepCost = 0.0, StepPrice = 0.0 }, @@ -1218,14 +1396,17 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 200.0, Envir = 1, - Inserted = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5476), + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6976), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5478), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6978), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, - OfferRowUID = "OFF250000000002", + OfferRowUID = "OFF250000010002", Qty = 3.0, RowNum = 2, SellingItemID = 2, @@ -1242,20 +1423,185 @@ namespace EgwCoreLib.Lux.Data.Migrations BomOk = true, BomPrice = 250.0, Envir = 1, - Inserted = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5489), + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6990), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5491), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6992), Note = "Installazione serramento", OfferID = 1, - OfferRowUID = "OFF250000000003", + OfferRowUID = "OFF250000010003", Qty = 3.0, RowNum = 3, SellingItemID = 3, SerStruct = "{}", StepCost = 0.0, StepPrice = 0.0 + }, + new + { + OfferRowID = 4, + AwaitBom = false, + AwaitPrice = false, + BomCost = 800.0, + BomOk = true, + BomPrice = 1150.0, + Envir = 2, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7023), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7025), + Note = "Demo file 01", + OfferID = 2, + OfferRowUID = "OFF250000020001", + Qty = 10.0, + RowNum = 1, + SellingItemID = 4, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 5, + AwaitBom = false, + AwaitPrice = false, + BomCost = 600.0, + BomOk = true, + BomPrice = 950.0, + Envir = 2, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7037), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7039), + Note = "Demo file 02", + OfferID = 2, + OfferRowUID = "OFF250000020002", + Qty = 4.0, + RowNum = 1, + SellingItemID = 4, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 6, + AwaitBom = false, + AwaitPrice = false, + BomCost = 200.0, + BomOk = true, + BomPrice = 250.0, + Envir = 3, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7070), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7072), + Note = "Demo file 01", + OfferID = 3, + OfferRowUID = "OFF250000030001", + Qty = 4.0, + RowNum = 1, + SellingItemID = 5, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 7, + AwaitBom = false, + AwaitPrice = false, + BomCost = 50.0, + BomOk = true, + BomPrice = 80.0, + Envir = 3, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7089), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7090), + Note = "Demo file 02", + OfferID = 3, + OfferRowUID = "OFF250000030002", + Qty = 12.0, + RowNum = 1, + SellingItemID = 5, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 8, + AwaitBom = false, + AwaitPrice = false, + BomCost = 800.0, + BomOk = true, + BomPrice = 1150.0, + Envir = 4, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7121), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7122), + Note = "Demo file 01", + OfferID = 4, + OfferRowUID = "OFF250000040001", + Qty = 6.0, + RowNum = 1, + SellingItemID = 6, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 9, + AwaitBom = false, + AwaitPrice = false, + BomCost = 600.0, + BomOk = true, + BomPrice = 950.0, + Envir = 4, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7134), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7136), + Note = "Demo file 02", + OfferID = 4, + OfferRowUID = "OFF250000040002", + Qty = 4.0, + RowNum = 1, + SellingItemID = 6, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 }); }); @@ -1429,8 +1775,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 1, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5013), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5075), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6489), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6540), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1442,8 +1788,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5079), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5080), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6543), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6544), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -1455,8 +1801,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5082), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5083), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6546), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6548), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1468,8 +1814,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5085), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5087), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6550), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6551), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1481,8 +1827,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5089), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5090), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6553), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6554), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -1494,8 +1840,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5092), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5094), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6556), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6558), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1507,8 +1853,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5096), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5097), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6560), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6561), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -1520,8 +1866,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5099), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5101), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6563), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6564), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1533,8 +1879,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5103), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5104), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6566), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6568), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1546,8 +1892,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - DtCreate = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5106), - DtMod = new DateTime(2025, 10, 3, 18, 48, 13, 550, DateTimeKind.Local).AddTicks(5108), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6570), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6571), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1706,6 +2052,21 @@ namespace EgwCoreLib.Lux.Data.Migrations { JobID = 2, Description = "Serramento Completo Legno su linea Saomad e installatore interno" + }, + new + { + JobID = 3, + Description = "Realizzazione Trave" + }, + new + { + JobID = 4, + Description = "Realizzazione Cabinet" + }, + new + { + JobID = 5, + Description = "Realizzazione Parete" }); }); @@ -1993,28 +2354,28 @@ namespace EgwCoreLib.Lux.Data.Migrations GenValID = 1, ClassCod = "WoodCol", Ordinal = 1, - ValString = "Legno" + ValString = "Blue" }, new { GenValID = 2, ClassCod = "WoodCol", Ordinal = 2, - ValString = "Bianco" + ValString = "White" }, new { GenValID = 3, ClassCod = "WoodCol", Ordinal = 3, - ValString = "Rosso" + ValString = "Red" }, new { GenValID = 4, ClassCod = "WoodCol", Ordinal = 4, - ValString = "Nero" + ValString = "Black" }, new { diff --git a/EgwCoreLib.Lux.Data/Migrations/20251015094406_UpdateConfigData.cs b/EgwCoreLib.Lux.Data/Migrations/20251015094406_UpdateConfigData.cs new file mode 100644 index 00000000..47949ceb --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20251015094406_UpdateConfigData.cs @@ -0,0 +1,506 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional + +namespace EgwCoreLib.Lux.Data.Migrations +{ + /// + public partial class UpdateConfigData : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.UpdateData( + table: "conf_glass", + keyColumn: "GlassID", + keyValue: 2, + columns: new[] { "Description", "Thickness" }, + values: new object[] { "Vetro BE 2S 4/16/4", 24.0 }); + + migrationBuilder.UpdateData( + table: "conf_glass", + keyColumn: "GlassID", + keyValue: 3, + columns: new[] { "Description", "Thickness" }, + values: new object[] { "Vetro BE 3S 4/12/4/12/4", 36.0 }); + + migrationBuilder.InsertData( + table: "conf_glass", + columns: new[] { "GlassID", "Code", "Description", "Thickness" }, + values: new object[,] + { + { 4, "0004", "Vetro BE 3S 4/16/4/16/4", 44.0 }, + { 5, "0005", "Vetro BE 2S 4T/12/4T", 20.0 }, + { 6, "0006", "Vetro BE 2S 4T/16/4T", 24.0 }, + { 7, "0007", "Vetro BE 3S 4T/12/4T/12/4T", 36.0 }, + { 8, "0008", "Vetro BE 3S 4T/16/4T/16/4T", 44.0 } + }); + + migrationBuilder.UpdateData( + table: "conf_profile", + keyColumn: "ProfileID", + keyValue: 1, + columns: new[] { "Description", "Thickness" }, + values: new object[] { "Profilo60", 60.0 }); + + migrationBuilder.UpdateData( + table: "conf_profile", + keyColumn: "ProfileID", + keyValue: 2, + columns: new[] { "Description", "Thickness" }, + values: new object[] { "Profilo78", 78.0 }); + + migrationBuilder.UpdateData( + table: "conf_profile", + keyColumn: "ProfileID", + keyValue: 3, + columns: new[] { "Description", "Thickness" }, + values: new object[] { "Profilo90", 90.0 }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6797), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6798), new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6794) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 2, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6804), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6806), new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6803) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 3, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6811), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6812), new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6809) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 4, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6817), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6818), new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6816) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6960), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6962) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6976), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6978) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6990), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6992) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 4, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7023), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7025) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 5, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7037), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7039) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 6, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7070), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7072) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 7, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7089), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7090) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 8, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7121), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7122) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 9, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7134), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7136) }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6489)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6543)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6546)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6550)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6553)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6556)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6560)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6563)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6566)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6570)); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 1, + column: "ValString", + value: "Blue"); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 2, + column: "ValString", + value: "White"); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 3, + column: "ValString", + value: "Red"); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 4, + column: "ValString", + value: "Black"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DeleteData( + table: "conf_glass", + keyColumn: "GlassID", + keyValue: 4); + + migrationBuilder.DeleteData( + table: "conf_glass", + keyColumn: "GlassID", + keyValue: 5); + + migrationBuilder.DeleteData( + table: "conf_glass", + keyColumn: "GlassID", + keyValue: 6); + + migrationBuilder.DeleteData( + table: "conf_glass", + keyColumn: "GlassID", + keyValue: 7); + + migrationBuilder.DeleteData( + table: "conf_glass", + keyColumn: "GlassID", + keyValue: 8); + + migrationBuilder.UpdateData( + table: "conf_glass", + keyColumn: "GlassID", + keyValue: 2, + columns: new[] { "Description", "Thickness" }, + values: new object[] { "Vetro BE 3S 4/12/4/12/4", 36.0 }); + + migrationBuilder.UpdateData( + table: "conf_glass", + keyColumn: "GlassID", + keyValue: 3, + columns: new[] { "Description", "Thickness" }, + values: new object[] { "Vetro BE 3S 4/16/4/16/4", 44.0 }); + + migrationBuilder.UpdateData( + table: "conf_profile", + keyColumn: "ProfileID", + keyValue: 1, + columns: new[] { "Description", "Thickness" }, + values: new object[] { "Profilo 32", 32.0 }); + + migrationBuilder.UpdateData( + table: "conf_profile", + keyColumn: "ProfileID", + keyValue: 2, + columns: new[] { "Description", "Thickness" }, + values: new object[] { "Profilo 48", 48.0 }); + + migrationBuilder.UpdateData( + table: "conf_profile", + keyColumn: "ProfileID", + keyValue: 3, + columns: new[] { "Description", "Thickness" }, + values: new object[] { "Profilo 58", 58.0 }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8361), new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8362), new DateTime(2025, 11, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8357) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 2, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8371), new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8372), new DateTime(2025, 11, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8369) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 3, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8377), new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8379), new DateTime(2025, 11, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8376) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 4, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8384), new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8385), new DateTime(2025, 11, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8383) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8517), new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8519) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8533), new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8535) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8548), new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8549) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 4, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8582), new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8584) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 5, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8596), new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8598) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 6, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8629), new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8631) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 7, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8643), new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8644) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 8, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8673), new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8675) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 9, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8688), new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8689) }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8060)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8105)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8108)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8112)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8115)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8119)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8122)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8126)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8129)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 16, 32, 49, DateTimeKind.Local).AddTicks(8132)); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 1, + column: "ValString", + value: "Legno"); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 2, + column: "ValString", + value: "Bianco"); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 3, + column: "ValString", + value: "Rosso"); + + migrationBuilder.UpdateData( + table: "utils_gen_value", + keyColumn: "GenValID", + keyValue: 4, + column: "ValString", + value: "Nero"); + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs index 8510bc45..d93d5126 100644 --- a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs +++ b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs @@ -91,14 +91,49 @@ namespace EgwCoreLib.Lux.Data.Migrations { GlassID = 2, Code = "0002", - Description = "Vetro BE 3S 4/12/4/12/4", - Thickness = 36.0 + Description = "Vetro BE 2S 4/16/4", + Thickness = 24.0 }, new { GlassID = 3, Code = "0003", - Description = "Vetro BE 3S 4/16/4/16/4", + Description = "Vetro BE 3S 4/12/4/12/4", + Thickness = 36.0 + }, + new + { + GlassID = 4, + Code = "0004", + Description = "Vetro BE 3S 4/16/4/16/4", + Thickness = 44.0 + }, + new + { + GlassID = 5, + Code = "0005", + Description = "Vetro BE 2S 4T/12/4T", + Thickness = 20.0 + }, + new + { + GlassID = 6, + Code = "0006", + Description = "Vetro BE 2S 4T/16/4T", + Thickness = 24.0 + }, + new + { + GlassID = 7, + Code = "0007", + Description = "Vetro BE 3S 4T/12/4T/12/4T", + Thickness = 36.0 + }, + new + { + GlassID = 8, + Code = "0008", + Description = "Vetro BE 3S 4T/16/4T/16/4T", Thickness = 44.0 }); }); @@ -129,22 +164,22 @@ namespace EgwCoreLib.Lux.Data.Migrations { ProfileID = 1, Code = "0001", - Description = "Profilo 32", - Thickness = 32.0 + Description = "Profilo60", + Thickness = 60.0 }, new { ProfileID = 2, Code = "0002", - Description = "Profilo 48", - Thickness = 48.0 + Description = "Profilo78", + Thickness = 78.0 }, new { ProfileID = 3, Code = "0003", - Description = "Profilo 58", - Thickness = 58.0 + Description = "Profilo90", + Thickness = 90.0 }); }); @@ -1171,13 +1206,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta per tre serramenti", Discount = 0.0, Envir = 1, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3416), - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3418), + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6797), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6798), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3413) + ValidUntil = new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6794) }, new { @@ -1187,13 +1222,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta BEAM", Discount = 0.0, Envir = 2, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3424), - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3425), + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6804), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6806), OffertState = 0, RefNum = 2, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3422) + ValidUntil = new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6803) }, new { @@ -1203,13 +1238,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta Cabinet", Discount = 0.0, Envir = 4, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3430), - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3432), + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6811), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6812), OffertState = 0, RefNum = 3, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3429) + ValidUntil = new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6809) }, new { @@ -1219,13 +1254,13 @@ namespace EgwCoreLib.Lux.Data.Migrations Description = "Offerta Wall", Discount = 0.0, Envir = 3, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3437), - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3438), + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6817), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6818), OffertState = 0, RefNum = 4, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3435) + ValidUntil = new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6816) }); }); @@ -1334,11 +1369,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3585), + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6960), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3587), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6962), Note = "Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000010001", @@ -1361,11 +1396,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3601), + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6976), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3603), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6978), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000010002", @@ -1388,11 +1423,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3623), + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6990), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3624), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6992), Note = "Installazione serramento", OfferID = 1, OfferRowUID = "OFF250000010003", @@ -1411,15 +1446,15 @@ namespace EgwCoreLib.Lux.Data.Migrations BomCost = 800.0, BomOk = true, BomPrice = 1150.0, - Envir = 1, + Envir = 2, FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3657), + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7023), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3659), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7025), Note = "Demo file 01", OfferID = 2, OfferRowUID = "OFF250000020001", @@ -1438,15 +1473,15 @@ namespace EgwCoreLib.Lux.Data.Migrations BomCost = 600.0, BomOk = true, BomPrice = 950.0, - Envir = 1, + Envir = 2, FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3671), + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7037), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3673), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7039), Note = "Demo file 02", OfferID = 2, OfferRowUID = "OFF250000020002", @@ -1465,15 +1500,15 @@ namespace EgwCoreLib.Lux.Data.Migrations BomCost = 200.0, BomOk = true, BomPrice = 250.0, - Envir = 1, + Envir = 3, FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3704), + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7070), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3705), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7072), Note = "Demo file 01", OfferID = 3, OfferRowUID = "OFF250000030001", @@ -1492,15 +1527,15 @@ namespace EgwCoreLib.Lux.Data.Migrations BomCost = 50.0, BomOk = true, BomPrice = 80.0, - Envir = 1, + Envir = 3, FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3717), + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7089), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3719), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7090), Note = "Demo file 02", OfferID = 3, OfferRowUID = "OFF250000030002", @@ -1519,15 +1554,15 @@ namespace EgwCoreLib.Lux.Data.Migrations BomCost = 800.0, BomOk = true, BomPrice = 1150.0, - Envir = 1, + Envir = 4, FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3749), + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7121), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3751), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7122), Note = "Demo file 01", OfferID = 4, OfferRowUID = "OFF250000040001", @@ -1546,15 +1581,15 @@ namespace EgwCoreLib.Lux.Data.Migrations BomCost = 600.0, BomOk = true, BomPrice = 950.0, - Envir = 1, + Envir = 4, FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3763), + Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7134), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3765), + Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7136), Note = "Demo file 02", OfferID = 4, OfferRowUID = "OFF250000040002", @@ -1737,8 +1772,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 1, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3114), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3164), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6489), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6540), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1750,8 +1785,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3167), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3168), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6543), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6544), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -1763,8 +1798,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3170), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3172), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6546), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6548), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1776,8 +1811,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3174), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3175), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6550), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6551), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1789,8 +1824,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3177), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3178), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6553), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6554), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -1802,8 +1837,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3180), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3182), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6556), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6558), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1815,8 +1850,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3184), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3185), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6560), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6561), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -1828,8 +1863,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3187), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3189), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6563), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6564), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1841,8 +1876,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3191), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3192), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6566), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6568), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1854,8 +1889,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - DtCreate = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3194), - DtMod = new DateTime(2025, 10, 4, 10, 56, 44, 628, DateTimeKind.Local).AddTicks(3195), + DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6570), + DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6571), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -2316,28 +2351,28 @@ namespace EgwCoreLib.Lux.Data.Migrations GenValID = 1, ClassCod = "WoodCol", Ordinal = 1, - ValString = "Legno" + ValString = "Blue" }, new { GenValID = 2, ClassCod = "WoodCol", Ordinal = 2, - ValString = "Bianco" + ValString = "White" }, new { GenValID = 3, ClassCod = "WoodCol", Ordinal = 3, - ValString = "Rosso" + ValString = "Red" }, new { GenValID = 4, ClassCod = "WoodCol", Ordinal = 4, - ValString = "Nero" + ValString = "Black" }, new { diff --git a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs index fd6722d7..aa86bd86 100644 --- a/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs +++ b/EgwCoreLib.Lux.Data/ModelBuilderExtensions.cs @@ -44,10 +44,10 @@ namespace EgwCoreLib.Lux.Data ); modelBuilder.Entity().HasData( - new GenValueModel { GenValID = 1, Ordinal = 1, ClassCod = "WoodCol", ValString = "Legno" }, - new GenValueModel { GenValID = 2, Ordinal = 2, ClassCod = "WoodCol", ValString = "Bianco" }, - new GenValueModel { GenValID = 3, Ordinal = 3, ClassCod = "WoodCol", ValString = "Rosso" }, - new GenValueModel { GenValID = 4, Ordinal = 4, ClassCod = "WoodCol", ValString = "Nero" }, + new GenValueModel { GenValID = 1, Ordinal = 1, ClassCod = "WoodCol", ValString = "Blue" }, + new GenValueModel { GenValID = 2, Ordinal = 2, ClassCod = "WoodCol", ValString = "White" }, + new GenValueModel { GenValID = 3, Ordinal = 3, ClassCod = "WoodCol", ValString = "Red" }, + new GenValueModel { GenValID = 4, Ordinal = 4, ClassCod = "WoodCol", ValString = "Black" }, new GenValueModel { GenValID = 5, Ordinal = 1, ClassCod = "ShapeList", ValString = "Rectangular" }, new GenValueModel { GenValID = 6, Ordinal = 2, ClassCod = "ShapeList", ValString = "Trapezoidal" }, new GenValueModel { GenValID = 7, Ordinal = 3, ClassCod = "ShapeList", ValString = "Triangular" }, @@ -60,13 +60,18 @@ namespace EgwCoreLib.Lux.Data modelBuilder.Entity().HasData( new GlassModel { GlassID = 1, Code = "0001", Description = "Vetro BE 2S 4/12/4", Thickness = 20 }, - new GlassModel { GlassID = 2, Code = "0002", Description = "Vetro BE 3S 4/12/4/12/4", Thickness = 36 }, - new GlassModel { GlassID = 3, Code = "0003", Description = "Vetro BE 3S 4/16/4/16/4", Thickness = 44 } + new GlassModel { GlassID = 2, Code = "0002", Description = "Vetro BE 2S 4/16/4", Thickness = 24 }, + new GlassModel { GlassID = 3, Code = "0003", Description = "Vetro BE 3S 4/12/4/12/4", Thickness = 36 }, + new GlassModel { GlassID = 4, Code = "0004", Description = "Vetro BE 3S 4/16/4/16/4", Thickness = 44 }, + new GlassModel { GlassID = 5, Code = "0005", Description = "Vetro BE 2S 4T/12/4T", Thickness = 20 }, + new GlassModel { GlassID = 6, Code = "0006", Description = "Vetro BE 2S 4T/16/4T", Thickness = 24 }, + new GlassModel { GlassID = 7, Code = "0007", Description = "Vetro BE 3S 4T/12/4T/12/4T", Thickness = 36 }, + new GlassModel { GlassID = 8, Code = "0008", Description = "Vetro BE 3S 4T/16/4T/16/4T", Thickness = 44 } ); modelBuilder.Entity().HasData( - new ProfileModel { ProfileID = 1, Code = "0001", Description = "Profilo 32", Thickness = 32 }, - new ProfileModel { ProfileID = 2, Code = "0002", Description = "Profilo 48", Thickness = 48 }, - new ProfileModel { ProfileID = 3, Code = "0003", Description = "Profilo 58", Thickness = 58 } + new ProfileModel { ProfileID = 1, Code = "0001", Description = "Profilo60", Thickness = 60 }, + new ProfileModel { ProfileID = 2, Code = "0002", Description = "Profilo78", Thickness = 78 }, + new ProfileModel { ProfileID = 3, Code = "0003", Description = "Profilo90", Thickness = 90 } ); modelBuilder.Entity().HasData( new WoodModel { WoodID = 1, Code = "0001", Description = "Abete", Type = 1 }, From c3805fe69cdd56730a2e6a86ad067dc4b5e11072 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 15 Oct 2025 11:49:30 +0200 Subject: [PATCH 53/65] update componente disegno window --- EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj | 3 ++- Lux.API/Lux.API.csproj | 3 +-- Lux.UI.Client/Lux.UI.Client.csproj | 3 +-- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 5 +++++ Lux.UI/Lux.UI.csproj | 5 ++--- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 8 files changed, 14 insertions(+), 11 deletions(-) diff --git a/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj b/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj index 82911780..84ebbf6d 100644 --- a/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj +++ b/EgwCoreLib.Lux.Core/EgwCoreLib.Lux.Core.csproj @@ -21,7 +21,8 @@ - + + diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 4ddc20a2..4091c27e 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2510.0716 + 0.9.2510.1511 @@ -65,7 +65,6 @@ - diff --git a/Lux.UI.Client/Lux.UI.Client.csproj b/Lux.UI.Client/Lux.UI.Client.csproj index ee438118..8a860940 100644 --- a/Lux.UI.Client/Lux.UI.Client.csproj +++ b/Lux.UI.Client/Lux.UI.Client.csproj @@ -9,8 +9,7 @@ - - + diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index d18e4f03..3a4bda66 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -243,6 +243,7 @@ namespace Lux.UI.Components.Compo private List AvailFamilyHardwareList = new List(); private List AvailGlassList = new List(); + private List AvailProfileList = new List(); private List AvailHardwareList = new(); @@ -362,6 +363,7 @@ namespace Lux.UI.Components.Compo Glass = AvailGlassList, Hardware = AvailHardwareList, Material = AvailMaterialList, + Profile = AvailProfileList, TemplateDTO = null }; CurrData = new LivePayload() @@ -392,6 +394,9 @@ namespace Lux.UI.Components.Compo AvailGlassList = AllConfGlass .Select(x => x.Description) .ToList(); + AvailProfileList = AllConfProfile + .Select(x => x.Description) + .ToList(); AvailFamilyHardwareList = AllConfHardware .DistinctBy(x => x.FamilyName) .OrderBy(x => x.FamilyName) diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 5528f1e3..2e24bff8 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2510.0716 + 0.9.2510.1511 @@ -17,8 +17,7 @@ - - + diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 3a0113c7..70c6f5fe 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

            Versione: 0.9.2510.0716

            +

            Versione: 0.9.2510.1511


            Note di rilascio:
            • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 3500876c..78bc6760 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2510.0716 +0.9.2510.1511 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index dcacd156..f17e3f47 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2510.0716 + 0.9.2510.1511 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 96a150b5de5f43772863b8527a72c02865e5da19 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 15 Oct 2025 17:26:08 +0200 Subject: [PATCH 54/65] Inizio gestione parametri comuni finestra --- .../Controllers/LuxController.cs | 42 +++++++++++++++++++ .../Services/DataLayerServices.cs | 19 +++++++++ Lux.API/Lux.API.csproj | 2 +- Lux.UI/Components/Compo/OfferCommonPar.razor | 5 +++ .../Components/Compo/OfferCommonPar.razor.cs | 24 +++++++++++ Lux.UI/Components/Compo/OfferMan.razor.cs | 15 +------ Lux.UI/Components/Pages/Offers.razor | 8 +--- Lux.UI/Components/Pages/Offers.razor.cs | 13 ++++++ Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 12 files changed, 111 insertions(+), 25 deletions(-) create mode 100644 Lux.UI/Components/Compo/OfferCommonPar.razor create mode 100644 Lux.UI/Components/Compo/OfferCommonPar.razor.cs diff --git a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs index 124a9001..7bf5b8c8 100644 --- a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs +++ b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs @@ -1490,6 +1490,48 @@ namespace EgwCoreLib.Lux.Data.Controllers return answ; } + /// + /// Upsert record offerta + /// + /// + /// + internal async Task OffertUpsert(OfferModel updRec) + { + bool answ = false; + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + // recupero offerta... + var currRec = dbCtx + .DbSetOffer + .Where(x => x.OfferID == updRec.OfferID) + .FirstOrDefault(); + + // se non trovo aggiungo + if (currRec == null) + { + dbCtx.DbSetOffer.Add(updRec); + } + // altrimenti aggiorno + else + { + dbCtx.Entry(currRec).CurrentValues.SetValues(updRec); + } + + // salvo TUTTI i cambiamenti... + var result = await dbCtx.SaveChangesAsync(); + answ = result > 0; + } + catch (Exception exc) + { + Log.Error($"Eccezione durante OffertUpsert{Environment.NewLine}{exc}"); + } + } + return answ; + } + /// /// Esegue upsert del record offerta data la BOM ricevuta /// diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index bfda5bfd..1cf019d2 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -879,6 +879,25 @@ namespace EgwCoreLib.Lux.Data.Services return fatto; } + /// + /// Effettua Upsert complessivo record offerta + /// + /// Key + /// + public async Task OffertUpsert(OfferModel updRec) + { + Stopwatch sw = new Stopwatch(); + sw.Start(); + // calcolo + bool fatto = await dbController.OffertUpsert(updRec); + // svuoto cache... + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Offers:*"); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:OfferRows:*"); + sw.Stop(); + Log.Debug($"OffertUpsert in {sw.Elapsed.TotalMilliseconds} ms"); + return fatto; + } + /// /// Esegue salvataggio BOM sul DB /// diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 4091c27e..df044ea8 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2510.1511 + 0.9.2510.1517 diff --git a/Lux.UI/Components/Compo/OfferCommonPar.razor b/Lux.UI/Components/Compo/OfferCommonPar.razor new file mode 100644 index 00000000..e74913f4 --- /dev/null +++ b/Lux.UI/Components/Compo/OfferCommonPar.razor @@ -0,0 +1,5 @@ +
              + aggiungi parametri generici + +
              + diff --git a/Lux.UI/Components/Compo/OfferCommonPar.razor.cs b/Lux.UI/Components/Compo/OfferCommonPar.razor.cs new file mode 100644 index 00000000..66949044 --- /dev/null +++ b/Lux.UI/Components/Compo/OfferCommonPar.razor.cs @@ -0,0 +1,24 @@ +using EgwCoreLib.Lux.Data.DbModel.Sales; +using Microsoft.AspNetCore.Components; + +namespace Lux.UI.Components.Compo +{ + public partial class OfferCommonPar + { + + [Parameter] + public OfferModel CurrRecord { get; set; } = null!; + + + [Parameter] + public EventCallback EC_Close { get; set; } + + [Parameter] + public EventCallback EC_Updated { get; set; } + + private async Task DoClose() + { + await EC_Close.InvokeAsync(true); + } + } +} \ No newline at end of file diff --git a/Lux.UI/Components/Compo/OfferMan.razor.cs b/Lux.UI/Components/Compo/OfferMan.razor.cs index 8abedaef..e5914cd4 100644 --- a/Lux.UI/Components/Compo/OfferMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferMan.razor.cs @@ -46,17 +46,6 @@ namespace Lux.UI.Components.Compo #region Private Methods - private async Task ClosePopup() - { - await EC_Close.InvokeAsync(true); -#if false - // Close the Popup - ShowPopup = false; - // Refresh Users - await GetUsers(); -#endif - } - private async Task DoCancel() { await EC_Close.InvokeAsync(true); @@ -64,9 +53,7 @@ namespace Lux.UI.Components.Compo private async Task DoSave() { - // fixme todo !!! - // effettuare salvataggio record... - + // richiesta update con salvataggio record await EC_Updated.InvokeAsync(CurrRecord); } diff --git a/Lux.UI/Components/Pages/Offers.razor b/Lux.UI/Components/Pages/Offers.razor index ac18123f..52d19dcf 100644 --- a/Lux.UI/Components/Pages/Offers.razor +++ b/Lux.UI/Components/Pages/Offers.razor @@ -53,17 +53,13 @@
      - @if (currStep == CompileStep.Header) { - + } else if (currStep == CompileStep.General) { -
      - aggiungi parametri generici - -
      + } else if (currStep == CompileStep.Rows) { diff --git a/Lux.UI/Components/Pages/Offers.razor.cs b/Lux.UI/Components/Pages/Offers.razor.cs index 215312e1..e97009eb 100644 --- a/Lux.UI/Components/Pages/Offers.razor.cs +++ b/Lux.UI/Components/Pages/Offers.razor.cs @@ -216,5 +216,18 @@ namespace Lux.UI.Components.Pages RefreshDisplay(); } #endif + /// + /// Salva record ed avanza compilazione + /// + /// + /// + private async Task DoSave(OfferModel updRec) + { + // salvo record + await DLService.OffertUpsert(updRec); + // cambio step + CompileStep nextStep = currStep < CompileStep.FinalCheck ? currStep + 1 : currStep; + AdvStep(nextStep); + } } } \ No newline at end of file diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 2e24bff8..e7d30c85 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2510.1511 + 0.9.2510.1517 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 70c6f5fe..32d6737a 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

      Versione: 0.9.2510.1511

      +

      Versione: 0.9.2510.1517


      Note di rilascio:
      • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 78bc6760..6b884512 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2510.1511 +0.9.2510.1517 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index f17e3f47..89578afc 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2510.1511 + 0.9.2510.1517 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 49e49ff95ece8f45e567710502f7b52047b09740 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 16 Oct 2025 10:42:50 +0200 Subject: [PATCH 55/65] update struttura dati x preselezioni valori salvati --- EgwCoreLib.Lux.Core/ParamDict.cs | 89 + .../Controllers/LuxController.cs | 86 + .../DbModel/Sales/OfferModel.cs | 8 +- .../DbModel/Sales/OfferRowModel.cs | 2 +- .../DbModel/Sales/OrderModel.cs | 5 + ...51015154324_AddOfferPreselDict.Designer.cs | 2807 ++++++++++++++++ .../20251015154324_AddOfferPreselDict.cs | 352 +++ ...51015154525_AddOrderPreselDict.Designer.cs | 2815 +++++++++++++++++ .../20251015154525_AddOrderPreselDict.cs | 352 +++ .../DataLayerContextModelSnapshot.cs | 112 +- .../Services/DataLayerServices.cs | 39 + 11 files changed, 6615 insertions(+), 52 deletions(-) create mode 100644 EgwCoreLib.Lux.Core/ParamDict.cs create mode 100644 EgwCoreLib.Lux.Data/Migrations/20251015154324_AddOfferPreselDict.Designer.cs create mode 100644 EgwCoreLib.Lux.Data/Migrations/20251015154324_AddOfferPreselDict.cs create mode 100644 EgwCoreLib.Lux.Data/Migrations/20251015154525_AddOrderPreselDict.Designer.cs create mode 100644 EgwCoreLib.Lux.Data/Migrations/20251015154525_AddOrderPreselDict.cs diff --git a/EgwCoreLib.Lux.Core/ParamDict.cs b/EgwCoreLib.Lux.Core/ParamDict.cs new file mode 100644 index 00000000..05b6fad2 --- /dev/null +++ b/EgwCoreLib.Lux.Core/ParamDict.cs @@ -0,0 +1,89 @@ +using Newtonsoft.Json; + +namespace EgwCoreLib.Lux.Core +{ + /// + /// Generico dizionario parametri con funzione ricerca valore (SE presente) + /// + public class ParamDict + { + #region Public Constructors + + /// + /// init classe dal valore serializzato del dizionario + /// + /// + public ParamDict(string rawVal) + { + DictVals = JsonConvert.DeserializeObject>(rawVal) ?? new Dictionary(); + } + + /// + /// init classe da dizionario + /// + /// + public ParamDict(Dictionary newDict) + { + DictVals = newDict; + } + + #endregion Public Constructors + + #region Public Properties + + /// + /// Versione serializzata del dizionario + /// + public string Serialized + { + get => JsonConvert.SerializeObject(DictVals); + } + + #endregion Public Properties + + #region Public Methods + + /// + /// Ricerca (se disponibile) il valore della chiave richiesta + /// + /// + /// + public string GetVal(string reqKey) + { + string answ = ""; + if (DictVals.ContainsKey(reqKey)) + { + answ = DictVals[reqKey]; + } + return answ; + } + + /// + /// Imposta valore (aggiungendo se mancasse) + /// + /// + /// + public void SetVal(string Key, string Val) + { + if (DictVals.ContainsKey(Key)) + { + DictVals[Key] = Val; + } + else + { + DictVals.Add(Key, Val); + } + } + + #endregion Public Methods + + #region Private Properties + + /// + /// Dizionario interno valori + /// + private Dictionary DictVals { get; set; } = new Dictionary(); + + #endregion Private Properties + } +} \ No newline at end of file diff --git a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs index 7bf5b8c8..8987afdc 100644 --- a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs +++ b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs @@ -1232,6 +1232,50 @@ namespace EgwCoreLib.Lux.Data.Controllers return dbResult; } + /// + /// Aggiornamento valore UID non calcolato + ritorno elenco UID da aggiornare + /// + /// + /// + internal List OffertRowFixUid(int offertID) + { + List answ = new List(); + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + var currList = dbCtx + .DbSetOfferRow + .Where(x => x.OfferID == offertID) + .ToList(); + // se trovato --> verifico valori differenti, aggiorno e restituisco da calcolare + if (currList != null) + { + var list2fix = currList.Where(x => string.IsNullOrEmpty(x.OfferRowUID) || x.OfferRowUID != x.OfferRowDtx).ToList(); + if (list2fix != null && list2fix.Count > 0) + { + // salvo elenco + answ = list2fix.Select(x => x.OfferRowDtx).ToList(); + // sistemo UID + foreach (var item in list2fix) + { + item.OfferRowUID = item.OfferRowDtx; + dbCtx.Entry(item).State = EntityState.Modified; + } + // salvo... + var result = dbCtx.SaveChanges(); + } + } + } + catch (Exception exc) + { + Log.Error($"Eccezione durante OffertRowFixUid{Environment.NewLine}{exc}"); + } + } + return answ; + } + /// /// Effettua update dei costi di tutte le righe dell'offerta indicata /// @@ -1375,6 +1419,48 @@ namespace EgwCoreLib.Lux.Data.Controllers return answ; } + /// + /// Upsert record riga offerta + /// + /// + /// + internal async Task OffertRowUpsert(OfferRowModel updRec) + { + bool answ = false; + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + // recupero offerta... + var currRec = dbCtx + .DbSetOfferRow + .Where(x => x.OfferRowID == updRec.OfferRowID) + .FirstOrDefault(); + + // se non trovo aggiungo + if (currRec == null) + { + dbCtx.DbSetOfferRow.Add(updRec); + } + // altrimenti aggiorno + else + { + dbCtx.Entry(currRec).CurrentValues.SetValues(updRec); + } + + // salvo TUTTI i cambiamenti... + var result = await dbCtx.SaveChangesAsync(); + answ = result > 0; + } + catch (Exception exc) + { + Log.Error($"Eccezione durante OffertRowUpsert{Environment.NewLine}{exc}"); + } + } + return answ; + } + /// /// Effettua update stato await BOM/PRICE per l'offerta indicata /// diff --git a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs index fee06031..b8952cdb 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferModel.cs @@ -43,7 +43,8 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales [NotMapped] public string OfferCode { - get => $"{RefYear:00}.{RefNum:00000}.{RefRev:00}"; + get => $"OFF{RefYear:00}.{RefNum:000000}"; + //get => $"{RefYear:00}.{RefNum:000000}.{RefRev:00}"; } /// @@ -61,6 +62,11 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales /// public int DealerID { get; set; } + /// + /// Dizionario serializzato delle preselezioni (opzionale) + /// + public string DictPresel { get; set; } = ""; + /// /// Validità offerta /// diff --git a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs index 16f4963d..2cc53ecb 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs @@ -43,7 +43,7 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales [NotMapped] public string OfferRowDtx { - get => $"OFF{Inserted:yy}{OfferRowID:000000000}"; + get => $"OFF{Inserted:yy}{OfferID:000000}{RowNum:0000}"; } /// diff --git a/EgwCoreLib.Lux.Data/DbModel/Sales/OrderModel.cs b/EgwCoreLib.Lux.Data/DbModel/Sales/OrderModel.cs index 047f6a3b..caa4b977 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Sales/OrderModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Sales/OrderModel.cs @@ -70,6 +70,11 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales /// public int DealerID { get; set; } + /// + /// Dizionario serializzato delle preselezioni (opzionale) + /// + public string DictPresel { get; set; } = ""; + /// /// Validità Ordine /// diff --git a/EgwCoreLib.Lux.Data/Migrations/20251015154324_AddOfferPreselDict.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20251015154324_AddOfferPreselDict.Designer.cs new file mode 100644 index 00000000..9b0c423a --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20251015154324_AddOfferPreselDict.Designer.cs @@ -0,0 +1,2807 @@ +// +using System; +using EgwCoreLib.Lux.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace EgwCoreLib.Lux.Data.Migrations +{ + [DbContext(typeof(DataLayerContext))] + [Migration("20251015154324_AddOfferPreselDict")] + partial class AddOfferPreselDict + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.17") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.EnvirParamModel", b => + { + b.Property("EnvirID") + .HasColumnType("int"); + + b.Property("SerStrucKey") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("EnvirID"); + + b.ToTable("conf_envir"); + + b.HasData( + new + { + EnvirID = 1, + SerStrucKey = "Jwd" + }, + new + { + EnvirID = 2, + SerStrucKey = "Btl" + }, + new + { + EnvirID = 4, + SerStrucKey = "Btl" + }, + new + { + EnvirID = 3, + SerStrucKey = "Btl" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.GlassModel", b => + { + b.Property("GlassID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GlassID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Thickness") + .HasColumnType("double"); + + b.HasKey("GlassID"); + + b.ToTable("conf_glass"); + + b.HasData( + new + { + GlassID = 1, + Code = "0001", + Description = "Vetro BE 2S 4/12/4", + Thickness = 20.0 + }, + new + { + GlassID = 2, + Code = "0002", + Description = "Vetro BE 2S 4/16/4", + Thickness = 24.0 + }, + new + { + GlassID = 3, + Code = "0003", + Description = "Vetro BE 3S 4/12/4/12/4", + Thickness = 36.0 + }, + new + { + GlassID = 4, + Code = "0004", + Description = "Vetro BE 3S 4/16/4/16/4", + Thickness = 44.0 + }, + new + { + GlassID = 5, + Code = "0005", + Description = "Vetro BE 2S 4T/12/4T", + Thickness = 20.0 + }, + new + { + GlassID = 6, + Code = "0006", + Description = "Vetro BE 2S 4T/16/4T", + Thickness = 24.0 + }, + new + { + GlassID = 7, + Code = "0007", + Description = "Vetro BE 3S 4T/12/4T/12/4T", + Thickness = 36.0 + }, + new + { + GlassID = 8, + Code = "0008", + Description = "Vetro BE 3S 4T/16/4T/16/4T", + Thickness = 44.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.ProfileModel", b => + { + b.Property("ProfileID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProfileID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Thickness") + .HasColumnType("double"); + + b.HasKey("ProfileID"); + + b.ToTable("conf_profile"); + + b.HasData( + new + { + ProfileID = 1, + Code = "0001", + Description = "Profilo60", + Thickness = 60.0 + }, + new + { + ProfileID = 2, + Code = "0002", + Description = "Profilo78", + Thickness = 78.0 + }, + new + { + ProfileID = 3, + Code = "0003", + Description = "Profilo90", + Thickness = 90.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.WoodModel", b => + { + b.Property("WoodID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("WoodID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("WoodID"); + + b.ToTable("conf_wood"); + + b.HasData( + new + { + WoodID = 1, + Code = "0001", + Description = "Abete", + Type = 1 + }, + new + { + WoodID = 2, + Code = "0002", + Description = "Acero", + Type = 1 + }, + new + { + WoodID = 3, + Code = "0003", + Description = "Pino", + Type = 2 + }, + new + { + WoodID = 4, + Code = "0004", + Description = "Tek", + Type = 3 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", b => + { + b.Property("CostDriverID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CostDriverID")); + + b.Property("Descript") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Unit") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CostDriverID"); + + b.ToTable("cost_driver"); + + b.HasData( + new + { + CostDriverID = 1, + Descript = "Ore lavorate per step/fase", + Name = "WorkHour", + Unit = "h" + }, + new + { + CostDriverID = 2, + Descript = "Metri prodotti per step/fase", + Name = "Meter", + Unit = "m" + }, + new + { + CostDriverID = 3, + Descript = "Numero unità prodotte (lavorate) per step/fase", + Name = "Unit", + Unit = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.Property("ResourceID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); + + b.Property("CostDriverBudget") + .HasColumnType("decimal(65,30)"); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("EBTPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("FixedCost") + .HasColumnType("decimal(65,30)"); + + b.Property("LaborCost") + .HasColumnType("decimal(65,30)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OverHeadCost") + .HasColumnType("decimal(65,30)"); + + b.Property("OverHeadPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("PriceMargin") + .HasColumnType("decimal(65,30)"); + + b.Property("VariableCost") + .HasColumnType("decimal(65,30)"); + + b.HasKey("ResourceID"); + + b.HasIndex("CostDriverID"); + + b.ToTable("cost_resource"); + + b.HasData( + new + { + ResourceID = 1, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 12000m, + LaborCost = 30m, + Name = "Sezionatrice", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 2, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 100000m, + LaborCost = 40m, + Name = "Linea SAOMAD WoodPecker Just 3500", + OverHeadCost = 15000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 30000m + }, + new + { + ResourceID = 3, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 35m, + Name = "Linea Pantografo", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 4, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 30m, + Name = "Stazione Verniciatura", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 5, + CostDriverBudget = 220m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 6000m, + LaborCost = 30m, + Name = "Verniciatura Manuale", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 2000m + }, + new + { + ResourceID = 6, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 500m, + LaborCost = 30m, + Name = "Montaggio Manuale", + OverHeadCost = 500m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 500m + }, + new + { + ResourceID = 7, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 0m, + LaborCost = 40m, + Name = "Installatore", + OverHeadCost = 0m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 3000m + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", b => + { + b.Property("CodGroup") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CodGroup"); + + b.ToTable("item_group"); + + b.HasData( + new + { + CodGroup = "WindowTrunk", + Description = "Barre legno per lavorazione" + }, + new + { + CodGroup = "WindowGlass", + Description = "Vetri serramento" + }, + new + { + CodGroup = "WindowVarnish", + Description = "Vernici per legno" + }, + new + { + CodGroup = "WindowHardware", + Description = "Ferramenta serramento" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.Property("ItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); + + b.Property("CodGroup") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemIDParent") + .HasColumnType("int"); + + b.Property("ItemType") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("QtyMax") + .HasColumnType("double"); + + b.Property("QtyMin") + .HasColumnType("double"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ItemID"); + + b.HasIndex("CodGroup"); + + b.ToTable("item_item"); + + b.HasData( + new + { + ItemID = 1, + CodGroup = "WindowTrunk", + Cost = 20.0, + Description = "BARRA-60x80 generica", + ExtItemCode = "", + IsService = false, + ItemCode = 1001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.29999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "BARR.001", + UM = "#" + }, + new + { + ItemID = 2, + CodGroup = "WindowTrunk", + Cost = 16.5, + Description = "Barra 60x80, lunghezza 12m", + ExtItemCode = "BARRA-60x80x12000", + IsService = false, + ItemCode = 1002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.12000", + UM = "#" + }, + new + { + ItemID = 3, + CodGroup = "WindowTrunk", + Cost = 17.5, + Description = "Barra 60x80, lunghezza 8m", + ExtItemCode = "BARRA-60x80x8000", + IsService = false, + ItemCode = 1003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.22, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.8000", + UM = "#" + }, + new + { + ItemID = 4, + CodGroup = "WindowTrunk", + Cost = 15.5, + Description = "Barra 60x80, lunghezza 16m", + ExtItemCode = "BARRA-60x80x16000", + IsService = false, + ItemCode = 1004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.16000", + UM = "#" + }, + new + { + ItemID = 5, + CodGroup = "WindowGlass", + Cost = 300.0, + Description = "Vetro triplo, basso indice termico, 800x1000", + ExtItemCode = "VETRO-3L-THERMO-800x1000", + IsService = false, + ItemCode = 2001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3T.800.1000", + UM = "m2" + }, + new + { + ItemID = 6, + CodGroup = "WindowGlass", + Cost = 200.0, + Description = "Vetro doppio, 800x1000", + ExtItemCode = "VETRO-2L-800x1000", + IsService = false, + ItemCode = 2002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.14999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V2.800.1000", + UM = "m2" + }, + new + { + ItemID = 7, + CodGroup = "WindowGlass", + Cost = 250.0, + Description = "Vetro triplo, 800x1000", + ExtItemCode = "VETRO-3L-800x1000", + IsService = false, + ItemCode = 2003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.17999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3.800.1000", + UM = "m2" + }, + new + { + ItemID = 8, + CodGroup = "WindowVarnish", + Cost = 20.0, + Description = "Vernice trasparente", + ExtItemCode = "VERN-TRASP", + IsService = false, + ItemCode = 3001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "VT.STD", + UM = "l" + }, + new + { + ItemID = 9, + CodGroup = "WindowHardware", + Cost = 65.0, + Description = "Kit standard completo AGB tipo 001", + ExtItemCode = "KIT-001", + IsService = false, + ItemCode = 5001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-KIT-001", + UM = "#" + }, + new + { + ItemID = 10, + CodGroup = "WindowHardware", + Cost = 10.0, + Description = "Cerniera AGB tipo 001", + ExtItemCode = "CERN-001", + IsService = false, + ItemCode = 5002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-CERN-001", + UM = "#" + }, + new + { + ItemID = 11, + CodGroup = "WindowHardware", + Cost = 15.0, + Description = "Serratura AGB tipo 001", + ExtItemCode = "SERR-001", + IsService = false, + ItemCode = 5003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-SERR-001", + UM = "#" + }, + new + { + ItemID = 12, + CodGroup = "WindowHardware", + Cost = 25.0, + Description = "Maniglia AGB tipo 001", + ExtItemCode = "MAN-001", + IsService = false, + ItemCode = 5004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-MAN-001", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.Property("SellingItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SellingItemID"); + + b.HasIndex("JobID"); + + b.ToTable("item_selling_item"); + + b.HasData( + new + { + SellingItemID = 1, + Cost = 820.0, + Description = "Finestra anta Singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 2, + Margin = 0.20000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 2, + Cost = 150.0, + Description = "Persiana anta singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.10000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 3, + Cost = 200.0, + Description = "Installazione", + ExtItemCode = "", + IsService = true, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 4, + Cost = 1000.0, + Description = "Trave lamellare", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 3, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 5, + Cost = 500.0, + Description = "Cabinet", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 4, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 6, + Cost = 2000.0, + Description = "Parete", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 5, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SupplierModel", b => + { + b.Property("SupplierID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SupplierID"); + + b.ToTable("item_supplier"); + + b.HasData( + new + { + SupplierID = 1, + CompanyName = "Company One", + FirstName = "Supplier A", + LastName = "Egalware", + VAT = "7294857103879254" + }, + new + { + SupplierID = 2, + CompanyName = "Company Two", + FirstName = "Supplier B", + LastName = "User", + VAT = "7294857103879254" + }, + new + { + SupplierID = 3, + CompanyName = "Company Two", + FirstName = "Supplier C", + LastName = "User Test", + VAT = "7294857103879254" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", b => + { + b.Property("ProductionBatchID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DueDate") + .HasColumnType("datetime(6)"); + + b.HasKey("ProductionBatchID"); + + b.ToTable("production_batch"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.Property("ProdItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("OrderRowID") + .HasColumnType("int"); + + b.Property("ProductionBatchID") + .HasColumnType("int"); + + b.HasKey("ProdItemID"); + + b.HasIndex("OrderRowID"); + + b.HasIndex("ProductionBatchID"); + + b.ToTable("production_item"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.Property("ProdItemStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProdItemID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.Property("WorkTime") + .HasColumnType("double"); + + b.HasKey("ProdItemStepID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ProdItemID"); + + b.HasIndex("ResourceID"); + + b.ToTable("production_item_step"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", b => + { + b.Property("CustomerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CustomerID"); + + b.ToTable("sales_customer"); + + b.HasData( + new + { + CustomerID = 1, + CompanyName = "", + FirstName = "Customer A", + LastName = "Egalware", + VAT = "1234567890123456" + }, + new + { + CustomerID = 2, + CompanyName = "", + FirstName = "Customer B", + LastName = "User", + VAT = "1234567890123456" + }, + new + { + CustomerID = 3, + CompanyName = "", + FirstName = "Customer C", + LastName = "User Test", + VAT = "1234567890123456" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", b => + { + b.Property("DealerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("DealerID"); + + b.ToTable("sales_dealer"); + + b.HasData( + new + { + DealerID = 1, + CompanyName = "Company First", + FirstName = "Dealer A", + LastName = "Egalware", + VAT = "9587362514671527" + }, + new + { + DealerID = 2, + CompanyName = "Company First", + FirstName = "Dealer B", + LastName = "User", + VAT = "9587362514671527" + }, + new + { + DealerID = 3, + CompanyName = "Company Second", + FirstName = "Dealer C", + LastName = "User Test", + VAT = "9587362514671527" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Property("OfferID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Discount") + .HasColumnType("double"); + + b.Property("Envir") + .HasColumnType("int"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OfferID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.ToTable("sales_offer"); + + b.HasData( + new + { + OfferID = 1, + CustomerID = 2, + DealerID = 2, + Description = "Offerta per tre serramenti", + Discount = 0.0, + Envir = 1, + Inserted = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5795), + Modified = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5797), + OffertState = 0, + RefNum = 1, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5792) + }, + new + { + OfferID = 2, + CustomerID = 2, + DealerID = 2, + Description = "Offerta BEAM", + Discount = 0.0, + Envir = 2, + Inserted = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5803), + Modified = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5805), + OffertState = 0, + RefNum = 2, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5802) + }, + new + { + OfferID = 3, + CustomerID = 2, + DealerID = 2, + Description = "Offerta Cabinet", + Discount = 0.0, + Envir = 4, + Inserted = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5810), + Modified = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5811), + OffertState = 0, + RefNum = 3, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5808) + }, + new + { + OfferID = 4, + CustomerID = 2, + DealerID = 2, + Description = "Offerta Wall", + Discount = 0.0, + Envir = 3, + Inserted = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5816), + Modified = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5817), + OffertState = 0, + RefNum = 4, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5815) + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferRowModel", b => + { + b.Property("OfferRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); + + b.Property("AwaitBom") + .HasColumnType("tinyint(1)"); + + b.Property("AwaitPrice") + .HasColumnType("tinyint(1)"); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomOk") + .HasColumnType("tinyint(1)"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Envir") + .HasColumnType("int"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FileResource") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemBOM") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemOk") + .HasColumnType("tinyint(1)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OfferRowUID") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OfferRowID"); + + b.HasIndex("OfferID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_offer_row"); + + b.HasData( + new + { + OfferRowID = 1, + AwaitBom = false, + AwaitPrice = false, + BomCost = 900.0, + BomOk = true, + BomPrice = 950.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5960), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5962), + Note = "Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000010001", + Qty = 3.0, + RowNum = 1, + SellingItemID = 1, + SerStruct = "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Pine\",\"ColorMaterial\":\"Black\",\"Glass\":\"4T/16/4T\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"IdGroup\":1,\"AreaList\":[{\"bIsSashVertical\":true,\"SashList\":[{\"nSashId\":1,\"OpeningType\":\"TILTTURN_LEFT\",\"bHasHandle\":true,\"dDimension\":100.0}],\"SashType\":\"NULL\",\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"Hardware\":\"000558\",\"IdGroup\":2,\"AreaList\":[{\"FillType\":\"GLASS\",\"IdGroup\":3,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"SASH\"}],\"AreaType\":\"FRAME\"}]}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 2, + AwaitBom = false, + AwaitPrice = false, + BomCost = 160.0, + BomOk = true, + BomPrice = 200.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5976), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5978), + Note = "Persiana per Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000010002", + Qty = 3.0, + RowNum = 2, + SellingItemID = 2, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 3, + AwaitBom = false, + AwaitPrice = false, + BomCost = 200.0, + BomOk = true, + BomPrice = 250.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5990), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5992), + Note = "Installazione serramento", + OfferID = 1, + OfferRowUID = "OFF250000010003", + Qty = 3.0, + RowNum = 3, + SellingItemID = 3, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 4, + AwaitBom = false, + AwaitPrice = false, + BomCost = 800.0, + BomOk = true, + BomPrice = 1150.0, + Envir = 2, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6029), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6030), + Note = "Demo file 01", + OfferID = 2, + OfferRowUID = "OFF250000020001", + Qty = 10.0, + RowNum = 1, + SellingItemID = 4, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 5, + AwaitBom = false, + AwaitPrice = false, + BomCost = 600.0, + BomOk = true, + BomPrice = 950.0, + Envir = 2, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6043), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6045), + Note = "Demo file 02", + OfferID = 2, + OfferRowUID = "OFF250000020002", + Qty = 4.0, + RowNum = 1, + SellingItemID = 4, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 6, + AwaitBom = false, + AwaitPrice = false, + BomCost = 200.0, + BomOk = true, + BomPrice = 250.0, + Envir = 3, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6076), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6077), + Note = "Demo file 01", + OfferID = 3, + OfferRowUID = "OFF250000030001", + Qty = 4.0, + RowNum = 1, + SellingItemID = 5, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 7, + AwaitBom = false, + AwaitPrice = false, + BomCost = 50.0, + BomOk = true, + BomPrice = 80.0, + Envir = 3, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6090), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6092), + Note = "Demo file 02", + OfferID = 3, + OfferRowUID = "OFF250000030002", + Qty = 12.0, + RowNum = 1, + SellingItemID = 5, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 8, + AwaitBom = false, + AwaitPrice = false, + BomCost = 800.0, + BomOk = true, + BomPrice = 1150.0, + Envir = 4, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6122), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6123), + Note = "Demo file 01", + OfferID = 4, + OfferRowUID = "OFF250000040001", + Qty = 6.0, + RowNum = 1, + SellingItemID = 6, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 9, + AwaitBom = false, + AwaitPrice = false, + BomCost = 600.0, + BomOk = true, + BomPrice = 950.0, + Envir = 4, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6136), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6137), + Note = "Demo file 02", + OfferID = 4, + OfferRowUID = "OFF250000040002", + Qty = 4.0, + RowNum = 1, + SellingItemID = 6, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", b => + { + b.Property("OrderID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DictPresel") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OrderID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.HasIndex("OfferID"); + + b.ToTable("sales_order"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.Property("OrderRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OrderID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OrderRowID"); + + b.HasIndex("OrderID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_order_row"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.Property("StockMovID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); + + b.Property("CodDoc") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DtCreate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("DtMod") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); + + b.Property("MovCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyRec") + .HasColumnType("double"); + + b.Property("StockStatusId") + .HasColumnType("int"); + + b.Property("UnitVal") + .HasColumnType("double"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("StockMovID"); + + b.HasIndex("MovCod"); + + b.HasIndex("StockStatusId"); + + b.ToTable("stock_mov"); + + b.HasData( + new + { + StockMovID = 1, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5466), + DtMod = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5526), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 1, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 2, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5529), + DtMod = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5530), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 8.0, + StockStatusId = 2, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 3, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5532), + DtMod = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5533), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 3, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 4, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5535), + DtMod = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5537), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 4, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 5, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5539), + DtMod = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5540), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 10.0, + StockStatusId = 5, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 6, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5542), + DtMod = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5543), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 6, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 7, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5546), + DtMod = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5547), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 50.0, + StockStatusId = 7, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 8, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5549), + DtMod = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5550), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 8, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 9, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5552), + DtMod = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5554), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 9, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 10, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5556), + DtMod = new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5557), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 10, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.Property("StockStatusId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("IsRemn") + .HasColumnType("tinyint(1)"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("Location") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyAvail") + .HasColumnType("double"); + + b.HasKey("StockStatusId"); + + b.HasIndex("ItemID"); + + b.ToTable("stock_status"); + + b.HasData( + new + { + StockStatusId = 1, + IsDeleted = false, + IsRemn = false, + ItemID = 1, + Location = "B001-001-003", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 2, + IsDeleted = false, + IsRemn = false, + ItemID = 2, + Location = "B001-001-002", + QtyAvail = 8.0 + }, + new + { + StockStatusId = 3, + IsDeleted = false, + IsRemn = false, + ItemID = 3, + Location = "B001-001-001", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 4, + IsDeleted = false, + IsRemn = false, + ItemID = 4, + Location = "V002-001-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 5, + IsDeleted = false, + IsRemn = false, + ItemID = 5, + Location = "V001-001-002", + QtyAvail = 10.0 + }, + new + { + StockStatusId = 6, + IsDeleted = false, + IsRemn = false, + ItemID = 6, + Location = "V001-001-003", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 7, + IsDeleted = false, + IsRemn = false, + ItemID = 8, + Location = "V001-001-003", + QtyAvail = 50.0 + }, + new + { + StockStatusId = 8, + IsDeleted = false, + IsRemn = false, + ItemID = 11, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 9, + IsDeleted = false, + IsRemn = false, + ItemID = 9, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 10, + IsDeleted = false, + IsRemn = false, + ItemID = 10, + Location = "S001-001-001", + QtyAvail = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => + { + b.Property("JobID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("JobID"); + + b.ToTable("task_job"); + + b.HasData( + new + { + JobID = 1, + Description = "Rivendita / servizi" + }, + new + { + JobID = 2, + Description = "Serramento Completo Legno su linea Saomad e installatore interno" + }, + new + { + JobID = 3, + Description = "Realizzazione Trave" + }, + new + { + JobID = 4, + Description = "Realizzazione Cabinet" + }, + new + { + JobID = 5, + Description = "Realizzazione Parete" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.Property("JobStepItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("JobStepID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.HasKey("JobStepItemID"); + + b.HasIndex("ItemID"); + + b.HasIndex("JobStepID"); + + b.ToTable("task_job_step_item"); + + b.HasData( + new + { + JobStepItemID = 1, + Description = "Grezzo legno abete", + Index = 1, + ItemID = 1, + JobStepID = 1, + Qty = 1.0 + }, + new + { + JobStepItemID = 2, + Description = "Vernice trasparente standard 1L", + Index = 2, + ItemID = 8, + JobStepID = 3, + Qty = 0.10000000000000001 + }, + new + { + JobStepItemID = 3, + Description = "Ferramenta AGB - rif. AGFD.00000.00000", + Index = 3, + ItemID = 9, + JobStepID = 4, + Qty = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.Property("JobStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProductivityRate") + .HasColumnType("decimal(65,30)"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.HasKey("JobStepID"); + + b.HasIndex("CostDriverID"); + + b.HasIndex("JobID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ResourceID"); + + b.ToTable("task_job_step"); + + b.HasData( + new + { + JobStepID = 1, + CostDriverID = 3, + Description = "", + Index = 1, + JobID = 2, + PhaseID = 1, + ProductivityRate = 1m, + ResourceID = 1 + }, + new + { + JobStepID = 2, + CostDriverID = 2, + Description = "", + Index = 2, + JobID = 2, + PhaseID = 2, + ProductivityRate = 1m, + ResourceID = 2 + }, + new + { + JobStepID = 3, + CostDriverID = 3, + Description = "", + Index = 3, + JobID = 2, + PhaseID = 3, + ProductivityRate = 1m, + ResourceID = 4 + }, + new + { + JobStepID = 4, + CostDriverID = 3, + Description = "", + Index = 4, + JobID = 2, + PhaseID = 4, + ProductivityRate = 1m, + ResourceID = 6 + }, + new + { + JobStepID = 5, + CostDriverID = 3, + Description = "", + Index = 5, + JobID = 2, + PhaseID = 6, + ProductivityRate = 1m, + ResourceID = 7 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", b => + { + b.Property("PhaseID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("PhaseID"); + + b.ToTable("task_phase"); + + b.HasData( + new + { + PhaseID = 1, + Description = "Taglio tronchetti" + }, + new + { + PhaseID = 2, + Description = "Lavorazione pezzi serramento" + }, + new + { + PhaseID = 3, + Description = "Verniciatura" + }, + new + { + PhaseID = 4, + Description = "Assemblaggio completo" + }, + new + { + PhaseID = 5, + Description = "Assemblaggio Ferramenta" + }, + new + { + PhaseID = 6, + Description = "Installazione e posa in opera" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.CounterModel", b => + { + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("CountName") + .HasColumnType("varchar(255)"); + + b.Property("Counter") + .HasColumnType("int"); + + b.HasKey("RefYear", "CountName"); + + b.ToTable("utils_counter"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Property("ClassCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ClassCod"); + + b.ToTable("utils_gen_class"); + + b.HasData( + new + { + ClassCod = "ShapeList", + Description = "Elenco Shape Gestite" + }, + new + { + ClassCod = "WoodCol", + Description = "Elenco Colori Legno" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.Property("GenValID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); + + b.Property("ClassCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Ordinal") + .HasColumnType("int"); + + b.Property("ValString") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("GenValID"); + + b.HasIndex("ClassCod"); + + b.ToTable("utils_gen_value"); + + b.HasData( + new + { + GenValID = 1, + ClassCod = "WoodCol", + Ordinal = 1, + ValString = "Blue" + }, + new + { + GenValID = 2, + ClassCod = "WoodCol", + Ordinal = 2, + ValString = "White" + }, + new + { + GenValID = 3, + ClassCod = "WoodCol", + Ordinal = 3, + ValString = "Red" + }, + new + { + GenValID = 4, + ClassCod = "WoodCol", + Ordinal = 4, + ValString = "Black" + }, + new + { + GenValID = 5, + ClassCod = "ShapeList", + Ordinal = 1, + ValString = "Rectangular" + }, + new + { + GenValID = 6, + ClassCod = "ShapeList", + Ordinal = 2, + ValString = "Trapezoidal" + }, + new + { + GenValID = 7, + ClassCod = "ShapeList", + Ordinal = 3, + ValString = "Triangular" + }, + new + { + GenValID = 8, + ClassCod = "ShapeList", + Ordinal = 4, + ValString = "Arc" + }, + new + { + GenValID = 9, + ClassCod = "ShapeList", + Ordinal = 5, + ValString = "FullArc" + }, + new + { + GenValID = 10, + ClassCod = "ShapeList", + Ordinal = 6, + ValString = "SemiFullArc" + }, + new + { + GenValID = 11, + ClassCod = "ShapeList", + Ordinal = 7, + ValString = "SemiArc" + }, + new + { + GenValID = 12, + ClassCod = "ShapeList", + Ordinal = 8, + ValString = "Circular" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", b => + { + b.Property("MovCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("MovCod"); + + b.ToTable("utils_mov_type"); + + b.HasData( + new + { + MovCod = "CAR", + Description = "Carico a magazzino" + }, + new + { + MovCod = "MOV", + Description = "Movimento interno (spostamento)" + }, + new + { + MovCod = "ND", + Description = "Non Definito" + }, + new + { + MovCod = "OFOR", + Description = "Ordine Fornitore" + }, + new + { + MovCod = "RETT", + Description = "Rettifica magazzino" + }, + new + { + MovCod = "SCAR", + Description = "Scarico da magazzino" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", b => + { + b.Property("TagID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("TagID"); + + b.ToTable("utils_tags"); + + b.HasData( + new + { + TagID = 1, + Description = "Tag 01" + }, + new + { + TagID = 2, + Description = "Tag 02" + }, + new + { + TagID = 3, + Description = "Tag 03" + }, + new + { + TagID = 4, + Description = "Tag 04" + }, + new + { + TagID = 5, + Description = "Tag 05" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", "ItemGroupNav") + .WithMany() + .HasForeignKey("CodGroup") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemGroupNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") + .WithMany() + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("JobNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", "OrderRowNav") + .WithMany() + .HasForeignKey("OrderRowID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", "ProductionBatchNav") + .WithMany() + .HasForeignKey("ProductionBatchID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderRowNav"); + + b.Navigation("ProductionBatchNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", "ProdItemNav") + .WithMany() + .HasForeignKey("ProdItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("PhaseNav"); + + b.Navigation("ProdItemNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", 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.OfferRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany("OfferRowNav") + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OfferNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", 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.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany() + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CustomerNav"); + + b.Navigation("DealerNav"); + + b.Navigation("OfferNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", "OrderNav") + .WithMany() + .HasForeignKey("OrderID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", "MovTypeNav") + .WithMany() + .HasForeignKey("MovCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", "StockStatusNav") + .WithMany() + .HasForeignKey("StockStatusId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("MovTypeNav"); + + b.Navigation("StockStatusNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", "JobStepNav") + .WithMany() + .HasForeignKey("JobStepID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") + .WithMany("JobStepNav") + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + + b.Navigation("JobNav"); + + b.Navigation("PhaseNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", "GenClassNav") + .WithMany("GenValNav") + .HasForeignKey("ClassCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GenClassNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Navigation("OfferRowNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => + { + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Navigation("GenValNav"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251015154324_AddOfferPreselDict.cs b/EgwCoreLib.Lux.Data/Migrations/20251015154324_AddOfferPreselDict.cs new file mode 100644 index 00000000..c288bd13 --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20251015154324_AddOfferPreselDict.cs @@ -0,0 +1,352 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EgwCoreLib.Lux.Data.Migrations +{ + /// + public partial class AddOfferPreselDict : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "DictPresel", + table: "sales_order", + type: "longtext", + nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5795), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5797), new DateTime(2025, 11, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5792) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 2, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5803), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5805), new DateTime(2025, 11, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5802) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 3, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5810), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5811), new DateTime(2025, 11, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5808) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 4, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5816), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5817), new DateTime(2025, 11, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5815) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5960), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5962) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5976), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5978) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5990), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5992) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 4, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6029), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6030) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 5, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6043), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6045) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 6, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6076), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6077) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 7, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6090), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6092) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 8, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6122), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6123) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 9, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6136), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6137) }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5466)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5529)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5532)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5535)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5539)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5542)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5546)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5549)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5552)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5556)); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "DictPresel", + table: "sales_order"); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6797), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6798), new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6794) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 2, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6804), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6806), new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6803) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 3, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6811), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6812), new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6809) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 4, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6817), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6818), new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6816) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6960), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6962) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6976), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6978) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6990), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6992) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 4, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7023), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7025) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 5, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7037), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7039) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 6, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7070), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7072) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 7, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7089), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7090) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 8, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7121), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7122) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 9, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7134), new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7136) }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6489)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6543)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6546)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6550)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6553)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6556)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6560)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6563)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6566)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6570)); + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251015154525_AddOrderPreselDict.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20251015154525_AddOrderPreselDict.Designer.cs new file mode 100644 index 00000000..957383ea --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20251015154525_AddOrderPreselDict.Designer.cs @@ -0,0 +1,2815 @@ +// +using System; +using EgwCoreLib.Lux.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace EgwCoreLib.Lux.Data.Migrations +{ + [DbContext(typeof(DataLayerContext))] + [Migration("20251015154525_AddOrderPreselDict")] + partial class AddOrderPreselDict + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.17") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.EnvirParamModel", b => + { + b.Property("EnvirID") + .HasColumnType("int"); + + b.Property("SerStrucKey") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("EnvirID"); + + b.ToTable("conf_envir"); + + b.HasData( + new + { + EnvirID = 1, + SerStrucKey = "Jwd" + }, + new + { + EnvirID = 2, + SerStrucKey = "Btl" + }, + new + { + EnvirID = 4, + SerStrucKey = "Btl" + }, + new + { + EnvirID = 3, + SerStrucKey = "Btl" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.GlassModel", b => + { + b.Property("GlassID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GlassID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Thickness") + .HasColumnType("double"); + + b.HasKey("GlassID"); + + b.ToTable("conf_glass"); + + b.HasData( + new + { + GlassID = 1, + Code = "0001", + Description = "Vetro BE 2S 4/12/4", + Thickness = 20.0 + }, + new + { + GlassID = 2, + Code = "0002", + Description = "Vetro BE 2S 4/16/4", + Thickness = 24.0 + }, + new + { + GlassID = 3, + Code = "0003", + Description = "Vetro BE 3S 4/12/4/12/4", + Thickness = 36.0 + }, + new + { + GlassID = 4, + Code = "0004", + Description = "Vetro BE 3S 4/16/4/16/4", + Thickness = 44.0 + }, + new + { + GlassID = 5, + Code = "0005", + Description = "Vetro BE 2S 4T/12/4T", + Thickness = 20.0 + }, + new + { + GlassID = 6, + Code = "0006", + Description = "Vetro BE 2S 4T/16/4T", + Thickness = 24.0 + }, + new + { + GlassID = 7, + Code = "0007", + Description = "Vetro BE 3S 4T/12/4T/12/4T", + Thickness = 36.0 + }, + new + { + GlassID = 8, + Code = "0008", + Description = "Vetro BE 3S 4T/16/4T/16/4T", + Thickness = 44.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.ProfileModel", b => + { + b.Property("ProfileID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProfileID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Thickness") + .HasColumnType("double"); + + b.HasKey("ProfileID"); + + b.ToTable("conf_profile"); + + b.HasData( + new + { + ProfileID = 1, + Code = "0001", + Description = "Profilo60", + Thickness = 60.0 + }, + new + { + ProfileID = 2, + Code = "0002", + Description = "Profilo78", + Thickness = 78.0 + }, + new + { + ProfileID = 3, + Code = "0003", + Description = "Profilo90", + Thickness = 90.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Config.WoodModel", b => + { + b.Property("WoodID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("WoodID")); + + b.Property("Code") + .HasColumnType("longtext"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("WoodID"); + + b.ToTable("conf_wood"); + + b.HasData( + new + { + WoodID = 1, + Code = "0001", + Description = "Abete", + Type = 1 + }, + new + { + WoodID = 2, + Code = "0002", + Description = "Acero", + Type = 1 + }, + new + { + WoodID = 3, + Code = "0003", + Description = "Pino", + Type = 2 + }, + new + { + WoodID = 4, + Code = "0004", + Description = "Tek", + Type = 3 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", b => + { + b.Property("CostDriverID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CostDriverID")); + + b.Property("Descript") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Unit") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CostDriverID"); + + b.ToTable("cost_driver"); + + b.HasData( + new + { + CostDriverID = 1, + Descript = "Ore lavorate per step/fase", + Name = "WorkHour", + Unit = "h" + }, + new + { + CostDriverID = 2, + Descript = "Metri prodotti per step/fase", + Name = "Meter", + Unit = "m" + }, + new + { + CostDriverID = 3, + Descript = "Numero unità prodotte (lavorate) per step/fase", + Name = "Unit", + Unit = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.Property("ResourceID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ResourceID")); + + b.Property("CostDriverBudget") + .HasColumnType("decimal(65,30)"); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("EBTPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("FixedCost") + .HasColumnType("decimal(65,30)"); + + b.Property("LaborCost") + .HasColumnType("decimal(65,30)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OverHeadCost") + .HasColumnType("decimal(65,30)"); + + b.Property("OverHeadPerc") + .HasColumnType("decimal(65,30)"); + + b.Property("PriceMargin") + .HasColumnType("decimal(65,30)"); + + b.Property("VariableCost") + .HasColumnType("decimal(65,30)"); + + b.HasKey("ResourceID"); + + b.HasIndex("CostDriverID"); + + b.ToTable("cost_resource"); + + b.HasData( + new + { + ResourceID = 1, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 12000m, + LaborCost = 30m, + Name = "Sezionatrice", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 2, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 100000m, + LaborCost = 40m, + Name = "Linea SAOMAD WoodPecker Just 3500", + OverHeadCost = 15000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 30000m + }, + new + { + ResourceID = 3, + CostDriverBudget = 1760m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 35m, + Name = "Linea Pantografo", + OverHeadCost = 5000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 4, + CostDriverBudget = 880m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 24000m, + LaborCost = 30m, + Name = "Stazione Verniciatura", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 6000m + }, + new + { + ResourceID = 5, + CostDriverBudget = 220m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 6000m, + LaborCost = 30m, + Name = "Verniciatura Manuale", + OverHeadCost = 3000m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 2000m + }, + new + { + ResourceID = 6, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 500m, + LaborCost = 30m, + Name = "Montaggio Manuale", + OverHeadCost = 500m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 500m + }, + new + { + ResourceID = 7, + CostDriverBudget = 3520m, + CostDriverID = 1, + EBTPerc = 0.15m, + FixedCost = 0m, + LaborCost = 40m, + Name = "Installatore", + OverHeadCost = 0m, + OverHeadPerc = 0.15m, + PriceMargin = 0.2m, + VariableCost = 3000m + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", b => + { + b.Property("CodGroup") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CodGroup"); + + b.ToTable("item_group"); + + b.HasData( + new + { + CodGroup = "WindowTrunk", + Description = "Barre legno per lavorazione" + }, + new + { + CodGroup = "WindowGlass", + Description = "Vetri serramento" + }, + new + { + CodGroup = "WindowVarnish", + Description = "Vernici per legno" + }, + new + { + CodGroup = "WindowHardware", + Description = "Ferramenta serramento" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.Property("ItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ItemID")); + + b.Property("CodGroup") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemIDParent") + .HasColumnType("int"); + + b.Property("ItemType") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("QtyMax") + .HasColumnType("double"); + + b.Property("QtyMin") + .HasColumnType("double"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ItemID"); + + b.HasIndex("CodGroup"); + + b.ToTable("item_item"); + + b.HasData( + new + { + ItemID = 1, + CodGroup = "WindowTrunk", + Cost = 20.0, + Description = "BARRA-60x80 generica", + ExtItemCode = "", + IsService = false, + ItemCode = 1001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.29999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "BARR.001", + UM = "#" + }, + new + { + ItemID = 2, + CodGroup = "WindowTrunk", + Cost = 16.5, + Description = "Barra 60x80, lunghezza 12m", + ExtItemCode = "BARRA-60x80x12000", + IsService = false, + ItemCode = 1002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.12000", + UM = "#" + }, + new + { + ItemID = 3, + CodGroup = "WindowTrunk", + Cost = 17.5, + Description = "Barra 60x80, lunghezza 8m", + ExtItemCode = "BARRA-60x80x8000", + IsService = false, + ItemCode = 1003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.22, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.8000", + UM = "#" + }, + new + { + ItemID = 4, + CodGroup = "WindowTrunk", + Cost = 15.5, + Description = "Barra 60x80, lunghezza 16m", + ExtItemCode = "BARRA-60x80x16000", + IsService = false, + ItemCode = 1004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "ABC.00123.16000", + UM = "#" + }, + new + { + ItemID = 5, + CodGroup = "WindowGlass", + Cost = 300.0, + Description = "Vetro triplo, basso indice termico, 800x1000", + ExtItemCode = "VETRO-3L-THERMO-800x1000", + IsService = false, + ItemCode = 2001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3T.800.1000", + UM = "m2" + }, + new + { + ItemID = 6, + CodGroup = "WindowGlass", + Cost = 200.0, + Description = "Vetro doppio, 800x1000", + ExtItemCode = "VETRO-2L-800x1000", + IsService = false, + ItemCode = 2002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.14999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V2.800.1000", + UM = "m2" + }, + new + { + ItemID = 7, + CodGroup = "WindowGlass", + Cost = 250.0, + Description = "Vetro triplo, 800x1000", + ExtItemCode = "VETRO-3L-800x1000", + IsService = false, + ItemCode = 2003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.17999999999999999, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "V3.800.1000", + UM = "m2" + }, + new + { + ItemID = 8, + CodGroup = "WindowVarnish", + Cost = 20.0, + Description = "Vernice trasparente", + ExtItemCode = "VERN-TRASP", + IsService = false, + ItemCode = 3001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "VT.STD", + UM = "l" + }, + new + { + ItemID = 9, + CodGroup = "WindowHardware", + Cost = 65.0, + Description = "Kit standard completo AGB tipo 001", + ExtItemCode = "KIT-001", + IsService = false, + ItemCode = 5001, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-KIT-001", + UM = "#" + }, + new + { + ItemID = 10, + CodGroup = "WindowHardware", + Cost = 10.0, + Description = "Cerniera AGB tipo 001", + ExtItemCode = "CERN-001", + IsService = false, + ItemCode = 5002, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-CERN-001", + UM = "#" + }, + new + { + ItemID = 11, + CodGroup = "WindowHardware", + Cost = 15.0, + Description = "Serratura AGB tipo 001", + ExtItemCode = "SERR-001", + IsService = false, + ItemCode = 5003, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-SERR-001", + UM = "#" + }, + new + { + ItemID = 12, + CodGroup = "WindowHardware", + Cost = 25.0, + Description = "Maniglia AGB tipo 001", + ExtItemCode = "MAN-001", + IsService = false, + ItemCode = 5004, + ItemIDParent = 0, + ItemType = 1, + Margin = 0.20000000000000001, + QtyMax = 0.0, + QtyMin = 0.0, + SupplCode = "AGB-MAN-001", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.Property("SellingItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SellingItemID")); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsService") + .HasColumnType("tinyint(1)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("Margin") + .HasColumnType("double"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("SupplCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UM") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SellingItemID"); + + b.HasIndex("JobID"); + + b.ToTable("item_selling_item"); + + b.HasData( + new + { + SellingItemID = 1, + Cost = 820.0, + Description = "Finestra anta Singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 2, + Margin = 0.20000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 2, + Cost = 150.0, + Description = "Persiana anta singola", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.10000000000000001, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 3, + Cost = 200.0, + Description = "Installazione", + ExtItemCode = "", + IsService = true, + ItemCode = 0, + ItemSteps = "", + JobID = 1, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 4, + Cost = 1000.0, + Description = "Trave lamellare", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 3, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 5, + Cost = 500.0, + Description = "Cabinet", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 4, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }, + new + { + SellingItemID = 6, + Cost = 2000.0, + Description = "Parete", + ExtItemCode = "", + IsService = false, + ItemCode = 0, + ItemSteps = "", + JobID = 5, + Margin = 0.29999999999999999, + SerStruct = "", + SupplCode = "", + UM = "#" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SupplierModel", b => + { + b.Property("SupplierID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("SupplierID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("SupplierID"); + + b.ToTable("item_supplier"); + + b.HasData( + new + { + SupplierID = 1, + CompanyName = "Company One", + FirstName = "Supplier A", + LastName = "Egalware", + VAT = "7294857103879254" + }, + new + { + SupplierID = 2, + CompanyName = "Company Two", + FirstName = "Supplier B", + LastName = "User", + VAT = "7294857103879254" + }, + new + { + SupplierID = 3, + CompanyName = "Company Two", + FirstName = "Supplier C", + LastName = "User Test", + VAT = "7294857103879254" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", b => + { + b.Property("ProductionBatchID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProductionBatchID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DueDate") + .HasColumnType("datetime(6)"); + + b.HasKey("ProductionBatchID"); + + b.ToTable("production_batch"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.Property("ProdItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemID")); + + b.Property("ExtItemCode") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("OrderRowID") + .HasColumnType("int"); + + b.Property("ProductionBatchID") + .HasColumnType("int"); + + b.HasKey("ProdItemID"); + + b.HasIndex("OrderRowID"); + + b.HasIndex("ProductionBatchID"); + + b.ToTable("production_item"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.Property("ProdItemStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("ProdItemStepID")); + + b.Property("DateEnd") + .HasColumnType("datetime(6)"); + + b.Property("DateStart") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProdItemID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.Property("WorkTime") + .HasColumnType("double"); + + b.HasKey("ProdItemStepID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ProdItemID"); + + b.HasIndex("ResourceID"); + + b.ToTable("production_item_step"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", b => + { + b.Property("CustomerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("CustomerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("CustomerID"); + + b.ToTable("sales_customer"); + + b.HasData( + new + { + CustomerID = 1, + CompanyName = "", + FirstName = "Customer A", + LastName = "Egalware", + VAT = "1234567890123456" + }, + new + { + CustomerID = 2, + CompanyName = "", + FirstName = "Customer B", + LastName = "User", + VAT = "1234567890123456" + }, + new + { + CustomerID = 3, + CompanyName = "", + FirstName = "Customer C", + LastName = "User Test", + VAT = "1234567890123456" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", b => + { + b.Property("DealerID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("DealerID")); + + b.Property("CompanyName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FirstName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LastName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VAT") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("DealerID"); + + b.ToTable("sales_dealer"); + + b.HasData( + new + { + DealerID = 1, + CompanyName = "Company First", + FirstName = "Dealer A", + LastName = "Egalware", + VAT = "9587362514671527" + }, + new + { + DealerID = 2, + CompanyName = "Company First", + FirstName = "Dealer B", + LastName = "User", + VAT = "9587362514671527" + }, + new + { + DealerID = 3, + CompanyName = "Company Second", + FirstName = "Dealer C", + LastName = "User Test", + VAT = "9587362514671527" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Property("OfferID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DictPresel") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Discount") + .HasColumnType("double"); + + b.Property("Envir") + .HasColumnType("int"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OfferID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.ToTable("sales_offer"); + + b.HasData( + new + { + OfferID = 1, + CustomerID = 2, + DealerID = 2, + Description = "Offerta per tre serramenti", + DictPresel = "", + Discount = 0.0, + Envir = 1, + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5260), + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5261), + OffertState = 0, + RefNum = 1, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5256) + }, + new + { + OfferID = 2, + CustomerID = 2, + DealerID = 2, + Description = "Offerta BEAM", + DictPresel = "", + Discount = 0.0, + Envir = 2, + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5269), + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5271), + OffertState = 0, + RefNum = 2, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5268) + }, + new + { + OfferID = 3, + CustomerID = 2, + DealerID = 2, + Description = "Offerta Cabinet", + DictPresel = "", + Discount = 0.0, + Envir = 4, + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5276), + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5277), + OffertState = 0, + RefNum = 3, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5274) + }, + new + { + OfferID = 4, + CustomerID = 2, + DealerID = 2, + Description = "Offerta Wall", + DictPresel = "", + Discount = 0.0, + Envir = 3, + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5282), + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5284), + OffertState = 0, + RefNum = 4, + RefRev = 1, + RefYear = 2024, + ValidUntil = new DateTime(2025, 11, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5281) + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferRowModel", b => + { + b.Property("OfferRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OfferRowID")); + + b.Property("AwaitBom") + .HasColumnType("tinyint(1)"); + + b.Property("AwaitPrice") + .HasColumnType("tinyint(1)"); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomOk") + .HasColumnType("tinyint(1)"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Envir") + .HasColumnType("int"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FileResource") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemBOM") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ItemOk") + .HasColumnType("tinyint(1)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OfferRowUID") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OfferRowID"); + + b.HasIndex("OfferID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_offer_row"); + + b.HasData( + new + { + OfferRowID = 1, + AwaitBom = false, + AwaitPrice = false, + BomCost = 900.0, + BomOk = true, + BomPrice = 950.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5417), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5419), + Note = "Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000010001", + Qty = 3.0, + RowNum = 1, + SellingItemID = 1, + SerStruct = "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Pine\",\"ColorMaterial\":\"Black\",\"Glass\":\"4T/16/4T\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"IdGroup\":1,\"AreaList\":[{\"bIsSashVertical\":true,\"SashList\":[{\"nSashId\":1,\"OpeningType\":\"TILTTURN_LEFT\",\"bHasHandle\":true,\"dDimension\":100.0}],\"SashType\":\"NULL\",\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"Hardware\":\"000558\",\"IdGroup\":2,\"AreaList\":[{\"FillType\":\"GLASS\",\"IdGroup\":3,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"SASH\"}],\"AreaType\":\"FRAME\"}]}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 2, + AwaitBom = false, + AwaitPrice = false, + BomCost = 160.0, + BomOk = true, + BomPrice = 200.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5434), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5436), + Note = "Persiana per Finestra anta singola 2025", + OfferID = 1, + OfferRowUID = "OFF250000010002", + Qty = 3.0, + RowNum = 2, + SellingItemID = 2, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 3, + AwaitBom = false, + AwaitPrice = false, + BomCost = 200.0, + BomOk = true, + BomPrice = 250.0, + Envir = 1, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5448), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5450), + Note = "Installazione serramento", + OfferID = 1, + OfferRowUID = "OFF250000010003", + Qty = 3.0, + RowNum = 3, + SellingItemID = 3, + SerStruct = "{}", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 4, + AwaitBom = false, + AwaitPrice = false, + BomCost = 800.0, + BomOk = true, + BomPrice = 1150.0, + Envir = 2, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5484), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5486), + Note = "Demo file 01", + OfferID = 2, + OfferRowUID = "OFF250000020001", + Qty = 10.0, + RowNum = 1, + SellingItemID = 4, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 5, + AwaitBom = false, + AwaitPrice = false, + BomCost = 600.0, + BomOk = true, + BomPrice = 950.0, + Envir = 2, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5499), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5500), + Note = "Demo file 02", + OfferID = 2, + OfferRowUID = "OFF250000020002", + Qty = 4.0, + RowNum = 1, + SellingItemID = 4, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 6, + AwaitBom = false, + AwaitPrice = false, + BomCost = 200.0, + BomOk = true, + BomPrice = 250.0, + Envir = 3, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5538), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5540), + Note = "Demo file 01", + OfferID = 3, + OfferRowUID = "OFF250000030001", + Qty = 4.0, + RowNum = 1, + SellingItemID = 5, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 7, + AwaitBom = false, + AwaitPrice = false, + BomCost = 50.0, + BomOk = true, + BomPrice = 80.0, + Envir = 3, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5552), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5554), + Note = "Demo file 02", + OfferID = 3, + OfferRowUID = "OFF250000030002", + Qty = 12.0, + RowNum = 1, + SellingItemID = 5, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 8, + AwaitBom = false, + AwaitPrice = false, + BomCost = 800.0, + BomOk = true, + BomPrice = 1150.0, + Envir = 4, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5585), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5586), + Note = "Demo file 01", + OfferID = 4, + OfferRowUID = "OFF250000040001", + Qty = 6.0, + RowNum = 1, + SellingItemID = 6, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }, + new + { + OfferRowID = 9, + AwaitBom = false, + AwaitPrice = false, + BomCost = 600.0, + BomOk = true, + BomPrice = 950.0, + Envir = 4, + FileName = "", + FileResource = "", + FileSize = 0L, + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5599), + ItemBOM = "", + ItemOk = true, + ItemSteps = "{}", + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5600), + Note = "Demo file 02", + OfferID = 4, + OfferRowUID = "OFF250000040002", + Qty = 4.0, + RowNum = 1, + SellingItemID = 6, + SerStruct = "", + StepCost = 0.0, + StepPrice = 0.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", b => + { + b.Property("OrderID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderID")); + + b.Property("CustomerID") + .HasColumnType("int"); + + b.Property("DealerID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DictPresel") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("OfferID") + .HasColumnType("int"); + + b.Property("OffertState") + .HasColumnType("int"); + + b.Property("RefNum") + .HasColumnType("int"); + + b.Property("RefRev") + .HasColumnType("int"); + + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("ValidUntil") + .HasColumnType("datetime(6)"); + + b.HasKey("OrderID"); + + b.HasIndex("CustomerID"); + + b.HasIndex("DealerID"); + + b.HasIndex("OfferID"); + + b.ToTable("sales_order"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.Property("OrderRowID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("OrderRowID")); + + b.Property("BomCost") + .HasColumnType("double"); + + b.Property("BomPrice") + .HasColumnType("double"); + + b.Property("Inserted") + .HasColumnType("datetime(6)"); + + b.Property("ItemSteps") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Modified") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OrderID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.Property("RowNum") + .HasColumnType("int"); + + b.Property("SellingItemID") + .HasColumnType("int"); + + b.Property("SerStruct") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StepCost") + .HasColumnType("double"); + + b.Property("StepPrice") + .HasColumnType("double"); + + b.HasKey("OrderRowID"); + + b.HasIndex("OrderID"); + + b.HasIndex("SellingItemID"); + + b.ToTable("sales_order_row"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.Property("StockMovID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockMovID")); + + b.Property("CodDoc") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("DtCreate") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + b.Property("DtMod") + .ValueGeneratedOnAddOrUpdate() + .HasColumnType("timestamp") + .HasDefaultValueSql("CURRENT_TIMESTAMP"); + + MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property("DtMod")); + + b.Property("MovCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Note") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyRec") + .HasColumnType("double"); + + b.Property("StockStatusId") + .HasColumnType("int"); + + b.Property("UnitVal") + .HasColumnType("double"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("StockMovID"); + + b.HasIndex("MovCod"); + + b.HasIndex("StockStatusId"); + + b.ToTable("stock_mov"); + + b.HasData( + new + { + StockMovID = 1, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(4953), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5004), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 1, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 2, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5007), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5008), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 8.0, + StockStatusId = 2, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 3, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5010), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5012), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 5.0, + StockStatusId = 3, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 4, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5014), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5015), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 4, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 5, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5017), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5018), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 10.0, + StockStatusId = 5, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 6, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5020), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5022), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 6, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 7, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5024), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5025), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 50.0, + StockStatusId = 7, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 8, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5027), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5028), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 8, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 9, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5030), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5032), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 9, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }, + new + { + StockMovID = 10, + CodDoc = "", + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5034), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5035), + MovCod = "CAR", + Note = "DEMO", + QtyRec = 1.0, + StockStatusId = 10, + UnitVal = 0.0, + UserId = "samuele.locatelli@egalware.com" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.Property("StockStatusId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("StockStatusId")); + + b.Property("IsDeleted") + .HasColumnType("tinyint(1)"); + + b.Property("IsRemn") + .HasColumnType("tinyint(1)"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("Location") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("QtyAvail") + .HasColumnType("double"); + + b.HasKey("StockStatusId"); + + b.HasIndex("ItemID"); + + b.ToTable("stock_status"); + + b.HasData( + new + { + StockStatusId = 1, + IsDeleted = false, + IsRemn = false, + ItemID = 1, + Location = "B001-001-003", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 2, + IsDeleted = false, + IsRemn = false, + ItemID = 2, + Location = "B001-001-002", + QtyAvail = 8.0 + }, + new + { + StockStatusId = 3, + IsDeleted = false, + IsRemn = false, + ItemID = 3, + Location = "B001-001-001", + QtyAvail = 5.0 + }, + new + { + StockStatusId = 4, + IsDeleted = false, + IsRemn = false, + ItemID = 4, + Location = "V002-001-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 5, + IsDeleted = false, + IsRemn = false, + ItemID = 5, + Location = "V001-001-002", + QtyAvail = 10.0 + }, + new + { + StockStatusId = 6, + IsDeleted = false, + IsRemn = false, + ItemID = 6, + Location = "V001-001-003", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 7, + IsDeleted = false, + IsRemn = false, + ItemID = 8, + Location = "V001-001-003", + QtyAvail = 50.0 + }, + new + { + StockStatusId = 8, + IsDeleted = false, + IsRemn = false, + ItemID = 11, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 9, + IsDeleted = false, + IsRemn = false, + ItemID = 9, + Location = "S001-002-001", + QtyAvail = 1.0 + }, + new + { + StockStatusId = 10, + IsDeleted = false, + IsRemn = false, + ItemID = 10, + Location = "S001-001-001", + QtyAvail = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => + { + b.Property("JobID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("JobID"); + + b.ToTable("task_job"); + + b.HasData( + new + { + JobID = 1, + Description = "Rivendita / servizi" + }, + new + { + JobID = 2, + Description = "Serramento Completo Legno su linea Saomad e installatore interno" + }, + new + { + JobID = 3, + Description = "Realizzazione Trave" + }, + new + { + JobID = 4, + Description = "Realizzazione Cabinet" + }, + new + { + JobID = 5, + Description = "Realizzazione Parete" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.Property("JobStepItemID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepItemID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("ItemID") + .HasColumnType("int"); + + b.Property("JobStepID") + .HasColumnType("int"); + + b.Property("Qty") + .HasColumnType("double"); + + b.HasKey("JobStepItemID"); + + b.HasIndex("ItemID"); + + b.HasIndex("JobStepID"); + + b.ToTable("task_job_step_item"); + + b.HasData( + new + { + JobStepItemID = 1, + Description = "Grezzo legno abete", + Index = 1, + ItemID = 1, + JobStepID = 1, + Qty = 1.0 + }, + new + { + JobStepItemID = 2, + Description = "Vernice trasparente standard 1L", + Index = 2, + ItemID = 8, + JobStepID = 3, + Qty = 0.10000000000000001 + }, + new + { + JobStepItemID = 3, + Description = "Ferramenta AGB - rif. AGFD.00000.00000", + Index = 3, + ItemID = 9, + JobStepID = 4, + Qty = 1.0 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.Property("JobStepID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("JobStepID")); + + b.Property("CostDriverID") + .HasColumnType("int"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Index") + .HasColumnType("int"); + + b.Property("JobID") + .HasColumnType("int"); + + b.Property("PhaseID") + .HasColumnType("int"); + + b.Property("ProductivityRate") + .HasColumnType("decimal(65,30)"); + + b.Property("ResourceID") + .HasColumnType("int"); + + b.HasKey("JobStepID"); + + b.HasIndex("CostDriverID"); + + b.HasIndex("JobID"); + + b.HasIndex("PhaseID"); + + b.HasIndex("ResourceID"); + + b.ToTable("task_job_step"); + + b.HasData( + new + { + JobStepID = 1, + CostDriverID = 3, + Description = "", + Index = 1, + JobID = 2, + PhaseID = 1, + ProductivityRate = 1m, + ResourceID = 1 + }, + new + { + JobStepID = 2, + CostDriverID = 2, + Description = "", + Index = 2, + JobID = 2, + PhaseID = 2, + ProductivityRate = 1m, + ResourceID = 2 + }, + new + { + JobStepID = 3, + CostDriverID = 3, + Description = "", + Index = 3, + JobID = 2, + PhaseID = 3, + ProductivityRate = 1m, + ResourceID = 4 + }, + new + { + JobStepID = 4, + CostDriverID = 3, + Description = "", + Index = 4, + JobID = 2, + PhaseID = 4, + ProductivityRate = 1m, + ResourceID = 6 + }, + new + { + JobStepID = 5, + CostDriverID = 3, + Description = "", + Index = 5, + JobID = 2, + PhaseID = 6, + ProductivityRate = 1m, + ResourceID = 7 + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", b => + { + b.Property("PhaseID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("PhaseID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("PhaseID"); + + b.ToTable("task_phase"); + + b.HasData( + new + { + PhaseID = 1, + Description = "Taglio tronchetti" + }, + new + { + PhaseID = 2, + Description = "Lavorazione pezzi serramento" + }, + new + { + PhaseID = 3, + Description = "Verniciatura" + }, + new + { + PhaseID = 4, + Description = "Assemblaggio completo" + }, + new + { + PhaseID = 5, + Description = "Assemblaggio Ferramenta" + }, + new + { + PhaseID = 6, + Description = "Installazione e posa in opera" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.CounterModel", b => + { + b.Property("RefYear") + .HasColumnType("int"); + + b.Property("CountName") + .HasColumnType("varchar(255)"); + + b.Property("Counter") + .HasColumnType("int"); + + b.HasKey("RefYear", "CountName"); + + b.ToTable("utils_counter"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Property("ClassCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("ClassCod"); + + b.ToTable("utils_gen_class"); + + b.HasData( + new + { + ClassCod = "ShapeList", + Description = "Elenco Shape Gestite" + }, + new + { + ClassCod = "WoodCol", + Description = "Elenco Colori Legno" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.Property("GenValID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("GenValID")); + + b.Property("ClassCod") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("Ordinal") + .HasColumnType("int"); + + b.Property("ValString") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("GenValID"); + + b.HasIndex("ClassCod"); + + b.ToTable("utils_gen_value"); + + b.HasData( + new + { + GenValID = 1, + ClassCod = "WoodCol", + Ordinal = 1, + ValString = "Blue" + }, + new + { + GenValID = 2, + ClassCod = "WoodCol", + Ordinal = 2, + ValString = "White" + }, + new + { + GenValID = 3, + ClassCod = "WoodCol", + Ordinal = 3, + ValString = "Red" + }, + new + { + GenValID = 4, + ClassCod = "WoodCol", + Ordinal = 4, + ValString = "Black" + }, + new + { + GenValID = 5, + ClassCod = "ShapeList", + Ordinal = 1, + ValString = "Rectangular" + }, + new + { + GenValID = 6, + ClassCod = "ShapeList", + Ordinal = 2, + ValString = "Trapezoidal" + }, + new + { + GenValID = 7, + ClassCod = "ShapeList", + Ordinal = 3, + ValString = "Triangular" + }, + new + { + GenValID = 8, + ClassCod = "ShapeList", + Ordinal = 4, + ValString = "Arc" + }, + new + { + GenValID = 9, + ClassCod = "ShapeList", + Ordinal = 5, + ValString = "FullArc" + }, + new + { + GenValID = 10, + ClassCod = "ShapeList", + Ordinal = 6, + ValString = "SemiFullArc" + }, + new + { + GenValID = 11, + ClassCod = "ShapeList", + Ordinal = 7, + ValString = "SemiArc" + }, + new + { + GenValID = 12, + ClassCod = "ShapeList", + Ordinal = 8, + ValString = "Circular" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", b => + { + b.Property("MovCod") + .HasColumnType("varchar(255)"); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("MovCod"); + + b.ToTable("utils_mov_type"); + + b.HasData( + new + { + MovCod = "CAR", + Description = "Carico a magazzino" + }, + new + { + MovCod = "MOV", + Description = "Movimento interno (spostamento)" + }, + new + { + MovCod = "ND", + Description = "Non Definito" + }, + new + { + MovCod = "OFOR", + Description = "Ordine Fornitore" + }, + new + { + MovCod = "RETT", + Description = "Rettifica magazzino" + }, + new + { + MovCod = "SCAR", + Description = "Scarico da magazzino" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.TagsModel", b => + { + b.Property("TagID") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TagID")); + + b.Property("Description") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("TagID"); + + b.ToTable("utils_tags"); + + b.HasData( + new + { + TagID = 1, + Description = "Tag 01" + }, + new + { + TagID = 2, + Description = "Tag 02" + }, + new + { + TagID = 3, + Description = "Tag 03" + }, + new + { + TagID = 4, + Description = "Tag 04" + }, + new + { + TagID = 5, + Description = "Tag 05" + }); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemGroupModel", "ItemGroupNav") + .WithMany() + .HasForeignKey("CodGroup") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemGroupNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") + .WithMany() + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("JobNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", "OrderRowNav") + .WithMany() + .HasForeignKey("OrderRowID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionBatchModel", "ProductionBatchNav") + .WithMany() + .HasForeignKey("ProductionBatchID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderRowNav"); + + b.Navigation("ProductionBatchNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Production.ProductionItemModel", "ProdItemNav") + .WithMany() + .HasForeignKey("ProdItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("PhaseNav"); + + b.Navigation("ProdItemNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", 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.OfferRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany("OfferRowNav") + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OfferNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", 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.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", "OfferNav") + .WithMany() + .HasForeignKey("OfferID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CustomerNav"); + + b.Navigation("DealerNav"); + + b.Navigation("OfferNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OrderRowModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.OrderModel", "OrderNav") + .WithMany() + .HasForeignKey("OrderID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") + .WithMany() + .HasForeignKey("SellingItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OrderNav"); + + b.Navigation("SellingItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockMovModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.MovTypeModel", "MovTypeNav") + .WithMany() + .HasForeignKey("MovCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", "StockStatusNav") + .WithMany() + .HasForeignKey("StockStatusId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("MovTypeNav"); + + b.Navigation("StockStatusNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Stock.StockStatusModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepItemModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.ItemModel", "ItemNav") + .WithMany() + .HasForeignKey("ItemID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", "JobStepNav") + .WithMany() + .HasForeignKey("JobStepID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ItemNav"); + + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobStepModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.CostDriverModel", "DriverNav") + .WithMany() + .HasForeignKey("CostDriverID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", "JobNav") + .WithMany("JobStepNav") + .HasForeignKey("JobID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Task.PhaseModel", "PhaseNav") + .WithMany() + .HasForeignKey("PhaseID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Cost.ResourceModel", "ResourceNav") + .WithMany() + .HasForeignKey("ResourceID") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DriverNav"); + + b.Navigation("JobNav"); + + b.Navigation("PhaseNav"); + + b.Navigation("ResourceNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenValueModel", b => + { + b.HasOne("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", "GenClassNav") + .WithMany("GenValNav") + .HasForeignKey("ClassCod") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GenClassNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.OfferModel", b => + { + b.Navigation("OfferRowNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Task.JobModel", b => + { + b.Navigation("JobStepNav"); + }); + + modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Utils.GenClassModel", b => + { + b.Navigation("GenValNav"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/20251015154525_AddOrderPreselDict.cs b/EgwCoreLib.Lux.Data/Migrations/20251015154525_AddOrderPreselDict.cs new file mode 100644 index 00000000..e0a7ef5e --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20251015154525_AddOrderPreselDict.cs @@ -0,0 +1,352 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EgwCoreLib.Lux.Data.Migrations +{ + /// + public partial class AddOrderPreselDict : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "DictPresel", + table: "sales_offer", + type: "longtext", + nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "DictPresel", "Inserted", "Modified", "ValidUntil" }, + values: new object[] { "", new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5260), new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5261), new DateTime(2025, 11, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5256) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 2, + columns: new[] { "DictPresel", "Inserted", "Modified", "ValidUntil" }, + values: new object[] { "", new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5269), new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5271), new DateTime(2025, 11, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5268) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 3, + columns: new[] { "DictPresel", "Inserted", "Modified", "ValidUntil" }, + values: new object[] { "", new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5276), new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5277), new DateTime(2025, 11, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5274) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 4, + columns: new[] { "DictPresel", "Inserted", "Modified", "ValidUntil" }, + values: new object[] { "", new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5282), new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5284), new DateTime(2025, 11, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5281) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5417), new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5419) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5434), new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5436) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5448), new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5450) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 4, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5484), new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5486) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 5, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5499), new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5500) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 6, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5538), new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5540) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 7, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5552), new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5554) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 8, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5585), new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5586) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 9, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5599), new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5600) }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(4953)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5007)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5010)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5014)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5017)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5020)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5024)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5027)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5030)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5034)); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "DictPresel", + table: "sales_offer"); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5795), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5797), new DateTime(2025, 11, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5792) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 2, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5803), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5805), new DateTime(2025, 11, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5802) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 3, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5810), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5811), new DateTime(2025, 11, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5808) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 4, + columns: new[] { "Inserted", "Modified", "ValidUntil" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5816), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5817), new DateTime(2025, 11, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5815) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5960), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5962) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5976), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5978) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5990), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5992) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 4, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6029), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6030) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 5, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6043), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6045) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 6, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6076), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6077) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 7, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6090), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6092) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 8, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6122), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6123) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 9, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6136), new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(6137) }); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 1, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5466)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 2, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5529)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 3, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5532)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 4, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5535)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 5, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5539)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 6, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5542)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 7, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5546)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 8, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5549)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 9, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5552)); + + migrationBuilder.UpdateData( + table: "stock_mov", + keyColumn: "StockMovID", + keyValue: 10, + column: "DtCreate", + value: new DateTime(2025, 10, 15, 17, 43, 24, 427, DateTimeKind.Local).AddTicks(5556)); + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs index d93d5126..89cbd108 100644 --- a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs +++ b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs @@ -1162,6 +1162,10 @@ namespace EgwCoreLib.Lux.Data.Migrations .IsRequired() .HasColumnType("longtext"); + b.Property("DictPresel") + .IsRequired() + .HasColumnType("longtext"); + b.Property("Discount") .HasColumnType("double"); @@ -1204,15 +1208,16 @@ namespace EgwCoreLib.Lux.Data.Migrations CustomerID = 2, DealerID = 2, Description = "Offerta per tre serramenti", + DictPresel = "", Discount = 0.0, Envir = 1, - Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6797), - Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6798), + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5260), + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5261), OffertState = 0, RefNum = 1, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6794) + ValidUntil = new DateTime(2025, 11, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5256) }, new { @@ -1220,15 +1225,16 @@ namespace EgwCoreLib.Lux.Data.Migrations CustomerID = 2, DealerID = 2, Description = "Offerta BEAM", + DictPresel = "", Discount = 0.0, Envir = 2, - Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6804), - Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6806), + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5269), + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5271), OffertState = 0, RefNum = 2, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6803) + ValidUntil = new DateTime(2025, 11, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5268) }, new { @@ -1236,15 +1242,16 @@ namespace EgwCoreLib.Lux.Data.Migrations CustomerID = 2, DealerID = 2, Description = "Offerta Cabinet", + DictPresel = "", Discount = 0.0, Envir = 4, - Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6811), - Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6812), + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5276), + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5277), OffertState = 0, RefNum = 3, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6809) + ValidUntil = new DateTime(2025, 11, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5274) }, new { @@ -1252,15 +1259,16 @@ namespace EgwCoreLib.Lux.Data.Migrations CustomerID = 2, DealerID = 2, Description = "Offerta Wall", + DictPresel = "", Discount = 0.0, Envir = 3, - Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6817), - Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6818), + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5282), + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5284), OffertState = 0, RefNum = 4, RefRev = 1, RefYear = 2024, - ValidUntil = new DateTime(2025, 11, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6816) + ValidUntil = new DateTime(2025, 11, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5281) }); }); @@ -1369,11 +1377,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6960), + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5417), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6962), + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5419), Note = "Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000010001", @@ -1396,11 +1404,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6976), + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5434), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6978), + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5436), Note = "Persiana per Finestra anta singola 2025", OfferID = 1, OfferRowUID = "OFF250000010002", @@ -1423,11 +1431,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6990), + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5448), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6992), + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5450), Note = "Installazione serramento", OfferID = 1, OfferRowUID = "OFF250000010003", @@ -1450,11 +1458,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7023), + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5484), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7025), + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5486), Note = "Demo file 01", OfferID = 2, OfferRowUID = "OFF250000020001", @@ -1477,11 +1485,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7037), + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5499), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7039), + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5500), Note = "Demo file 02", OfferID = 2, OfferRowUID = "OFF250000020002", @@ -1504,11 +1512,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7070), + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5538), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7072), + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5540), Note = "Demo file 01", OfferID = 3, OfferRowUID = "OFF250000030001", @@ -1531,11 +1539,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7089), + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5552), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7090), + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5554), Note = "Demo file 02", OfferID = 3, OfferRowUID = "OFF250000030002", @@ -1558,11 +1566,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7121), + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5585), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7122), + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5586), Note = "Demo file 01", OfferID = 4, OfferRowUID = "OFF250000040001", @@ -1585,11 +1593,11 @@ namespace EgwCoreLib.Lux.Data.Migrations FileName = "", FileResource = "", FileSize = 0L, - Inserted = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7134), + Inserted = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5599), ItemBOM = "", ItemOk = true, ItemSteps = "{}", - Modified = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(7136), + Modified = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5600), Note = "Demo file 02", OfferID = 4, OfferRowUID = "OFF250000040002", @@ -1620,6 +1628,10 @@ namespace EgwCoreLib.Lux.Data.Migrations .IsRequired() .HasColumnType("longtext"); + b.Property("DictPresel") + .IsRequired() + .HasColumnType("longtext"); + b.Property("Inserted") .HasColumnType("datetime(6)"); @@ -1772,8 +1784,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 1, CodDoc = "", - DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6489), - DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6540), + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(4953), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5004), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1785,8 +1797,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 2, CodDoc = "", - DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6543), - DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6544), + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5007), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5008), MovCod = "CAR", Note = "DEMO", QtyRec = 8.0, @@ -1798,8 +1810,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 3, CodDoc = "", - DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6546), - DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6548), + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5010), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5012), MovCod = "CAR", Note = "DEMO", QtyRec = 5.0, @@ -1811,8 +1823,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 4, CodDoc = "", - DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6550), - DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6551), + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5014), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5015), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1824,8 +1836,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 5, CodDoc = "", - DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6553), - DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6554), + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5017), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5018), MovCod = "CAR", Note = "DEMO", QtyRec = 10.0, @@ -1837,8 +1849,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 6, CodDoc = "", - DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6556), - DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6558), + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5020), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5022), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1850,8 +1862,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 7, CodDoc = "", - DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6560), - DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6561), + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5024), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5025), MovCod = "CAR", Note = "DEMO", QtyRec = 50.0, @@ -1863,8 +1875,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 8, CodDoc = "", - DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6563), - DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6564), + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5027), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5028), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1876,8 +1888,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 9, CodDoc = "", - DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6566), - DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6568), + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5030), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5032), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, @@ -1889,8 +1901,8 @@ namespace EgwCoreLib.Lux.Data.Migrations { StockMovID = 10, CodDoc = "", - DtCreate = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6570), - DtMod = new DateTime(2025, 10, 15, 11, 44, 5, 702, DateTimeKind.Local).AddTicks(6571), + DtCreate = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5034), + DtMod = new DateTime(2025, 10, 15, 17, 45, 25, 284, DateTimeKind.Local).AddTicks(5035), MovCod = "CAR", Note = "DEMO", QtyRec = 1.0, diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index 1cf019d2..82a3e53c 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -774,6 +774,26 @@ namespace EgwCoreLib.Lux.Data.Services return answ; } + /// + /// Effettua fix UID righe child dell'offerta indicata e restituisce elenco UID da chiamare x refresh + /// + /// Key + /// + public async Task> OffertRowFixUid(int OffertID) + { + List answ = new List(); + Stopwatch sw = new Stopwatch(); + sw.Start(); + // calcolo + answ = dbController.OffertRowFixUid(OffertID); + // svuoto cache... + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Offers:*"); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:OfferRows:*"); + sw.Stop(); + Log.Debug($"OffertRowFixUid in {sw.Elapsed.TotalMilliseconds} ms"); + return answ; + } + /// /// Effettua update della BOM (e dei costi) di tutte le righe dell'offerta indicata /// @@ -833,6 +853,25 @@ namespace EgwCoreLib.Lux.Data.Services return fatto; } + /// + /// Effettua Upsert della riga offerta + /// + /// IRiga offerta coin dati FILE da aggiornare + /// + public async Task OffertRowUpsert(OfferRowModel updRec) + { + Stopwatch sw = new Stopwatch(); + sw.Start(); + // calcolo + bool fatto = await dbController.OffertRowUpsert(updRec); + // svuoto cache... + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Offers:*"); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:OfferRows:*"); + sw.Stop(); + Log.Debug($"OffertRowUpsert in {sw.Elapsed.TotalMilliseconds} ms"); + return fatto; + } + /// /// Effettua update stato await BOM/PRICE per l'offerta indicata /// From 1c7dc0d0b931c64d1442f75d0e724678dd6273a2 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 16 Oct 2025 10:43:03 +0200 Subject: [PATCH 56/65] inizio modifiche x clonazione e delete righe offerta --- Lux.API/Lux.API.csproj | 2 +- Lux.UI/Components/Compo/OfferCommonPar.razor | 68 +++++- .../Components/Compo/OfferCommonPar.razor.cs | 109 +++++++++- Lux.UI/Components/Compo/OfferMan.razor | 199 +++++------------- Lux.UI/Components/Compo/OfferRowMan.razor | 1 + Lux.UI/Components/Compo/OfferRowMan.razor.cs | 57 ++++- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 10 files changed, 290 insertions(+), 154 deletions(-) diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index df044ea8..185cf8e5 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2510.1517 + 0.9.2510.1610 diff --git a/Lux.UI/Components/Compo/OfferCommonPar.razor b/Lux.UI/Components/Compo/OfferCommonPar.razor index e74913f4..137c7134 100644 --- a/Lux.UI/Components/Compo/OfferCommonPar.razor +++ b/Lux.UI/Components/Compo/OfferCommonPar.razor @@ -1,5 +1,65 @@ -
        - aggiungi parametri generici - -
        +
        + @if (isLoading) + { + + } + else + { +
        +
        + + +
        +
        +
        +
        + + +
        +
        +
        +
        + + +
        +
        +
        +
        + + +
        +
        + +
        + +
        +
        + +
        + } +
        diff --git a/Lux.UI/Components/Compo/OfferCommonPar.razor.cs b/Lux.UI/Components/Compo/OfferCommonPar.razor.cs index 66949044..fdd8684a 100644 --- a/Lux.UI/Components/Compo/OfferCommonPar.razor.cs +++ b/Lux.UI/Components/Compo/OfferCommonPar.razor.cs @@ -1,24 +1,129 @@ +using EgwCoreLib.Lux.Core; using EgwCoreLib.Lux.Data.DbModel.Sales; +using EgwCoreLib.Lux.Data.Services; using Microsoft.AspNetCore.Components; namespace Lux.UI.Components.Compo { public partial class OfferCommonPar { + #region Public Properties [Parameter] public OfferModel CurrRecord { get; set; } = null!; - [Parameter] public EventCallback EC_Close { get; set; } [Parameter] public EventCallback EC_Updated { get; set; } - private async Task DoClose() + #endregion Public Properties + + #region Protected Properties + + [Inject] + protected DataLayerServices DLService { get; set; } = null!; + + /// + /// Gestione selezione Colore + /// + protected string SelColor + { + get => CurrSel.GetVal("Color"); + set => CurrSel.SetVal("Color", value); + } + + /// + /// Gestione selezione Glass + /// + protected string SelGlass + { + get => CurrSel.GetVal("Glass"); + set => CurrSel.SetVal("Glass", value); + } + + /// + /// Gestione selezione Profile + /// + protected string SelProfile + { + get => CurrSel.GetVal("Profile"); + set => CurrSel.SetVal("Profile", value); + } + + /// + /// Gestione selezione Wood + /// + protected string SelWood + { + get => CurrSel.GetVal("Wood"); + set => CurrSel.SetVal("Wood", value); + } + + #endregion Protected Properties + + #region Protected Methods + + protected override async Task OnParametersSetAsync() + { + isLoading = true; + // deserializzo se possibile dal record... + CurrSel = new ParamDict(CurrRecord.DictPresel); + // leggo dati di base + var AllColors = await DLService.GenValGetFiltAsync("WoodCol"); + var AllConfGlass = await DLService.ConfGlassGetAllAsync(); + var AllConfProfile = await DLService.ConfProfileGetAllAsync(); + var AllConfWood = await DLService.ConfWoodGetAllAsync(); + // conversione tipi + ListColors = AllColors + .Select(x => x.ValString) + .ToList(); + ListGlass = AllConfGlass + .Select(x => x.Description) + .ToList(); + ListProfiles = AllConfProfile + .Select(x => x.Description) + .ToList(); + ListWood = AllConfWood + .Select(x => x.Description) + .ToList(); + isLoading = false; + } + + #endregion Protected Methods + + #region Private Fields + + private ParamDict CurrSel = new ParamDict(""); + + private bool isLoading = false; + + private List ListColors = new List(); + + private List ListGlass = new List(); + + private List ListProfiles = new List(); + + private List ListWood = new List(); + + #endregion Private Fields + + #region Private Methods + + private async Task DoCancel() { await EC_Close.InvokeAsync(true); } + + private async Task DoSave() + { + // aggiorno valore serializzato... + CurrRecord.DictPresel = CurrSel.Serialized; + // richiesta update con salvataggio record + await EC_Updated.InvokeAsync(CurrRecord); + } + + #endregion Private Methods } } \ No newline at end of file diff --git a/Lux.UI/Components/Compo/OfferMan.razor b/Lux.UI/Components/Compo/OfferMan.razor index 8c033a5d..aab87a73 100644 --- a/Lux.UI/Components/Compo/OfferMan.razor +++ b/Lux.UI/Components/Compo/OfferMan.razor @@ -1,146 +1,61 @@ @using EgwCoreLib.Lux.Core -@*
        -
        -
        -
        -
        Edit Offerta @CurrRecord.OfferCode
        - -
        -
        *@ -
        -
        -
        - - -
        -
        -
        -
        - - -
        -
        -
        -
        - - -
        -
        -
        -
        - - -
        -
        -
        -
        - - -
        -
        -
        -
        - - -
        -
        -
        - -
        -
        - -
        -
        - @*
        -
        -
        -
        *@ -@*