Commessa posizione
This commit is contained in:
@ -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; }
|
||||||
|
|||||||
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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -161,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")
|
||||||
@ -630,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")
|
||||||
@ -805,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,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,30 @@
|
|||||||
<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>
|
<Columns>
|
||||||
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.CodiceCommessa)" Title="NR Commessa" Width="160px" />
|
<RadzenDataGridColumn Property="@nameof(CommessaPosizioneViewModel.Posizione)" Title="Pos. Commessa" SortOrder="SortOrder.Ascending" Sortable="false"></RadzenDataGridColumn>
|
||||||
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.RagioneSocialeCliente)" Title="Cliente" Width="160px" />
|
<RadzenDataGridColumn Property="@nameof(CommessaPosizioneViewModel.NumeroDisegno)" Title="Dwg N°"></RadzenDataGridColumn>
|
||||||
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.ClienteId)" Title="Data Vis.Cliente" Width="200px" />
|
<RadzenDataGridColumn Property="@nameof(CommessaPosizioneViewModel.NumeroArticolo)" Title="Item N°"></RadzenDataGridColumn>
|
||||||
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.RiferimentoCliente)" Title="Riferimento Cliente" Width="200px" />
|
<RadzenDataGridColumn Property="@nameof(CommessaPosizioneViewModel.NumeroFabb)" Title="N° Fabb"></RadzenDataGridColumn>
|
||||||
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.DataOrdine)" FormatString="{0:dd/MM/yyyy}" Title="Data ordine" Width="200px" />
|
<RadzenDataGridColumn Property="@nameof(CommessaPosizioneViewModel.Descrizione)" Title="Descrizione"></RadzenDataGridColumn>
|
||||||
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.DataConsegnaPrevista)" FormatString="{0:dd/MM/yyyy}" Title="Data consegna effettiva" Width="200px" />
|
<RadzenDataGridColumn Property="@nameof(CommessaPosizioneViewModel.Categoria)" Title="Categoria"></RadzenDataGridColumn>
|
||||||
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.DataConsegna)" FormatString="{0:dd/MM/yyyy}" Title="Data consegna richiesta" Width="200px" />
|
<RadzenDataGridColumn Property="@nameof(CommessaPosizioneViewModel.DataConsegna)" Title="Data consegna"></RadzenDataGridColumn>
|
||||||
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.Stato)" Title="Stato" Width="200px" />
|
<RadzenDataGridColumn Property="@nameof(CommessaPosizioneViewModel.DataTerminePrevisto)" Title="Data termine previsto"></RadzenDataGridColumn>
|
||||||
|
</Columns>
|
||||||
|
</RadzenDataGrid>
|
||||||
|
<RadzenButton Icon="add" Text="Nuova posizione"></RadzenButton>
|
||||||
|
</Template>
|
||||||
|
<Columns>
|
||||||
|
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.CodiceCommessa)" Title="NR Commessa" 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.RiferimentoCliente)" Title="Riferimento Cliente" Width="200px"/>
|
||||||
|
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.DataOrdine)" FormatString="{0:dd/MM/yyyy}" Title="Data ordine" Width="200px"/>
|
||||||
|
<RadzenDataGridColumn Property="@nameof(CommessaViewModel.DataConsegnaPrevista)" FormatString="{0:dd/MM/yyyy}" Title="Data consegna effettiva" 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"/>
|
||||||
</Columns>
|
</Columns>
|
||||||
</RadzenDataGrid>
|
</RadzenDataGrid>
|
||||||
</div>
|
</div>
|
||||||
@ -56,7 +73,8 @@
|
|||||||
|
|
||||||
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -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()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user