//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Zentral.Infrastructure.Data;
#nullable disable
namespace Zentral.Infrastructure.Migrations
{
[DbContext(typeof(ZentralDbContext))]
partial class ZentralDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "9.0.0");
modelBuilder.Entity("Zentral.Domain.Entities.App", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("BasePrice")
.HasPrecision(18, 2)
.HasColumnType("TEXT");
b.Property("Code")
.IsRequired()
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.HasColumnType("TEXT");
b.Property("CustomFieldsJson")
.HasColumnType("TEXT");
b.Property("Dependencies")
.HasColumnType("TEXT");
b.Property("Description")
.HasColumnType("TEXT");
b.Property("Icon")
.HasColumnType("TEXT");
b.Property("IsAvailable")
.HasColumnType("INTEGER");
b.Property("IsCore")
.HasColumnType("INTEGER");
b.Property("MonthlyMultiplier")
.HasPrecision(5, 2)
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property("RoutePath")
.HasColumnType("TEXT");
b.Property("SortOrder")
.HasColumnType("INTEGER");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("Code")
.IsUnique();
b.HasIndex("SortOrder");
b.ToTable("Apps");
});
modelBuilder.Entity("Zentral.Domain.Entities.AppSubscription", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AppId")
.HasColumnType("INTEGER");
b.Property("AutoRenew")
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.HasColumnType("TEXT");
b.Property("CustomFieldsJson")
.HasColumnType("TEXT");
b.Property("EndDate")
.HasColumnType("TEXT");
b.Property("IsEnabled")
.HasColumnType("INTEGER");
b.Property("LastRenewalDate")
.HasColumnType("TEXT");
b.Property("Notes")
.HasColumnType("TEXT");
b.Property("PaidPrice")
.HasPrecision(18, 2)
.HasColumnType("TEXT");
b.Property("StartDate")
.HasColumnType("TEXT");
b.Property("SubscriptionType")
.HasColumnType("INTEGER");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("AppId")
.IsUnique();
b.ToTable("AppSubscriptions");
});
modelBuilder.Entity("Zentral.Domain.Entities.Articolo", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Attivo")
.HasColumnType("INTEGER");
b.Property("CategoriaId")
.HasColumnType("INTEGER");
b.Property("Codice")
.IsRequired()
.HasColumnType("TEXT");
b.Property("CodiceAlternativo")
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.HasColumnType("TEXT");
b.Property("CustomFieldsJson")
.HasColumnType("TEXT");
b.Property("Descrizione")
.IsRequired()
.HasColumnType("TEXT");
b.Property("GiorniValidita")
.HasColumnType("INTEGER");
b.Property("Immagine")
.HasColumnType("BLOB");
b.Property("MimeType")
.HasColumnType("TEXT");
b.Property("Note")
.HasColumnType("TEXT");
b.Property("QtaDisponibile")
.HasColumnType("TEXT");
b.Property("QtaStdA")
.HasColumnType("TEXT");
b.Property("QtaStdB")
.HasColumnType("TEXT");
b.Property("QtaStdS")
.HasColumnType("TEXT");
b.Property("Tipo")
.HasColumnType("INTEGER");
b.Property("TipoMaterialeId")
.HasColumnType("INTEGER");
b.Property("UnitaMisura")
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CategoriaId");
b.HasIndex("Codice")
.IsUnique();
b.HasIndex("TipoMaterialeId");
b.ToTable("Articoli");
});
modelBuilder.Entity("Zentral.Domain.Entities.AutoCode", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.HasColumnType("TEXT");
b.Property("CustomFieldsJson")
.HasColumnType("TEXT");
b.Property("Description")
.HasColumnType("TEXT");
b.Property("EntityCode")
.IsRequired()
.HasColumnType("TEXT");
b.Property("EntityName")
.IsRequired()
.HasColumnType("TEXT");
b.Property("IsEnabled")
.HasColumnType("INTEGER");
b.Property("IsReadOnly")
.HasColumnType("INTEGER");
b.Property("LastResetMonth")
.HasColumnType("INTEGER");
b.Property("LastResetYear")
.HasColumnType("INTEGER");
b.Property("LastSequence")
.HasColumnType("INTEGER");
b.Property("ModuleCode")
.HasColumnType("TEXT");
b.Property("Pattern")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Prefix")
.HasColumnType("TEXT");
b.Property("ResetSequenceMonthly")
.HasColumnType("INTEGER");
b.Property("ResetSequenceYearly")
.HasColumnType("INTEGER");
b.Property("SortOrder")
.HasColumnType("INTEGER");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("EntityCode")
.IsUnique();
b.HasIndex("ModuleCode");
b.ToTable("AutoCodes");
});
modelBuilder.Entity("Zentral.Domain.Entities.Cliente", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Attivo")
.HasColumnType("INTEGER");
b.Property("Cap")
.HasColumnType("TEXT");
b.Property("Citta")
.HasColumnType("TEXT");
b.Property("Codice")
.IsRequired()
.HasColumnType("TEXT");
b.Property("CodiceAlternativo")
.HasColumnType("TEXT");
b.Property("CodiceDestinatario")
.HasColumnType("TEXT");
b.Property("CodiceFiscale")
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.HasColumnType("TEXT");
b.Property("CustomFieldsJson")
.HasColumnType("TEXT");
b.Property("Email")
.HasColumnType("TEXT");
b.Property("Indirizzo")
.HasColumnType("TEXT");
b.Property("Note")
.HasColumnType("TEXT");
b.Property("PartitaIva")
.HasColumnType("TEXT");
b.Property("Pec")
.HasColumnType("TEXT");
b.Property("Provincia")
.HasColumnType("TEXT");
b.Property("RagioneSociale")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Telefono")
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("PartitaIva");
b.HasIndex("RagioneSociale");
b.ToTable("Clienti");
});
modelBuilder.Entity("Zentral.Domain.Entities.ClienteContatto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("ClienteId")
.HasColumnType("INTEGER");
b.Property("Cognome")
.IsRequired()
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.HasColumnType("TEXT");
b.Property("CustomFieldsJson")
.HasColumnType("TEXT");
b.Property("Email")
.HasColumnType("TEXT");
b.Property("Nome")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Ruolo")
.HasColumnType("TEXT");
b.Property("Telefono")
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ClienteId");
b.ToTable("ClienteContatti", (string)null);
});
modelBuilder.Entity("Zentral.Domain.Entities.CodiceCategoria", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Attivo")
.HasColumnType("INTEGER");
b.Property("Codice")
.IsRequired()
.HasColumnType("TEXT");
b.Property("CoeffA")
.HasColumnType("TEXT");
b.Property("CoeffB")
.HasColumnType("TEXT");
b.Property("CoeffS")
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.HasColumnType("TEXT");
b.Property("CustomFieldsJson")
.HasColumnType("TEXT");
b.Property("Descrizione")
.IsRequired()
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("CodiciCategoria");
});
modelBuilder.Entity("Zentral.Domain.Entities.Communications.EmailLog", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.HasColumnType("TEXT");
b.Property("CustomFieldsJson")
.HasColumnType("TEXT");
b.Property("ErrorMessage")
.HasColumnType("TEXT");
b.Property("Recipient")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Sender")
.IsRequired()
.HasColumnType("TEXT");
b.Property("SentDate")
.HasColumnType("TEXT");
b.Property("Status")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Subject")
.IsRequired()
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("Recipient");
b.HasIndex("SentDate");
b.HasIndex("Status");
b.ToTable("EmailLogs", (string)null);
});
modelBuilder.Entity("Zentral.Domain.Entities.Configurazione", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Chiave")
.IsRequired()
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.HasColumnType("TEXT");
b.Property("CustomFieldsJson")
.HasColumnType("TEXT");
b.Property("Descrizione")
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.HasColumnType("TEXT");
b.Property("Valore")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("Chiave")
.IsUnique();
b.ToTable("Configurazioni");
});
modelBuilder.Entity("Zentral.Domain.Entities.CustomFieldDefinition", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.HasColumnType("TEXT");
b.Property("CustomFieldsJson")
.HasColumnType("TEXT");
b.Property("DefaultValue")
.HasColumnType("TEXT");
b.Property("Description")
.HasColumnType("TEXT");
b.Property("EntityName")
.IsRequired()
.HasColumnType("TEXT");
b.Property("FieldName")
.IsRequired()
.HasColumnType("TEXT");
b.Property("IsActive")
.HasColumnType("INTEGER");
b.Property("IsRequired")
.HasColumnType("INTEGER");
b.Property("Label")
.IsRequired()
.HasColumnType("TEXT");
b.Property("OptionsJson")
.HasColumnType("TEXT");
b.Property("Placeholder")
.HasColumnType("TEXT");
b.Property("SortOrder")
.HasColumnType("INTEGER");
b.Property("Type")
.HasColumnType("INTEGER");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.HasColumnType("TEXT");
b.Property("ValidationRegex")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("EntityName");
b.HasIndex("EntityName", "FieldName")
.IsUnique();
b.ToTable("CustomFieldDefinitions");
});
modelBuilder.Entity("Zentral.Domain.Entities.Evento", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("ClienteId")
.HasColumnType("INTEGER");
b.Property("Codice")
.HasColumnType("TEXT");
b.Property("Confermato")
.HasColumnType("INTEGER");
b.Property("CostoPersona")
.HasColumnType("TEXT");
b.Property("CostoTotale")
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.HasColumnType("TEXT");
b.Property("CustomFieldsJson")
.HasColumnType("TEXT");
b.Property("DataEvento")
.HasColumnType("TEXT");
b.Property("DataScadenzaPreventivo")
.HasColumnType("TEXT");
b.Property("Descrizione")
.HasColumnType("TEXT");
b.Property("LocationId")
.HasColumnType("INTEGER");
b.Property("NoteAllestimento")
.HasColumnType("TEXT");
b.Property("NoteCliente")
.HasColumnType("TEXT");
b.Property("NoteCucina")
.HasColumnType("TEXT");
b.Property("NoteInterne")
.HasColumnType("TEXT");
b.Property("NumeroOspiti")
.HasColumnType("INTEGER");
b.Property("NumeroOspitiAdulti")
.HasColumnType("INTEGER");
b.Property("NumeroOspitiBambini")
.HasColumnType("INTEGER");
b.Property("NumeroOspitiBuffet")
.HasColumnType("INTEGER");
b.Property("NumeroOspitiSeduti")
.HasColumnType("INTEGER");
b.Property("OraFine")
.HasColumnType("TEXT");
b.Property("OraInizio")
.HasColumnType("TEXT");
b.Property("Saldo")
.HasColumnType("TEXT");
b.Property("Stato")
.HasColumnType("INTEGER");
b.Property("TipoEventoId")
.HasColumnType("INTEGER");
b.Property("TotaleAcconti")
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ClienteId");
b.HasIndex("Codice");
b.HasIndex("DataEvento");
b.HasIndex("LocationId");
b.HasIndex("Stato");
b.HasIndex("TipoEventoId");
b.ToTable("Eventi");
});
modelBuilder.Entity("Zentral.Domain.Entities.EventoAcconto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AConferma")
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.HasColumnType("TEXT");
b.Property("CustomFieldsJson")
.HasColumnType("TEXT");
b.Property("DataPagamento")
.HasColumnType("TEXT");
b.Property("Descrizione")
.HasColumnType("TEXT");
b.Property("EventoId")
.HasColumnType("INTEGER");
b.Property("Importo")
.HasColumnType("TEXT");
b.Property("MetodoPagamento")
.HasColumnType("TEXT");
b.Property("Note")
.HasColumnType("TEXT");
b.Property("Ordine")
.HasColumnType("INTEGER");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("EventoId");
b.ToTable("EventiAcconti");
});
modelBuilder.Entity("Zentral.Domain.Entities.EventoAllegato", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Contenuto")
.HasColumnType("BLOB");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.HasColumnType("TEXT");
b.Property("CustomFieldsJson")
.HasColumnType("TEXT");
b.Property("EventoId")
.HasColumnType("INTEGER");
b.Property("MimeType")
.HasColumnType("TEXT");
b.Property("NomeFile")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Note")
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("EventoId");
b.ToTable("EventiAllegati");
});
modelBuilder.Entity("Zentral.Domain.Entities.EventoAltroCosto", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("AliquotaIva")
.HasColumnType("TEXT");
b.Property("ApplicaIva")
.HasColumnType("INTEGER");
b.Property("CostoUnitario")
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.HasColumnType("TEXT");
b.Property("CustomFieldsJson")
.HasColumnType("TEXT");
b.Property("Descrizione")
.IsRequired()
.HasColumnType("TEXT");
b.Property("EventoId")
.HasColumnType("INTEGER");
b.Property("Ordine")
.HasColumnType("INTEGER");
b.Property("Quantita")
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("EventoId");
b.ToTable("EventiAltriCosti");
});
modelBuilder.Entity("Zentral.Domain.Entities.EventoDegustazione", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Completata")
.HasColumnType("INTEGER");
b.Property("CostoDegustazione")
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.HasColumnType("TEXT");
b.Property("CustomFieldsJson")
.HasColumnType("TEXT");
b.Property("DataDegustazione")
.HasColumnType("TEXT");
b.Property("Detraibile")
.HasColumnType("INTEGER");
b.Property("EventoId")
.HasColumnType("INTEGER");
b.Property("Luogo")
.HasColumnType("TEXT");
b.Property("Menu")
.HasColumnType("TEXT");
b.Property("Note")
.HasColumnType("TEXT");
b.Property("NumeroPaganti")
.HasColumnType("INTEGER");
b.Property("NumeroPersone")
.HasColumnType("INTEGER");
b.Property("Ora")
.HasColumnType("TEXT");
b.Property("UpdatedAt")
.HasColumnType("TEXT");
b.Property("UpdatedBy")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("EventoId");
b.ToTable("EventiDegustazioni");
});
modelBuilder.Entity("Zentral.Domain.Entities.EventoDettaglioOspiti", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("CostoUnitario")
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("CreatedBy")
.HasColumnType("TEXT");
b.Property("CustomFieldsJson")
.HasColumnType("TEXT");
b.Property("EventoId")
.HasColumnType("INTEGER");
b.Property("Note")
.HasColumnType("TEXT");
b.Property("Numero")
.HasColumnType("INTEGER");
b.Property("Ordine")
.HasColumnType("INTEGER");
b.Property("Sconto")
.HasColumnType("TEXT");
b.Property("TipoOspiteId")
.HasColumnType("INTEGER");
b.Property