commit merge
This commit is contained in:
@ -7,16 +7,14 @@ public class Cliente : EntitaBase
|
|||||||
{
|
{
|
||||||
public string RagioneSociale { get; set; }
|
public string RagioneSociale { get; set; }
|
||||||
public string PartitaIva { get; set; }
|
public string PartitaIva { get; set; }
|
||||||
public string Paese { get; set; }
|
|
||||||
public string Telefono { get; set; }
|
public string Telefono { get; set; }
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
public string Indirizzo { get; set; }
|
|
||||||
public string CAP { get; set; }
|
public string CAP { get; set; }
|
||||||
public string Citta { get; set; }
|
public string Citta { get; set; }
|
||||||
public string NumeroCivico { get; set; }
|
public string NumeroCivico { get; set; }
|
||||||
public string Via { get; set; }
|
public string Via { get; set; }
|
||||||
public string Provincia { get; set; }
|
public string Provincia { get; set; }
|
||||||
public string Note { get; set; }
|
public string? Note { get; set; }
|
||||||
|
|
||||||
[ForeignKey(nameof(Comune))]
|
[ForeignKey(nameof(Comune))]
|
||||||
public Guid? ComuneId { get; set; }
|
public Guid? ComuneId { get; set; }
|
||||||
|
|||||||
@ -17,6 +17,9 @@ public class Commessa : EntitaBase
|
|||||||
public DateTime DataConsegnaPrevista { get; set; }
|
public DateTime DataConsegnaPrevista { get; set; }
|
||||||
public DateTime DataConsegna { get; set; }
|
public DateTime DataConsegna { get; set; }
|
||||||
public CommessaStato Stato { get; set; }
|
public CommessaStato Stato { get; set; }
|
||||||
|
|
||||||
|
[InverseProperty(nameof(CommessaPosizione.Commessa))]
|
||||||
|
public List<CommessaPosizione> Posizioni { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum CommessaStato
|
public enum CommessaStato
|
||||||
|
|||||||
20
TecniStamp/TecniStamp.Domain/CommessaPosizione.cs
Normal file
20
TecniStamp/TecniStamp.Domain/CommessaPosizione.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using TecniStamp.Domain.Base;
|
||||||
|
|
||||||
|
namespace TecniStamp.Domain;
|
||||||
|
|
||||||
|
public class CommessaPosizione : EntitaBase
|
||||||
|
{
|
||||||
|
public int Posizione { get; set; }
|
||||||
|
public string NumeroDisegno { get; set; }
|
||||||
|
public string NumeroArticolo { get; set; }
|
||||||
|
public string NumeroFabb { get; set; }
|
||||||
|
public string Descrizione { get; set; }
|
||||||
|
public string Categoria { get; set; }
|
||||||
|
public DateTime DataConsegna { get; set; }
|
||||||
|
public DateTime DataTerminePrevisto { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey(nameof(Commessa))]
|
||||||
|
public Guid? CommessaId { get; set; }
|
||||||
|
public Commessa Commessa { get; set; }
|
||||||
|
}
|
||||||
@ -11,6 +11,7 @@ public class TecniStampDbContext : OAServiceContext
|
|||||||
|
|
||||||
public DbSet<Cliente> Cliente { get; set; }
|
public DbSet<Cliente> Cliente { get; set; }
|
||||||
public DbSet<Commessa> Commessa { get; set; }
|
public DbSet<Commessa> Commessa { get; set; }
|
||||||
|
public DbSet<CommessaPosizione> ComessaPosizione { get; set; }
|
||||||
public DbSet<ComuneIstat> ComuneIstat { get; set; }
|
public DbSet<ComuneIstat> ComuneIstat { get; set; }
|
||||||
public DbSet<Feature> Feature { get; set; }
|
public DbSet<Feature> Feature { get; set; }
|
||||||
public DbSet<Lavorazione> Lavorazione { get; set; }
|
public DbSet<Lavorazione> Lavorazione { get; set; }
|
||||||
|
|||||||
825
TecniStamp/TecniStamp.Infrastructure/Migrations/20260203103529_Rimossi campi cliente.Designer.cs
generated
Normal file
825
TecniStamp/TecniStamp.Infrastructure/Migrations/20260203103529_Rimossi campi cliente.Designer.cs
generated
Normal file
@ -0,0 +1,825 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using TecniStamp.Infrastructure.DAL.Context;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace TecniStamp.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(TecniStampDbContext))]
|
||||||
|
[Migration("20260203103529_Rimossi campi cliente")]
|
||||||
|
partial class Rimossicampicliente
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void BuildTargetModel(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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CAP")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Citta")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ComuneId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Note")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroCivico")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("PartitaIva")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Provincia")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("RagioneSociale")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Telefono")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<int>("AnnoCommessa")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ClienteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CodiceCommessa")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataConsegna")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataConsegnaPrevista")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataOrdine")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("OrdineNr")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<decimal?>("OreTotali")
|
||||||
|
.HasColumnType("decimal(18,2)");
|
||||||
|
|
||||||
|
b.Property<string>("RiferimentoCliente")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CodFisco")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Comune")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Istat")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Prefisso")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Provincia")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ProvinciaIstatId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("Descrizione")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Ordinamento")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<Guid>("SezioneId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<int>("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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("ChiaveEsterna")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Codice")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("CodiceColore")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<float?>("CostoOrario")
|
||||||
|
.HasColumnType("real");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("Descrizione")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("Sovrapponibile")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Lavorazione");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("TecniStamp.Domain.Macchinario", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CodiceEsterno")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("ConfigurazioneJSON")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("ConfigurazionePercorso")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("Descrizione")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("Interscambio")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid>("IdFeature")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Provincia")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("Blank")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Icona")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Ordinamento")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ParentId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Cognome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<decimal>("Costo")
|
||||||
|
.HasColumnType("decimal(18,2)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Password")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,58 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace TecniStamp.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Rimossicampicliente : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Indirizzo",
|
||||||
|
table: "Cliente");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Paese",
|
||||||
|
table: "Cliente");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "Note",
|
||||||
|
table: "Cliente",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "nvarchar(max)");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "Note",
|
||||||
|
table: "Cliente",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: "",
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "nvarchar(max)",
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Indirizzo",
|
||||||
|
table: "Cliente",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: "");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Paese",
|
||||||
|
table: "Cliente",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
915
TecniStamp/TecniStamp.Infrastructure/Migrations/20260203110047_CommessaPosizione.Designer.cs
generated
Normal file
915
TecniStamp/TecniStamp.Infrastructure/Migrations/20260203110047_CommessaPosizione.Designer.cs
generated
Normal file
@ -0,0 +1,915 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using TecniStamp.Infrastructure.DAL.Context;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace TecniStamp.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(TecniStampDbContext))]
|
||||||
|
[Migration("20260203110047_CommessaPosizione")]
|
||||||
|
partial class CommessaPosizione
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void BuildTargetModel(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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CAP")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Citta")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ComuneId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Note")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroCivico")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("PartitaIva")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Provincia")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("RagioneSociale")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Telefono")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<int>("AnnoCommessa")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ClienteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CodiceCommessa")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataConsegna")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataConsegnaPrevista")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataOrdine")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("OrdineNr")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<decimal?>("OreTotali")
|
||||||
|
.HasColumnType("decimal(18,2)");
|
||||||
|
|
||||||
|
b.Property<string>("RiferimentoCliente")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Stato")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ClienteId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Commessa");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("TecniStamp.Domain.CommessaPosizione", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Categoria")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CommessaId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataConsegna")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataTerminePrevisto")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("Descrizione")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroArticolo")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroDisegno")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroFabb")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Posizione")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("CommessaId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("ComessaPosizione");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("TecniStamp.Domain.ComuneIstat", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CodFisco")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Comune")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Istat")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Prefisso")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Provincia")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ProvinciaIstatId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("Descrizione")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Ordinamento")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<Guid>("SezioneId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<int>("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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("ChiaveEsterna")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Codice")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("CodiceColore")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<float?>("CostoOrario")
|
||||||
|
.HasColumnType("real");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("Descrizione")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("Sovrapponibile")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Lavorazione");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("TecniStamp.Domain.Macchinario", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CodiceEsterno")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("ConfigurazioneJSON")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("ConfigurazionePercorso")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("Descrizione")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("Interscambio")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid>("IdFeature")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Provincia")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("Blank")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Icona")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Ordinamento")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ParentId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("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<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Cognome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<decimal>("Costo")
|
||||||
|
.HasColumnType("decimal(18,2)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Password")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("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.CommessaPosizione", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("TecniStamp.Domain.Commessa", "Commessa")
|
||||||
|
.WithMany("Posizioni")
|
||||||
|
.HasForeignKey("CommessaId");
|
||||||
|
|
||||||
|
b.HasOne("TecniStamp.Domain.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("TecniStamp.Domain.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("Commessa");
|
||||||
|
|
||||||
|
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.Commessa", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Posizioni");
|
||||||
|
});
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,77 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace TecniStamp.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class CommessaPosizione : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ComessaPosizione",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
Posizione = table.Column<int>(type: "int", nullable: false),
|
||||||
|
NumeroDisegno = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
NumeroArticolo = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
NumeroFabb = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Descrizione = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Categoria = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
DataConsegna = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
DataTerminePrevisto = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
CommessaId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
DataCreazione = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
DataModifica = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
Eliminato = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
IdUtenteCreazione = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
IdUtenteModifica = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_ComessaPosizione", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ComessaPosizione_Commessa_CommessaId",
|
||||||
|
column: x => x.CommessaId,
|
||||||
|
principalTable: "Commessa",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ComessaPosizione_Utente_IdUtenteCreazione",
|
||||||
|
column: x => x.IdUtenteCreazione,
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ComessaPosizione_Utente_IdUtenteModifica",
|
||||||
|
column: x => x.IdUtenteModifica,
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ComessaPosizione_CommessaId",
|
||||||
|
table: "ComessaPosizione",
|
||||||
|
column: "CommessaId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ComessaPosizione_IdUtenteCreazione",
|
||||||
|
table: "ComessaPosizione",
|
||||||
|
column: "IdUtenteCreazione");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ComessaPosizione_IdUtenteModifica",
|
||||||
|
table: "ComessaPosizione",
|
||||||
|
column: "IdUtenteModifica");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ComessaPosizione");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -58,22 +58,13 @@ namespace TecniStamp.Infrastructure.Migrations
|
|||||||
b.Property<Guid?>("IdUtenteModifica")
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<string>("Indirizzo")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Note")
|
b.Property<string>("Note")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("NumeroCivico")
|
b.Property<string>("NumeroCivico")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("Paese")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("PartitaIva")
|
b.Property<string>("PartitaIva")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
@ -170,6 +161,70 @@ namespace TecniStamp.Infrastructure.Migrations
|
|||||||
b.ToTable("Commessa");
|
b.ToTable("Commessa");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("TecniStamp.Domain.CommessaPosizione", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Categoria")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CommessaId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataConsegna")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataTerminePrevisto")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("Descrizione")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroArticolo")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroDisegno")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroFabb")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Posizione")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("CommessaId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("ComessaPosizione");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("TecniStamp.Domain.ComuneIstat", b =>
|
modelBuilder.Entity("TecniStamp.Domain.ComuneIstat", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
@ -639,6 +694,27 @@ namespace TecniStamp.Infrastructure.Migrations
|
|||||||
b.Navigation("UtenteModifica");
|
b.Navigation("UtenteModifica");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("TecniStamp.Domain.CommessaPosizione", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("TecniStamp.Domain.Commessa", "Commessa")
|
||||||
|
.WithMany("Posizioni")
|
||||||
|
.HasForeignKey("CommessaId");
|
||||||
|
|
||||||
|
b.HasOne("TecniStamp.Domain.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("TecniStamp.Domain.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("Commessa");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("TecniStamp.Domain.ComuneIstat", b =>
|
modelBuilder.Entity("TecniStamp.Domain.ComuneIstat", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("TecniStamp.Domain.Utente", "UtenteCreazione")
|
b.HasOne("TecniStamp.Domain.Utente", "UtenteCreazione")
|
||||||
@ -814,6 +890,11 @@ namespace TecniStamp.Infrastructure.Migrations
|
|||||||
b.Navigation("UtenteModifica");
|
b.Navigation("UtenteModifica");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("TecniStamp.Domain.Commessa", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Posizioni");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("TecniStamp.Domain.Ruolo", b =>
|
modelBuilder.Entity("TecniStamp.Domain.Ruolo", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Permessi");
|
b.Navigation("Permessi");
|
||||||
|
|||||||
@ -4,15 +4,15 @@
|
|||||||
|
|
||||||
<AuthorizeView>
|
<AuthorizeView>
|
||||||
<Authorized>
|
<Authorized>
|
||||||
<header class="header">
|
<div class="sticky-top">
|
||||||
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow h-100">
|
<header class="navbar navbar-expand-md sticky-top d-print-none">
|
||||||
<div class="container-fluid justify-content-between align-items-center">
|
<div class="container-xl">
|
||||||
<button class="navbar-toggler collapsed d-flex" type="button" data-bs-toggle="offcanvas" data-bs-target="#navbar-menu" aria-controls="navbar-menu" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler collapsed d-flex" type="button" data-bs-toggle="offcanvas" data-bs-target="#navbar-menu" aria-controls="navbar-menu" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<a class="navbar-brand align-middle" asp-area="" asp-controller="Home" asp-action="Index">
|
<a class="navbar-brand align-middle" asp-area="" asp-controller="Home" asp-action="Index">
|
||||||
<img src="~/img/logo-dark.png" alt="TecniStamp logo" style="height: 35px;" />
|
<img src="~/img/logo-dark.png" alt="TecniStamp logo" style="height: 35px;"/>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="position-relative">
|
<div class="position-relative">
|
||||||
@ -30,8 +30,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</header>
|
||||||
</header>
|
</div>
|
||||||
</Authorized>
|
</Authorized>
|
||||||
</AuthorizeView>
|
</AuthorizeView>
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<div class="col-auto ms-auto">
|
<div class="col-auto ms-auto">
|
||||||
<div class="btn-list">
|
<div class="btn-list">
|
||||||
<a href="/Anagrafiche/Ruoli/Modifica" class="btn btn-primary btn-5 d-none d-sm-inline-block">
|
<a href="/Anagrafiche/Ruoli/Modifica" class="btn btn-primary btn-5 d-none d-sm-inline-block">
|
||||||
Nuovo Ruolo
|
Nuovo ruolo
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -11,88 +11,75 @@
|
|||||||
<Breadcrumb Items="BreadcrumbList" />
|
<Breadcrumb Items="BreadcrumbList" />
|
||||||
|
|
||||||
<PageTitle>@pageTitle</PageTitle>
|
<PageTitle>@pageTitle</PageTitle>
|
||||||
|
<Breadcrumb Items="BreadcrumbList" />
|
||||||
|
|
||||||
<div class="page-wrapper">
|
<main role="main">
|
||||||
<!-- BEGIN PAGE HEADER -->
|
<div class="container-fluid h-100 mt-5 mb-5">
|
||||||
<div class="page-header d-print-none" aria-label="Page header">
|
<div class="row justify-content-start">
|
||||||
<div class="container-xl">
|
|
||||||
<div class="row g-2 align-items-center">
|
|
||||||
<div class="col">
|
|
||||||
<h2 class="page-title">@pageTitle</h2>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- END PAGE HEADER -->
|
|
||||||
<!-- BEGIN PAGE BODY -->
|
|
||||||
<div class="page-body">
|
|
||||||
<div class="container-fluid">
|
|
||||||
|
|
||||||
<div class="row row-cards">
|
<div class="row row-cards">
|
||||||
<div class="col-lg-12">
|
<div class="card">
|
||||||
<div class="card">
|
<div class="card-body">
|
||||||
<div class="card-body">
|
<div class="row g-5">
|
||||||
<div class="row g-5">
|
<EditForm Model="Model" OnValidSubmit="onRuoloSave" FormName="editRuoloForm">
|
||||||
<EditForm Model="Model" OnValidSubmit="onRuoloSave" FormName="editRuoloForm">
|
<DataAnnotationsValidator />
|
||||||
<DataAnnotationsValidator />
|
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-3 mb-3">
|
<div class="col-3 mb-3">
|
||||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Descrizione</RadzenText>
|
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Descrizione</RadzenText>
|
||||||
<RadzenTextBox Style="width: 100%" aria-label="Nome" @bind-Value="@Model.Nome" />
|
<RadzenTextBox Style="width: 100%" aria-label="Nome" @bind-Value="@Model.Nome" />
|
||||||
<ValidationMessage For="@(() => Model.Nome)" />
|
<ValidationMessage For="@(() => Model.Nome)" />
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-4 mb-3">
|
|
||||||
<button type="button" class="btn btn-default w-100" @onclick="backToHome">
|
|
||||||
Annulla
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="col-4 mb-3">
|
|
||||||
<button type="submit" class="btn btn-primary w-100">
|
|
||||||
Salva
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</EditForm>
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4 mb-3">
|
||||||
|
<button type="button" class="btn btn-default w-100" @onclick="backToHome">
|
||||||
|
Annulla
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 mb-3">
|
||||||
|
<button type="submit" class="btn btn-primary w-100">
|
||||||
|
Salva
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</EditForm>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row g-5">
|
||||||
|
<div id="advanced-table">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<RadzenDataGrid @ref="permessiGrid" AllowFiltering="true" AllowColumnResize="true" AllowAlternatingRows="false" FilterMode="FilterMode.CheckBoxList" AllowSorting="true" PageSize="25"
|
||||||
|
AllowPaging="true" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true" AllowGrouping="true"
|
||||||
|
Data="@permessi" LogicalFilterOperator="LogicalFilterOperator.Or" SelectionMode="DataGridSelectionMode.Single" Render="@OnRender">
|
||||||
|
<Columns>
|
||||||
|
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.Selected)" Filterable="true" Width="200px" TextAlign="TextAlign.Center">
|
||||||
|
<Template Context="permesso">
|
||||||
|
<RadzenCheckBox TValue="bool" Value="@permesso.Selected" Change=@(args => onSelected(args, permesso))></RadzenCheckBox>
|
||||||
|
</Template>
|
||||||
|
</RadzenDataGridColumn>
|
||||||
|
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.Ordinamento)" Visible="false" SortOrder="SortOrder.Ascending" />
|
||||||
|
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.OrdinamentoFeature)" Visible="false" SortOrder="SortOrder.Ascending" />
|
||||||
|
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.Nome)" Groupable="true" GroupProperty="Nome" Filterable="true" Width="200px" TextAlign="TextAlign.Center" />
|
||||||
|
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.NomeFeature)" Title="Nome" Width="250px" />
|
||||||
|
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.DescrizioneFeature)" Title="Descrizione" Width="250px" />
|
||||||
|
</Columns>
|
||||||
|
</RadzenDataGrid>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="advanced-table">
|
|
||||||
<div class="table-responsive">
|
|
||||||
<RadzenDataGrid @ref="permessiGrid" AllowFiltering="true" AllowColumnResize="true" AllowAlternatingRows="false" FilterMode="FilterMode.CheckBoxList" AllowSorting="true" PageSize="25"
|
|
||||||
AllowPaging="true" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true" AllowGrouping="true"
|
|
||||||
Data="@permessi" LogicalFilterOperator="LogicalFilterOperator.Or" SelectionMode="DataGridSelectionMode.Single" Render="@OnRender">
|
|
||||||
<Columns>
|
|
||||||
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.Selected)" Filterable="true" Width="200px" TextAlign="TextAlign.Center">
|
|
||||||
<Template Context="permesso">
|
|
||||||
<RadzenCheckBox TValue="bool" Value="@permesso.Selected" Change=@(args => onSelected(args, permesso))></RadzenCheckBox>
|
|
||||||
</Template>
|
|
||||||
</RadzenDataGridColumn>
|
|
||||||
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.Ordinamento)" Visible="false" SortOrder="SortOrder.Ascending" />
|
|
||||||
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.OrdinamentoFeature)" Visible="false" SortOrder="SortOrder.Ascending" />
|
|
||||||
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.Nome)" Groupable="true" GroupProperty="Nome" Filterable="true" Width="200px" TextAlign="TextAlign.Center" />
|
|
||||||
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.NomeFeature)" Title="Nome" Width="250px" />
|
|
||||||
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.DescrizioneFeature)" Title="Descrizione" Width="250px" />
|
|
||||||
</Columns>
|
|
||||||
</RadzenDataGrid>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</main>
|
||||||
|
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
[Parameter] public Guid? RuoloId { get; set; }
|
[Parameter] public Guid? RuoloId { get; set; }
|
||||||
|
public List<BreadcrumbViewModel> BreadcrumbList { get; set; } = new();
|
||||||
|
|
||||||
public RuoloViewModel Model { get; set; } = new();
|
public RuoloViewModel Model { get; set; } = new();
|
||||||
private List<PermissionRowViewModel> permessi { get; set; } = new();
|
private List<PermissionRowViewModel> permessi { get; set; } = new();
|
||||||
|
|||||||
@ -4,6 +4,8 @@
|
|||||||
@using TecniStamp.Model.Common
|
@using TecniStamp.Model.Common
|
||||||
@using TecniStamp.Utils
|
@using TecniStamp.Utils
|
||||||
|
|
||||||
|
@rendermode InteractiveServer
|
||||||
|
|
||||||
<PageTitle>Commesse</PageTitle>
|
<PageTitle>Commesse</PageTitle>
|
||||||
<Breadcrumb Items="BreadcrumbList" />
|
<Breadcrumb Items="BreadcrumbList" />
|
||||||
|
|
||||||
@ -24,15 +26,37 @@
|
|||||||
<RadzenDataGrid @ref="commesseGrid" AllowFiltering="true" AllowColumnResize="true" AllowAlternatingRows="false" FilterMode="FilterMode.CheckBoxList" AllowSorting="true" PageSize="25"
|
<RadzenDataGrid @ref="commesseGrid" AllowFiltering="true" AllowColumnResize="true" AllowAlternatingRows="false" FilterMode="FilterMode.CheckBoxList" AllowSorting="true" PageSize="25"
|
||||||
AllowPaging="true" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true"
|
AllowPaging="true" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true"
|
||||||
Data="@CommesseList" ColumnWidth="300px" LogicalFilterOperator="LogicalFilterOperator.Or" SelectionMode="DataGridSelectionMode.Single">
|
Data="@CommesseList" ColumnWidth="300px" LogicalFilterOperator="LogicalFilterOperator.Or" SelectionMode="DataGridSelectionMode.Single">
|
||||||
|
<Template Context="commessa">
|
||||||
|
<RadzenDataGrid AllowFiltering="true" AllowPaging="true" AllowSorting="true" Data="@commessa.Posizioni" EmptyText="Nessuna posizione associata" PageSize="10">
|
||||||
|
<Columns>
|
||||||
|
<RadzenDataGridColumn Property="@nameof(CommessaPosizioneViewModel.Posizione)" Title="Pos. Commessa" SortOrder="SortOrder.Ascending" Sortable="false"></RadzenDataGridColumn>
|
||||||
|
<RadzenDataGridColumn Property="@nameof(CommessaPosizioneViewModel.NumeroDisegno)" Title="Dwg N°"></RadzenDataGridColumn>
|
||||||
|
<RadzenDataGridColumn Property="@nameof(CommessaPosizioneViewModel.NumeroArticolo)" Title="Item N°"></RadzenDataGridColumn>
|
||||||
|
<RadzenDataGridColumn Property="@nameof(CommessaPosizioneViewModel.NumeroFabb)" Title="N° Fabb"></RadzenDataGridColumn>
|
||||||
|
<RadzenDataGridColumn Property="@nameof(CommessaPosizioneViewModel.Descrizione)" Title="Descrizione"></RadzenDataGridColumn>
|
||||||
|
<RadzenDataGridColumn Property="@nameof(CommessaPosizioneViewModel.Categoria)" Title="Categoria"></RadzenDataGridColumn>
|
||||||
|
<RadzenDataGridColumn Property="@nameof(CommessaPosizioneViewModel.DataConsegna)" Title="Data consegna"></RadzenDataGridColumn>
|
||||||
|
<RadzenDataGridColumn Property="@nameof(CommessaPosizioneViewModel.DataTerminePrevisto)" Title="Data termine previsto"></RadzenDataGridColumn>
|
||||||
|
</Columns>
|
||||||
|
</RadzenDataGrid>
|
||||||
|
<RadzenButton Icon="add" Text="Nuova posizione"></RadzenButton>
|
||||||
|
</Template>
|
||||||
<Columns>
|
<Columns>
|
||||||
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.CodiceCommessa)" Title="NR Commessa" Width="160px" />
|
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.CodiceCommessa)" Title="NR Commessa" Width="160px"/>
|
||||||
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.RagioneSocialeCliente)" Title="Cliente" Width="160px" />
|
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.RagioneSocialeCliente)" Title="Cliente" Width="160px"/>
|
||||||
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.ClienteId)" Title="Data Vis.Cliente" Width="200px" />
|
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.ClienteId)" Title="Data Vis.Cliente" Width="200px"/>
|
||||||
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.RiferimentoCliente)" Title="Riferimento Cliente" Width="200px" />
|
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.RiferimentoCliente)" Title="Riferimento Cliente" Width="200px"/>
|
||||||
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.DataOrdine)" FormatString="dd/MM/yyyy" Title="Data ordine" Width="200px" />
|
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.DataOrdine)" FormatString="{0:dd/MM/yyyy}" Title="Data ordine" Width="200px"/>
|
||||||
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.DataConsegnaPrevista)" FormatString="dd/MM/yyyy" Title="Data consegna effettiva" Width="200px" />
|
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.DataConsegnaPrevista)" FormatString="{0:dd/MM/yyyy}" Title="Data consegna effettiva" Width="200px"/>
|
||||||
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.DataConsegna)" FormatString="dd/MM/yyyy" Title="Data consegna richiesta" Width="200px" />
|
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.DataConsegna)" FormatString="{0:dd/MM/yyyy}" Title="Data consegna richiesta" Width="200px"/>
|
||||||
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.Stato)" Title="Stato" Width="200px" />
|
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.Stato)" Title="Stato" Width="200px"/>
|
||||||
|
|
||||||
|
<RadzenDataGridColumn Context="commessa" Filterable="false" Sortable="false" TextAlign="TextAlign.Right" Width="250px">
|
||||||
|
<Template Context="commessa">
|
||||||
|
<RadzenButton Visible="canEdit" Icon="edit" ButtonStyle="ButtonStyle.Light" Variant="Variant.Flat" Size="ButtonSize.Medium" class="rz-my-1 rz-ms-1" Click="@(args => EditRow(commessa))" @onclick:stopPropagation="true" MouseEnter="@(args => ShowTooltip(args, new TooltipOptions() { Text = "Modifica commessa" }))" />
|
||||||
|
<RadzenButton Visible="canDelete" Icon="delete" ButtonStyle="ButtonStyle.Danger" Variant="Variant.Flat" Size="ButtonSize.Medium" Shade="Shade.Lighter" class="rz-my-1 rz-ms-1" Click="@(args => DeleteRow(commessa))" @onclick:stopPropagation="true" MouseEnter="@(args => ShowTooltip(args, new TooltipOptions() { Text = "Rimuovi commessa" }))" />
|
||||||
|
</Template>
|
||||||
|
</RadzenDataGridColumn>
|
||||||
</Columns>
|
</Columns>
|
||||||
</RadzenDataGrid>
|
</RadzenDataGrid>
|
||||||
</div>
|
</div>
|
||||||
@ -48,6 +72,9 @@
|
|||||||
public List<CommessaViewModel> CommesseList { get; set; } = new();
|
public List<CommessaViewModel> CommesseList { get; set; } = new();
|
||||||
RadzenDataGrid<CommessaViewModel> commesseGrid;
|
RadzenDataGrid<CommessaViewModel> commesseGrid;
|
||||||
|
|
||||||
|
private bool canEdit = false;
|
||||||
|
private bool canDelete = false;
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
await base.OnInitializedAsync();
|
await base.OnInitializedAsync();
|
||||||
@ -56,7 +83,32 @@
|
|||||||
|
|
||||||
CommesseList = (await _managerService.CommessaService.RicercaQueryable(
|
CommesseList = (await _managerService.CommessaService.RicercaQueryable(
|
||||||
x => x.Eliminato == false,
|
x => x.Eliminato == false,
|
||||||
includi:x => x.Include(y => y.Cliente).ThenInclude(z => z.Comune).ThenInclude(w => w.ProvinciaIstat)))
|
includi:x => x.Include(y => y.Cliente).ThenInclude(z => z.Comune).ThenInclude(w => w.ProvinciaIstat)
|
||||||
|
.Include(x => x.Posizioni)))
|
||||||
.Select(x => (CommessaViewModel)x).ToList();
|
.Select(x => (CommessaViewModel)x).ToList();
|
||||||
|
canEdit = await MembershipUtils.CheckPermission(_auth, _managerService, "Commesse_Edit");
|
||||||
|
canDelete = await MembershipUtils.CheckPermission(_auth, _managerService, "Commesse_Delete");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task EditRow(CommessaViewModel commessa)
|
||||||
|
{
|
||||||
|
_navManager.NavigateTo($"/commesse/modifica/{commessa.Id}");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task DeleteRow(CommessaViewModel commessa)
|
||||||
|
{
|
||||||
|
var ok = await _dialogService.Confirm($"Vuoi davvero eliminare la commessa {commessa.CodiceCommessa}?", "Conferma eliminazione", new ConfirmOptions { OkButtonText = "Sì", CancelButtonText = "No", Width = "400px" });
|
||||||
|
|
||||||
|
if (ok == true)
|
||||||
|
{
|
||||||
|
await _managerService.CommessaService.Elimina(commessa.Id, await MembershipUtils.GetUserId(_auth));
|
||||||
|
CommesseList = (await _managerService.CommessaService.RicercaQueryable(
|
||||||
|
x => x.Eliminato == false,
|
||||||
|
includi:x => x.Include(y => y.Cliente).ThenInclude(z => z.Comune).ThenInclude(w => w.ProvinciaIstat)
|
||||||
|
.Include(x => x.Posizioni)))
|
||||||
|
.Select(x => (CommessaViewModel)x).ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShowTooltip(ElementReference elementReference, TooltipOptions options = null) => _tooltipService.Open(elementReference, options.Text, options);
|
||||||
}
|
}
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
@page "/commesse/modifica"
|
||||||
|
@page "/commesse/modifica/{CommessaId:guid}"
|
||||||
|
|
||||||
|
@rendermode InteractiveServer
|
||||||
|
|
||||||
|
@using Microsoft.EntityFrameworkCore
|
||||||
|
@using TecniStamp.Model.Commesse
|
||||||
|
@using TecniStamp.Model.Common
|
||||||
|
@using TecniStamp.Utils
|
||||||
|
|
||||||
|
<PageTitle>Commesse</PageTitle>
|
||||||
|
<Breadcrumb Items="BreadcrumbList" />
|
||||||
|
|
||||||
|
<main role="main">
|
||||||
|
<div class="container-fluid h-100 mt-5">
|
||||||
|
<div class="row justify-content-start">
|
||||||
|
<div class="row row-cards">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<RadzenTabs TabPosition="TabPosition.Top" RenderMode="TabRenderMode.Client" >
|
||||||
|
<Tabs>
|
||||||
|
<RadzenTabsItem Text="Info generali">
|
||||||
|
<Commesse_Edit_InfoGenerali Model="@Model"/>
|
||||||
|
</RadzenTabsItem>
|
||||||
|
|
||||||
|
<RadzenTabsItem Text="OE">
|
||||||
|
<Commesse_Edit_OE />
|
||||||
|
</RadzenTabsItem>
|
||||||
|
</Tabs>
|
||||||
|
</RadzenTabs>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[Parameter] public Guid? CommessaId { get; set; }
|
||||||
|
|
||||||
|
public List<BreadcrumbViewModel> BreadcrumbList { get; set; } = new();
|
||||||
|
|
||||||
|
public CommessaViewModel Model { get; set; } = new();
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
await base.OnInitializedAsync();
|
||||||
|
|
||||||
|
Model = CommessaId.GetValueOrDefault() == Guid.Empty
|
||||||
|
? new CommessaViewModel()
|
||||||
|
: await _managerService.CommessaService.RicercaPer(x => x.Id == CommessaId,
|
||||||
|
includi:x => x.Include(y => y.Cliente).Include(y => y.Posizioni));
|
||||||
|
|
||||||
|
BreadcrumbList = await BreadcrumbUtils.BuildBreadcrumbByFeature(_managerService, "Commesse_Info", "Modifica", "/commesse");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
@using TecniStamp.Model.Commesse
|
||||||
|
<h3>@Model.CodiceCommessa</h3>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[Parameter] public CommessaViewModel Model { get; set; } = new();
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
@using TecniStamp.Model.Commesse
|
||||||
|
<h3>Commesse_Edit_OE</h3>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[Parameter] public CommessaViewModel Model { get; set; } = new();
|
||||||
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
@using TecniStamp.Model.Common
|
@using TecniStamp.Model.Common
|
||||||
<div class="card bg-primary-lt position-fixed w-100 rounded-0 shadow-sm" style="top: 58px; left:0; z-index: 100;">
|
<div class="card app-topbar position-fixed w-100 rounded-0 shadow-sm" style="top:58px; left:0; z-index:100;">
|
||||||
<div class="card-body py-2">
|
<div class="card-body py-2">
|
||||||
<ol class="breadcrumb breadcrumb-arrows">
|
<ol class="breadcrumb breadcrumb-arrows">
|
||||||
@foreach (var item in Items)
|
@foreach (var item in Items)
|
||||||
|
|||||||
15
TecniStamp/TecniStamp/Components/Widget/Breadcrumb.razor.css
Normal file
15
TecniStamp/TecniStamp/Components/Widget/Breadcrumb.razor.css
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
.app-topbar{
|
||||||
|
background-color: #fff;
|
||||||
|
border-bottom: 1px solid rgba(0,0,0,.08);
|
||||||
|
color: #7FB3FF; /* azzurro pastello */
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-topbar a,
|
||||||
|
.app-topbar .nav-link{
|
||||||
|
color: #7FB3FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-topbar a:hover,
|
||||||
|
.app-topbar .nav-link:hover{
|
||||||
|
color: #4D8FE6; /* un filo più deciso in hover */
|
||||||
|
}
|
||||||
@ -18,5 +18,6 @@
|
|||||||
@inject IManagerService _managerService
|
@inject IManagerService _managerService
|
||||||
|
|
||||||
@inject DialogService _dialogService
|
@inject DialogService _dialogService
|
||||||
|
@inject TooltipService _tooltipService
|
||||||
@inject NavigationManager _navManager
|
@inject NavigationManager _navManager
|
||||||
@inject AuthenticationStateProvider _auth
|
@inject AuthenticationStateProvider _auth
|
||||||
@ -6,16 +6,14 @@ public class ClienteViewModel : BaseViewModel
|
|||||||
{
|
{
|
||||||
public string RagioneSociale { get; set; }
|
public string RagioneSociale { get; set; }
|
||||||
public string PartitaIva { get; set; }
|
public string PartitaIva { get; set; }
|
||||||
public string Paese { get; set; }
|
|
||||||
public string Telefono { get; set; }
|
public string Telefono { get; set; }
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
public string Indirizzo { get; set; }
|
|
||||||
public string CAP { get; set; }
|
public string CAP { get; set; }
|
||||||
public string Citta { get; set; }
|
public string Citta { get; set; }
|
||||||
public string NumeroCivico { get; set; }
|
public string NumeroCivico { get; set; }
|
||||||
public string Via { get; set; }
|
public string Via { get; set; }
|
||||||
public string Provincia { get; set; }
|
public string Provincia { get; set; }
|
||||||
public string Note { get; set; }
|
public string? Note { get; set; }
|
||||||
public Guid? ComuneId { get; set; }
|
public Guid? ComuneId { get; set; }
|
||||||
public ComuneIstatViewModel Comune { get; set; }
|
public ComuneIstatViewModel Comune { get; set; }
|
||||||
|
|
||||||
@ -32,10 +30,8 @@ public class ClienteViewModel : BaseViewModel
|
|||||||
{
|
{
|
||||||
RagioneSociale = model.RagioneSociale,
|
RagioneSociale = model.RagioneSociale,
|
||||||
PartitaIva = model.PartitaIva,
|
PartitaIva = model.PartitaIva,
|
||||||
Paese = model.Paese,
|
|
||||||
Telefono = model.Telefono,
|
Telefono = model.Telefono,
|
||||||
Email = model.Email,
|
Email = model.Email,
|
||||||
Indirizzo = model.Indirizzo,
|
|
||||||
CAP = model.CAP,
|
CAP = model.CAP,
|
||||||
Citta = model.Citta,
|
Citta = model.Citta,
|
||||||
NumeroCivico = model.NumeroCivico,
|
NumeroCivico = model.NumeroCivico,
|
||||||
|
|||||||
@ -0,0 +1,35 @@
|
|||||||
|
using TecniStamp.Domain;
|
||||||
|
|
||||||
|
namespace TecniStamp.Model.Commesse;
|
||||||
|
|
||||||
|
public class CommessaPosizioneViewModel : BaseViewModel
|
||||||
|
{
|
||||||
|
public int Posizione { get; set; }
|
||||||
|
public string NumeroDisegno { get; set; }
|
||||||
|
public string NumeroArticolo { get; set; }
|
||||||
|
public string NumeroFabb { get; set; }
|
||||||
|
public string Descrizione { get; set; }
|
||||||
|
public string Categoria { get; set; }
|
||||||
|
public DateTime DataConsegna { get; set; }
|
||||||
|
public DateTime DataTerminePrevisto { get; set; }
|
||||||
|
|
||||||
|
public override void Validate(){}
|
||||||
|
|
||||||
|
public static implicit operator CommessaPosizioneViewModel(CommessaPosizione model)
|
||||||
|
{
|
||||||
|
return model == null
|
||||||
|
? null
|
||||||
|
: new CommessaPosizioneViewModel()
|
||||||
|
{
|
||||||
|
Descrizione = model.Descrizione,
|
||||||
|
NumeroArticolo = model.NumeroArticolo,
|
||||||
|
NumeroDisegno = model.NumeroDisegno,
|
||||||
|
NumeroFabb = model.NumeroFabb,
|
||||||
|
Categoria = model.Categoria,
|
||||||
|
DataConsegna = model.DataConsegna,
|
||||||
|
DataTerminePrevisto = model.DataTerminePrevisto,
|
||||||
|
Id = model.Id,
|
||||||
|
Posizione = model.Posizione
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -15,6 +15,7 @@ public class CommessaViewModel : BaseViewModel
|
|||||||
public DateTime DataConsegnaPrevista { get; set; }
|
public DateTime DataConsegnaPrevista { get; set; }
|
||||||
public DateTime DataConsegna { get; set; }
|
public DateTime DataConsegna { get; set; }
|
||||||
public CommessaStato Stato { get; set; }
|
public CommessaStato Stato { get; set; }
|
||||||
|
public List<CommessaPosizioneViewModel> Posizioni { get; set; }
|
||||||
|
|
||||||
public string RagioneSocialeCliente => Cliente?.RagioneSociale ?? string.Empty;
|
public string RagioneSocialeCliente => Cliente?.RagioneSociale ?? string.Empty;
|
||||||
|
|
||||||
@ -40,7 +41,8 @@ public class CommessaViewModel : BaseViewModel
|
|||||||
DataOrdine = model.DataOrdine,
|
DataOrdine = model.DataOrdine,
|
||||||
DataConsegnaPrevista = model.DataConsegnaPrevista,
|
DataConsegnaPrevista = model.DataConsegnaPrevista,
|
||||||
DataConsegna = model.DataConsegna,
|
DataConsegna = model.DataConsegna,
|
||||||
Id = model.Id
|
Id = model.Id,
|
||||||
|
Posizioni = model.Posizioni.Select(p => (CommessaPosizioneViewModel)p).ToList()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -22,4 +22,9 @@ public class RuoloViewModel
|
|||||||
{
|
{
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return Nome;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -1,4 +1,5 @@
|
|||||||
using Microsoft.AspNetCore.Components.Authorization;
|
using Microsoft.AspNetCore.Components.Authorization;
|
||||||
|
using TecniStamp.Service.Interfaces;
|
||||||
|
|
||||||
namespace TecniStamp.Utils;
|
namespace TecniStamp.Utils;
|
||||||
|
|
||||||
@ -19,4 +20,16 @@ public static class MembershipUtils
|
|||||||
|
|
||||||
return Guid.Parse(idClaim ?? Guid.Empty.ToString());
|
return Guid.Parse(idClaim ?? Guid.Empty.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static async Task<bool> CheckPermission(AuthenticationStateProvider auth, IManagerService managerService, string featureName)
|
||||||
|
{
|
||||||
|
var state = await auth.GetAuthenticationStateAsync();
|
||||||
|
var idClaim = state.User.FindFirst("RoleId")?.Value;
|
||||||
|
|
||||||
|
var parsed = Guid.Parse(idClaim ?? Guid.Empty.ToString());
|
||||||
|
|
||||||
|
var perm = await managerService.RuoloService.RicercaPer(x =>
|
||||||
|
x.Id == parsed && x.Permessi.Any(y => y.Feature.Nome == featureName && y.Eliminato == false) && x.Eliminato == false);
|
||||||
|
return perm != null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user