using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata; #nullable disable namespace MpDataLayer.DatabaseModels { public partial class MoonPro_STATSContext : DbContext { public MoonPro_STATSContext() { } public MoonPro_STATSContext(DbContextOptions options) : base(options) { } 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 DdbTurnis { get; set; } public virtual DbSet DdbTurniNews { 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 Rs { get; set; } public virtual DbSet Rs1 { get; set; } public virtual DbSet Rcs { get; set; } public virtual DbSet Tallies { get; set; } public virtual DbSet TcStats { get; set; } public virtual DbSet Tcrs { get; set; } public virtual DbSet Tcrs1 { get; set; } public virtual DbSet TcrDays { get; set; } public virtual DbSet TcrDayTests { get; set; } public virtual DbSet TestJasons { get; set; } public virtual DbSet
    Uls { get; set; } public virtual DbSet VDdbs { get; set; } public virtual DbSet VDdbLights { get; set; } public virtual DbSet VDdbLightOlds { get; set; } public virtual DbSet VDdbTurnis { get; set; } public virtual DbSet VEcps { get; set; } public virtual DbSet VEcps1 { get; set; } public virtual DbSet VEcpExtendeds { 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; } public virtual DbSet VRs { get; set; } public virtual DbSet VRs1 { get; set; } public virtual DbSet VRcs { get; set; } public virtual DbSet VTcStats { get; set; } public virtual DbSet VTcrs { get; set; } public virtual DbSet VTcrs1 { get; set; } public virtual DbSet VTcrDays { get; set; } public virtual DbSet VUls { get; set; } public virtual DbSet VetoTcs { get; set; } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (!optionsBuilder.IsConfigured) { #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"); 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)"); }); 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); }); 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); }); 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); }); 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"); }); 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); }); 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))"); }); OnModelCreatingPartial(modelBuilder); } partial void OnModelCreatingPartial(ModelBuilder modelBuilder); } }