Province
This commit is contained in:
9
StandManager.Domain/Entita/ProvinciaIstat.cs
Normal file
9
StandManager.Domain/Entita/ProvinciaIstat.cs
Normal file
@ -0,0 +1,9 @@
|
||||
using StandManager.Domain.Entita.Base;
|
||||
|
||||
namespace StandManager.Domain.Entita;
|
||||
|
||||
public class ProvinciaIstat : EntitaBase
|
||||
{
|
||||
public string Istat { get; set; }
|
||||
public string Comune { get; set; }
|
||||
}
|
||||
@ -18,6 +18,7 @@ public class StandManagerDbContext : OAServiceContext
|
||||
public DbSet<InvitoEvento> InvitoEvento { get; set; }
|
||||
public DbSet<IscrizioneEvento> IscrizioneEvento { get; set; }
|
||||
public DbSet<Permission> Permission { get; set; }
|
||||
public DbSet<ProvinciaIstat> Provincie { get; set; }
|
||||
public DbSet<Referente> Referente { get; set; }
|
||||
public DbSet<Ruolo> Ruolo { get; set; }
|
||||
public DbSet<Sezione> Sezione { get; set; }
|
||||
|
||||
1150
StandManager.Infrastructure/Migrations/20251222141858_Province.Designer.cs
generated
Normal file
1150
StandManager.Infrastructure/Migrations/20251222141858_Province.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace StandManager.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Province : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Provincie",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Istat = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Comune = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
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_Provincie", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Provincie_Utente_IdUtenteCreazione",
|
||||
column: x => x.IdUtenteCreazione,
|
||||
principalTable: "Utente",
|
||||
principalColumn: "Id");
|
||||
table.ForeignKey(
|
||||
name: "FK_Provincie_Utente_IdUtenteModifica",
|
||||
column: x => x.IdUtenteModifica,
|
||||
principalTable: "Utente",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Provincie_IdUtenteCreazione",
|
||||
table: "Provincie",
|
||||
column: "IdUtenteCreazione");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Provincie_IdUtenteModifica",
|
||||
table: "Provincie",
|
||||
column: "IdUtenteModifica");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Provincie");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -526,6 +526,44 @@ namespace StandManager.Infrastructure.Migrations
|
||||
b.ToTable("Permission");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("StandManager.Domain.Entita.ProvinciaIstat", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
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.HasKey("Id");
|
||||
|
||||
b.HasIndex("IdUtenteCreazione");
|
||||
|
||||
b.HasIndex("IdUtenteModifica");
|
||||
|
||||
b.ToTable("Provincie");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("StandManager.Domain.Entita.Referente", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@ -969,6 +1007,21 @@ namespace StandManager.Infrastructure.Migrations
|
||||
b.Navigation("UtenteModifica");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("StandManager.Domain.Entita.ProvinciaIstat", b =>
|
||||
{
|
||||
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdUtenteCreazione");
|
||||
|
||||
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdUtenteModifica");
|
||||
|
||||
b.Navigation("UtenteCreazione");
|
||||
|
||||
b.Navigation("UtenteModifica");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("StandManager.Domain.Entita.Referente", b =>
|
||||
{
|
||||
b.HasOne("StandManager.Domain.Entita.Destinazione", "Destinazione")
|
||||
|
||||
Reference in New Issue
Block a user