// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using TecniStamp.Infrastructure.DAL.Context; #nullable disable namespace TecniStamp.Infrastructure.Migrations { [DbContext(typeof(TecniStampDbContext))] partial class TecniStampDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "9.0.11") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("TecniStamp.Domain.Cliente", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("CAP") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Citta") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ComuneId") .HasColumnType("uniqueidentifier"); b.Property("DataCreazione") .HasColumnType("datetime2"); b.Property("DataModifica") .HasColumnType("datetime2"); b.Property("Eliminato") .HasColumnType("bit"); b.Property("Email") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("IdUtenteCreazione") .HasColumnType("uniqueidentifier"); b.Property("IdUtenteModifica") .HasColumnType("uniqueidentifier"); b.Property("Indirizzo") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Note") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("NumeroCivico") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Paese") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("PartitaIva") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Provincia") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RagioneSociale") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Telefono") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Via") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("ComuneId"); b.HasIndex("IdUtenteCreazione"); b.HasIndex("IdUtenteModifica"); b.ToTable("Cliente"); }); modelBuilder.Entity("TecniStamp.Domain.Commessa", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("AnnoCommessa") .HasColumnType("int"); b.Property("ClienteId") .HasColumnType("uniqueidentifier"); b.Property("CodiceCommessa") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("DataConsegna") .HasColumnType("datetime2"); b.Property("DataConsegnaPrevista") .HasColumnType("datetime2"); b.Property("DataCreazione") .HasColumnType("datetime2"); b.Property("DataModifica") .HasColumnType("datetime2"); b.Property("DataOrdine") .HasColumnType("datetime2"); b.Property("Eliminato") .HasColumnType("bit"); b.Property("IdUtenteCreazione") .HasColumnType("uniqueidentifier"); b.Property("IdUtenteModifica") .HasColumnType("uniqueidentifier"); b.Property("OrdineNr") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("OreTotali") .HasColumnType("decimal(18,2)"); b.Property("RiferimentoCliente") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Stato") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("ClienteId"); b.HasIndex("IdUtenteCreazione"); b.HasIndex("IdUtenteModifica"); b.ToTable("Commessa"); }); modelBuilder.Entity("TecniStamp.Domain.ComuneIstat", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("CodFisco") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Comune") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("DataCreazione") .HasColumnType("datetime2"); b.Property("DataModifica") .HasColumnType("datetime2"); b.Property("Eliminato") .HasColumnType("bit"); b.Property("IdUtenteCreazione") .HasColumnType("uniqueidentifier"); b.Property("IdUtenteModifica") .HasColumnType("uniqueidentifier"); b.Property("Istat") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Prefisso") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Provincia") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ProvinciaIstatId") .HasColumnType("uniqueidentifier"); b.Property("Regione") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("IdUtenteCreazione"); b.HasIndex("IdUtenteModifica"); b.HasIndex("ProvinciaIstatId"); b.ToTable("ComuneIstat"); }); modelBuilder.Entity("TecniStamp.Domain.Feature", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("DataCreazione") .HasColumnType("datetime2"); b.Property("DataModifica") .HasColumnType("datetime2"); b.Property("Descrizione") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Eliminato") .HasColumnType("bit"); b.Property("IdUtenteCreazione") .HasColumnType("uniqueidentifier"); b.Property("IdUtenteModifica") .HasColumnType("uniqueidentifier"); b.Property("Nome") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Ordinamento") .HasColumnType("int"); b.Property("SezioneId") .HasColumnType("uniqueidentifier"); b.Property("Type") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("IdUtenteCreazione"); b.HasIndex("IdUtenteModifica"); b.HasIndex("SezioneId"); b.ToTable("Feature"); }); modelBuilder.Entity("TecniStamp.Domain.Lavorazione", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("ChiaveEsterna") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Codice") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("CodiceColore") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("CostoOrario") .HasColumnType("real"); b.Property("DataCreazione") .HasColumnType("datetime2"); b.Property("DataModifica") .HasColumnType("datetime2"); b.Property("Descrizione") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Eliminato") .HasColumnType("bit"); b.Property("IdUtenteCreazione") .HasColumnType("uniqueidentifier"); b.Property("IdUtenteModifica") .HasColumnType("uniqueidentifier"); b.Property("Sovrapponibile") .HasColumnType("bit"); b.HasKey("Id"); b.HasIndex("IdUtenteCreazione"); b.HasIndex("IdUtenteModifica"); b.ToTable("Lavorazione"); }); modelBuilder.Entity("TecniStamp.Domain.Macchinario", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("CodiceEsterno") .HasColumnType("nvarchar(max)"); b.Property("ConfigurazioneJSON") .HasColumnType("nvarchar(max)"); b.Property("ConfigurazionePercorso") .HasColumnType("nvarchar(max)"); b.Property("DataCreazione") .HasColumnType("datetime2"); b.Property("DataModifica") .HasColumnType("datetime2"); b.Property("Descrizione") .HasColumnType("nvarchar(max)"); b.Property("Eliminato") .HasColumnType("bit"); b.Property("IdUtenteCreazione") .HasColumnType("uniqueidentifier"); b.Property("IdUtenteModifica") .HasColumnType("uniqueidentifier"); b.Property("Interscambio") .HasColumnType("bit"); b.Property("Nome") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("IdUtenteCreazione"); b.HasIndex("IdUtenteModifica"); b.ToTable("Macchinario"); }); modelBuilder.Entity("TecniStamp.Domain.Permission", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("DataCreazione") .HasColumnType("datetime2"); b.Property("DataModifica") .HasColumnType("datetime2"); b.Property("Eliminato") .HasColumnType("bit"); b.Property("IdFeature") .HasColumnType("uniqueidentifier"); b.Property("IdUtenteCreazione") .HasColumnType("uniqueidentifier"); b.Property("IdUtenteModifica") .HasColumnType("uniqueidentifier"); b.Property("RuoloId") .HasColumnType("uniqueidentifier"); b.HasKey("Id"); b.HasIndex("IdFeature"); b.HasIndex("IdUtenteCreazione"); b.HasIndex("IdUtenteModifica"); b.HasIndex("RuoloId"); b.ToTable("Permission"); }); modelBuilder.Entity("TecniStamp.Domain.ProvinciaIstat", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("DataCreazione") .HasColumnType("datetime2"); b.Property("DataModifica") .HasColumnType("datetime2"); b.Property("Eliminato") .HasColumnType("bit"); b.Property("IdUtenteCreazione") .HasColumnType("uniqueidentifier"); b.Property("IdUtenteModifica") .HasColumnType("uniqueidentifier"); b.Property("Provincia") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Sigla") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("IdUtenteCreazione"); b.HasIndex("IdUtenteModifica"); b.ToTable("ProvinciaIstat"); }); modelBuilder.Entity("TecniStamp.Domain.Ruolo", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("DataCreazione") .HasColumnType("datetime2"); b.Property("DataModifica") .HasColumnType("datetime2"); b.Property("Eliminato") .HasColumnType("bit"); b.Property("IdUtenteCreazione") .HasColumnType("uniqueidentifier"); b.Property("IdUtenteModifica") .HasColumnType("uniqueidentifier"); b.Property("Nome") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("IdUtenteCreazione"); b.HasIndex("IdUtenteModifica"); b.ToTable("Ruolo"); }); modelBuilder.Entity("TecniStamp.Domain.Sezione", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Blank") .HasColumnType("bit"); b.Property("DataCreazione") .HasColumnType("datetime2"); b.Property("DataModifica") .HasColumnType("datetime2"); b.Property("Eliminato") .HasColumnType("bit"); b.Property("Icona") .HasColumnType("nvarchar(max)"); b.Property("IdUtenteCreazione") .HasColumnType("uniqueidentifier"); b.Property("IdUtenteModifica") .HasColumnType("uniqueidentifier"); b.Property("Nome") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Ordinamento") .HasColumnType("int"); b.Property("ParentId") .HasColumnType("uniqueidentifier"); b.Property("Url") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("IdUtenteCreazione"); b.HasIndex("IdUtenteModifica"); b.HasIndex("ParentId"); b.ToTable("Sezione"); }); modelBuilder.Entity("TecniStamp.Domain.Utente", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Cognome") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Costo") .HasColumnType("decimal(18,2)"); b.Property("DataCreazione") .HasColumnType("datetime2"); b.Property("DataModifica") .HasColumnType("datetime2"); b.Property("Eliminato") .HasColumnType("bit"); b.Property("Email") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("IdUtenteCreazione") .HasColumnType("uniqueidentifier"); b.Property("IdUtenteModifica") .HasColumnType("uniqueidentifier"); b.Property("Nome") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Password") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RuoloId") .HasColumnType("uniqueidentifier"); b.HasKey("Id"); b.HasIndex("IdUtenteCreazione"); b.HasIndex("IdUtenteModifica"); b.HasIndex("RuoloId"); b.ToTable("Utente"); }); modelBuilder.Entity("TecniStamp.Domain.Cliente", b => { b.HasOne("TecniStamp.Domain.ComuneIstat", "Comune") .WithMany() .HasForeignKey("ComuneId"); b.HasOne("TecniStamp.Domain.Utente", "UtenteCreazione") .WithMany() .HasForeignKey("IdUtenteCreazione"); b.HasOne("TecniStamp.Domain.Utente", "UtenteModifica") .WithMany() .HasForeignKey("IdUtenteModifica"); b.Navigation("Comune"); b.Navigation("UtenteCreazione"); b.Navigation("UtenteModifica"); }); modelBuilder.Entity("TecniStamp.Domain.Commessa", b => { b.HasOne("TecniStamp.Domain.Cliente", "Cliente") .WithMany() .HasForeignKey("ClienteId"); b.HasOne("TecniStamp.Domain.Utente", "UtenteCreazione") .WithMany() .HasForeignKey("IdUtenteCreazione"); b.HasOne("TecniStamp.Domain.Utente", "UtenteModifica") .WithMany() .HasForeignKey("IdUtenteModifica"); b.Navigation("Cliente"); b.Navigation("UtenteCreazione"); b.Navigation("UtenteModifica"); }); modelBuilder.Entity("TecniStamp.Domain.ComuneIstat", b => { b.HasOne("TecniStamp.Domain.Utente", "UtenteCreazione") .WithMany() .HasForeignKey("IdUtenteCreazione"); b.HasOne("TecniStamp.Domain.Utente", "UtenteModifica") .WithMany() .HasForeignKey("IdUtenteModifica"); b.HasOne("TecniStamp.Domain.ProvinciaIstat", "ProvinciaIstat") .WithMany() .HasForeignKey("ProvinciaIstatId"); b.Navigation("ProvinciaIstat"); b.Navigation("UtenteCreazione"); b.Navigation("UtenteModifica"); }); modelBuilder.Entity("TecniStamp.Domain.Feature", b => { b.HasOne("TecniStamp.Domain.Utente", "UtenteCreazione") .WithMany() .HasForeignKey("IdUtenteCreazione"); b.HasOne("TecniStamp.Domain.Utente", "UtenteModifica") .WithMany() .HasForeignKey("IdUtenteModifica"); b.HasOne("TecniStamp.Domain.Sezione", "Sezione") .WithMany("Features") .HasForeignKey("SezioneId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Sezione"); b.Navigation("UtenteCreazione"); b.Navigation("UtenteModifica"); }); modelBuilder.Entity("TecniStamp.Domain.Lavorazione", b => { b.HasOne("TecniStamp.Domain.Utente", "UtenteCreazione") .WithMany() .HasForeignKey("IdUtenteCreazione"); b.HasOne("TecniStamp.Domain.Utente", "UtenteModifica") .WithMany() .HasForeignKey("IdUtenteModifica"); b.Navigation("UtenteCreazione"); b.Navigation("UtenteModifica"); }); modelBuilder.Entity("TecniStamp.Domain.Macchinario", b => { b.HasOne("TecniStamp.Domain.Utente", "UtenteCreazione") .WithMany() .HasForeignKey("IdUtenteCreazione"); b.HasOne("TecniStamp.Domain.Utente", "UtenteModifica") .WithMany() .HasForeignKey("IdUtenteModifica"); b.Navigation("UtenteCreazione"); b.Navigation("UtenteModifica"); }); modelBuilder.Entity("TecniStamp.Domain.Permission", b => { b.HasOne("TecniStamp.Domain.Feature", "Feature") .WithMany() .HasForeignKey("IdFeature") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("TecniStamp.Domain.Utente", "UtenteCreazione") .WithMany() .HasForeignKey("IdUtenteCreazione"); b.HasOne("TecniStamp.Domain.Utente", "UtenteModifica") .WithMany() .HasForeignKey("IdUtenteModifica"); b.HasOne("TecniStamp.Domain.Ruolo", "Ruolo") .WithMany("Permessi") .HasForeignKey("RuoloId"); b.Navigation("Feature"); b.Navigation("Ruolo"); b.Navigation("UtenteCreazione"); b.Navigation("UtenteModifica"); }); modelBuilder.Entity("TecniStamp.Domain.ProvinciaIstat", b => { b.HasOne("TecniStamp.Domain.Utente", "UtenteCreazione") .WithMany() .HasForeignKey("IdUtenteCreazione"); b.HasOne("TecniStamp.Domain.Utente", "UtenteModifica") .WithMany() .HasForeignKey("IdUtenteModifica"); b.Navigation("UtenteCreazione"); b.Navigation("UtenteModifica"); }); modelBuilder.Entity("TecniStamp.Domain.Ruolo", b => { b.HasOne("TecniStamp.Domain.Utente", "UtenteCreazione") .WithMany() .HasForeignKey("IdUtenteCreazione"); b.HasOne("TecniStamp.Domain.Utente", "UtenteModifica") .WithMany() .HasForeignKey("IdUtenteModifica"); b.Navigation("UtenteCreazione"); b.Navigation("UtenteModifica"); }); modelBuilder.Entity("TecniStamp.Domain.Sezione", b => { b.HasOne("TecniStamp.Domain.Utente", "UtenteCreazione") .WithMany() .HasForeignKey("IdUtenteCreazione"); b.HasOne("TecniStamp.Domain.Utente", "UtenteModifica") .WithMany() .HasForeignKey("IdUtenteModifica"); b.HasOne("TecniStamp.Domain.Sezione", "Parent") .WithMany() .HasForeignKey("ParentId"); b.Navigation("Parent"); b.Navigation("UtenteCreazione"); b.Navigation("UtenteModifica"); }); modelBuilder.Entity("TecniStamp.Domain.Utente", b => { b.HasOne("TecniStamp.Domain.Utente", "UtenteCreazione") .WithMany() .HasForeignKey("IdUtenteCreazione"); b.HasOne("TecniStamp.Domain.Utente", "UtenteModifica") .WithMany() .HasForeignKey("IdUtenteModifica"); b.HasOne("TecniStamp.Domain.Ruolo", "Ruolo") .WithMany("Utenti") .HasForeignKey("RuoloId"); b.Navigation("Ruolo"); b.Navigation("UtenteCreazione"); b.Navigation("UtenteModifica"); }); modelBuilder.Entity("TecniStamp.Domain.Ruolo", b => { b.Navigation("Permessi"); b.Navigation("Utenti"); }); modelBuilder.Entity("TecniStamp.Domain.Sezione", b => { b.Navigation("Features"); }); #pragma warning restore 612, 618 } } }