This commit is contained in:
2025-12-17 14:42:45 +01:00
parent d443ece2ca
commit 875396e6ee
32 changed files with 1669 additions and 286 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,79 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace StandManager.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class Capoarea : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "CapoareaId",
table: "Utente",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "CapoareaId",
table: "Cliente",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_Utente_CapoareaId",
table: "Utente",
column: "CapoareaId");
migrationBuilder.CreateIndex(
name: "IX_Cliente_CapoareaId",
table: "Cliente",
column: "CapoareaId");
migrationBuilder.AddForeignKey(
name: "FK_Cliente_Utente_CapoareaId",
table: "Cliente",
column: "CapoareaId",
principalTable: "Utente",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Utente_Utente_CapoareaId",
table: "Utente",
column: "CapoareaId",
principalTable: "Utente",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Cliente_Utente_CapoareaId",
table: "Cliente");
migrationBuilder.DropForeignKey(
name: "FK_Utente_Utente_CapoareaId",
table: "Utente");
migrationBuilder.DropIndex(
name: "IX_Utente_CapoareaId",
table: "Utente");
migrationBuilder.DropIndex(
name: "IX_Cliente_CapoareaId",
table: "Cliente");
migrationBuilder.DropColumn(
name: "CapoareaId",
table: "Utente");
migrationBuilder.DropColumn(
name: "CapoareaId",
table: "Cliente");
}
}
}

View File

@ -34,6 +34,9 @@ namespace StandManager.Infrastructure.Migrations
b.Property<string>("Cap")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("CapoareaId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Citta")
.HasColumnType("nvarchar(max)");
@ -85,6 +88,8 @@ namespace StandManager.Infrastructure.Migrations
b.HasIndex("AgenteId");
b.HasIndex("CapoareaId");
b.HasIndex("IdUtenteCreazione");
b.HasIndex("IdUtenteModifica");
@ -633,6 +638,9 @@ namespace StandManager.Infrastructure.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("CapoareaId")
.HasColumnType("uniqueidentifier");
b.Property<string>("CodiceAgente")
.HasColumnType("nvarchar(max)");
@ -676,6 +684,8 @@ namespace StandManager.Infrastructure.Migrations
b.HasKey("Id");
b.HasIndex("CapoareaId");
b.HasIndex("IdUtenteCreazione");
b.HasIndex("IdUtenteModifica");
@ -691,6 +701,10 @@ namespace StandManager.Infrastructure.Migrations
.WithMany()
.HasForeignKey("AgenteId");
b.HasOne("StandManager.Domain.Entita.Utente", "Capoarea")
.WithMany()
.HasForeignKey("CapoareaId");
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
.WithMany()
.HasForeignKey("IdUtenteCreazione");
@ -705,6 +719,8 @@ namespace StandManager.Infrastructure.Migrations
b.Navigation("Agente");
b.Navigation("Capoarea");
b.Navigation("TipologiaCliente");
b.Navigation("UtenteCreazione");
@ -946,6 +962,10 @@ namespace StandManager.Infrastructure.Migrations
modelBuilder.Entity("StandManager.Domain.Entita.Utente", b =>
{
b.HasOne("StandManager.Domain.Entita.Utente", "Capoarea")
.WithMany()
.HasForeignKey("CapoareaId");
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
.WithMany()
.HasForeignKey("IdUtenteCreazione");
@ -958,6 +978,8 @@ namespace StandManager.Infrastructure.Migrations
.WithMany("Utenti")
.HasForeignKey("RuoloId");
b.Navigation("Capoarea");
b.Navigation("Ruolo");
b.Navigation("UtenteCreazione");