- Gestione Iscrizioni in management

- PartitaIVA in Component_Registrazione
- Flag "Da verificare" a DB
This commit is contained in:
2026-02-05 12:32:58 +01:00
parent 932299c98f
commit 4ddf71f465
17 changed files with 3253 additions and 48 deletions

View File

@ -0,0 +1,109 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace StandManager.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class CapiareaAgentiInIscrizioneEvento : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "ProvinciaIstatId",
table: "Utente",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "AgenteId",
table: "IscrizioneEvento",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "CapoareaId",
table: "IscrizioneEvento",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_Utente_ProvinciaIstatId",
table: "Utente",
column: "ProvinciaIstatId");
migrationBuilder.CreateIndex(
name: "IX_IscrizioneEvento_AgenteId",
table: "IscrizioneEvento",
column: "AgenteId");
migrationBuilder.CreateIndex(
name: "IX_IscrizioneEvento_CapoareaId",
table: "IscrizioneEvento",
column: "CapoareaId");
migrationBuilder.AddForeignKey(
name: "FK_IscrizioneEvento_Utente_AgenteId",
table: "IscrizioneEvento",
column: "AgenteId",
principalTable: "Utente",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_IscrizioneEvento_Utente_CapoareaId",
table: "IscrizioneEvento",
column: "CapoareaId",
principalTable: "Utente",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Utente_Province_ProvinciaIstatId",
table: "Utente",
column: "ProvinciaIstatId",
principalTable: "Province",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_IscrizioneEvento_Utente_AgenteId",
table: "IscrizioneEvento");
migrationBuilder.DropForeignKey(
name: "FK_IscrizioneEvento_Utente_CapoareaId",
table: "IscrizioneEvento");
migrationBuilder.DropForeignKey(
name: "FK_Utente_Province_ProvinciaIstatId",
table: "Utente");
migrationBuilder.DropIndex(
name: "IX_Utente_ProvinciaIstatId",
table: "Utente");
migrationBuilder.DropIndex(
name: "IX_IscrizioneEvento_AgenteId",
table: "IscrizioneEvento");
migrationBuilder.DropIndex(
name: "IX_IscrizioneEvento_CapoareaId",
table: "IscrizioneEvento");
migrationBuilder.DropColumn(
name: "ProvinciaIstatId",
table: "Utente");
migrationBuilder.DropColumn(
name: "AgenteId",
table: "IscrizioneEvento");
migrationBuilder.DropColumn(
name: "CapoareaId",
table: "IscrizioneEvento");
}
}
}

View File

@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace StandManager.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class CapoareaDaVerificareInProvincia : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "CapoareaDaVerificare",
table: "Province",
type: "bit",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CapoareaDaVerificare",
table: "Province");
}
}
}

View File

@ -407,9 +407,15 @@ namespace StandManager.Infrastructure.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("AgenteId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Cap")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("CapoareaId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("ClienteId")
.HasColumnType("uniqueidentifier");
@ -487,6 +493,10 @@ namespace StandManager.Infrastructure.Migrations
b.HasKey("Id");
b.HasIndex("AgenteId");
b.HasIndex("CapoareaId");
b.HasIndex("ClienteId");
b.HasIndex("ComuneId");
@ -608,6 +618,9 @@ namespace StandManager.Infrastructure.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<bool>("CapoareaDaVerificare")
.HasColumnType("bit");
b.Property<DateTime>("DataCreazione")
.HasColumnType("datetime2");
@ -849,6 +862,9 @@ namespace StandManager.Infrastructure.Migrations
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("ProvinciaIstatId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("RuoloId")
.HasColumnType("uniqueidentifier");
@ -864,6 +880,8 @@ namespace StandManager.Infrastructure.Migrations
b.HasIndex("IdUtenteModifica");
b.HasIndex("ProvinciaIstatId");
b.HasIndex("RuoloId");
b.ToTable("Utente");
@ -1029,6 +1047,14 @@ namespace StandManager.Infrastructure.Migrations
modelBuilder.Entity("StandManager.Domain.Entita.IscrizioneEvento", b =>
{
b.HasOne("StandManager.Domain.Entita.Utente", "Agente")
.WithMany()
.HasForeignKey("AgenteId");
b.HasOne("StandManager.Domain.Entita.Utente", "Capoarea")
.WithMany()
.HasForeignKey("CapoareaId");
b.HasOne("StandManager.Domain.Entita.Cliente", "Cliente")
.WithMany()
.HasForeignKey("ClienteId");
@ -1065,6 +1091,10 @@ namespace StandManager.Infrastructure.Migrations
.WithMany()
.HasForeignKey("TipologiaClienteId");
b.Navigation("Agente");
b.Navigation("Capoarea");
b.Navigation("Cliente");
b.Navigation("Comune");
@ -1223,12 +1253,18 @@ namespace StandManager.Infrastructure.Migrations
.WithMany()
.HasForeignKey("IdUtenteModifica");
b.HasOne("StandManager.Domain.Entita.ProvinciaIstat", "ProvinciaIstat")
.WithMany("UtentiList")
.HasForeignKey("ProvinciaIstatId");
b.HasOne("StandManager.Domain.Entita.Ruolo", "Ruolo")
.WithMany("Utenti")
.HasForeignKey("RuoloId");
b.Navigation("Capoarea");
b.Navigation("ProvinciaIstat");
b.Navigation("Ruolo");
b.Navigation("UtenteCreazione");
@ -1258,6 +1294,11 @@ namespace StandManager.Infrastructure.Migrations
b.Navigation("IscrizioniEvento");
});
modelBuilder.Entity("StandManager.Domain.Entita.ProvinciaIstat", b =>
{
b.Navigation("UtentiList");
});
modelBuilder.Entity("StandManager.Domain.Entita.Ruolo", b =>
{
b.Navigation("Permessi");