diff --git a/MpDataLayer/Constants.cs b/MpDataLayer/Constants.cs deleted file mode 100644 index 4abf10f1..00000000 --- a/MpDataLayer/Constants.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MP.Data -{ - class Constants - { - } -} diff --git a/MpDataLayer/Controllers/MpStatsController.cs b/MpDataLayer/Controllers/MpStatsController.cs deleted file mode 100644 index 0b1d43eb..00000000 --- a/MpDataLayer/Controllers/MpStatsController.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Configuration; -using NLog; -using Microsoft.Extensions.Configuration; - -namespace MP.Data.Controllers -{ - public class MpStatsController : IDisposable - { - #region Private Fields - - private static IConfiguration _configuration; - private static MoonPro_STATSContext dbCtx; - private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); - - #endregion Private Fields - - #region Public Constructors - - public MpStatsController(IConfiguration configuration) - { - _configuration = configuration; - dbCtx = new MoonPro_STATSContext(configuration); - Log.Info("Avviata classe MpStatsController.MpStatsController"); - } - - #endregion Public Constructors - - #region Public Methods - - public void Dispose() - { - // Clear database context - dbCtx.Dispose(); - } - - /// - /// Annulla modifiche su una specifica entity (cancel update) - /// - /// - /// - public bool rollBackEntity(object item) - { - bool answ = false; - try - { - if (dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Deleted || dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Modified) - { - dbCtx.Entry(item).Reload(); - } - } - catch (Exception exc) - { - Log.Error($"Eccezione in rollBackEntity{Environment.NewLine}{exc}"); - } - return answ; - } - - /// - /// Elenco tabella scarti da filtro - /// - /// - /// - /// - public List ScartiGetAll(int numRecord, string searchVal = "") - { - List dbResult = new List(); - - dbResult = dbCtx - .DbSetScarti - .Where(x => x.KeyRichiesta.Contains(searchVal) || x.Descrizione.Contains(searchVal) || x.CodArticolo.Contains(searchVal) || string.IsNullOrEmpty(searchVal)) - .OrderByDescending(x => x.DataOra) - .Take(numRecord) - .ToList(); - - return dbResult; - } - - #endregion Public Methods - } -} \ No newline at end of file diff --git a/MpDataLayer/DatabaseModels/Aaul.cs b/MpDataLayer/DatabaseModels/Aaul.cs deleted file mode 100644 index f639d8c7..00000000 --- a/MpDataLayer/DatabaseModels/Aaul.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class Aaul - { - public string Azione { get; set; } - public string Descrizione { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/Cal.cs b/MpDataLayer/DatabaseModels/Cal.cs deleted file mode 100644 index 62ac75a3..00000000 --- a/MpDataLayer/DatabaseModels/Cal.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class Cal - { - public DateTime Giorno { get; set; } - public bool? DoDdb { get; set; } - public bool? DoTcr { get; set; } - public bool? DoUl { get; set; } - public bool? DoEcp { get; set; } - public bool? DoRs { get; set; } - public bool? DoOdl { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/Config.cs b/MpDataLayer/DatabaseModels/Config.cs deleted file mode 100644 index e994d899..00000000 --- a/MpDataLayer/DatabaseModels/Config.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class Config - { - public string Chiave { get; set; } - public string Valore { get; set; } - public string ValoreStd { get; set; } - public string Note { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/Ddb.cs b/MpDataLayer/DatabaseModels/Ddb.cs deleted file mode 100644 index 01eb95f0..00000000 --- a/MpDataLayer/DatabaseModels/Ddb.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class Ddb - { - public DateTime DataOraRif { get; set; } - public string IdxMacchina { get; set; } - public int IdxStato { get; set; } - public decimal DurataMinuti { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/Ddb1.cs b/MpDataLayer/DatabaseModels/Ddb1.cs deleted file mode 100644 index 60291b02..00000000 --- a/MpDataLayer/DatabaseModels/Ddb1.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class Ddb1 - { - public string IdxMacchina { get; set; } - public DateTime InizioStato { get; set; } - public DateTime? FineStato { get; set; } - public int IdxStato { get; set; } - public double? DurataMinuti { get; set; } - public string Value { get; set; } - public string CodArticolo { get; set; } - public double? TempoCicloBase { get; set; } - public int? PzPalletProd { get; set; } - public int? MatrOpr { get; set; } - public string Pallet { get; set; } - public string Descrizione { get; set; } - public string ClasseTempo { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/DdbTurni.cs b/MpDataLayer/DatabaseModels/DdbTurni.cs deleted file mode 100644 index 4fc7e14d..00000000 --- a/MpDataLayer/DatabaseModels/DdbTurni.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class DdbTurni - { - public DateTime DataRif { get; set; } - public string IdxMacchina { get; set; } - public string Turno { get; set; } - public int IdxStato { get; set; } - public string CodArticolo { get; set; } - public DateTime InizioStato { get; set; } - public DateTime FineStato { get; set; } - public string Pallet { get; set; } - public int? PzPalletProd { get; set; } - public decimal? TempoCicloBase { get; set; } - public string Descrizione { get; set; } - public string ClasseTempo { get; set; } - public DateTime? DataTurnoInizio { get; set; } - public DateTime? DataTurnoFine { get; set; } - public long? DurataStato { get; set; } - public DateTime InizioPeriodo { get; set; } - public DateTime? FinePeriodo { get; set; } - public long? DurataPeriodo { get; set; } - public int TotPzProd { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/DdbTurniNew.cs b/MpDataLayer/DatabaseModels/DdbTurniNew.cs deleted file mode 100644 index 37bf31d9..00000000 --- a/MpDataLayer/DatabaseModels/DdbTurniNew.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class DdbTurniNew - { - public DateTime DataRif { get; set; } - public string IdxMacchina { get; set; } - public string Turno { get; set; } - public int IdxStato { get; set; } - public string CodArticolo { get; set; } - public DateTime InizioStato { get; set; } - public DateTime FineStato { get; set; } - public string Pallet { get; set; } - public int? PzPalletProd { get; set; } - public decimal? TempoCicloBase { get; set; } - public string Descrizione { get; set; } - public string ClasseTempo { get; set; } - public DateTime? DataTurnoInizio { get; set; } - public DateTime? DataTurnoFine { get; set; } - public long? DurataStato { get; set; } - public DateTime InizioPeriodo { get; set; } - public DateTime? FinePeriodo { get; set; } - public long? DurataPeriodo { get; set; } - public int TotPzProd { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/DdbTurniSummary.cs b/MpDataLayer/DatabaseModels/DdbTurniSummary.cs deleted file mode 100644 index 5db34143..00000000 --- a/MpDataLayer/DatabaseModels/DdbTurniSummary.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class DdbTurniSummary - { - public string IdxMacchina { get; set; } - public DateTime DataRif { get; set; } - public string Turno { get; set; } - public string CodArticolo { get; set; } - public int IdxStato { get; set; } - public decimal TempoCicloBase { get; set; } - public DateTime? Inizio { get; set; } - public int PzPalletProd { get; set; } - public decimal? Durata { get; set; } - public int? PzProd { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/DdbTurniSummaryNew.cs b/MpDataLayer/DatabaseModels/DdbTurniSummaryNew.cs deleted file mode 100644 index 1460328b..00000000 --- a/MpDataLayer/DatabaseModels/DdbTurniSummaryNew.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class DdbTurniSummaryNew - { - public string IdxMacchina { get; set; } - public DateTime DataRif { get; set; } - public string Turno { get; set; } - public string CodArticolo { get; set; } - public int IdxStato { get; set; } - public decimal TempoCicloBase { get; set; } - public DateTime? Inizio { get; set; } - public int PzPalletProd { get; set; } - public decimal? Durata { get; set; } - public int? PzProd { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/Ecp.cs b/MpDataLayer/DatabaseModels/Ecp.cs deleted file mode 100644 index 09fb32dc..00000000 --- a/MpDataLayer/DatabaseModels/Ecp.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class Ecp - { - public int IdxEcp { get; set; } - public DateTime DataOraConf { get; set; } - public string IdxMacchina { get; set; } - public string KeyRichiesta { get; set; } - public int IdxOdl { get; set; } - public string CodArticolo { get; set; } - public int PezziConf { get; set; } - public int PezziScar { get; set; } - public int PezziDaRilav { get; set; } - public int MatrOpr { get; set; } - public string Cognome { get; set; } - public string Nome { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/Ecp1.cs b/MpDataLayer/DatabaseModels/Ecp1.cs deleted file mode 100644 index 33a3a973..00000000 --- a/MpDataLayer/DatabaseModels/Ecp1.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class Ecp1 - { - public DateTime DataOraConf { get; set; } - public string IdxMacchina { get; set; } - public int MatrApp { get; set; } - public DateTime DataFrom { get; set; } - public DateTime DataTo { get; set; } - public int PezziConf { get; set; } - public int PezziScar { get; set; } - public int PezziDaRilav { get; set; } - public string CommessaEsterna { get; set; } - public int TipoConf { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/Kit.cs b/MpDataLayer/DatabaseModels/Kit.cs deleted file mode 100644 index cb25c5c0..00000000 --- a/MpDataLayer/DatabaseModels/Kit.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class Kit - { - public string KeyKit { get; set; } - public string KeyExtOrd { get; set; } - public string CodArtParent { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/Odl.cs b/MpDataLayer/DatabaseModels/Odl.cs deleted file mode 100644 index fa8f8bfa..00000000 --- a/MpDataLayer/DatabaseModels/Odl.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class Odl - { - public int IdxOdl { get; set; } - public string KeyRichiesta { get; set; } - public string CodArticolo { get; set; } - public decimal Tcassegnato { get; set; } - public string IdxMacchina { get; set; } - public int NumPezzi { get; set; } - public int NumPezziEv { get; set; } - public int NumPezziSca { get; set; } - public int NumPezziRil { get; set; } - public DateTime? DataInizio { get; set; } - public DateTime? DataFine { get; set; } - public string KeyRichiestaParent { get; set; } - public string CodArticoloParent { get; set; } - public DateTime? DueDate { get; set; } - public int? PzPallet { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/Odl1.cs b/MpDataLayer/DatabaseModels/Odl1.cs deleted file mode 100644 index 50436e07..00000000 --- a/MpDataLayer/DatabaseModels/Odl1.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class Odl1 - { - public int IdxOdl { get; set; } - public string CodArticolo { get; set; } - public string IdxMacchina { get; set; } - public int NumPezzi { get; set; } - public decimal Tcassegnato { get; set; } - public DateTime? DataInizio { get; set; } - public DateTime? DataFine { get; set; } - public string Note { get; set; } - public bool NeedAppr { get; set; } - public string UserAppr { get; set; } - public DateTime? DataAppr { get; set; } - public decimal? TcrichAttr { get; set; } - public string KeyRichiesta { get; set; } - public int PzPallet { get; set; } - public bool Provvisorio { get; set; } - public int MatrOpr { get; set; } - public string CommessaAs400 { get; set; } - public int ToAs400 { get; set; } - public DateTime? DueDate { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/R.cs b/MpDataLayer/DatabaseModels/R.cs deleted file mode 100644 index 8e58bf74..00000000 --- a/MpDataLayer/DatabaseModels/R.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class R - { - public DateTime DataOraRif { get; set; } - public string IdxMacchina { get; set; } - public string Causale { get; set; } - public string Descrizione { get; set; } - public string Note { get; set; } - public int Qta { get; set; } - public string KeyRichiesta { get; set; } - public int IdxOdl { get; set; } - public string CodArticolo { get; set; } - public int MatrOpr { get; set; } - public string Cognome { get; set; } - public string Nome { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/R1.cs b/MpDataLayer/DatabaseModels/R1.cs deleted file mode 100644 index e4abb10d..00000000 --- a/MpDataLayer/DatabaseModels/R1.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class R1 - { - public string IdxMacchina { get; set; } - public DateTime DataOra { get; set; } - public string Causale { get; set; } - public int Qta { get; set; } - public string Note { get; set; } - public string CodArticolo { get; set; } - public int MatrOpr { get; set; } - public DateTime? DataOraProdRec { get; set; } - public string Descrizione { get; set; } - public string KeyRichiesta { get; set; } - public int IdxOdl { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/Rc.cs b/MpDataLayer/DatabaseModels/Rc.cs deleted file mode 100644 index 8578e1a4..00000000 --- a/MpDataLayer/DatabaseModels/Rc.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class Rc - { - public int IdxControllo { get; set; } - public DateTime DataOra { get; set; } - public string IdxMacchina { get; set; } - public int IdxOdl { get; set; } - public string CodArticolo { get; set; } - public int MatrOpr { get; set; } - public bool EsitoOk { get; set; } - public string Note { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/ResControlli.cs b/MpDataLayer/DatabaseModels/ResControlli.cs deleted file mode 100644 index 77f46ee9..00000000 --- a/MpDataLayer/DatabaseModels/ResControlli.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class ResControlli - { - #region Public Properties - - public string CodArticolo { get; set; } - public DateTime DataOra { get; set; } - public bool EsitoOk { get; set; } - public int IdxControllo { get; set; } - public string IdxMacchina { get; set; } - public int IdxOdl { get; set; } - public int MatrOpr { get; set; } - public string Note { get; set; } - - #endregion Public Properties - } -} \ No newline at end of file diff --git a/MpDataLayer/DatabaseModels/ResScarti.cs b/MpDataLayer/DatabaseModels/ResScarti.cs deleted file mode 100644 index 4d66d124..00000000 --- a/MpDataLayer/DatabaseModels/ResScarti.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class ResScarti - { - #region Public Properties - - public string Causale { get; set; } - public string CodArticolo { get; set; } - public DateTime DataOra { get; set; } - public DateTime? DataOraProdRec { get; set; } - public string Descrizione { get; set; } - public string IdxMacchina { get; set; } - public int IdxOdl { get; set; } - public string KeyRichiesta { get; set; } - public int MatrOpr { get; set; } - public string Note { get; set; } - public int Qta { get; set; } - - #endregion Public Properties - } -} \ No newline at end of file diff --git a/MpDataLayer/DatabaseModels/Tally.cs b/MpDataLayer/DatabaseModels/Tally.cs deleted file mode 100644 index e64cf735..00000000 --- a/MpDataLayer/DatabaseModels/Tally.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class Tally - { - public int N { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/TcStat.cs b/MpDataLayer/DatabaseModels/TcStat.cs deleted file mode 100644 index eef51348..00000000 --- a/MpDataLayer/DatabaseModels/TcStat.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class TcStat - { - public string CodArticolo { get; set; } - public string CodGruppo { get; set; } - public string IdxMacchina { get; set; } - public decimal TcStat1 { get; set; } - public int TcType { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/Tcr.cs b/MpDataLayer/DatabaseModels/Tcr.cs deleted file mode 100644 index d0ba1c26..00000000 --- a/MpDataLayer/DatabaseModels/Tcr.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class Tcr - { - public DateTime DataOraRif { get; set; } - public string IdxMacchina { get; set; } - public string CodArticolo { get; set; } - public int PzProd { get; set; } - public decimal? Tcmedio { get; set; } - public decimal? Tcmin { get; set; } - public decimal? Tcmax { get; set; } - public decimal? Tc50p { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/Tcr1.cs b/MpDataLayer/DatabaseModels/Tcr1.cs deleted file mode 100644 index 444d2669..00000000 --- a/MpDataLayer/DatabaseModels/Tcr1.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class Tcr1 - { - public string IdxMacchina { get; set; } - public string CodArticolo { get; set; } - public DateTime DataOraRif { get; set; } - public decimal Tcmedio { get; set; } - public int PzProd { get; set; } - public int IdxOdl { get; set; } - public decimal Tcassegnato { get; set; } - public string KeyRichiesta { get; set; } - public int PzPallet { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/TcrDay.cs b/MpDataLayer/DatabaseModels/TcrDay.cs deleted file mode 100644 index 20c3fbdf..00000000 --- a/MpDataLayer/DatabaseModels/TcrDay.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class TcrDay - { - public DateTime DataOraRif { get; set; } - public string IdxMacchina { get; set; } - public string CodArticolo { get; set; } - public int PzProd { get; set; } - public decimal? Tcmedio { get; set; } - public decimal? Tcmin { get; set; } - public decimal? Tcmax { get; set; } - public decimal? Tc50p { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/TcrDayTest.cs b/MpDataLayer/DatabaseModels/TcrDayTest.cs deleted file mode 100644 index 904d7c7f..00000000 --- a/MpDataLayer/DatabaseModels/TcrDayTest.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class TcrDayTest - { - public DateTime DataOraRif { get; set; } - public string IdxMacchina { get; set; } - public string CodArticolo { get; set; } - public int PzProd { get; set; } - public decimal? Tcmedio { get; set; } - public decimal? Tcmin { get; set; } - public decimal? Tcmax { get; set; } - public decimal? Tc50p { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/TestJason.cs b/MpDataLayer/DatabaseModels/TestJason.cs deleted file mode 100644 index 8f921d40..00000000 --- a/MpDataLayer/DatabaseModels/TestJason.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class TestJason - { - public DateTime Data { get; set; } - public byte[] Json { get; set; } - public int? Rows { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/Ul.cs b/MpDataLayer/DatabaseModels/Ul.cs deleted file mode 100644 index 54b11f82..00000000 --- a/MpDataLayer/DatabaseModels/Ul.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class Ul - { - public int IdxLog { get; set; } - public DateTime DataOraRif { get; set; } - public string IdxMacchina { get; set; } - public int MatrOpr { get; set; } - public string Cognome { get; set; } - public string Nome { get; set; } - public string CodArticolo { get; set; } - public string Azione { get; set; } - public string Valore { get; set; } - public decimal Qta { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/UserActionLog.cs b/MpDataLayer/DatabaseModels/UserActionLog.cs deleted file mode 100644 index 15426401..00000000 --- a/MpDataLayer/DatabaseModels/UserActionLog.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class UserActionLog - { - #region Public Properties - - public string Azione { get; set; } - public string CodArticolo { get; set; } - public string Cognome { get; set; } - public DateTime DataOraRif { get; set; } - public int IdxLog { get; set; } - public string IdxMacchina { get; set; } - public int MatrOpr { get; set; } - public string Nome { get; set; } - public decimal Qta { get; set; } - public string Valore { get; set; } - - #endregion Public Properties - } -} \ No newline at end of file diff --git a/MpDataLayer/DatabaseModels/VDdb.cs b/MpDataLayer/DatabaseModels/VDdb.cs deleted file mode 100644 index 4aeccff6..00000000 --- a/MpDataLayer/DatabaseModels/VDdb.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class VDdb - { - public string IdxMacchina { get; set; } - public DateTime InizioStato { get; set; } - public DateTime? FineStato { get; set; } - public int IdxStato { get; set; } - public double? DurataMinuti { get; set; } - public string Value { get; set; } - public string CodArticolo { get; set; } - public double? TempoCicloBase { get; set; } - public int? PzPalletProd { get; set; } - public int? MatrOpr { get; set; } - public string Pallet { get; set; } - public string Descrizione { get; set; } - public string ClasseTempo { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/VDdbLight.cs b/MpDataLayer/DatabaseModels/VDdbLight.cs deleted file mode 100644 index f1bafcbc..00000000 --- a/MpDataLayer/DatabaseModels/VDdbLight.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class VDdbLight - { - public string CodMacchina { get; set; } - public string DescMacchina { get; set; } - public DateTime InizioStato { get; set; } - public string Stato { get; set; } - public double? DurataMinuti { get; set; } - public string CodArticolo { get; set; } - public string Operatore { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/VDdbLightOld.cs b/MpDataLayer/DatabaseModels/VDdbLightOld.cs deleted file mode 100644 index d636177a..00000000 --- a/MpDataLayer/DatabaseModels/VDdbLightOld.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class VDdbLightOld - { - public string CodMacchina { get; set; } - public string DescMacchina { get; set; } - public DateTime InizioStato { get; set; } - public string Stato { get; set; } - public double? DurataMinuti { get; set; } - public string CodArticolo { get; set; } - public string Operatore { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/VDdbTurni.cs b/MpDataLayer/DatabaseModels/VDdbTurni.cs deleted file mode 100644 index fbdc6046..00000000 --- a/MpDataLayer/DatabaseModels/VDdbTurni.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class VDdbTurni - { - public string IdxMacchina { get; set; } - public DateTime DataRif { get; set; } - public string Turno { get; set; } - public string CodArticolo { get; set; } - public int IdxStato { get; set; } - public decimal TempoCicloBase { get; set; } - public int PzPalletProd { get; set; } - public decimal? Durata { get; set; } - public int? PzProd { get; set; } - public string ClasseTempo { get; set; } - public string DescClasseTempo { get; set; } - public string Semaforo { get; set; } - public string SemColore { get; set; } - public string CodMacchina { get; set; } - public string DescMacchina { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/VEcp.cs b/MpDataLayer/DatabaseModels/VEcp.cs deleted file mode 100644 index c90a45b6..00000000 --- a/MpDataLayer/DatabaseModels/VEcp.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class VEcp - { - public DateTime DataOraConf { get; set; } - public string IdxMacchina { get; set; } - public int MatrApp { get; set; } - public DateTime DataFrom { get; set; } - public DateTime DataTo { get; set; } - public int PezziConf { get; set; } - public int PezziScar { get; set; } - public int PezziDaRilav { get; set; } - public string CommessaEsterna { get; set; } - public int TipoConf { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/VEcp1.cs b/MpDataLayer/DatabaseModels/VEcp1.cs deleted file mode 100644 index 3c63b654..00000000 --- a/MpDataLayer/DatabaseModels/VEcp1.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class VEcp1 - { - public int IdxEcp { get; set; } - public DateTime DataOraConf { get; set; } - public string IdxMacchina { get; set; } - public string CodMacchina { get; set; } - public string DescMacchina { get; set; } - public string KeyRichiesta { get; set; } - public int IdxOdl { get; set; } - public string CodArticolo { get; set; } - public int PezziConf { get; set; } - public int PezziScar { get; set; } - public int PezziDaRilav { get; set; } - public int MatrOpr { get; set; } - public string Cognome { get; set; } - public string Nome { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/VEcpExtended.cs b/MpDataLayer/DatabaseModels/VEcpExtended.cs deleted file mode 100644 index c2d75bc9..00000000 --- a/MpDataLayer/DatabaseModels/VEcpExtended.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class VEcpExtended - { - public int IdxEcp { get; set; } - public DateTime DataOraConf { get; set; } - public string IdxMacchina { get; set; } - public string CodMacchina { get; set; } - public string DescMacchina { get; set; } - public string KeyRichiesta { get; set; } - public int IdxOdl { get; set; } - public string CodArticolo { get; set; } - public int PezziConf { get; set; } - public int PezziScar { get; set; } - public int PezziDaRilav { get; set; } - public int MatrOpr { get; set; } - public string Cognome { get; set; } - public string Nome { get; set; } - public decimal Tcassegnato { get; set; } - public DateTime DueDate { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/VKit.cs b/MpDataLayer/DatabaseModels/VKit.cs deleted file mode 100644 index f84ce903..00000000 --- a/MpDataLayer/DatabaseModels/VKit.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class VKit - { - public string KeyKit { get; set; } - public string KeyExtOrd { get; set; } - public string CodArtParent { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/VOdl.cs b/MpDataLayer/DatabaseModels/VOdl.cs deleted file mode 100644 index 8600135a..00000000 --- a/MpDataLayer/DatabaseModels/VOdl.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class VOdl - { - public int IdxOdl { get; set; } - public string CodArticolo { get; set; } - public string IdxMacchina { get; set; } - public int NumPezzi { get; set; } - public decimal Tcassegnato { get; set; } - public DateTime? DataInizio { get; set; } - public DateTime? DataFine { get; set; } - public string Note { get; set; } - public bool NeedAppr { get; set; } - public string UserAppr { get; set; } - public DateTime? DataAppr { get; set; } - public decimal? TcrichAttr { get; set; } - public string KeyRichiesta { get; set; } - public int PzPallet { get; set; } - public bool Provvisorio { get; set; } - public int MatrOpr { get; set; } - public string CommessaAs400 { get; set; } - public int ToAs400 { get; set; } - public DateTime? DueDate { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/VOdl1.cs b/MpDataLayer/DatabaseModels/VOdl1.cs deleted file mode 100644 index 97fda075..00000000 --- a/MpDataLayer/DatabaseModels/VOdl1.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class VOdl1 - { - public int IdxOdl { get; set; } - public string KeyRichiesta { get; set; } - public string CodArticolo { get; set; } - public decimal Tcassegnato { get; set; } - public string IdxMacchina { get; set; } - public string CodMacchina { get; set; } - public string DescMacchina { get; set; } - public int NumPezzi { get; set; } - public int NumPezziEv { get; set; } - public int NumPezziSca { get; set; } - public int NumPezziRil { get; set; } - public DateTime? DataInizio { get; set; } - public DateTime? DataFine { get; set; } - public string KeyRichiestaParent { get; set; } - public string CodArticoloParent { get; set; } - public DateTime? DueDate { get; set; } - public int? PzPallet { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/VPodlNonChiusi.cs b/MpDataLayer/DatabaseModels/VPodlNonChiusi.cs deleted file mode 100644 index fa806e0d..00000000 --- a/MpDataLayer/DatabaseModels/VPodlNonChiusi.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class VPodlNonChiusi - { - public int IdxPromessa { get; set; } - public string KeyRichiesta { get; set; } - public string KeyBcode { get; set; } - public bool Attivabile { get; set; } - public int IdxOdl { get; set; } - public DateTime? DataInizio { get; set; } - public string CodArticolo { get; set; } - public string DescArticolo { get; set; } - public string CodGruppo { get; set; } - public string IdxMacchina { get; set; } - public string CodMacchina { get; set; } - public string Nome { get; set; } - public int NumPezzi { get; set; } - public decimal Tcassegnato { get; set; } - public DateTime DueDate { get; set; } - public int Priorita { get; set; } - public int PzPallet { get; set; } - public decimal? TotMinProg { get; set; } - public decimal? TotOreProg { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/VR1.cs b/MpDataLayer/DatabaseModels/VR1.cs deleted file mode 100644 index 956f8786..00000000 --- a/MpDataLayer/DatabaseModels/VR1.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class VR1 - { - public DateTime DataOraRif { get; set; } - public string IdxMacchina { get; set; } - public string Causale { get; set; } - public string Descrizione { get; set; } - public string Note { get; set; } - public int Qta { get; set; } - public string KeyRichiesta { get; set; } - public int IdxOdl { get; set; } - public string CodArticolo { get; set; } - public int MatrOpr { get; set; } - public string Cognome { get; set; } - public string Nome { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/VTcStat.cs b/MpDataLayer/DatabaseModels/VTcStat.cs deleted file mode 100644 index 2c048219..00000000 --- a/MpDataLayer/DatabaseModels/VTcStat.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class VTcStat - { - public string CodArticolo { get; set; } - public string CodGruppo { get; set; } - public string IdxMacchina { get; set; } - public string CodMacchina { get; set; } - public string DescMacchina { get; set; } - public decimal TcStat { get; set; } - public int TcType { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/VTcr.cs b/MpDataLayer/DatabaseModels/VTcr.cs deleted file mode 100644 index a3adb842..00000000 --- a/MpDataLayer/DatabaseModels/VTcr.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class VTcr - { - public string IdxMacchina { get; set; } - public string CodArticolo { get; set; } - public DateTime DataOraRif { get; set; } - public decimal Tcmedio { get; set; } - public int PzProd { get; set; } - public int IdxOdl { get; set; } - public decimal Tcassegnato { get; set; } - public string KeyRichiesta { get; set; } - public int PzPallet { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/VTcr1.cs b/MpDataLayer/DatabaseModels/VTcr1.cs deleted file mode 100644 index 55061b57..00000000 --- a/MpDataLayer/DatabaseModels/VTcr1.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class VTcr1 - { - public DateTime DataOraRif { get; set; } - public string IdxMacchina { get; set; } - public string CodMacchina { get; set; } - public string DescMacchina { get; set; } - public string CodArticolo { get; set; } - public int PzProd { get; set; } - public decimal? Tcmedio { get; set; } - public decimal? Tcmin { get; set; } - public decimal? Tcmax { get; set; } - public decimal? Tc50p { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/VTcrDay.cs b/MpDataLayer/DatabaseModels/VTcrDay.cs deleted file mode 100644 index 5d591407..00000000 --- a/MpDataLayer/DatabaseModels/VTcrDay.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class VTcrDay - { - public DateTime? DataOraRif { get; set; } - public string IdxMacchina { get; set; } - public string CodMacchina { get; set; } - public string DescMacchina { get; set; } - public string CodArticolo { get; set; } - public int PzProd { get; set; } - public decimal? Tcmedio { get; set; } - public decimal? Tcmin { get; set; } - public decimal? Tcmax { get; set; } - public decimal? Tc50p { get; set; } - } -} diff --git a/MpDataLayer/DatabaseModels/VetoTc.cs b/MpDataLayer/DatabaseModels/VetoTc.cs deleted file mode 100644 index b48ad96b..00000000 --- a/MpDataLayer/DatabaseModels/VetoTc.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace MP.Data.DatabaseModels -{ - public partial class VetoTc - { - public string IdxMacchina { get; set; } - public string CodArticolo { get; set; } - public bool? VetoTc1 { get; set; } - public decimal SogliaTc { get; set; } - } -} diff --git a/MpDataLayer/Enums.cs b/MpDataLayer/Enums.cs deleted file mode 100644 index 421dd601..00000000 --- a/MpDataLayer/Enums.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System; - -namespace MP.Data -{ - public class Enums - { - } -} \ No newline at end of file diff --git a/MpDataLayer/MP.Data.csproj b/MpDataLayer/MP.Data.csproj deleted file mode 100644 index a8360e39..00000000 --- a/MpDataLayer/MP.Data.csproj +++ /dev/null @@ -1,65 +0,0 @@ - - - - net5.0 - MP.Data - MP.Data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - diff --git a/MpDataLayer/MoonPro_STATSContext.cs b/MpDataLayer/MoonPro_STATSContext.cs deleted file mode 100644 index 2c0ed3fa..00000000 --- a/MpDataLayer/MoonPro_STATSContext.cs +++ /dev/null @@ -1,1606 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.Extensions.Configuration; -using MpDataLayer.DatabaseModels; -using NLog; - -#nullable disable - -namespace MP.Data -{ - public partial class MoonPro_STATSContext : DbContext - { - #region Private Fields - - private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); - - private IConfiguration _configuration; - - #endregion Private Fields - - #region Public Constructors - - public MoonPro_STATSContext(IConfiguration configuration) - { - _configuration = configuration; - } - - public MoonPro_STATSContext(DbContextOptions options) - : base(options) - { - } - - #endregion Public Constructors - -#if false - public virtual DbSet Aauls { get; set; } - public virtual DbSet Cals { get; set; } - public virtual DbSet Configs { get; set; } - public virtual DbSet Ddbs { get; set; } - public virtual DbSet Ddbs1 { get; set; } - public virtual DbSet DdbTurniNews { get; set; } - public virtual DbSet DdbTurnis { get; set; } - public virtual DbSet DdbTurniSummaries { get; set; } - public virtual DbSet DdbTurniSummaryNews { get; set; } - public virtual DbSet Ecps { get; set; } - public virtual DbSet Ecps1 { get; set; } - public virtual DbSet Kits { get; set; } - public virtual DbSet Odls { get; set; } - public virtual DbSet Odls1 { get; set; } - public virtual DbSet Rcs { get; set; } - public virtual DbSet Rs { get; set; } - public virtual DbSet Rs1 { get; set; } - public virtual DbSet Tallies { get; set; } - public virtual DbSet TcrDays { get; set; } - public virtual DbSet TcrDayTests { get; set; } - public virtual DbSet Tcrs { get; set; } - public virtual DbSet Tcrs1 { get; set; } - public virtual DbSet TcStats { get; set; } - public virtual DbSet TestJasons { get; set; } - public virtual DbSet
    Uls { get; set; } -#endif - -#if false - public virtual DbSet VDdbLightOlds { get; set; } - public virtual DbSet VDdbLights { get; set; } - public virtual DbSet VDdbs { get; set; } - public virtual DbSet VDdbTurnis { get; set; } - public virtual DbSet VEcpExtendeds { get; set; } - public virtual DbSet VEcps { get; set; } - public virtual DbSet VEcps1 { get; set; } - public virtual DbSet VetoTcs { get; set; } - public virtual DbSet VKits { get; set; } - public virtual DbSet VOdls { get; set; } - public virtual DbSet VOdls1 { get; set; } - public virtual DbSet VPodlNonChiusis { get; set; } -#endif - - #region Public Properties - - public virtual DbSet DbSetControlli { get; set; } - public virtual DbSet DbSetScarti { get; set; } -#if false - public virtual DbSet VRs1 { get; set; } - public virtual DbSet VTcrDays { get; set; } - public virtual DbSet VTcrs { get; set; } - public virtual DbSet VTcrs1 { get; set; } - public virtual DbSet VTcStats { get; set; } -#endif - public virtual DbSet DbSetUserLog { get; set; } - - #endregion Public Properties - - #region Private Methods - - partial void OnModelCreatingPartial(ModelBuilder modelBuilder); - - #endregion Private Methods - - #region Protected Methods - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - if (!optionsBuilder.IsConfigured) - { - string connString = _configuration.GetConnectionString("Mp.Stats"); - - optionsBuilder.UseSqlServer(_configuration.GetConnectionString("Mp.Stats")); - -#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263. - //optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=MoonPro_STATS;Trusted_Connection=True;"); - } - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - modelBuilder.HasAnnotation("Relational:Collation", "SQL_Latin1_General_CP1_CI_AS"); - -#if false - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.Azione); - - entity.ToTable("AAUL"); - - entity.Property(e => e.Azione) - .HasMaxLength(50) - .HasDefaultValueSql("('ND')") - .HasComment("Azione dell'operatore"); - - entity.Property(e => e.Descrizione) - .IsRequired() - .HasMaxLength(50) - .HasDefaultValueSql("('')"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.Giorno) - .HasName("PK_Calendario"); - - entity.ToTable("CAL"); - - entity.Property(e => e.Giorno) - .HasColumnType("datetime") - .HasColumnName("giorno"); - - entity.Property(e => e.DoDdb) - .IsRequired() - .HasColumnName("doDDB") - .HasDefaultValueSql("((1))") - .HasComment("Indica che è necessario ricalcolare statistiche derivate da DDB (DiarioDiBordo)"); - - entity.Property(e => e.DoEcp) - .IsRequired() - .HasColumnName("doECP") - .HasDefaultValueSql("((1))") - .HasComment("Indica che è necessario ricalcolare statistiche derivate da DPO (DatiProduzione Operatore) - conferme manuali operatore"); - - entity.Property(e => e.DoOdl) - .IsRequired() - .HasColumnName("doODL") - .HasDefaultValueSql("((1))") - .HasComment("Indica che è necessario ricalcolare statistiche ODL"); - - entity.Property(e => e.DoRs) - .IsRequired() - .HasColumnName("doRS") - .HasDefaultValueSql("((1))") - .HasComment("Indica che è necessario ricalcolare statistiche derivate da RS (Registro Scarti)"); - - entity.Property(e => e.DoTcr) - .IsRequired() - .HasColumnName("doTCR") - .HasDefaultValueSql("((1))") - .HasComment("Indica che è necessario ricalcolare statistiche derivate da rilevazione TCR (TempiCicloRilevati)"); - - entity.Property(e => e.DoUl) - .IsRequired() - .HasColumnName("doUL") - .HasDefaultValueSql("((1))") - .HasComment("Indica che è necessario ricalcolare statistiche derivate da DSO (Dichiarazioni Scarti Operatore)"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.Chiave); - - entity.ToTable("Config"); - - entity.Property(e => e.Chiave) - .HasMaxLength(50) - .HasColumnName("chiave"); - - entity.Property(e => e.Note).HasColumnName("note"); - - entity.Property(e => e.Valore).HasColumnName("valore"); - - entity.Property(e => e.ValoreStd) - .HasColumnName("valoreStd") - .HasComment("Valore di default/riferimento per la variabile"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.DataOraRif, e.IdxMacchina, e.IdxStato }) - .HasName("PK_DDB_1"); - - entity.ToTable("DDB"); - - entity.Property(e => e.DataOraRif).HasColumnType("datetime"); - - entity.Property(e => e.IdxMacchina).HasMaxLength(50); - - entity.Property(e => e.DurataMinuti).HasColumnType("decimal(18, 8)"); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToTable("DDB", "raw"); - - entity.HasIndex(e => e.InizioStato, "ci_DDB_Data") - .IsClustered(); - - entity.HasIndex(e => e.CodArticolo, "i_DDB_CodArt"); - - entity.HasIndex(e => e.IdxMacchina, "i_DDB_IdxMacc"); - - entity.HasIndex(e => e.IdxStato, "i_DDB_IdxStato"); - - entity.HasIndex(e => e.MatrOpr, "i_DDB_MatrOpr"); - - entity.Property(e => e.ClasseTempo).HasMaxLength(50); - - entity.Property(e => e.CodArticolo).HasMaxLength(50); - - entity.Property(e => e.Descrizione).HasMaxLength(50); - - entity.Property(e => e.FineStato).HasColumnType("datetime"); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.InizioStato).HasColumnType("datetime"); - - entity.Property(e => e.Pallet) - .HasMaxLength(20) - .HasColumnName("pallet"); - - entity.Property(e => e.Value).HasMaxLength(50); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.DataRif, e.IdxMacchina, e.Turno, e.IdxStato, e.CodArticolo, e.InizioPeriodo }); - - entity.ToTable("DDB_Turni"); - - entity.Property(e => e.DataRif).HasColumnType("datetime"); - - entity.Property(e => e.IdxMacchina).HasMaxLength(50); - - entity.Property(e => e.Turno).HasMaxLength(5); - - entity.Property(e => e.CodArticolo).HasMaxLength(50); - - entity.Property(e => e.InizioPeriodo).HasColumnType("datetime"); - - entity.Property(e => e.ClasseTempo).HasMaxLength(50); - - entity.Property(e => e.DataTurnoFine).HasColumnType("datetime"); - - entity.Property(e => e.DataTurnoInizio).HasColumnType("datetime"); - - entity.Property(e => e.Descrizione).HasMaxLength(50); - - entity.Property(e => e.FinePeriodo).HasColumnType("datetime"); - - entity.Property(e => e.FineStato).HasColumnType("datetime"); - - entity.Property(e => e.InizioStato).HasColumnType("datetime"); - - entity.Property(e => e.Pallet) - .HasMaxLength(20) - .HasColumnName("pallet"); - - entity.Property(e => e.TempoCicloBase).HasColumnType("decimal(18, 8)"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.DataRif, e.IdxMacchina, e.Turno, e.IdxStato, e.CodArticolo, e.InizioPeriodo }); - - entity.ToTable("DDB_TurniNew"); - - entity.Property(e => e.DataRif).HasColumnType("datetime"); - - entity.Property(e => e.IdxMacchina).HasMaxLength(50); - - entity.Property(e => e.Turno).HasMaxLength(5); - - entity.Property(e => e.CodArticolo).HasMaxLength(50); - - entity.Property(e => e.InizioPeriodo).HasColumnType("datetime"); - - entity.Property(e => e.ClasseTempo).HasMaxLength(50); - - entity.Property(e => e.DataTurnoFine).HasColumnType("datetime"); - - entity.Property(e => e.DataTurnoInizio).HasColumnType("datetime"); - - entity.Property(e => e.Descrizione).HasMaxLength(50); - - entity.Property(e => e.FinePeriodo).HasColumnType("datetime"); - - entity.Property(e => e.FineStato).HasColumnType("datetime"); - - entity.Property(e => e.InizioStato).HasColumnType("datetime"); - - entity.Property(e => e.Pallet) - .HasMaxLength(20) - .HasColumnName("pallet"); - - entity.Property(e => e.TempoCicloBase).HasColumnType("decimal(18, 8)"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.IdxMacchina, e.DataRif, e.Turno, e.CodArticolo, e.IdxStato, e.TempoCicloBase, e.PzPalletProd }); - - entity.ToTable("DDB_TurniSummary"); - - entity.Property(e => e.IdxMacchina).HasMaxLength(50); - - entity.Property(e => e.DataRif).HasColumnType("datetime"); - - entity.Property(e => e.Turno).HasMaxLength(5); - - entity.Property(e => e.CodArticolo).HasMaxLength(50); - - entity.Property(e => e.TempoCicloBase).HasColumnType("decimal(18, 8)"); - - entity.Property(e => e.Durata).HasColumnType("numeric(27, 7)"); - - entity.Property(e => e.Inizio).HasColumnType("datetime"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.IdxMacchina, e.DataRif, e.Turno, e.CodArticolo, e.IdxStato, e.TempoCicloBase, e.PzPalletProd }); - - entity.ToTable("DDB_TurniSummaryNew"); - - entity.Property(e => e.IdxMacchina).HasMaxLength(50); - - entity.Property(e => e.DataRif).HasColumnType("datetime"); - - entity.Property(e => e.Turno).HasMaxLength(5); - - entity.Property(e => e.CodArticolo).HasMaxLength(50); - - entity.Property(e => e.TempoCicloBase).HasColumnType("decimal(18, 8)"); - - entity.Property(e => e.Durata).HasColumnType("numeric(27, 7)"); - - entity.Property(e => e.Inizio).HasColumnType("datetime"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.IdxEcp); - - entity.ToTable("ECP"); - - entity.Property(e => e.IdxEcp).HasColumnName("idxECP"); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Cognome) - .IsRequired() - .HasMaxLength(50) - .HasDefaultValueSql("('')"); - - entity.Property(e => e.DataOraConf).HasColumnType("datetime"); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50) - .HasColumnName("idxMacchina"); - - entity.Property(e => e.IdxOdl).HasColumnName("IdxODL"); - - entity.Property(e => e.KeyRichiesta) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Nome) - .IsRequired() - .HasMaxLength(50) - .HasDefaultValueSql("('')"); - - entity.Property(e => e.PezziConf).HasColumnName("pezziConf"); - - entity.Property(e => e.PezziDaRilav).HasColumnName("pezziDaRilav"); - - entity.Property(e => e.PezziScar).HasColumnName("pezziScar"); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToTable("ECP", "raw"); - - entity.HasIndex(e => e.DataOraConf, "ci_ECP_Data") - .IsClustered(); - - entity.HasIndex(e => e.IdxMacchina, "i_ECP_IdxMacc"); - - entity.HasIndex(e => e.MatrApp, "i_ECP_MatrApp"); - - entity.HasIndex(e => e.IdxMacchina, "i_ODL_IdxMacc"); - - entity.Property(e => e.CommessaEsterna) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.DataFrom) - .HasColumnType("datetime") - .HasColumnName("dataFrom"); - - entity.Property(e => e.DataOraConf).HasColumnType("datetime"); - - entity.Property(e => e.DataTo) - .HasColumnType("datetime") - .HasColumnName("dataTo"); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50) - .HasColumnName("idxMacchina"); - - entity.Property(e => e.PezziConf).HasColumnName("pezziConf"); - - entity.Property(e => e.PezziDaRilav).HasColumnName("pezziDaRilav"); - - entity.Property(e => e.PezziScar).HasColumnName("pezziScar"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.KeyKit); - - entity.ToTable("KIT", "raw"); - - entity.Property(e => e.KeyKit).HasMaxLength(50); - - entity.Property(e => e.CodArtParent).IsRequired(); - - entity.Property(e => e.KeyExtOrd).IsRequired(); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.IdxOdl) - .HasName("PK_ODL_1"); - - entity.ToTable("ODL"); - - entity.Property(e => e.IdxOdl) - .ValueGeneratedNever() - .HasColumnName("IdxODL"); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.CodArticoloParent) - .IsRequired() - .HasDefaultValueSql("('')"); - - entity.Property(e => e.DataFine).HasColumnType("datetime"); - - entity.Property(e => e.DataInizio).HasColumnType("datetime"); - - entity.Property(e => e.DueDate).HasColumnType("datetime"); - - entity.Property(e => e.IdxMacchina).HasMaxLength(50); - - entity.Property(e => e.KeyRichiesta) - .IsRequired() - .HasMaxLength(50) - .HasComment("Chiave: ordine esterno o KIT"); - - entity.Property(e => e.KeyRichiestaParent) - .IsRequired() - .HasDefaultValueSql("('')") - .HasComment("Chiave: ordine esterno o KIT"); - - entity.Property(e => e.PzPallet).HasDefaultValueSql("((1))"); - - entity.Property(e => e.Tcassegnato) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCAssegnato"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.IdxOdl) - .IsClustered(false); - - entity.ToTable("ODL", "raw"); - - entity.HasIndex(e => e.IdxOdl, "ci_ODL_Data") - .IsClustered(); - - entity.HasIndex(e => e.IdxMacchina, "i_ODL_IdxMacc"); - - entity.HasIndex(e => e.KeyRichiesta, "i_ODL_KeyRic"); - - entity.Property(e => e.IdxOdl) - .ValueGeneratedNever() - .HasColumnName("IdxODL"); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.CommessaAs400) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.DataAppr).HasColumnType("datetime"); - - entity.Property(e => e.DataFine).HasColumnType("datetime"); - - entity.Property(e => e.DataInizio).HasColumnType("datetime"); - - entity.Property(e => e.DueDate).HasColumnType("datetime"); - - entity.Property(e => e.IdxMacchina).HasMaxLength(50); - - entity.Property(e => e.KeyRichiesta) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Note).HasMaxLength(2500); - - entity.Property(e => e.Provvisorio).HasColumnName("provvisorio"); - - entity.Property(e => e.Tcassegnato) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCAssegnato"); - - entity.Property(e => e.TcrichAttr) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCRichAttr"); - - entity.Property(e => e.UserAppr).HasMaxLength(50); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.DataOraRif, e.IdxMacchina, e.Causale, e.IdxOdl }); - - entity.ToTable("RS"); - - entity.Property(e => e.DataOraRif).HasColumnType("datetime"); - - entity.Property(e => e.IdxMacchina).HasMaxLength(50); - - entity.Property(e => e.Causale).HasMaxLength(50); - - entity.Property(e => e.IdxOdl).HasColumnName("IdxODL"); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Cognome) - .IsRequired() - .HasMaxLength(50) - .HasDefaultValueSql("('')"); - - entity.Property(e => e.Descrizione) - .IsRequired() - .HasMaxLength(250); - - entity.Property(e => e.KeyRichiesta) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Nome) - .IsRequired() - .HasMaxLength(50) - .HasDefaultValueSql("('')"); - - entity.Property(e => e.Note) - .IsRequired() - .HasMaxLength(250); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToTable("RS", "raw"); - - entity.HasIndex(e => e.DataOra, "ci_RS_Data") - .IsClustered(); - - entity.HasIndex(e => e.Causale, "i_RS_Causale"); - - entity.HasIndex(e => e.CodArticolo, "i_RS_CodArt"); - - entity.HasIndex(e => e.IdxMacchina, "i_RS_IdxMacc"); - - entity.HasIndex(e => e.MatrOpr, "i_RS_MatrOpr"); - - entity.Property(e => e.Causale) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.DataOra).HasColumnType("datetime"); - - entity.Property(e => e.DataOraProdRec).HasColumnType("datetime"); - - entity.Property(e => e.Descrizione) - .IsRequired() - .HasMaxLength(250); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.IdxOdl).HasColumnName("IdxODL"); - - entity.Property(e => e.KeyRichiesta) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Note) - .IsRequired() - .HasMaxLength(250); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.IdxControllo) - .IsClustered(false); - - entity.ToTable("RC", "raw"); - - entity.HasIndex(e => e.DataOra, "ci_RC_Data") - .IsClustered(); - - entity.HasIndex(e => e.CodArticolo, "i_RC_CodArt"); - - entity.HasIndex(e => e.EsitoOk, "i_RC_EsitoOk"); - - entity.HasIndex(e => e.IdxMacchina, "i_RC_IdxMacc"); - - entity.HasIndex(e => e.MatrOpr, "i_RC_MatrOpr"); - - entity.Property(e => e.IdxControllo).ValueGeneratedNever(); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.DataOra).HasColumnType("datetime"); - - entity.Property(e => e.EsitoOk).HasColumnName("EsitoOK"); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.IdxOdl).HasColumnName("IdxODL"); - - entity.Property(e => e.Note) - .IsRequired() - .HasMaxLength(250); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.N) - .HasName("PK_Tally_N"); - - entity.ToTable("Tally"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.CodArticolo, e.CodGruppo, e.IdxMacchina }); - - entity.ToTable("TC_Stat"); - - entity.Property(e => e.CodArticolo).HasMaxLength(50); - - entity.Property(e => e.CodGruppo).HasMaxLength(50); - - entity.Property(e => e.IdxMacchina).HasMaxLength(50); - - entity.Property(e => e.TcStat1) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TC_Stat"); - - entity.Property(e => e.TcType).HasColumnName("TC_Type"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.IdxMacchina, e.CodArticolo, e.DataOraRif }) - .IsClustered(false); - - entity.ToTable("TCR"); - - entity.Property(e => e.IdxMacchina).HasMaxLength(50); - - entity.Property(e => e.CodArticolo).HasMaxLength(50); - - entity.Property(e => e.DataOraRif).HasColumnType("datetime"); - - entity.Property(e => e.Tc50p) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TC50p") - .HasComment("Valore percentile 50"); - - entity.Property(e => e.Tcmax) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCMax") - .HasComment("Valore MASSIMO"); - - entity.Property(e => e.Tcmedio) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCMedio") - .HasComment("Valore di MEDIA arimetica"); - - entity.Property(e => e.Tcmin) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCMin") - .HasComment("Valore minimo"); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToTable("TCR", "raw"); - - entity.HasIndex(e => e.DataOraRif, "ci_TCR_Data") - .IsClustered(); - - entity.HasIndex(e => e.CodArticolo, "i_TCR_CodArt"); - - entity.HasIndex(e => e.IdxMacchina, "i_TCR_IdxMacc"); - - entity.HasIndex(e => e.KeyRichiesta, "i_TCR_KeyRich"); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.DataOraRif).HasColumnType("datetime"); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.IdxOdl).HasColumnName("IdxODL"); - - entity.Property(e => e.KeyRichiesta) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Tcassegnato) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCAssegnato"); - - entity.Property(e => e.Tcmedio) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCMedio"); - }); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.IdxMacchina, e.CodArticolo, e.DataOraRif }) - .HasName("PK_TCRDay") - .IsClustered(false); - - entity.ToTable("TCR_Day"); - - entity.Property(e => e.IdxMacchina).HasMaxLength(50); - - entity.Property(e => e.CodArticolo).HasMaxLength(50); - - entity.Property(e => e.DataOraRif).HasColumnType("date"); - - entity.Property(e => e.Tc50p) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TC50p") - .HasComment("Valore percentile 50"); - - entity.Property(e => e.Tcmax) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCMax") - .HasComment("Valore MASSIMO"); - - entity.Property(e => e.Tcmedio) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCMedio") - .HasComment("Valore di MEDIA arimetica"); - - entity.Property(e => e.Tcmin) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCMin") - .HasComment("Valore minimo"); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToTable("TCR_DayTest"); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.DataOraRif).HasColumnType("date"); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Tc50p) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TC50p"); - - entity.Property(e => e.Tcmax) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCMax"); - - entity.Property(e => e.Tcmedio) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCMedio"); - - entity.Property(e => e.Tcmin) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCMin"); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToTable("TestJason"); - - entity.Property(e => e.Data).HasColumnType("date"); - }); - - modelBuilder.Entity
      (entity => - { - entity.HasKey(e => e.IdxLog) - .HasName("PK_UserLog"); - - entity.ToTable("UL"); - - entity.HasIndex(e => e.DataOraRif, "i_UL_DataOra"); - - entity.Property(e => e.Azione) - .IsRequired() - .HasMaxLength(50) - .HasDefaultValueSql("('ND')") - .HasComment("Azione dell'operatore"); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Cognome) - .IsRequired() - .HasMaxLength(50) - .HasDefaultValueSql("('')"); - - entity.Property(e => e.DataOraRif).HasColumnType("datetime"); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Nome) - .IsRequired() - .HasMaxLength(50) - .HasDefaultValueSql("('')"); - - entity.Property(e => e.Qta).HasColumnType("decimal(18, 8)"); - - entity.Property(e => e.Valore) - .IsRequired() - .HasMaxLength(250) - .HasDefaultValueSql("('')"); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("vDDB"); - - entity.Property(e => e.ClasseTempo).HasMaxLength(50); - - entity.Property(e => e.CodArticolo).HasMaxLength(50); - - entity.Property(e => e.Descrizione).HasMaxLength(50); - - entity.Property(e => e.FineStato).HasColumnType("datetime"); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.InizioStato).HasColumnType("datetime"); - - entity.Property(e => e.Pallet) - .HasMaxLength(20) - .HasColumnName("pallet"); - - entity.Property(e => e.Value).HasMaxLength(50); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("v_DDB_Light", "export"); - - entity.Property(e => e.CodArticolo).HasMaxLength(50); - - entity.Property(e => e.CodMacchina).HasMaxLength(50); - - entity.Property(e => e.DescMacchina).HasMaxLength(50); - - entity.Property(e => e.InizioStato).HasColumnType("datetime"); - - entity.Property(e => e.Operatore) - .IsRequired() - .HasMaxLength(101); - - entity.Property(e => e.Stato).HasMaxLength(50); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("vDDB_Light_OLD"); - - entity.Property(e => e.CodArticolo).HasMaxLength(50); - - entity.Property(e => e.CodMacchina).HasMaxLength(50); - - entity.Property(e => e.DescMacchina).HasMaxLength(50); - - entity.Property(e => e.InizioStato).HasColumnType("datetime"); - - entity.Property(e => e.Operatore) - .IsRequired() - .HasMaxLength(101); - - entity.Property(e => e.Stato).HasMaxLength(50); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("v_DDB_Turni", "export"); - - entity.Property(e => e.ClasseTempo).HasMaxLength(50); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.CodMacchina).HasMaxLength(50); - - entity.Property(e => e.DataRif).HasColumnType("datetime"); - - entity.Property(e => e.DescClasseTempo).HasMaxLength(50); - - entity.Property(e => e.DescMacchina).HasMaxLength(50); - - entity.Property(e => e.Durata).HasColumnType("numeric(38, 7)"); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.SemColore) - .IsRequired() - .HasMaxLength(6) - .IsUnicode(false); - - entity.Property(e => e.Semaforo).HasMaxLength(50); - - entity.Property(e => e.TempoCicloBase).HasColumnType("decimal(18, 8)"); - - entity.Property(e => e.Turno) - .IsRequired() - .HasMaxLength(5); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("vECP"); - - entity.Property(e => e.CommessaEsterna) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.DataFrom) - .HasColumnType("datetime") - .HasColumnName("dataFrom"); - - entity.Property(e => e.DataOraConf).HasColumnType("datetime"); - - entity.Property(e => e.DataTo) - .HasColumnType("datetime") - .HasColumnName("dataTo"); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50) - .HasColumnName("idxMacchina"); - - entity.Property(e => e.PezziConf).HasColumnName("pezziConf"); - - entity.Property(e => e.PezziDaRilav).HasColumnName("pezziDaRilav"); - - entity.Property(e => e.PezziScar).HasColumnName("pezziScar"); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("v_ECP", "export"); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.CodMacchina).HasMaxLength(50); - - entity.Property(e => e.Cognome) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.DataOraConf).HasColumnType("datetime"); - - entity.Property(e => e.DescMacchina).HasMaxLength(50); - - entity.Property(e => e.IdxEcp).HasColumnName("idxECP"); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50) - .HasColumnName("idxMacchina"); - - entity.Property(e => e.IdxOdl).HasColumnName("IdxODL"); - - entity.Property(e => e.KeyRichiesta) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Nome) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.PezziConf).HasColumnName("pezziConf"); - - entity.Property(e => e.PezziDaRilav).HasColumnName("pezziDaRilav"); - - entity.Property(e => e.PezziScar).HasColumnName("pezziScar"); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("v_ECP_Extended", "export"); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.CodMacchina).HasMaxLength(50); - - entity.Property(e => e.Cognome) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.DataOraConf).HasColumnType("datetime"); - - entity.Property(e => e.DescMacchina).HasMaxLength(50); - - entity.Property(e => e.DueDate).HasColumnType("datetime"); - - entity.Property(e => e.IdxEcp).HasColumnName("idxECP"); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50) - .HasColumnName("idxMacchina"); - - entity.Property(e => e.IdxOdl).HasColumnName("IdxODL"); - - entity.Property(e => e.KeyRichiesta) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Nome) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.PezziConf).HasColumnName("pezziConf"); - - entity.Property(e => e.PezziDaRilav).HasColumnName("pezziDaRilav"); - - entity.Property(e => e.PezziScar).HasColumnName("pezziScar"); - - entity.Property(e => e.Tcassegnato) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCAssegnato"); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("vKIT"); - - entity.Property(e => e.KeyKit) - .IsRequired() - .HasMaxLength(50); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("vODL"); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.CommessaAs400) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.DataAppr).HasColumnType("datetime"); - - entity.Property(e => e.DataFine).HasColumnType("datetime"); - - entity.Property(e => e.DataInizio).HasColumnType("datetime"); - - entity.Property(e => e.DueDate).HasColumnType("datetime"); - - entity.Property(e => e.IdxMacchina).HasMaxLength(50); - - entity.Property(e => e.IdxOdl).HasColumnName("IdxODL"); - - entity.Property(e => e.KeyRichiesta) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Note).HasMaxLength(2500); - - entity.Property(e => e.Provvisorio).HasColumnName("provvisorio"); - - entity.Property(e => e.Tcassegnato) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCAssegnato"); - - entity.Property(e => e.TcrichAttr) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCRichAttr"); - - entity.Property(e => e.UserAppr).HasMaxLength(50); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("v_ODL", "export"); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.CodArticoloParent).IsRequired(); - - entity.Property(e => e.CodMacchina).HasMaxLength(50); - - entity.Property(e => e.DataFine).HasColumnType("datetime"); - - entity.Property(e => e.DataInizio).HasColumnType("datetime"); - - entity.Property(e => e.DescMacchina).HasMaxLength(50); - - entity.Property(e => e.DueDate).HasColumnType("datetime"); - - entity.Property(e => e.IdxMacchina).HasMaxLength(50); - - entity.Property(e => e.IdxOdl).HasColumnName("IdxODL"); - - entity.Property(e => e.KeyRichiesta) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.KeyRichiestaParent).IsRequired(); - - entity.Property(e => e.Tcassegnato) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCAssegnato"); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("v_PODL_NonChiusi", "export"); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.CodGruppo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.CodMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.DataInizio).HasColumnType("datetime"); - - entity.Property(e => e.DescArticolo).HasMaxLength(301); - - entity.Property(e => e.DueDate).HasColumnType("datetime"); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.IdxOdl).HasColumnName("IdxODL"); - - entity.Property(e => e.IdxPromessa).HasColumnName("idxPromessa"); - - entity.Property(e => e.KeyBcode) - .IsRequired() - .HasMaxLength(50) - .HasColumnName("KeyBCode"); - - entity.Property(e => e.KeyRichiesta) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Nome).HasMaxLength(50); - - entity.Property(e => e.Tcassegnato) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCAssegnato"); - - entity.Property(e => e.TotMinProg).HasColumnType("decimal(29, 8)"); - - entity.Property(e => e.TotOreProg).HasColumnType("decimal(32, 11)"); - }); -#endif - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("vRS"); - - entity.Property(e => e.Causale) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.DataOra).HasColumnType("datetime"); - - entity.Property(e => e.DataOraProdRec).HasColumnType("datetime"); - - entity.Property(e => e.Descrizione) - .IsRequired() - .HasMaxLength(250); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.IdxOdl).HasColumnName("IdxODL"); - - entity.Property(e => e.KeyRichiesta) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Note) - .IsRequired() - .HasMaxLength(250); - }); -#if false - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("v_RS", "export"); - - entity.Property(e => e.Causale) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Cognome) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.DataOraRif).HasColumnType("datetime"); - - entity.Property(e => e.Descrizione) - .IsRequired() - .HasMaxLength(250); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.IdxOdl).HasColumnName("IdxODL"); - - entity.Property(e => e.KeyRichiesta) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Nome) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Note) - .IsRequired() - .HasMaxLength(250); - }); -#endif - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("vRC"); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.DataOra).HasColumnType("datetime"); - - entity.Property(e => e.EsitoOk).HasColumnName("EsitoOK"); - - entity.Property(e => e.IdxControllo).ValueGeneratedOnAdd(); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.IdxOdl).HasColumnName("IdxODL"); - - entity.Property(e => e.Note) - .IsRequired() - .HasMaxLength(250); - }); - -#if false - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("v_TC_Stat", "export"); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.CodGruppo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.CodMacchina).HasMaxLength(50); - - entity.Property(e => e.DescMacchina).HasMaxLength(50); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.TcStat) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TC_Stat"); - - entity.Property(e => e.TcType).HasColumnName("TC_Type"); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("vTCR"); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.DataOraRif).HasColumnType("datetime"); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.IdxOdl).HasColumnName("IdxODL"); - - entity.Property(e => e.KeyRichiesta) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Tcassegnato) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCAssegnato"); - - entity.Property(e => e.Tcmedio) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCMedio"); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("v_TCR", "export"); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.CodMacchina).HasMaxLength(50); - - entity.Property(e => e.DataOraRif).HasColumnType("datetime"); - - entity.Property(e => e.DescMacchina).HasMaxLength(50); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Tc50p) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TC50p"); - - entity.Property(e => e.Tcmax) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCMax"); - - entity.Property(e => e.Tcmedio) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCMedio"); - - entity.Property(e => e.Tcmin) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCMin"); - }); - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("v_TCR_Day", "export"); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.CodMacchina).HasMaxLength(50); - - entity.Property(e => e.DataOraRif).HasColumnType("datetime"); - - entity.Property(e => e.DescMacchina).HasMaxLength(50); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Tc50p) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TC50p"); - - entity.Property(e => e.Tcmax) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCMax"); - - entity.Property(e => e.Tcmedio) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCMedio"); - - entity.Property(e => e.Tcmin) - .HasColumnType("decimal(18, 8)") - .HasColumnName("TCMin"); - }); -#endif - - modelBuilder.Entity(entity => - { - entity.HasNoKey(); - - entity.ToView("v_UL", "export"); - - entity.Property(e => e.Azione) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.CodArticolo) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Cognome) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.DataOraRif).HasColumnType("datetime"); - - entity.Property(e => e.IdxLog).ValueGeneratedOnAdd(); - - entity.Property(e => e.IdxMacchina) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Nome) - .IsRequired() - .HasMaxLength(50); - - entity.Property(e => e.Qta).HasColumnType("decimal(18, 8)"); - - entity.Property(e => e.Valore) - .IsRequired() - .HasMaxLength(250); - }); -#if false - - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.IdxMacchina, e.CodArticolo }); - - entity.ToTable("VetoTC"); - - entity.Property(e => e.IdxMacchina).HasMaxLength(50); - - entity.Property(e => e.CodArticolo).HasMaxLength(50); - - entity.Property(e => e.SogliaTc) - .HasColumnType("decimal(18, 8)") - .HasColumnName("SogliaTC"); - - entity.Property(e => e.VetoTc1) - .IsRequired() - .HasColumnName("VetoTC") - .HasDefaultValueSql("((1))"); - }); -#endif - - OnModelCreatingPartial(modelBuilder); - } - - #endregion Protected Methods - } -} \ No newline at end of file diff --git a/MpDataLayer/Resources/Readme.md b/MpDataLayer/Resources/Readme.md deleted file mode 100644 index 29cc121b..00000000 --- a/MpDataLayer/Resources/Readme.md +++ /dev/null @@ -1,23 +0,0 @@ -# Appunti gestione MP-STAT DB - - -Per la gestione dell'accesso al DB statistiche si opera con EFCore --> apop blazor server - -## Scaffolding DB iniziale - - Scaffold-DbContext "Server=SQL2016DEV;Database=MoonPro_STATS;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir DatabaseModels - -## Scaffolding SOLO di tabelle/viste selezionate (con force update) - - Scaffold-DbContext "Server=SQL2016DEV;Database=MoonPro_STATS;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir DatabaseModels -Tables v_RS, v_TC_Stat, v_TCR, v_TCR_Day, v_UL - - - -## Approfondimenti - -Qualche link di approfondimento: - - - https://docs.microsoft.com/en-us/ef/core/ - - https://docs.microsoft.com/en-us/ef/core/extensions/ - - https://www.entityframeworktutorial.net/efcore/create-model-for-existing-database-in-ef-core.aspx - - https://entityframework.net/ef-code-first \ No newline at end of file diff --git a/MpDataLayer/StatsDbContext.cs b/MpDataLayer/StatsDbContext.cs deleted file mode 100644 index e52f398f..00000000 --- a/MpDataLayer/StatsDbContext.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MP.Data -{ - public class StatsDbContext - { - } -} \ No newline at end of file