From aa07f3d4f96a38efcdec12774f0fd5d7f33497c5 Mon Sep 17 00:00:00 2001 From: Francesco Spilla Date: Wed, 19 Mar 2025 11:02:30 +0100 Subject: [PATCH] feat(api): init oceano db entities --- .gitignore | 3 + .../oceano/entities/API_CAP_Luoghi.entity.ts | 20 + .../oceano/entities/API_Luoghi.entity.ts | 38 + .../entities/API_Luoghi_Estero.entity.ts | 14 + .../oceano/entities/allegati.entity.ts | 84 +++ .../oceano/entities/contratto.entity.ts | 492 +++++++++++++ .../oceano/entities/ente.entity.ts | 87 +++ .../oceano/entities/formeAssistenza.entity.ts | 155 +++++ .../oceano/entities/gruppo.entity.ts | 6 +- .../connections/oceano/entities/index.ts | 12 + .../oceano/entities/missioni.entity.ts | 53 ++ .../oceano/entities/socio.entity.ts | 651 ++++++++++++++++++ .../oceano/entities/socioContratto.entity.ts | 50 ++ .../entities/socioFormeAssistenza.entity.ts | 46 ++ .../oceano/entities/sportelli.entity.ts | 30 + 15 files changed, 1740 insertions(+), 1 deletion(-) create mode 100644 apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/API_CAP_Luoghi.entity.ts create mode 100644 apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/API_Luoghi.entity.ts create mode 100644 apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/API_Luoghi_Estero.entity.ts create mode 100644 apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/allegati.entity.ts create mode 100644 apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/contratto.entity.ts create mode 100644 apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/ente.entity.ts create mode 100644 apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/formeAssistenza.entity.ts create mode 100644 apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/missioni.entity.ts create mode 100644 apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/socio.entity.ts create mode 100644 apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/socioContratto.entity.ts create mode 100644 apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/socioFormeAssistenza.entity.ts create mode 100644 apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/sportelli.entity.ts diff --git a/.gitignore b/.gitignore index d75a511..59c7617 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,6 @@ Thumbs.db .nx/cache .nx/workspace-data + +# typeorm +typeorm-model-generator-output/ diff --git a/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/API_CAP_Luoghi.entity.ts b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/API_CAP_Luoghi.entity.ts new file mode 100644 index 0000000..2b8ee4a --- /dev/null +++ b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/API_CAP_Luoghi.entity.ts @@ -0,0 +1,20 @@ +import { Column, Entity, Index, JoinColumn, ManyToOne } from 'typeorm'; +import { ApiLuoghiEntity } from './API_Luoghi.entity'; + +@Index('nk_API_CAP_Luoghi', ['codice', 'cap'], { unique: true }) +@Entity('API_CAP_Luoghi') +export class ApiCapLuoghiEntity { + @Column('varchar', { primary: true, name: 'codice', length: 5 }) + codice!: string; + + @Column('varchar', { primary: true, name: 'cap', length: 5 }) + cap!: string; + + @ManyToOne(() => ApiLuoghiEntity) + @JoinColumn([{ name: 'codice', referencedColumnName: 'codice' }]) + luogo!: ApiLuoghiEntity; + + constructor(init?: Partial) { + Object.assign(this, init); + } +} diff --git a/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/API_Luoghi.entity.ts b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/API_Luoghi.entity.ts new file mode 100644 index 0000000..d79e29e --- /dev/null +++ b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/API_Luoghi.entity.ts @@ -0,0 +1,38 @@ +import { Column, Entity, Index, OneToMany } from 'typeorm'; +import { ApiCapLuoghiEntity } from './API_CAP_Luoghi.entity'; +import { SocioEntity } from './socio.entity'; + +@Index('PK_API_Luoghi', ['codice'], { unique: true }) +@Entity('API_Luoghi') +export class ApiLuoghiEntity { + @Column('varchar', { primary: true, name: 'codice', length: 5 }) + codice!: string; + + @Column('nvarchar', { name: 'comune', nullable: true, length: 255 }) + comune!: string | null; + + @Column('nvarchar', { name: 'sigla_provincia', nullable: true, length: 5 }) + siglaProvincia!: string | null; + + @Column('nvarchar', { name: 'provincia', nullable: true, length: 255 }) + provincia!: string | null; + + @Column('nvarchar', { name: 'codice_regione', nullable: true, length: 5 }) + codiceRegione!: string | null; + + @Column('nvarchar', { name: 'regione', nullable: true, length: 255 }) + regione!: string | null; + + @Column('nvarchar', { name: 'codice_stato', nullable: true, length: 5 }) + codiceStato!: string | null; + + @Column('nvarchar', { name: 'stato', nullable: true, length: 255 }) + stato!: string | null; + + @Column('int', { name: 'flag_attivo', nullable: true }) + flagAttivo!: number | null; + + constructor(init?: Partial) { + Object.assign(this, init); + } +} diff --git a/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/API_Luoghi_Estero.entity.ts b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/API_Luoghi_Estero.entity.ts new file mode 100644 index 0000000..f366b8c --- /dev/null +++ b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/API_Luoghi_Estero.entity.ts @@ -0,0 +1,14 @@ +import { Column, Entity } from 'typeorm'; + +@Entity('API_Luoghi_Estero') +export class ApiLuoghiEsteroEntity { + @Column('varchar', { name: 'codice', length: 5 }) + codice!: string; + + @Column('nvarchar', { name: 'codice_stato', length: 5 }) + codiceStato!: string; + + constructor(init?: Partial) { + Object.assign(this, init); + } +} diff --git a/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/allegati.entity.ts b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/allegati.entity.ts new file mode 100644 index 0000000..10d30b3 --- /dev/null +++ b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/allegati.entity.ts @@ -0,0 +1,84 @@ +import { Column, Entity, Index, JoinColumn, ManyToOne } from 'typeorm'; + +@Index('PK_allegati', ['codiceAllegato'], { unique: true }) +@Entity('allegati') +export class AllegatiEntity { + @Column('bigint', { primary: true, name: 'codiceAllegato' }) + codiceAllegato!: string; + + @Column('int', { name: 'tipoOrigine', nullable: true }) + tipoOrigine!: number | null; + + @Column('bigint', { name: 'codiceOrigine', nullable: true }) + codiceOrigine!: string | null; + + @Column('nvarchar', { + name: 'descrizioneAllegato', + nullable: true, + length: 255, + }) + descrizioneAllegato!: string | null; + + @Column('nvarchar', { name: 'dataAllegato', nullable: true, length: 10 }) + dataAllegato!: string | null; + + @Column('nvarchar', { + name: 'cartellaAllegato', + nullable: true, + length: 2048, + }) + cartellaAllegato!: string | null; + + @Column('nvarchar', { name: 'nomeFileAllegato', nullable: true, length: 255 }) + nomeFileAllegato!: string | null; + + @Column('ntext', { name: 'noteAllegato', nullable: true }) + noteAllegato!: string | null; + + @Column('bigint', { name: 'utenteCreazione', nullable: true }) + utenteCreazione!: string | null; + + @Column('nvarchar', { name: 'dataCreazione', nullable: true, length: 10 }) + dataCreazione!: string | null; + + @Column('nvarchar', { name: 'oraCreazione', nullable: true, length: 8 }) + oraCreazione!: string | null; + + @Column('bigint', { name: 'utenteModifica', nullable: true }) + utenteModifica!: string | null; + + @Column('nvarchar', { name: 'dataModifica', nullable: true, length: 10 }) + dataModifica!: string | null; + + @Column('nvarchar', { name: 'oraModifica', nullable: true, length: 8 }) + oraModifica!: string | null; + + @Column('int', { name: 'pubblicatoWEB', nullable: true }) + pubblicatoWeb!: number | null; + + @Column('int', { + name: 'trasferitoWEB', + nullable: true, + default: () => '(0)', + }) + trasferitoWeb!: number | null; + + @Column('nvarchar', { + name: 'dataPubblicazione', + nullable: true, + length: 10, + default: () => "''", + }) + dataPubblicazione!: string | null; + + @Column('bigint', { + name: 'codiceProtocolloGenerico', + nullable: true, + default: () => '(0)', + }) + codiceProtocolloGenerico!: string | null; + + constructor(init?: Partial) { + Object.assign(this, init); + } +} diff --git a/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/contratto.entity.ts b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/contratto.entity.ts new file mode 100644 index 0000000..d813d76 --- /dev/null +++ b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/contratto.entity.ts @@ -0,0 +1,492 @@ +import { Column, Entity, Index, JoinColumn, ManyToOne, OneToMany } from 'typeorm'; +import { EnteEntity } from './ente.entity'; +import { SocioContrattoEntity } from './socioContratto.entity'; + +@Index('PK_contratto', ['codiceContratto'], { unique: true }) +@Entity('contratto') +export class ContrattoEntity { + @Column('bigint', { primary: true, name: 'codiceContratto' }) + codiceContratto!: string; + + @Column('bigint', { name: 'codiceEnte', nullable: true }) + codiceEnte!: string | null; + + @Column('nvarchar', { name: 'contratto', nullable: true, length: 255 }) + contratto!: string | null; + + @Column('nvarchar', { name: 'dataContratto', nullable: true, length: 10 }) + dataContratto!: string | null; + + @Column('int', { name: 'rinnovoAutomatico', nullable: true }) + rinnovoAutomatico!: number | null; + + @Column('nvarchar', { + name: 'dataDecorrenzaContratto', + nullable: true, + length: 10, + }) + dataDecorrenzaContratto!: string | null; + + @Column('nvarchar', { + name: 'codiceEconomicoEsolver', + nullable: true, + length: 30, + }) + codiceEconomicoEsolver!: string | null; + + @Column('nvarchar', { + name: 'codicePatrimonialeEsolver', + nullable: true, + length: 30, + }) + codicePatrimonialeEsolver!: string | null; + + @Column('int', { name: 'iscrizioneFamiliariObbligatoria', nullable: true }) + iscrizioneFamiliariObbligatoria!: number | null; + + @Column('int', { + name: 'inizioDecorrenzaNuoveAdesioniAderenti', + nullable: true, + }) + inizioDecorrenzaNuoveAdesioniAderenti!: number | null; + + @Column('int', { + name: 'inizioDecorrenzaNuoveAdesioniFamiliari', + nullable: true, + }) + inizioDecorrenzaNuoveAdesioniFamiliari!: number | null; + + @Column('int', { name: 'cessazioneInfraAnnuale', nullable: true }) + cessazioneInfraAnnuale!: number | null; + + @Column('int', { name: 'numeroGiorniRimborso', nullable: true }) + numeroGiorniRimborso!: number | null; + + @Column('int', { name: 'rimborsoPersona', nullable: true }) + rimborsoPersona!: number | null; + + @Column('int', { name: 'rimborsoFax', nullable: true }) + rimborsoFax!: number | null; + + @Column('int', { name: 'rimborsoEmail', nullable: true }) + rimborsoEmail!: number | null; + + @Column('int', { name: 'rimborsoPosta', nullable: true }) + rimborsoPosta!: number | null; + + @Column('int', { name: 'rimborsoWeb', nullable: true }) + rimborsoWeb!: number | null; + + @Column('bigint', { name: 'utentecreazione', nullable: true }) + utentecreazione!: string | null; + + @Column('nvarchar', { name: 'dataCreazione', nullable: true, length: 10 }) + dataCreazione!: string | null; + + @Column('nvarchar', { name: 'oraCreazione', nullable: true, length: 8 }) + oraCreazione!: string | null; + + @Column('bigint', { name: 'utenteModifica', nullable: true }) + utenteModifica!: string | null; + + @Column('nvarchar', { name: 'dataModifica', nullable: true, length: 10 }) + dataModifica!: string | null; + + @Column('nvarchar', { name: 'oraModifica', nullable: true, length: 8 }) + oraModifica!: string | null; + + @Column('ntext', { name: 'noteContratto', nullable: true }) + noteContratto!: string | null; + + @Column('int', { name: 'versamentiTerzi', nullable: true }) + versamentiTerzi!: number | null; + + @Column('int', { name: 'ignoraControlloPagamenti', nullable: true }) + ignoraControlloPagamenti!: number | null; + + @Column('int', { name: 'anniRinnovo', nullable: true }) + anniRinnovo!: number | null; + + @Column('bigint', { name: 'codiceRivenditore', nullable: true }) + codiceRivenditore!: string | null; + + @Column('int', { + name: 'inizioDecorrenzaNuoveAdesioniNascita', + nullable: true, + }) + inizioDecorrenzaNuoveAdesioniNascita!: number | null; + + @Column('int', { name: 'numeroGiorniNascita', nullable: true }) + numeroGiorniNascita!: number | null; + + @Column('int', { name: 'mesiEsclusionePatologieAderenti', nullable: true }) + mesiEsclusionePatologieAderenti!: number | null; + + @Column('int', { name: 'mesiEsclusionePatologieFamiliari', nullable: true }) + mesiEsclusionePatologieFamiliari!: number | null; + + @Column('int', { name: 'coperturaPreesistenzeAderenti', nullable: true }) + coperturaPreesistenzeAderenti!: number | null; + + @Column('int', { name: 'coperturaPreesistenzeFamiliari', nullable: true }) + coperturaPreesistenzeFamiliari!: number | null; + + @Column('int', { name: 'adesioniFdaIndividuali', nullable: true }) + adesioniFdaIndividuali!: number | null; + + @Column('nvarchar', { + name: 'dataAssunzioneAderenti', + nullable: true, + length: 10, + }) + dataAssunzioneAderenti!: string | null; + + @Column('int', { name: 'associazioniIndividuali', nullable: true }) + associazioniIndividuali!: number | null; + + @Column('bigint', { name: 'categoria', nullable: true }) + categoria!: string | null; + + @Column('nvarchar', { name: 'email', nullable: true, length: 80 }) + email!: string | null; + + @Column('nvarchar', { name: 'fax', nullable: true, length: 80 }) + fax!: string | null; + + @Column('nvarchar', { name: 'telefono', nullable: true, length: 80 }) + telefono!: string | null; + + @Column('nvarchar', { name: 'sitoWeb', nullable: true, length: 80 }) + sitoWeb!: string | null; + + @Column('nvarchar', { name: 'riferimento', nullable: true, length: 80 }) + riferimento!: string | null; + + @Column('int', { name: 'comunicazioniFax', nullable: true }) + comunicazioniFax!: number | null; + + @Column('int', { name: 'comunicazioniEmail', nullable: true }) + comunicazioniEmail!: number | null; + + @Column('int', { name: 'comunicazioniSito', nullable: true }) + comunicazioniSito!: number | null; + + @Column('int', { name: 'comunicazioniPosta', nullable: true }) + comunicazioniPosta!: number | null; + + @Column('int', { name: 'gestionePreventiviWEB', nullable: true }) + gestionePreventiviWeb!: number | null; + + @Column('nvarchar', { + name: 'codiceDocumentoWEB', + nullable: true, + length: 80, + }) + codiceDocumentoWeb!: string | null; + + @Column('int', { name: 'numeroGiorniEffettuareRimborsi', nullable: true }) + numeroGiorniEffettuareRimborsi!: number | null; + + @Column('int', { name: 'numeroGiorniIntegrazioneDocumenti', nullable: true }) + numeroGiorniIntegrazioneDocumenti!: number | null; + + @Column('int', { name: 'gestioneIndividuali', nullable: true }) + gestioneIndividuali!: number | null; + + @Column('int', { name: 'fondoPluriaziendale', nullable: true }) + fondoPluriaziendale!: number | null; + + @Column('nvarchar', { name: 'emailCertificata', nullable: true, length: 80 }) + emailCertificata!: string | null; + + @Column('int', { name: 'comunicazioniEmailCertificata', nullable: true }) + comunicazioniEmailCertificata!: number | null; + + @Column('nvarchar', { + name: 'dataAssunzioneFamiliari', + nullable: true, + length: 10, + }) + dataAssunzioneFamiliari!: string | null; + + @Column('int', { + name: 'coperturaPreesistenzeAderentiNuoveAssunzioni', + nullable: true, + }) + coperturaPreesistenzeAderentiNuoveAssunzioni!: number | null; + + @Column('int', { + name: 'coperturaPreesistenzeFamiliariNuoveAssunzioni', + nullable: true, + }) + coperturaPreesistenzeFamiliariNuoveAssunzioni!: number | null; + + @Column('int', { name: 'noCessazioneAutomaticaFineAnno', nullable: true }) + noCessazioneAutomaticaFineAnno!: number | null; + + @Column('int', { name: 'contrattoRateSemestrali', nullable: true }) + contrattoRateSemestrali!: number | null; + + @Column('decimal', { + name: 'moraRitardoPagamenti', + nullable: true, + precision: 18, + scale: 2, + }) + moraRitardoPagamenti!: number | null; + + @Column('decimal', { + name: 'quotaRichiestaFondo', + nullable: true, + precision: 18, + scale: 2, + }) + quotaRichiestaFondo!: number | null; + + @Column('int', { name: 'percQuotaRichiestaFondo', nullable: true }) + percQuotaRichiestaFondo!: number | null; + + @Column('int', { name: 'scontoIndividuali', nullable: true }) + scontoIndividuali!: number | null; + + @Column('int', { + name: 'modalitaCalcoloDatiContributiviIndividuali', + nullable: true, + }) + modalitaCalcoloDatiContributiviIndividuali!: number | null; + + @Column('bigint', { name: 'codiceFiguraContratto', nullable: true }) + codiceFiguraContratto!: string | null; + + @Column('nvarchar', { + name: 'nomeModelloTesserini', + nullable: true, + length: 255, + }) + nomeModelloTesserini!: string | null; + + @Column('nvarchar', { + name: 'nomeModelloLettera', + nullable: true, + length: 255, + }) + nomeModelloLettera!: string | null; + + @Column('int', { name: 'ignoraControlloPagamentiTitolare', nullable: true }) + ignoraControlloPagamentiTitolare!: number | null; + + @Column('int', { name: 'ignoraControlloPagamentiAzienda', nullable: true }) + ignoraControlloPagamentiAzienda!: number | null; + + @Column('bigint', { name: 'codicePromoter', nullable: true }) + codicePromoter!: string | null; + + @Column('bigint', { name: 'codiceOriginePromoter', nullable: true }) + codiceOriginePromoter!: string | null; + + @Column('int', { name: 'fornituraTesserino', nullable: true }) + fornituraTesserino!: number | null; + + @Column('nvarchar', { + name: 'dataChiusuraContratto', + nullable: true, + length: 10, + }) + dataChiusuraContratto!: string | null; + + @Column('nvarchar', { + name: 'nomeModelloLetteraRID', + nullable: true, + length: 255, + }) + nomeModelloLetteraRid!: string | null; + + @Column('nvarchar', { + name: 'nomeModelloLetteraAdesione', + nullable: true, + length: 255, + }) + nomeModelloLetteraAdesione!: string | null; + + @Column('nvarchar', { + name: 'nomeModelloLetteraAdeguamenti', + nullable: true, + length: 255, + }) + nomeModelloLetteraAdeguamenti!: string | null; + + @Column('int', { name: 'coopersalute', nullable: true }) + coopersalute!: number | null; + + @Column('int', { name: 'forzaEstensioneTolleranza', nullable: true }) + forzaEstensioneTolleranza!: number | null; + + @Column('int', { name: 'giorniEstensioneTolleranza', nullable: true }) + giorniEstensioneTolleranza!: number | null; + + @Column('nvarchar', { + name: 'nomeModelloLetteraSollecito', + nullable: true, + length: 255, + }) + nomeModelloLetteraSollecito!: string | null; + + @Column('nvarchar', { + name: 'nomeModelloLetteraSollecito2', + nullable: true, + length: 255, + }) + nomeModelloLetteraSollecito2!: string | null; + + @Column('nvarchar', { + name: 'nomeModelloLetteraNeonato', + nullable: true, + length: 255, + }) + nomeModelloLetteraNeonato!: string | null; + + @Column('int', { name: 'comunicazioniViaEmail', nullable: true }) + comunicazioniViaEmail!: number | null; + + @Column('int', { + name: 'modalitaCalcoloQuotaAssociativaFondo', + default: () => '(0)', + }) + modalitaCalcoloQuotaAssociativaFondo!: number; + + @Column('int', { + name: 'modalitaCalcoloQuotaAssociativaNumeroFondo', + default: () => '(0)', + }) + modalitaCalcoloQuotaAssociativaNumeroFondo!: number; + + @Column('int', { name: 'quotaAssociativaFondo', default: () => '(0)' }) + quotaAssociativaFondo!: number; + + @Column('int', { name: 'tipoAnamnesi', default: () => '(1)' }) + tipoAnamnesi!: number; + + @Column('int', { name: 'primoCheck', default: () => '(1)' }) + primoCheck!: number; + + @Column('int', { name: 'secondoCheck', default: () => '(1)' }) + secondoCheck!: number; + + @Column('ntext', { name: 'testoPrimoCheck', default: () => "''" }) + testoPrimoCheck!: string; + + @Column('ntext', { name: 'testoSecondoCheck', default: () => "''" }) + testoSecondoCheck!: string; + + @Column('int', { name: 'calcolaQuotaWEB', default: () => '(1)' }) + calcolaQuotaWeb!: number; + + @Column('int', { name: 'verificaEsistenzaOnline', default: () => '(1)' }) + verificaEsistenzaOnline!: number; + + @Column('int', { name: 'titolareGiaAssociato', default: () => '(1)' }) + titolareGiaAssociato!: number; + + @Column('ntext', { + name: 'intestazionePrimaPaginaAdesione', + default: () => "''", + }) + intestazionePrimaPaginaAdesione!: string; + + @Column('ntext', { + name: 'intestazioneUltimaPaginaAdesione', + default: () => "''", + }) + intestazioneUltimaPaginaAdesione!: string; + + @Column('int', { name: 'importaComeAssociati', default: () => '(1)' }) + importaComeAssociati!: number; + + @Column('int', { name: 'importazioneAutomatica', default: () => '(1)' }) + importazioneAutomatica!: number; + + @Column('int', { name: 'stampaModuloAdesione', default: () => '(1)' }) + stampaModuloAdesione!: number; + + @Column('int', { name: 'terzoCheck', default: () => '(1)' }) + terzoCheck!: number; + + @Column('ntext', { name: 'testoTerzoCheck', default: () => "''" }) + testoTerzoCheck!: string; + + @Column('ntext', { name: 'testoEmailPreventivo', default: () => "''" }) + testoEmailPreventivo!: string; + + @Column('ntext', { name: 'testoEmailAdesione', default: () => "''" }) + testoEmailAdesione!: string; + + @Column('ntext', { name: 'oggettoEmailPreventivo', default: () => "''" }) + oggettoEmailPreventivo!: string; + + @Column('ntext', { name: 'oggettoEmailAdesione', default: () => "''" }) + oggettoEmailAdesione!: string; + + @Column('nvarchar', { + name: 'nomeModelloLetteraStampaAdesione', + length: 255, + default: () => "''", + }) + nomeModelloLetteraStampaAdesione!: string; + + @Column('ntext', { + name: 'oggettoSecondaNotificaScadenzaPreventivo', + default: () => "''", + }) + oggettoSecondaNotificaScadenzaPreventivo!: string; + + @Column('ntext', { + name: 'oggettoPrimaNotificaScadenzaPreventivo', + default: () => "''", + }) + oggettoPrimaNotificaScadenzaPreventivo!: string; + + @Column('ntext', { + name: 'testoSecondaNotificaScadenzaPreventivo', + default: () => "''", + }) + testoSecondaNotificaScadenzaPreventivo!: string; + + @Column('ntext', { + name: 'testoPrimaNotificaScadenzaPreventivo', + default: () => "''", + }) + testoPrimaNotificaScadenzaPreventivo!: string; + + @Column('bigint', { name: 'codiceBancaContributi', default: () => '(0)' }) + codiceBancaContributi!: string; + + @Column('bigint', { name: 'codiceBancaRimborsi', default: () => '(0)' }) + codiceBancaRimborsi!: string; + + @Column('ntext', { + name: 'testataCertificazione', + nullable: true, + default: () => "''", + }) + testataCertificazione!: string | null; + + @Column('ntext', { name: 'codaCertificazione', default: () => "''" }) + codaCertificazione!: string; + + @Column('ntext', { name: 'testataRiepilogoRimborsi', default: () => "''" }) + testataRiepilogoRimborsi!: string; + + @Column('int', { name: 'adesioneInfraAnnuale', default: () => '(0)' }) + adesioneInfraAnnuale!: number; + + @ManyToOne(() => EnteEntity, (enteEntity) => enteEntity.contratti) + @JoinColumn([{ name: 'codiceEnte', referencedColumnName: 'codiceEnte' }]) + ente!: EnteEntity; + + @OneToMany(() => SocioContrattoEntity, (socioContrattoEntity) => socioContrattoEntity.contratto) + socioContratto!: SocioContrattoEntity[]; + + constructor(init?: Partial) { + Object.assign(this, init); + } +} diff --git a/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/ente.entity.ts b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/ente.entity.ts new file mode 100644 index 0000000..611f8cf --- /dev/null +++ b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/ente.entity.ts @@ -0,0 +1,87 @@ +import { Column, Entity, Index, JoinColumn, ManyToOne, OneToMany } from 'typeorm'; +import { ContrattoEntity } from './contratto.entity'; +import { GruppoEntity } from './gruppo.entity'; + +@Index('PK_ent', ['codiceEnte'], { unique: true }) +@Entity('ente') +export class EnteEntity { + @Column('bigint', { primary: true, name: 'codiceEnte' }) + codiceEnte!: string; + + @Column('nvarchar', { name: 'ragioneSociale', nullable: true, length: 255 }) + ragioneSociale!: string | null; + + @Column('nvarchar', { name: 'partitaIva', nullable: true, length: 25 }) + partitaIva!: string | null; + + @Column('nvarchar', { name: 'codiceFiscale', nullable: true, length: 25 }) + codiceFiscale!: string | null; + + @Column('ntext', { name: 'noteEnte', nullable: true }) + noteEnte!: string | null; + + @Column('nvarchar', { + name: 'codiceDivisioneEsolver', + nullable: true, + length: 25, + }) + codiceDivisioneEsolver!: string | null; + + @Column('int', { name: 'enteAttivo', nullable: true }) + enteAttivo!: number | null; + + @Column('nvarchar', { name: 'indirizzoEnte', nullable: true, length: 80 }) + indirizzoEnte!: string | null; + + @Column('nvarchar', { name: 'numeroCivicoEnte', nullable: true, length: 80 }) + numeroCivicoEnte!: string | null; + + @Column('nvarchar', { name: 'capEnte', nullable: true, length: 10 }) + capEnte!: string | null; + + @Column('nvarchar', { name: 'localitaEnte', nullable: true, length: 80 }) + localitaEnte!: string | null; + + @Column('bigint', { name: 'utenteCreazione', nullable: true }) + utenteCreazione!: string | null; + + @Column('nvarchar', { name: 'dataCreazione', nullable: true, length: 10 }) + dataCreazione!: string | null; + + @Column('nvarchar', { name: 'oraCreazione', nullable: true, length: 8 }) + oraCreazione!: string | null; + + @Column('bigint', { name: 'utenteModifica', nullable: true }) + utenteModifica!: string | null; + + @Column('nvarchar', { name: 'dataModifica', nullable: true, length: 10 }) + dataModifica!: string | null; + + @Column('nvarchar', { name: 'oraModifica', nullable: true, length: 8 }) + oraModifica!: string | null; + + @Column('bigint', { name: 'codiceGruppo', nullable: true }) + codiceGruppo!: string | null; + + @Column('bigint', { name: 'statoEnte', nullable: true }) + statoEnte!: string | null; + + @Column('bigint', { name: 'provinciaEnte', nullable: true }) + provinciaEnte!: string | null; + + @Column('int', { name: 'inOsservazione', nullable: true }) + inOsservazione!: number | null; + + @Column('nvarchar', { name: 'sitoInternet', nullable: true, length: 255 }) + sitoInternet!: string | null; + + @ManyToOne(() => GruppoEntity, (gruppoEntity) => gruppoEntity.enti) + gruppo!: ContrattoEntity; + + @OneToMany(() => ContrattoEntity, (contrattoEntity) => contrattoEntity.ente) + contratti!: ContrattoEntity[]; + + constructor(init?: Partial) { + Object.assign(this, init); + } +} diff --git a/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/formeAssistenza.entity.ts b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/formeAssistenza.entity.ts new file mode 100644 index 0000000..ab8e5f2 --- /dev/null +++ b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/formeAssistenza.entity.ts @@ -0,0 +1,155 @@ +import { Column, Entity, Index, JoinColumn, ManyToOne, OneToMany } from 'typeorm'; +import { SocioFormeAssistenzaEntity } from './socioFormeAssistenza.entity'; + +@Index('PK_formeAssistenza', ['codiceFda'], { unique: true }) +@Entity('formeAssistenza') +export class FormeAssistenzaEntity { + @Column('bigint', { name: 'codiceGruppo' }) + codiceGruppo!: string; + + @Column('bigint', { primary: true, name: 'codiceFda' }) + codiceFda!: string; + + @Column('nvarchar', { name: 'descrizioneFda', nullable: true, length: 80 }) + descrizioneFda!: string | null; + + @Column('int', { name: 'attivaFda', nullable: true }) + attivaFda!: number | null; + + @Column('int', { name: 'fornituraTesserino', nullable: true }) + fornituraTesserino!: number | null; + + @Column('ntext', { name: 'noteFda', nullable: true }) + noteFda!: string | null; + + @Column('bigint', { name: 'utenteCreazione', nullable: true }) + utenteCreazione!: string | null; + + @Column('nvarchar', { name: 'dataCreazione', nullable: true, length: 10 }) + dataCreazione!: string | null; + + @Column('nvarchar', { name: 'oraCreazione', nullable: true, length: 8 }) + oraCreazione!: string | null; + + @Column('bigint', { name: 'utenteModifica', nullable: true }) + utenteModifica!: string | null; + + @Column('nvarchar', { name: 'dataModifica', nullable: true, length: 10 }) + dataModifica!: string | null; + + @Column('nvarchar', { name: 'oraModifica', nullable: true, length: 8 }) + oraModifica!: string | null; + + @Column('int', { name: 'attivaDiretta', nullable: true }) + attivaDiretta!: number | null; + + @Column('int', { name: 'attivaIndiretta', nullable: true }) + attivaIndiretta!: number | null; + + @Column('int', { name: 'anniAdesione', nullable: true }) + anniAdesione!: number | null; + + @Column('int', { name: 'gestionePreventivo', nullable: true }) + gestionePreventivo!: number | null; + + @Column('int', { name: 'interoNucleoFamiliare', nullable: true }) + interoNucleoFamiliare!: number | null; + + @Column('int', { name: 'escludeDocRimborsi', nullable: true }) + escludeDocRimborsi!: number | null; + + @Column('int', { name: 'struttureDirettaIncluse', nullable: true }) + struttureDirettaIncluse!: number | null; + + @Column('int', { name: 'struttureIndirettaIncluse', nullable: true }) + struttureIndirettaIncluse!: number | null; + + @Column('int', { name: 'categorieDirettaIncluse', nullable: true }) + categorieDirettaIncluse!: number | null; + + @Column('int', { name: 'categorieIndirettaIncluse', nullable: true }) + categorieIndirettaIncluse!: number | null; + + @Column('nvarchar', { + name: 'descrizioneTesserino', + nullable: true, + length: 80, + }) + descrizioneTesserino!: string | null; + + @Column('bigint', { name: 'codiceFdaOrigine', nullable: true }) + codiceFdaOrigine!: string | null; + + @Column('nvarchar', { + name: 'dataInizioValidita', + nullable: true, + length: 10, + }) + dataInizioValidita!: string | null; + + @Column('nvarchar', { name: 'dataFineValidita', nullable: true, length: 10 }) + dataFineValidita!: string | null; + + @Column('int', { name: 'limiteMassimoAssistenza', nullable: true }) + limiteMassimoAssistenza!: number | null; + + @Column('int', { name: 'limiteMinimoAssistenza', nullable: true }) + limiteMinimoAssistenza!: number | null; + + @Column('int', { name: 'limiteEtaAderentiDa', nullable: true }) + limiteEtaAderentiDa!: number | null; + + @Column('int', { name: 'limiteEtaFamiliariDa', nullable: true }) + limiteEtaFamiliariDa!: number | null; + + @Column('int', { name: 'limiteEtaAderentiA', nullable: true }) + limiteEtaAderentiA!: number | null; + + @Column('int', { name: 'limiteEtaFamiliariA', nullable: true }) + limiteEtaFamiliariA!: number | null; + + @Column('nvarchar', { + name: 'descrizioneLettera', + nullable: true, + length: 80, + }) + descrizioneLettera!: string | null; + + @Column('int', { name: 'fdaOpzionale', nullable: true }) + fdaOpzionale!: number | null; + + @Column('int', { name: 'giorniCarenzaTesserino', nullable: true }) + giorniCarenzaTesserino!: number | null; + + @Column('ntext', { name: 'informazioni', nullable: true }) + informazioni!: string | null; + + @Column('nvarchar', { + name: 'denominazioneRegolamento', + nullable: true, + length: 1024, + default: () => "''", + }) + denominazioneRegolamento!: string | null; + + @Column('nvarchar', { + name: 'dataMassimaAdesione', + nullable: true, + length: 10, + default: () => "'9998-12-31'", + }) + dataMassimaAdesione!: string | null; + + @Column('int', { name: 'prioritaWeb', default: () => '(0)' }) + prioritaWeb!: number; + + @Column('int', { name: 'attivaDirettaAreaRiservata', default: () => '(0)' }) + attivaDirettaAreaRiservata!: number; + + @OneToMany(() => SocioFormeAssistenzaEntity, (socioFormeAssistenzaEntity) => socioFormeAssistenzaEntity.formaAssistenza) + socioFormeAssistenza!: SocioFormeAssistenzaEntity[]; + + constructor(init?: Partial) { + Object.assign(this, init); + } +} diff --git a/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/gruppo.entity.ts b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/gruppo.entity.ts index b36c385..13a6e81 100644 --- a/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/gruppo.entity.ts +++ b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/gruppo.entity.ts @@ -1,4 +1,5 @@ -import { Column, Entity, Index, JoinColumn, ManyToOne, OneToMany } from 'typeorm'; +import { Column, Entity, Index, OneToMany } from 'typeorm'; +import { EnteEntity } from './ente.entity'; @Index('PK_gruppo', ['codiceGruppo'], { unique: true }) @Entity('gruppo') export class GruppoEntity { @@ -647,6 +648,9 @@ export class GruppoEntity { }) flagAllegaModuloIbanEmailRichiestaDatiBancari!: number | null; + @OneToMany(() => EnteEntity, (enteEntity) => enteEntity.gruppo) + enti!: EnteEntity[]; + constructor(init?: Partial) { Object.assign(this, init); } diff --git a/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/index.ts b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/index.ts index d91d396..9cc8781 100644 --- a/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/index.ts +++ b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/index.ts @@ -1 +1,13 @@ +export * from './API_CAP_Luoghi.entity'; +export * from './API_Luoghi.entity'; +export * from './API_Luoghi_Estero.entity'; +export * from './allegati.entity'; +export * from './contratto.entity'; +export * from './ente.entity'; +export * from './formeAssistenza.entity'; export * from './gruppo.entity'; +export * from './missioni.entity'; +export * from './socio.entity'; +export * from './socioContratto.entity'; +export * from './socioFormeAssistenza.entity'; +export * from './sportelli.entity'; diff --git a/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/missioni.entity.ts b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/missioni.entity.ts new file mode 100644 index 0000000..3388d2b --- /dev/null +++ b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/missioni.entity.ts @@ -0,0 +1,53 @@ +import { Column, Entity, Index } from 'typeorm'; + +@Index( + 'PK_Missioni_Data', + [ + 'codiceFiscale', + 'tipoDocumento', + 'idMissione', + 'idLettera', + 'idPratica', + 'idAgenzia', + 'dataInizio', + 'dataFine', + 'tipoContratto', + ], + { unique: true } +) +@Entity('missioni') +export class MissioniEntity { + @Column('nvarchar', { primary: true, name: 'codiceFiscale', length: 20 }) + codiceFiscale!: string; + + @Column('bigint', { primary: true, name: 'tipoDocumento' }) + tipoDocumento!: string; + + @Column('bigint', { primary: true, name: 'idMissione' }) + idMissione!: string; + + @Column('bigint', { primary: true, name: 'idLettera' }) + idLettera!: string; + + @Column('bigint', { primary: true, name: 'idPratica' }) + idPratica!: string; + + @Column('bigint', { primary: true, name: 'idAgenzia' }) + idAgenzia!: string; + + @Column('nvarchar', { primary: true, name: 'dataInizio', length: 10 }) + dataInizio!: string; + + @Column('nvarchar', { primary: true, name: 'dataFine', length: 10 }) + dataFine!: string; + + @Column('nvarchar', { primary: true, name: 'tipoContratto', length: 20 }) + tipoContratto!: string; + + @Column('bigint', { name: 'progressivoRecord', default: () => '(0)' }) + progressivoRecord!: string; + + constructor(init?: Partial) { + Object.assign(this, init); + } +} diff --git a/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/socio.entity.ts b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/socio.entity.ts new file mode 100644 index 0000000..aed0c29 --- /dev/null +++ b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/socio.entity.ts @@ -0,0 +1,651 @@ +import { Column, Entity, Index, JoinColumn, ManyToOne, OneToMany } from 'typeorm'; +import { ApiLuoghiEntity } from './API_Luoghi.entity'; +import { GruppoEntity } from './gruppo.entity'; +import { SocioContrattoEntity } from './socioContratto.entity'; +import { SocioFormeAssistenzaEntity } from './socioFormeAssistenza.entity'; + +@Index('PK_socio', ['codiceSocio'], { unique: true }) +@Entity('socio') +export class SocioEntity { + @Column('bigint', { name: 'codiceGruppo', nullable: true }) + codiceGruppo!: string | null; + + @Column('bigint', { primary: true, name: 'codiceSocio' }) + codiceSocio!: string; + + @Column('bigint', { name: 'matricolaSocio', nullable: true }) + matricolaSocio!: string | null; + + @Column('nvarchar', { name: 'cognome', nullable: true, length: 80 }) + cognome!: string | null; + + @Column('nvarchar', { name: 'nome', nullable: true, length: 80 }) + nome!: string | null; + + @Column('nvarchar', { name: 'dataNascita', nullable: true, length: 10 }) + dataNascita!: string | null; + + @Column('nvarchar', { name: 'codiceFiscale', nullable: true, length: 20 }) + codiceFiscale!: string | null; + + @Column('bigint', { name: 'codiceContrattoOld', nullable: true }) + codiceContrattoOld!: string | null; + + @Column('bigint', { name: 'socio.codiceFiguraContrattoOld', nullable: true }) + socioCodiceFiguraContrattoOld!: string | null; + + @Column('bigint', { name: 'codiceRivenditore', nullable: true }) + codiceRivenditore!: string | null; + + @Column('bigint', { name: 'utenteCreazione', nullable: true }) + utenteCreazione!: string | null; + + @Column('nvarchar', { name: 'dataCreazione', nullable: true, length: 10 }) + dataCreazione!: string | null; + + @Column('nvarchar', { name: 'oraCreazione', nullable: true, length: 8 }) + oraCreazione!: string | null; + + @Column('bigint', { name: 'utenteModifica', nullable: true }) + utenteModifica!: string | null; + + @Column('nvarchar', { name: 'dataModifica', nullable: true, length: 10 }) + dataModifica!: string | null; + + @Column('nvarchar', { name: 'oraModifica', nullable: true, length: 8 }) + oraModifica!: string | null; + + @Column('nvarchar', { + name: 'residenzaIndirizzo', + nullable: true, + length: 80, + }) + residenzaIndirizzo!: string | null; + + @Column('nvarchar', { + name: 'residenzaNumeroCivico', + nullable: true, + length: 80, + }) + residenzaNumeroCivico!: string | null; + + @Column('nvarchar', { name: 'residenzaLocalita', nullable: true, length: 80 }) + residenzaLocalita!: string | null; + + @Column('nvarchar', { name: 'residenzaCAP', nullable: true, length: 10 }) + residenzaCap!: string | null; + + @Column('bigint', { name: 'residenzaProvincia', nullable: true }) + residenzaProvincia!: string | null; + + @Column('bigint', { name: 'residenzaStato', nullable: true }) + residenzaStato!: string | null; + + @Column('nvarchar', { + name: 'domicilioIndirizzo', + nullable: true, + length: 80, + }) + domicilioIndirizzo!: string | null; + + @Column('nvarchar', { + name: 'domicilioNumeroCivico', + nullable: true, + length: 80, + }) + domicilioNumeroCivico!: string | null; + + @Column('nvarchar', { name: 'domicilioLocalita', nullable: true, length: 80 }) + domicilioLocalita!: string | null; + + @Column('nvarchar', { name: 'domicilioCAP', nullable: true, length: 10 }) + domicilioCap!: string | null; + + @Column('bigint', { name: 'domicilioProvincia', nullable: true }) + domicilioProvincia!: string | null; + + @Column('bigint', { name: 'domicilioStato', nullable: true }) + domicilioStato!: string | null; + + @Column('nvarchar', { name: 'nascitaLocalita', nullable: true, length: 80 }) + nascitaLocalita!: string | null; + + @Column('nvarchar', { name: 'nascitaCAP', nullable: true, length: 10 }) + nascitaCap!: string | null; + + @Column('bigint', { name: 'nascitaProvincia', nullable: true }) + nascitaProvincia!: string | null; + + @Column('bigint', { name: 'nascitaStato', nullable: true }) + nascitaStato!: string | null; + + @Column('nvarchar', { name: 'telefono', nullable: true, length: 80 }) + telefono!: string | null; + + @Column('nvarchar', { name: 'cellulare', nullable: true, length: 80 }) + cellulare!: string | null; + + @Column('nvarchar', { name: 'email', nullable: true, length: 80 }) + email!: string | null; + + @Column('bigint', { name: 'codiceSesso', nullable: true }) + codiceSesso!: string | null; + + @Column('bigint', { name: 'codiceStatoCivile', nullable: true }) + codiceStatoCivile!: string | null; + + @Column('bigint', { name: 'codiceProfessione', nullable: true }) + codiceProfessione!: string | null; + + @Column('int', { name: 'consensoComunicazioneDati', nullable: true }) + consensoComunicazioneDati!: number | null; + + @Column('int', { name: 'consensoDiffusioneDati', nullable: true }) + consensoDiffusioneDati!: number | null; + + @Column('int', { name: 'riassicurato', nullable: true }) + riassicurato!: number | null; + + @Column('nvarchar', { name: 'fax', nullable: true, length: 80 }) + fax!: string | null; + + @Column('nvarchar', { name: 'dataIscrizione', nullable: true, length: 10 }) + dataIscrizione!: string | null; + + @Column('nvarchar', { + name: 'dataRichiestaRecesso', + nullable: true, + length: 10, + }) + dataRichiestaRecesso!: string | null; + + @Column('nvarchar', { name: 'dataRecesso', nullable: true, length: 10 }) + dataRecesso!: string | null; + + @Column('int', { name: 'recessoAnnoSolareSuccessivo', nullable: true }) + recessoAnnoSolareSuccessivo!: number | null; + + @Column('int', { name: 'capofamiglia', nullable: true }) + flagCapofamiglia!: number | null; + + @Column('bigint', { name: 'livelloFamiliare', nullable: true }) + livelloFamiliare!: string | null; + + @Column('bigint', { name: 'codiceCapofamiglia', nullable: true }) + codiceCapofamiglia!: string | null; + + @Column('nvarchar', { name: 'codicePaese', nullable: true, length: 50 }) + codicePaese!: string | null; + + @Column('nvarchar', { name: 'codiceCIN', nullable: true, length: 50 }) + codiceCin!: string | null; + + @Column('nvarchar', { name: 'checkDigitCIN', nullable: true, length: 50 }) + checkDigitCin!: string | null; + + @Column('nvarchar', { name: 'rifBancaEstero', nullable: true, length: 50 }) + rifBancaEstero!: string | null; + + @Column('nvarchar', { name: 'contoCorrente', nullable: true, length: 50 }) + contoCorrente!: string | null; + + @Column('nvarchar', { name: 'codiceBIC', nullable: true, length: 50 }) + codiceBic!: string | null; + + @Column('nvarchar', { name: 'codiceIBAN', nullable: true, length: 50 }) + codiceIban!: string | null; + + @Column('nvarchar', { name: 'codiceABI', nullable: true, length: 50 }) + codiceAbi!: string | null; + + @Column('nvarchar', { name: 'codiceCAB', nullable: true, length: 10 }) + codiceCab!: string | null; + + @Column('nvarchar', { name: 'dataDecesso', nullable: true, length: 10 }) + dataDecesso!: string | null; + + @Column('int', { name: 'modalitaSuddivisioneContributi', nullable: true }) + modalitaSuddivisioneContributi!: number | null; + + @Column('nvarchar', { name: 'dataEsclusione', nullable: true, length: 10 }) + dataEsclusione!: string | null; + + @Column('bigint', { name: 'codiceMotivoEsclusione', nullable: true }) + codiceMotivoEsclusione!: string | null; + + @Column('ntext', { name: 'noteEsclusione', nullable: true }) + noteEsclusione!: string | null; + + @Column('nvarchar', { name: 'usernameWEB', nullable: true, length: 80 }) + usernameWeb!: string | null; + + @Column('nvarchar', { name: 'passwordWEB', nullable: true, length: 80 }) + passwordWeb!: string | null; + + @Column('int', { name: 'consensoNucleoFamiliare', nullable: true }) + consensoNucleoFamiliare!: number | null; + + @Column('int', { name: 'webAccessoDisabilitato', nullable: true }) + webAccessoDisabilitato!: number | null; + + @Column('int', { name: 'webModificaDati', nullable: true }) + webModificaDati!: number | null; + + @Column('int', { name: 'webInfo', nullable: true }) + webInfo!: number | null; + + @Column('int', { name: 'webStrutture', nullable: true }) + webStrutture!: number | null; + + @Column('int', { name: 'webPratiche', nullable: true }) + webPratiche!: number | null; + + @Column('int', { name: 'webCertificazione', nullable: true }) + webCertificazione!: number | null; + + @Column('int', { name: 'webRimborsiBase', nullable: true }) + webRimborsiBase!: number | null; + + @Column('int', { name: 'webRimborsiAvanzato', nullable: true }) + webRimborsiAvanzato!: number | null; + + @Column('int', { name: 'webRichiestaPresaCarico', nullable: true }) + webRichiestaPresaCarico!: number | null; + + @Column('int', { name: 'webServizioCup', nullable: true }) + webServizioCup!: number | null; + + @Column('int', { name: 'webEmailUsername', nullable: true }) + webEmailUsername!: number | null; + + @Column('bigint', { name: 'categoria1', nullable: true }) + categoria1!: string | null; + + @Column('bigint', { name: 'categoria2', nullable: true }) + categoria2!: string | null; + + @Column('bigint', { name: 'categoria3', nullable: true }) + categoria3!: string | null; + + @Column('bigint', { name: 'categoria4', nullable: true }) + categoria4!: string | null; + + @Column('bigint', { name: 'categoria5', nullable: true }) + categoria5!: string | null; + + @Column('int', { name: 'socioEsterno', nullable: true }) + socioEsterno!: number | null; + + @Column('bigint', { name: 'codiceMutua', nullable: true }) + codiceMutua!: string | null; + + @Column('nvarchar', { + name: 'dataInizioValidita', + nullable: true, + length: 10, + }) + dataInizioValidita!: string | null; + + @Column('nvarchar', { name: 'dataFineValidita', nullable: true, length: 10 }) + dataFineValidita!: string | null; + + @Column('bigint', { name: 'idAssiBase', nullable: true }) + idAssiBase!: string | null; + + @Column('nvarchar', { + name: 'protezioniAssiBase', + nullable: true, + length: 80, + }) + protezioniAssiBase!: string | null; + + @Column('nvarchar', { name: 'gruppoAssiBase', nullable: true, length: 80 }) + gruppoAssiBase!: string | null; + + @Column('ntext', { name: 'noteAnagrafica', nullable: true }) + noteAnagrafica!: string | null; + + @Column('bigint', { name: 'tipoSocio', nullable: true }) + tipoSocio!: string | null; + + @Column('int', { name: 'stampatoLibroSoci', default: () => '(0)' }) + stampatoLibroSoci!: number; + + @Column('nvarchar', { + name: 'dataStampaLibroSoci', + nullable: true, + length: 10, + }) + dataStampaLibroSoci!: string | null; + + @Column('int', { name: 'codiceModalitaPagamentoRimborsi', nullable: true }) + codiceModalitaPagamentoRimborsi!: number | null; + + @Column('int', { name: 'codiceModalitaVersamentoContributi', nullable: true }) + codiceModalitaVersamentoContributi!: number | null; + + @Column('nvarchar', { name: 'dataAssunzione', nullable: true, length: 10 }) + dataAssunzione!: string | null; + + @Column('bigint', { name: 'codiceMotivoRecesso', nullable: true }) + codiceMotivoRecesso!: string | null; + + @Column('int', { name: 'codiceCanaleComunicazione', nullable: true }) + codiceCanaleComunicazione!: number | null; + + @Column('nvarchar', { name: 'dataRegistrazione', nullable: true, length: 10 }) + dataRegistrazione!: string | null; + + @Column('ntext', { name: 'noteAnamnesi', nullable: true }) + noteAnamnesi!: string | null; + + @Column('bigint', { + name: 'codiceModalitacessazioneContributiInfrannuale', + nullable: true, + }) + codiceModalitacessazioneContributiInfrannuale!: string | null; + + @Column('int', { + name: 'forzaCodiceModalitacessazioneContributiInfrannuale', + nullable: true, + }) + forzaCodiceModalitacessazioneContributiInfrannuale!: number | null; + + @Column('nvarchar', { + name: 'matricolaAziendale', + nullable: true, + length: 80, + }) + matricolaAziendale!: string | null; + + @Column('int', { name: 'coniugeCarico', nullable: true }) + coniugeCarico!: number | null; + + @Column('ntext', { name: 'noteProtezioni', nullable: true }) + noteProtezioni!: string | null; + + @Column('bigint', { name: 'idNucleo', nullable: true }) + idNucleo!: string | null; + + @Column('bigint', { name: 'idSocio', nullable: true }) + idSocio!: string | null; + + @Column('bigint', { name: 'idLibroSoci', nullable: true }) + idLibroSoci!: string | null; + + @Column('bigint', { name: 'idPersona', nullable: true }) + idPersona!: string | null; + + @Column('bigint', { name: 'codicePromoter', nullable: true }) + codicePromoter!: string | null; + + @Column('bigint', { name: 'originePromoter', nullable: true }) + originePromoter!: string | null; + + @Column('bigint', { name: 'livelloFamiliareAnagrafica', nullable: true }) + livelloFamiliareAnagrafica!: string | null; + + @Column('bigint', { name: 'codiceCapoFamigliaAnagrafica', nullable: true }) + codiceCapoFamigliaAnagrafica!: string | null; + + @Column('int', { name: 'codiceModalitaVersamentoRID', nullable: true }) + codiceModalitaVersamentoRid!: number | null; + + @Column('nvarchar', { + name: 'dataPossibileAmmissione', + nullable: true, + length: 10, + }) + dataPossibileAmmissione!: string | null; + + @Column('nvarchar', { name: 'banca', nullable: true, length: 255 }) + banca!: string | null; + + @Column('nvarchar', { name: 'agenziaBanca', nullable: true, length: 255 }) + agenziaBanca!: string | null; + + @Column('nvarchar', { name: 'intestazioneCC', nullable: true, length: 255 }) + intestazioneCc!: string | null; + + @Column('nvarchar', { + name: 'dataRicezioneRichiestaRecesso', + nullable: true, + length: 10, + }) + dataRicezioneRichiestaRecesso!: string | null; + + @Column('nvarchar', { name: 'dataUscitaNucleo', nullable: true, length: 10 }) + dataUscitaNucleo!: string | null; + + @Column('int', { name: 'datiBancariDaAggiornare', nullable: true }) + datiBancariDaAggiornare!: number | null; + + @Column('nvarchar', { name: 'telefono2', nullable: true, length: 80 }) + telefono2!: string | null; + + @Column('nvarchar', { + name: 'dataModificaIban', + nullable: true, + length: 10, + default: () => "''", + }) + dataModificaIban!: string | null; + + @Column('int', { + name: 'richiestoIBAN', + nullable: true, + default: () => '(0)', + }) + richiestoIban!: number | null; + + @Column('nvarchar', { + name: 'dataRichiestaIBAN', + nullable: true, + length: 10, + default: () => "''", + }) + dataRichiestaIban!: string | null; + + @Column('int', { name: 'comunicazioniViaEmail', nullable: true }) + comunicazioniViaEmail!: number | null; + + @Column('int', { name: 'esitoUltimaValidazione', nullable: true }) + esitoUltimaValidazione!: number | null; + + @Column('nvarchar', { + name: 'dataOraUltimaValidazione', + nullable: true, + length: 50, + }) + dataOraUltimaValidazione!: string | null; + + @Column('ntext', { name: 'noteUltimaValidazione', nullable: true }) + noteUltimaValidazione!: string | null; + + @Column('int', { name: 'stampareLibroSoci', default: () => '(0)' }) + stampareLibroSoci!: number; + + @Column('nvarchar', { + name: 'dataStampaCessazioneLibroSoci', + nullable: true, + length: 10, + default: () => "'9998-12-31'", + }) + dataStampaCessazioneLibroSoci!: string | null; + + @Column('int', { + name: 'stampataCessazioneLibroSoci', + nullable: true, + default: () => '(0)', + }) + stampataCessazioneLibroSoci!: number | null; + + @Column('int', { name: 'adesioneWeb', default: () => '(0)' }) + adesioneWeb!: number; + + @Column('int', { name: 'preeesistenzaContratto', default: () => '(0)' }) + preeesistenzaContratto!: number; + + @Column('int', { name: 'preeesistenzaInclusa', default: () => '(0)' }) + preeesistenzaInclusa!: number; + + @Column('nvarchar', { name: 'IBANRid', length: 50, default: () => "''" }) + ibanRid!: string; + + @Column('nvarchar', { + name: 'intestatarioContoRid', + length: 255, + default: () => "''", + }) + intestatarioContoRid!: string; + + @Column('nvarchar', { + name: 'dataMandato', + length: 10, + default: () => "'9998-12-31'", + }) + dataMandato!: string; + + @Column('nvarchar', { name: 'idMandato', length: 10, default: () => "''" }) + idMandato!: string; + + @Column('nvarchar', { name: 'codiceSWIFT', length: 80, default: () => "''" }) + codiceSwift!: string; + + @Column('decimal', { + name: 'percentualeFamiliareACarico', + precision: 18, + scale: 2, + default: () => '(0)', + }) + percentualeFamiliareACarico!: number; + + @Column('int', { name: 'familiareMultiplo', default: () => '(0)' }) + familiareMultiplo!: number; + + @Column('nvarchar', { + name: 'origineAggiornamento', + length: 20, + default: () => "''", + }) + origineAggiornamento!: string; + + @Column('int', { name: 'consensoNewsletter', default: () => '(0)' }) + consensoNewsletter!: number; + + @Column('int', { + name: 'flagRichiestaVariazioneAnagrafica', + default: () => '(0)', + }) + flagRichiestaVariazioneAnagrafica!: number; + + @Column('int', { name: 'flagPresenzaMorositaPrestiti', default: () => '(0)' }) + flagPresenzaMorositaPrestiti!: number; + + @Column('int', { name: 'flagBloccoAmministrativo', default: () => '(0)' }) + flagBloccoAmministrativo!: number; + + @Column('int', { name: 'codiceTitoloStudio', default: () => '(0)' }) + codiceTitoloStudio!: number; + + @Column('varchar', { + name: 'codiceLuogoDomicilio', + nullable: true, + length: 5, + }) + codiceLuogoDomicilio!: string | null; + + @Column('varchar', { name: 'codiceLuogoNascita', nullable: true, length: 5 }) + codiceLuogoNascita!: string | null; + + @Column('varchar', { + name: 'codiceLuogoResidenza', + nullable: true, + length: 5, + }) + codiceLuogoResidenza!: string | null; + + @Column('nvarchar', { name: 'domicilioFrazione', nullable: true, length: 80 }) + domicilioFrazione!: string | null; + + @Column('nvarchar', { name: 'nascitaFrazione', nullable: true, length: 80 }) + nascitaFrazione!: string | null; + + @Column('nvarchar', { name: 'residenzaFrazione', nullable: true, length: 80 }) + residenzaFrazione!: string | null; + + @Column('varchar', { name: 'codicePartner', nullable: true, length: 255 }) + codicePartner!: string | null; + + @Column('varchar', { + name: 'documentoIdentitaCodice', + nullable: true, + length: 100, + }) + documentoIdentitaCodice!: string | null; + + @Column('varchar', { + name: 'documentoIdentitaDataEmissione', + nullable: true, + length: 10, + }) + documentoIdentitaDataEmissione!: string | null; + + @Column('varchar', { + name: 'documentoIdentitaDataScadenza', + nullable: true, + length: 10, + }) + documentoIdentitaDataScadenza!: string | null; + + @Column('varchar', { + name: 'documentoIdentitaEnteRilascio', + nullable: true, + length: 100, + }) + documentoIdentitaEnteRilascio!: string | null; + + @Column('varchar', { + name: 'documentoIdentitaComuneRilascio', + nullable: true, + length: 5, + }) + documentoIdentitaCodiceLuogoComuneRilascio!: string | null; + + @ManyToOne(() => SocioEntity, (socioEntity) => socioEntity.familiari) + @JoinColumn([{ name: 'codiceCapofamiglia', referencedColumnName: 'codiceSocio' }]) + capofamiglia!: SocioEntity; + + @OneToMany(() => SocioEntity, (socioEntity) => socioEntity.capofamiglia) + familiari!: SocioEntity[]; + + @ManyToOne(() => GruppoEntity) + @JoinColumn([{ name: 'codiceGruppo', referencedColumnName: 'codiceGruppo' }]) + gruppo!: GruppoEntity; + + @ManyToOne(() => ApiLuoghiEntity) + @JoinColumn([{ name: 'codiceLuogoNascita', referencedColumnName: 'codice' }]) + luogoNascita!: ApiLuoghiEntity; + + @ManyToOne(() => ApiLuoghiEntity) + @JoinColumn([{ name: 'codiceLuogoResidenza', referencedColumnName: 'codice' }]) + luogoResidenza!: ApiLuoghiEntity; + + @ManyToOne(() => ApiLuoghiEntity) + @JoinColumn([{ name: 'codiceLuogoDomicilio', referencedColumnName: 'codice' }]) + luogoDomicilio!: ApiLuoghiEntity; + + @ManyToOne(() => ApiLuoghiEntity) + @JoinColumn([{ name: 'documentoIdentitaComuneRilascio', referencedColumnName: 'codice' }]) + documentoIdentitaComuneRilascio!: ApiLuoghiEntity; + + @OneToMany(() => SocioContrattoEntity, (socioContrattoEntity) => socioContrattoEntity.socio) + socioContratto!: SocioContrattoEntity[]; + + @OneToMany(() => SocioFormeAssistenzaEntity, (socioFormeAssistenzaEntity) => socioFormeAssistenzaEntity.socio) + socioFormeAssistenzas!: SocioFormeAssistenzaEntity[]; + + constructor(init?: Partial) { + Object.assign(this, init); + } +} diff --git a/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/socioContratto.entity.ts b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/socioContratto.entity.ts new file mode 100644 index 0000000..9b0e872 --- /dev/null +++ b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/socioContratto.entity.ts @@ -0,0 +1,50 @@ +import { Column, Entity, Index, JoinColumn, ManyToOne } from 'typeorm'; +import { ContrattoEntity } from './contratto.entity'; +import { SocioEntity } from './socio.entity'; + +@Index( + 'PK_socioContratto', + ['codiceSocio', 'codiceCapofamiglia', 'codiceContratto', 'dataInizio', 'dataFine', 'codiceFiguraContratto'], + { unique: true } +) +@Entity('socioContratto') +export class SocioContrattoEntity { + @Column('bigint', { primary: true, name: 'codiceSocio' }) + codiceSocio!: string; + + @Column('bigint', { primary: true, name: 'codiceCapofamiglia' }) + codiceCapofamiglia!: string; + + @Column('nvarchar', { primary: true, name: 'dataInizio', length: 10 }) + dataInizio!: string; + + @Column('nvarchar', { primary: true, name: 'dataFine', length: 10 }) + dataFine!: string; + + @Column('bigint', { primary: true, name: 'codiceContratto' }) + codiceContratto!: string; + + @Column('nvarchar', { name: 'contratto', length: 400 }) + nomeContratto!: string; + + @Column('bigint', { primary: true, name: 'codiceFiguraContratto' }) + codiceFiguraContratto!: string; + + @Column('nvarchar', { name: 'figuraContratto', length: 400 }) + figuraContratto!: string; + + @Column('nvarchar', { name: 'note', length: 400 }) + note!: string; + + @ManyToOne(() => SocioEntity, (socioEntity) => socioEntity.socioContratto) + @JoinColumn([{ name: 'codiceSocio', referencedColumnName: 'codiceSocio' }]) + socio!: SocioEntity; + + @ManyToOne(() => ContrattoEntity, (contrattoEntity) => contrattoEntity.socioContratto) + @JoinColumn([{ name: 'codiceContratto', referencedColumnName: 'codiceContratto' }]) + contratto!: ContrattoEntity; + + constructor(init?: Partial) { + Object.assign(this, init); + } +} diff --git a/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/socioFormeAssistenza.entity.ts b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/socioFormeAssistenza.entity.ts new file mode 100644 index 0000000..77337ef --- /dev/null +++ b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/socioFormeAssistenza.entity.ts @@ -0,0 +1,46 @@ +import { Column, Entity, Index, JoinColumn, ManyToOne } from 'typeorm'; +import { FormeAssistenzaEntity } from './formeAssistenza.entity'; +import { SocioEntity } from './socio.entity'; + +@Index('PK_socioFormeAssistenza', ['codiceSocio', 'codiceFdA', 'dataInizio', 'dataFine', 'titolare'], { unique: true }) +@Entity('socioFormeAssistenza') +export class SocioFormeAssistenzaEntity { + @Column('bigint', { primary: true, name: 'codiceSocio' }) + codiceSocio!: string; + + @Column('bigint', { primary: true, name: 'codiceFdA' }) + codiceFdA!: string; + + @Column('nvarchar', { primary: true, name: 'dataInizio', length: 10 }) + dataInizio!: string; + + @Column('nvarchar', { primary: true, name: 'dataFine', length: 10 }) + dataFine!: string; + + @Column('int', { primary: true, name: 'titolare' }) + titolare!: number; + + @Column('bigint', { name: 'codiceContratto', nullable: true }) + codiceContratto!: string | null; + + @Column('bigint', { name: 'codiceFiguraContratto', nullable: true }) + codiceFiguraContratto!: string | null; + + @Column('int', { name: 'forzaEtaContributi', nullable: true }) + forzaEtaContributi!: number | null; + + @Column('nvarchar', { name: 'dataRicezione', nullable: true, length: 10 }) + dataRicezione!: string | null; + + @ManyToOne(() => FormeAssistenzaEntity, (formeAssistenzaEntity) => formeAssistenzaEntity.socioFormeAssistenza) + @JoinColumn([{ name: 'codiceFdA', referencedColumnName: 'codiceFda' }]) + formaAssistenza!: FormeAssistenzaEntity; + + @ManyToOne(() => SocioEntity, (socioEntity) => socioEntity.socioFormeAssistenzas) + @JoinColumn([{ name: 'codiceSocio', referencedColumnName: 'codiceSocio' }]) + socio!: SocioEntity; + + constructor(init?: Partial) { + Object.assign(this, init); + } +} diff --git a/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/sportelli.entity.ts b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/sportelli.entity.ts new file mode 100644 index 0000000..5798b76 --- /dev/null +++ b/apps/ebitemp-api/src/app/modules/database/connections/oceano/entities/sportelli.entity.ts @@ -0,0 +1,30 @@ +import { Column, Entity, Index } from 'typeorm'; + +@Index('PK_sportelli', ['codiceSportello'], { unique: true }) +@Entity('sportelli') +export class SportelliEntity { + @Column('nvarchar', { primary: true, name: 'codiceSportello', length: 255 }) + codiceSportello!: string; + + @Column('nvarchar', { name: 'denominazione', length: 255 }) + denominazione!: string; + + @Column('nvarchar', { name: 'email', length: 255 }) + email!: string; + + @Column('nvarchar', { name: 'password', length: 255 }) + password!: string; + + @Column('nvarchar', { name: 'indirizzo', length: 200, default: () => "''" }) + indirizzo!: string; + + @Column('nvarchar', { name: 'citta', length: 200, default: () => "''" }) + citta!: string; + + @Column('nvarchar', { name: 'provincia', length: 2, default: () => "''" }) + provincia!: string; + + constructor(init?: Partial) { + Object.assign(this, init); + } +}