From eb8a09839ab402fb1d2f4fb72094cf28d5a2914c Mon Sep 17 00:00:00 2001 From: Marine Heckler Date: Thu, 7 Nov 2024 16:18:37 +0100 Subject: [PATCH 01/21] =?UTF-8?q?Ajout=20de=20tags=20de=20suivi=20personna?= =?UTF-8?q?lis=C3=A9s=20=C3=A0=20la=20fiche=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api_tests/lib/database.types.ts | 28863 +++++----------- .../ExportPdf/FicheActionPdf/Description.tsx | 8 +- .../FicheActionDescription.tsx | 9 + .../ModaleDescription.tsx | 15 +- .../TagsSuiviPersoDropdown.tsx | 41 + .../useTagsSuiviPersoListe.ts | 23 + packages/api/src/database.types.ts | 28863 +++++----------- .../domain/fiche-action.schema.ts | 1 + packages/api/src/shared/domain/tag.schema.ts | 3 +- supabase/functions/_shared/database.types.ts | 28863 +++++----------- 10 files changed, 26382 insertions(+), 60307 deletions(-) create mode 100644 app.territoiresentransitions.react/src/ui/dropdownLists/TagsSuiviPersoDropdown/TagsSuiviPersoDropdown.tsx create mode 100644 app.territoiresentransitions.react/src/ui/dropdownLists/TagsSuiviPersoDropdown/useTagsSuiviPersoListe.ts diff --git a/api_tests/lib/database.types.ts b/api_tests/lib/database.types.ts index a4d2aee316..721665834f 100644 --- a/api_tests/lib/database.types.ts +++ b/api_tests/lib/database.types.ts @@ -44,27 +44,6 @@ export type Database = { statut?: Database["public"]["Enums"]["audit_statut"] } Relationships: [ - { - foreignKeyName: "action_audit_state_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_audit_state_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "action_audit_state" - referencedColumns: ["audit_id"] - }, - { - foreignKeyName: "action_audit_state_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] - }, { foreignKeyName: "action_audit_state_audit_id_fkey" columns: ["audit_id"] @@ -72,20 +51,6 @@ export type Database = { referencedRelation: "audit" referencedColumns: ["id"] }, - { - foreignKeyName: "action_audit_state_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "audit_en_cours" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_audit_state_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["audit_id"] - }, { foreignKeyName: "action_audit_state_collectivite_id_fkey" columns: ["collectivite_id"] @@ -93,15596 +58,3462 @@ export type Database = { referencedRelation: "action_snippet" referencedColumns: ["collectivite_id"] }, + ] + } + audit: { + Row: { + clos: boolean + collectivite_id: number + date_cnl: string | null + date_debut: string | null + date_fin: string | null + demande_id: number | null + id: number + referentiel: Database["public"]["Enums"]["referentiel"] + valide: boolean + valide_labellisation: boolean | null + } + Insert: { + clos?: boolean + collectivite_id: number + date_cnl?: string | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number + referentiel: Database["public"]["Enums"]["referentiel"] + valide?: boolean + valide_labellisation?: boolean | null + } + Update: { + clos?: boolean + collectivite_id?: number + date_cnl?: string | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number + referentiel?: Database["public"]["Enums"]["referentiel"] + valide?: boolean + valide_labellisation?: boolean | null + } + Relationships: [ { - foreignKeyName: "action_audit_state_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "action_snippet" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_demande_id_fkey" + columns: ["demande_id"] isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "demande" + referencedColumns: ["id"] }, + ] + } + bibliotheque_fichier: { + Row: { + collectivite_id: number | null + confidentiel: boolean + filename: string | null + hash: string | null + id: number + } + Insert: { + collectivite_id?: number | null + confidentiel?: boolean + filename?: string | null + hash?: string | null + id?: number + } + Update: { + collectivite_id?: number | null + confidentiel?: boolean + filename?: string | null + hash?: string | null + id?: number + } + Relationships: [ { - foreignKeyName: "action_audit_state_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "action_snippet" referencedColumns: ["collectivite_id"] }, + ] + } + demande: { + Row: { + collectivite_id: number + date: string + demandeur: string | null + en_cours: boolean + envoyee_le: string | null + etoiles: Database["labellisation"]["Enums"]["etoile"] | null + id: number + modified_at: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + sujet: Database["labellisation"]["Enums"]["sujet_demande"] | null + } + Insert: { + collectivite_id: number + date?: string + demandeur?: string | null + en_cours?: boolean + envoyee_le?: string | null + etoiles?: Database["labellisation"]["Enums"]["etoile"] | null + id?: number + modified_at?: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + sujet?: Database["labellisation"]["Enums"]["sujet_demande"] | null + } + Update: { + collectivite_id?: number + date?: string + demandeur?: string | null + en_cours?: boolean + envoyee_le?: string | null + etoiles?: Database["labellisation"]["Enums"]["etoile"] | null + id?: number + modified_at?: string | null + referentiel?: Database["public"]["Enums"]["referentiel"] + sujet?: Database["labellisation"]["Enums"]["sujet_demande"] | null + } + Relationships: [ { - foreignKeyName: "action_audit_state_collectivite_id_fkey" + foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "action_snippet" referencedColumns: ["collectivite_id"] }, + ] + } + etoile_meta: { + Row: { + etoile: Database["labellisation"]["Enums"]["etoile"] + long_label: string + min_realise_percentage: number + min_realise_score: number | null + prochaine_etoile: Database["labellisation"]["Enums"]["etoile"] | null + short_label: string + } + Insert: { + etoile: Database["labellisation"]["Enums"]["etoile"] + long_label: string + min_realise_percentage: number + min_realise_score?: number | null + prochaine_etoile?: Database["labellisation"]["Enums"]["etoile"] | null + short_label: string + } + Update: { + etoile?: Database["labellisation"]["Enums"]["etoile"] + long_label?: string + min_realise_percentage?: number + min_realise_score?: number | null + prochaine_etoile?: Database["labellisation"]["Enums"]["etoile"] | null + short_label?: string + } + Relationships: [] + } + preuve_base: { + Row: { + collectivite_id: number + commentaire: string + fichier_id: number | null + lien: Json | null + modified_at: string + modified_by: string + titre: string + url: string | null + } + Insert: { + collectivite_id: number + commentaire?: string + fichier_id?: number | null + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null + } + Update: { + collectivite_id?: number + commentaire?: string + fichier_id?: number | null + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null + } + Relationships: [ { - foreignKeyName: "action_audit_state_collectivite_id_fkey" + foreignKeyName: "preuve_base_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "action_snippet" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_base_fichier_id_fkey" + columns: ["fichier_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "bibliotheque_fichier" referencedColumns: ["id"] }, { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_base_fichier_id_fkey" + columns: ["fichier_id"] isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - audit: { - Row: { - clos: boolean - collectivite_id: number - date_cnl: string | null - date_debut: string | null - date_fin: string | null - demande_id: number | null - id: number - referentiel: Database["public"]["Enums"]["referentiel"] - valide: boolean - valide_labellisation: boolean | null - } - Insert: { - clos?: boolean - collectivite_id: number - date_cnl?: string | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number - referentiel: Database["public"]["Enums"]["referentiel"] - valide?: boolean - valide_labellisation?: boolean | null - } - Update: { - clos?: boolean - collectivite_id?: number - date_cnl?: string | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number - referentiel?: Database["public"]["Enums"]["referentiel"] - valide?: boolean - valide_labellisation?: boolean | null - } - Relationships: [ - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "demande" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["demande_id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "retool_labellisation_demande" - referencedColumns: ["id"] - }, - ] - } - bibliotheque_fichier: { - Row: { - collectivite_id: number | null - confidentiel: boolean - filename: string | null - hash: string | null - id: number - } - Insert: { - collectivite_id?: number | null - confidentiel?: boolean - filename?: string | null - hash?: string | null - id?: number - } - Update: { - collectivite_id?: number | null - confidentiel?: boolean - filename?: string | null - hash?: string | null - id?: number - } - Relationships: [ - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - demande: { - Row: { - collectivite_id: number - date: string - demandeur: string | null - en_cours: boolean - envoyee_le: string | null - etoiles: Database["labellisation"]["Enums"]["etoile"] | null - id: number - modified_at: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - sujet: Database["labellisation"]["Enums"]["sujet_demande"] | null - } - Insert: { - collectivite_id: number - date?: string - demandeur?: string | null - en_cours?: boolean - envoyee_le?: string | null - etoiles?: Database["labellisation"]["Enums"]["etoile"] | null - id?: number - modified_at?: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - sujet?: Database["labellisation"]["Enums"]["sujet_demande"] | null - } - Update: { - collectivite_id?: number - date?: string - demandeur?: string | null - en_cours?: boolean - envoyee_le?: string | null - etoiles?: Database["labellisation"]["Enums"]["etoile"] | null - id?: number - modified_at?: string | null - referentiel?: Database["public"]["Enums"]["referentiel"] - sujet?: Database["labellisation"]["Enums"]["sujet_demande"] | null - } - Relationships: [ - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_demandeur_fkey" - columns: ["demandeur"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - etoile_meta: { - Row: { - etoile: Database["labellisation"]["Enums"]["etoile"] - long_label: string - min_realise_percentage: number - min_realise_score: number | null - prochaine_etoile: Database["labellisation"]["Enums"]["etoile"] | null - short_label: string - } - Insert: { - etoile: Database["labellisation"]["Enums"]["etoile"] - long_label: string - min_realise_percentage: number - min_realise_score?: number | null - prochaine_etoile?: Database["labellisation"]["Enums"]["etoile"] | null - short_label: string - } - Update: { - etoile?: Database["labellisation"]["Enums"]["etoile"] - long_label?: string - min_realise_percentage?: number - min_realise_score?: number | null - prochaine_etoile?: Database["labellisation"]["Enums"]["etoile"] | null - short_label?: string - } - Relationships: [] - } - preuve_base: { - Row: { - collectivite_id: number - commentaire: string - fichier_id: number | null - lien: Json | null - modified_at: string - modified_by: string - titre: string - url: string | null - } - Insert: { - collectivite_id: number - commentaire?: string - fichier_id?: number | null - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null - } - Update: { - collectivite_id?: number - commentaire?: string - fichier_id?: number | null - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null - } - Relationships: [ - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_fichier_id_fkey" - columns: ["fichier_id"] - isOneToOne: false - referencedRelation: "bibliotheque_fichier" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_base_fichier_id_fkey" - columns: ["fichier_id"] - isOneToOne: false - referencedRelation: "bibliotheque_fichier" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_base_fichier_id_fkey" - columns: ["fichier_id"] - isOneToOne: false - referencedRelation: "bibliotheque_fichier_snippet" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_base_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - } - Views: { - action_snippet: { - Row: { - action_id: string | null - collectivite_id: number | null - snippet: Json | null - } - Relationships: [] - } - bibliotheque_fichier_snippet: { - Row: { - id: number | null - snippet: Json | null - } - Relationships: [] - } - export_score_audit: { - Row: { - collectivite: string | null - cot: boolean | null - date_cloture_cae: string | null - date_cloture_eci: string | null - points_cae: number | null - points_eci: number | null - programme_cae: number | null - programme_eci: number | null - realise_cae: number | null - realise_eci: number | null - region: string | null - signataire: string | null - } - Relationships: [] - } - } - Functions: { - active_audit: { - Args: { - collectivite_id: number - referentiel: Database["public"]["Enums"]["referentiel"] - } - Returns: { - clos: boolean - collectivite_id: number - date_cnl: string | null - date_debut: string | null - date_fin: string | null - demande_id: number | null - id: number - referentiel: Database["public"]["Enums"]["referentiel"] - valide: boolean - valide_labellisation: boolean | null - } - } - audit_evaluation_payload: { - Args: { - audit: unknown - pre_audit: boolean - labellisation: boolean - } - Returns: Record - } - audit_personnalisation_payload: { - Args: { - audit_id: number - pre_audit: boolean - scores_table: string - } - Returns: Json - } - critere_action: { - Args: { - collectivite_id: number - } - Returns: { - referentiel: Database["public"]["Enums"]["referentiel"] - etoiles: Database["labellisation"]["Enums"]["etoile"] - action_id: unknown - formulation: string - score_realise: number - min_score_realise: number - score_programme: number - min_score_programme: number - atteint: boolean - prio: number - }[] - } - critere_fichier: { - Args: { - collectivite_id: number - } - Returns: { - referentiel: Database["public"]["Enums"]["referentiel"] - preuve_nombre: number - atteint: boolean - }[] - } - critere_score_global: { - Args: { - collectivite_id: number - } - Returns: { - referentiel: Database["public"]["Enums"]["referentiel"] - etoile_objectif: Database["labellisation"]["Enums"]["etoile"] - score_a_realiser: number - score_fait: number - atteint: boolean - }[] - } - current_audit: { - Args: { - col: number - ref: Database["public"]["Enums"]["referentiel"] - } - Returns: { - clos: boolean - collectivite_id: number - date_cnl: string | null - date_debut: string | null - date_fin: string | null - demande_id: number | null - id: number - referentiel: Database["public"]["Enums"]["referentiel"] - valide: boolean - valide_labellisation: boolean | null - } - } - etoiles: { - Args: { - collectivite_id: number - } - Returns: { - referentiel: Database["public"]["Enums"]["referentiel"] - etoile_labellise: Database["labellisation"]["Enums"]["etoile"] - prochaine_etoile_labellisation: Database["labellisation"]["Enums"]["etoile"] - etoile_score_possible: Database["labellisation"]["Enums"]["etoile"] - etoile_objectif: Database["labellisation"]["Enums"]["etoile"] - }[] - } - evaluate_audit_statuts: { - Args: { - audit_id: number - pre_audit: boolean - scores_table: string - } - Returns: number - } - json_action_statuts_at: { - Args: { - collectivite_id: number - referentiel: Database["public"]["Enums"]["referentiel"] - date_at: string - } - Returns: Json - } - json_reponses_at: { - Args: { - collectivite_id: number - date_at: string - } - Returns: Json - } - referentiel_score: { - Args: { - collectivite_id: number - } - Returns: { - referentiel: Database["public"]["Enums"]["referentiel"] - score_fait: number - score_programme: number - completude: number - complet: boolean - }[] - } - upsert_preuves_reglementaire: { - Args: { - preuves: Json - } - Returns: undefined - } - } - Enums: { - etoile: "1" | "2" | "3" | "4" | "5" - sujet_demande: "labellisation" | "labellisation_cot" | "cot" - } - CompositeTypes: { - [_ in never]: never - } - } - public: { - Tables: { - abstract_any_indicateur_value: { - Row: { - annee: number - modified_at: string - valeur: number | null - } - Insert: { - annee: number - modified_at?: string - valeur?: number | null - } - Update: { - annee?: number - modified_at?: string - valeur?: number | null - } - Relationships: [] - } - abstract_modified_at: { - Row: { - modified_at: string - } - Insert: { - modified_at?: string - } - Update: { - modified_at?: string - } - Relationships: [] - } - action_commentaire: { - Row: { - action_id: string - collectivite_id: number - commentaire: string - modified_at: string - modified_by: string - } - Insert: { - action_id: string - collectivite_id: number - commentaire: string - modified_at?: string - modified_by?: string - } - Update: { - action_id?: string - collectivite_id?: number - commentaire?: string - modified_at?: string - modified_by?: string - } - Relationships: [ - { - foreignKeyName: "action_commentaire_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - action_computed_points: { - Row: { - action_id: string - modified_at: string - value: number - } - Insert: { - action_id: string - modified_at?: string - value: number - } - Update: { - action_id?: string - modified_at?: string - value?: number - } - Relationships: [ - { - foreignKeyName: "action_computed_points_action_id_fkey" - columns: ["action_id"] - isOneToOne: true - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - ] - } - action_definition: { - Row: { - action_id: string - categorie: Database["public"]["Enums"]["action_categorie"] | null - contexte: string - description: string - exemples: string - identifiant: string - modified_at: string - nom: string - perimetre_evaluation: string - points: number | null - pourcentage: number | null - preuve: string | null - reduction_potentiel: string - referentiel: Database["public"]["Enums"]["referentiel"] - ressources: string - } - Insert: { - action_id: string - categorie?: Database["public"]["Enums"]["action_categorie"] | null - contexte: string - description: string - exemples: string - identifiant: string - modified_at?: string - nom: string - perimetre_evaluation: string - points?: number | null - pourcentage?: number | null - preuve?: string | null - reduction_potentiel: string - referentiel: Database["public"]["Enums"]["referentiel"] - ressources: string - } - Update: { - action_id?: string - categorie?: Database["public"]["Enums"]["action_categorie"] | null - contexte?: string - description?: string - exemples?: string - identifiant?: string - modified_at?: string - nom?: string - perimetre_evaluation?: string - points?: number | null - pourcentage?: number | null - preuve?: string | null - reduction_potentiel?: string - referentiel?: Database["public"]["Enums"]["referentiel"] - ressources?: string - } - Relationships: [ - { - foreignKeyName: "action_definition_action_id_fkey" - columns: ["action_id"] - isOneToOne: true - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - ] - } - action_discussion: { - Row: { - action_id: string - collectivite_id: number - created_at: string - created_by: string - id: number - modified_at: string - status: Database["public"]["Enums"]["action_discussion_statut"] - } - Insert: { - action_id: string - collectivite_id: number - created_at?: string - created_by?: string - id?: number - modified_at?: string - status?: Database["public"]["Enums"]["action_discussion_statut"] - } - Update: { - action_id?: string - collectivite_id?: number - created_at?: string - created_by?: string - id?: number - modified_at?: string - status?: Database["public"]["Enums"]["action_discussion_statut"] - } - Relationships: [ - { - foreignKeyName: "action_discussion_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_created_by_fkey" - columns: ["created_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - action_discussion_commentaire: { - Row: { - created_at: string - created_by: string - discussion_id: number - id: number - message: string - } - Insert: { - created_at?: string - created_by?: string - discussion_id: number - id?: number - message: string - } - Update: { - created_at?: string - created_by?: string - discussion_id?: number - id?: number - message?: string - } - Relationships: [ - { - foreignKeyName: "action_discussion_commentaire_created_by_fkey" - columns: ["created_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_discussion_commentaire_discussion_id_fkey" - columns: ["discussion_id"] - isOneToOne: false - referencedRelation: "action_discussion" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_discussion_commentaire_discussion_id_fkey" - columns: ["discussion_id"] - isOneToOne: false - referencedRelation: "action_discussion_feed" - referencedColumns: ["id"] - }, - ] - } - action_impact: { - Row: { - action_continue: boolean - competences_communales: boolean - description: string - description_complementaire: string - fourchette_budgetaire: number - id: number - impact_tier: number - independamment_competences: boolean - nb_collectivite_en_cours: number - nb_collectivite_realise: number - ressources_externes: Json | null - rex: Json | null - subventions_mobilisables: Json | null - temps_de_mise_en_oeuvre: number - titre: string - typologie_id: number | null - } - Insert: { - action_continue?: boolean - competences_communales?: boolean - description: string - description_complementaire?: string - fourchette_budgetaire?: number - id?: number - impact_tier?: number - independamment_competences?: boolean - nb_collectivite_en_cours?: number - nb_collectivite_realise?: number - ressources_externes?: Json | null - rex?: Json | null - subventions_mobilisables?: Json | null - temps_de_mise_en_oeuvre?: number - titre: string - typologie_id?: number | null - } - Update: { - action_continue?: boolean - competences_communales?: boolean - description?: string - description_complementaire?: string - fourchette_budgetaire?: number - id?: number - impact_tier?: number - independamment_competences?: boolean - nb_collectivite_en_cours?: number - nb_collectivite_realise?: number - ressources_externes?: Json | null - rex?: Json | null - subventions_mobilisables?: Json | null - temps_de_mise_en_oeuvre?: number - titre?: string - typologie_id?: number | null - } - Relationships: [ - { - foreignKeyName: "action_impact_fourchette_budgetaire_fkey" - columns: ["fourchette_budgetaire"] - isOneToOne: false - referencedRelation: "action_impact_fourchette_budgetaire" - referencedColumns: ["niveau"] - }, - { - foreignKeyName: "action_impact_impact_tier_fkey" - columns: ["impact_tier"] - isOneToOne: false - referencedRelation: "action_impact_tier" - referencedColumns: ["niveau"] - }, - { - foreignKeyName: "action_impact_temps_de_mise_en_oeuvre_fkey" - columns: ["temps_de_mise_en_oeuvre"] - isOneToOne: false - referencedRelation: "action_impact_temps_de_mise_en_oeuvre" - referencedColumns: ["niveau"] - }, - { - foreignKeyName: "action_impact_typologie_id_fkey" - columns: ["typologie_id"] - isOneToOne: false - referencedRelation: "action_impact_typologie" - referencedColumns: ["id"] - }, - ] - } - action_impact_action: { - Row: { - action_id: string - action_impact_id: number - } - Insert: { - action_id: string - action_impact_id: number - } - Update: { - action_id?: string - action_impact_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_action_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_definition" - referencedColumns: ["action_id"] - }, - { - foreignKeyName: "action_impact_action_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - ] - } - action_impact_banatic_competence: { - Row: { - action_impact_id: number - competence_code: number - } - Insert: { - action_impact_id: number - competence_code: number - } - Update: { - action_impact_id?: number - competence_code?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_banatic_competence_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_banatic_competence_competence_code_fkey" - columns: ["competence_code"] - isOneToOne: false - referencedRelation: "banatic_competence" - referencedColumns: ["code"] - }, - ] - } - action_impact_categorie: { - Row: { - id: string - nom: string - } - Insert: { - id: string - nom: string - } - Update: { - id?: string - nom?: string - } - Relationships: [] - } - action_impact_categorie_fnv: { - Row: { - action_impact_id: number - categorie_fnv_id: number - } - Insert: { - action_impact_id: number - categorie_fnv_id: number - } - Update: { - action_impact_id?: number - categorie_fnv_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_categorie_fnv_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_categorie_fnv_categorie_fnv_id_fkey" - columns: ["categorie_fnv_id"] - isOneToOne: false - referencedRelation: "categorie_fnv" - referencedColumns: ["id"] - }, - ] - } - action_impact_complexite: { - Row: { - niveau: number - nom: string - } - Insert: { - niveau?: number - nom: string - } - Update: { - niveau?: number - nom?: string - } - Relationships: [] - } - action_impact_effet_attendu: { - Row: { - action_impact_id: number - effet_attendu_id: number - } - Insert: { - action_impact_id: number - effet_attendu_id: number - } - Update: { - action_impact_id?: number - effet_attendu_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_effet_attendu_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_effet_attendu_effet_attendu_id_fkey" - columns: ["effet_attendu_id"] - isOneToOne: false - referencedRelation: "effet_attendu" - referencedColumns: ["id"] - }, - ] - } - action_impact_fiche_action: { - Row: { - action_impact_id: number - fiche_id: number - } - Insert: { - action_impact_id: number - fiche_id: number - } - Update: { - action_impact_id?: number - fiche_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_fiche_action_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - action_impact_fourchette_budgetaire: { - Row: { - niveau: number - nom: string - } - Insert: { - niveau?: number - nom: string - } - Update: { - niveau?: number - nom?: string - } - Relationships: [] - } - action_impact_indicateur: { - Row: { - action_impact_id: number - indicateur_id: number - } - Insert: { - action_impact_id: number - indicateur_id: number - } - Update: { - action_impact_id?: number - indicateur_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_indicateur_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - action_impact_panier: { - Row: { - action_id: number - panier_id: string - } - Insert: { - action_id: number - panier_id: string - } - Update: { - action_id?: number - panier_id?: string - } - Relationships: [ - { - foreignKeyName: "action_impact_panier_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_panier_panier_id_fkey" - columns: ["panier_id"] - isOneToOne: false - referencedRelation: "panier" - referencedColumns: ["id"] - }, - ] - } - action_impact_partenaire: { - Row: { - action_impact_id: number - partenaire_id: number - } - Insert: { - action_impact_id: number - partenaire_id: number - } - Update: { - action_impact_id?: number - partenaire_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_partenaire_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_partenaire_partenaire_id_fkey" - columns: ["partenaire_id"] - isOneToOne: false - referencedRelation: "panier_partenaire" - referencedColumns: ["id"] - }, - ] - } - action_impact_sous_thematique: { - Row: { - action_impact_id: number - sous_thematique_id: number - } - Insert: { - action_impact_id: number - sous_thematique_id: number - } - Update: { - action_impact_id?: number - sous_thematique_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_sous_thematique_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_sous_thematique_sous_thematique_id_fkey" - columns: ["sous_thematique_id"] - isOneToOne: false - referencedRelation: "sous_thematique" - referencedColumns: ["id"] - }, - ] - } - action_impact_state: { - Row: { - action: Database["public"]["Tables"]["action_impact"]["Row"] | null - isinpanier: boolean | null - panier: Database["public"]["Tables"]["panier"]["Row"] | null - statut: - | Database["public"]["Tables"]["action_impact_statut"]["Row"] - | null - action_definition: unknown | null - action_impact_fourchette_budgetaire: unknown | null - action_impact_temps_de_mise_en_oeuvre: unknown | null - action_impact_thematique: unknown | null - action_impact_typologie: unknown | null - matches_competences: boolean | null - thematique: unknown | null - } - Insert: { - action?: Database["public"]["Tables"]["action_impact"]["Row"] | null - isinpanier?: boolean | null - panier?: Database["public"]["Tables"]["panier"]["Row"] | null - statut?: - | Database["public"]["Tables"]["action_impact_statut"]["Row"] - | null - } - Update: { - action?: Database["public"]["Tables"]["action_impact"]["Row"] | null - isinpanier?: boolean | null - panier?: Database["public"]["Tables"]["panier"]["Row"] | null - statut?: - | Database["public"]["Tables"]["action_impact_statut"]["Row"] - | null - } - Relationships: [] - } - action_impact_statut: { - Row: { - action_id: number - categorie_id: string - panier_id: string - } - Insert: { - action_id: number - categorie_id: string - panier_id: string - } - Update: { - action_id?: number - categorie_id?: string - panier_id?: string - } - Relationships: [ - { - foreignKeyName: "action_impact_statut_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_statut_categorie_id_fkey" - columns: ["categorie_id"] - isOneToOne: false - referencedRelation: "action_impact_categorie" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_statut_panier_id_fkey" - columns: ["panier_id"] - isOneToOne: false - referencedRelation: "panier" - referencedColumns: ["id"] - }, - ] - } - action_impact_temps_de_mise_en_oeuvre: { - Row: { - niveau: number - nom: string - } - Insert: { - niveau?: number - nom: string - } - Update: { - niveau?: number - nom?: string - } - Relationships: [] - } - action_impact_thematique: { - Row: { - action_impact_id: number - ordre: number - thematique_id: number - } - Insert: { - action_impact_id: number - ordre?: number - thematique_id: number - } - Update: { - action_impact_id?: number - ordre?: number - thematique_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_thematique_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_thematique_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "thematique" - referencedColumns: ["id"] - }, - ] - } - action_impact_tier: { - Row: { - niveau: number - nom: string - } - Insert: { - niveau?: number - nom: string - } - Update: { - niveau?: number - nom?: string - } - Relationships: [] - } - action_impact_typologie: { - Row: { - id: number - nom: string - } - Insert: { - id?: number - nom: string - } - Update: { - id?: number - nom?: string - } - Relationships: [] - } - action_relation: { - Row: { - id: string - parent: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - } - Insert: { - id: string - parent?: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - } - Update: { - id?: string - parent?: string | null - referentiel?: Database["public"]["Enums"]["referentiel"] - } - Relationships: [ - { - foreignKeyName: "action_relation_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - ] - } - action_statut: { - Row: { - action_id: string - avancement: Database["public"]["Enums"]["avancement"] - avancement_detaille: number[] | null - collectivite_id: number - concerne: boolean - modified_at: string - modified_by: string - } - Insert: { - action_id: string - avancement: Database["public"]["Enums"]["avancement"] - avancement_detaille?: number[] | null - collectivite_id: number - concerne: boolean - modified_at?: string - modified_by?: string - } - Update: { - action_id?: string - avancement?: Database["public"]["Enums"]["avancement"] - avancement_detaille?: number[] | null - collectivite_id?: number - concerne?: boolean - modified_at?: string - modified_by?: string - } - Relationships: [ - { - foreignKeyName: "action_statut_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - annexe: { - Row: { - collectivite_id: number - commentaire: string - fiche_id: number - fichier_id: number | null - id: number - lien: Json | null - modified_at: string - modified_by: string - titre: string - url: string | null - } - Insert: { - collectivite_id: number - commentaire?: string - fiche_id: number - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null - } - Update: { - collectivite_id?: number - commentaire?: string - fiche_id?: number - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null - } - Relationships: [ - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - audit_auditeur: { - Row: { - audit_id: number - auditeur: string - created_at: string | null - } - Insert: { - audit_id: number - auditeur: string - created_at?: string | null - } - Update: { - audit_id?: number - auditeur?: string - created_at?: string | null - } - Relationships: [ - { - foreignKeyName: "audit_auditeur_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "action_audit_state" - referencedColumns: ["audit_id"] - }, - { - foreignKeyName: "audit_auditeur_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_auditeur_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_auditeur_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "audit_en_cours" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_auditeur_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["audit_id"] - }, - { - foreignKeyName: "audit_auditeur_auditeur_fkey" - columns: ["auditeur"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - axe: { - Row: { - collectivite_id: number - created_at: string - id: number - modified_at: string - modified_by: string | null - nom: string | null - panier_id: string | null - parent: number | null - plan: number | null - type: number | null - axe_enfant: unknown | null - collectivite_card: unknown | null - plan_action_type: unknown | null - vide: boolean | null - } - Insert: { - collectivite_id: number - created_at?: string - id?: number - modified_at?: string - modified_by?: string | null - nom?: string | null - panier_id?: string | null - parent?: number | null - plan?: number | null - type?: number | null - } - Update: { - collectivite_id?: number - created_at?: string - id?: number - modified_at?: string - modified_by?: string | null - nom?: string | null - panier_id?: string | null - parent?: number | null - plan?: number | null - type?: number | null - } - Relationships: [ - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_panier_id_fkey" - columns: ["panier_id"] - isOneToOne: false - referencedRelation: "panier" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "axe" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "plan_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "plan_action_profondeur" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_plan_fkey" - columns: ["plan"] - isOneToOne: false - referencedRelation: "axe" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_plan_fkey" - columns: ["plan"] - isOneToOne: false - referencedRelation: "plan_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_plan_fkey" - columns: ["plan"] - isOneToOne: false - referencedRelation: "plan_action_profondeur" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_type_fkey" - columns: ["type"] - isOneToOne: false - referencedRelation: "plan_action_type" - referencedColumns: ["id"] - }, - ] - } - banatic_competence: { - Row: { - code: number - nom: string - } - Insert: { - code: number - nom: string - } - Update: { - code?: number - nom?: string - } - Relationships: [] - } - categorie_fnv: { - Row: { - id: number - nom: string - } - Insert: { - id?: number - nom: string - } - Update: { - id?: number - nom?: string - } - Relationships: [] - } - categorie_tag: { - Row: { - collectivite_id: number | null - created_at: string - created_by: string | null - groupement_id: number | null - id: number - nom: string - visible: boolean - } - Insert: { - collectivite_id?: number | null - created_at?: string - created_by?: string | null - groupement_id?: number | null - id?: number - nom: string - visible?: boolean - } - Update: { - collectivite_id?: number | null - created_at?: string - created_by?: string | null - groupement_id?: number | null - id?: number - nom?: string - visible?: boolean - } - Relationships: [ - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_created_by_fkey" - columns: ["created_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - { - foreignKeyName: "categorie_tag_groupement_id_fkey" - columns: ["groupement_id"] - isOneToOne: false - referencedRelation: "groupement" - referencedColumns: ["id"] - }, - ] - } - client_scores: { - Row: { - collectivite_id: number - modified_at: string - payload_timestamp: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json - } - Insert: { - collectivite_id: number - modified_at: string - payload_timestamp?: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json - } - Update: { - collectivite_id?: number - modified_at?: string - payload_timestamp?: string | null - referentiel?: Database["public"]["Enums"]["referentiel"] - scores?: Json - } - Relationships: [ - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - client_scores_update: { - Row: { - collectivite_id: number - modified_at: string - referentiel: Database["public"]["Enums"]["referentiel"] - } - Insert: { - collectivite_id: number - modified_at: string - referentiel: Database["public"]["Enums"]["referentiel"] - } - Update: { - collectivite_id?: number - modified_at?: string - referentiel?: Database["public"]["Enums"]["referentiel"] - } - Relationships: [ - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - collectivite: { - Row: { - access_restreint: boolean - created_at: string - id: number - modified_at: string - active: boolean | null - collectivite_thematique: unknown | null - collectivite_utilisateur: unknown | null - } - Insert: { - access_restreint?: boolean - created_at?: string - id?: number - modified_at?: string - } - Update: { - access_restreint?: boolean - created_at?: string - id?: number - modified_at?: string - } - Relationships: [] - } - collectivite_banatic_competence: { - Row: { - collectivite_id: number - competence_code: number - } - Insert: { - collectivite_id: number - competence_code: number - } - Update: { - collectivite_id?: number - competence_code?: number - } - Relationships: [ - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_competence_code_fkey" - columns: ["competence_code"] - isOneToOne: false - referencedRelation: "banatic_competence" - referencedColumns: ["code"] - }, - ] - } - collectivite_bucket: { - Row: { - bucket_id: string - collectivite_id: number - } - Insert: { - bucket_id: string - collectivite_id: number - } - Update: { - bucket_id?: string - collectivite_id?: number - } - Relationships: [ - { - foreignKeyName: "collectivite_bucket_bucket_id_fkey" - columns: ["bucket_id"] - isOneToOne: false - referencedRelation: "buckets" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - collectivite_test: { - Row: { - collectivite_id: number | null - id: number - nom: string - } - Insert: { - collectivite_id?: number | null - id?: number - nom: string - } - Update: { - collectivite_id?: number | null - id?: number - nom?: string - } - Relationships: [ - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - commune: { - Row: { - code: string - collectivite_id: number | null - id: number - nom: string - } - Insert: { - code: string - collectivite_id?: number | null - id?: number - nom: string - } - Update: { - code?: string - collectivite_id?: number | null - id?: number - nom?: string - } - Relationships: [ - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - confidentialite_crud: { - Row: { - c: Database["public"]["Enums"]["confidentialite_option_crud"] - d: Database["public"]["Enums"]["confidentialite_option_crud"] - nom_element: string - profil: Database["public"]["Enums"]["confidentialite_profil"] - r: Database["public"]["Enums"]["confidentialite_option_crud"] - type_element: Database["public"]["Enums"]["confidentialite_type_element"] - u: Database["public"]["Enums"]["confidentialite_option_crud"] - } - Insert: { - c: Database["public"]["Enums"]["confidentialite_option_crud"] - d: Database["public"]["Enums"]["confidentialite_option_crud"] - nom_element: string - profil: Database["public"]["Enums"]["confidentialite_profil"] - r: Database["public"]["Enums"]["confidentialite_option_crud"] - type_element: Database["public"]["Enums"]["confidentialite_type_element"] - u: Database["public"]["Enums"]["confidentialite_option_crud"] - } - Update: { - c?: Database["public"]["Enums"]["confidentialite_option_crud"] - d?: Database["public"]["Enums"]["confidentialite_option_crud"] - nom_element?: string - profil?: Database["public"]["Enums"]["confidentialite_profil"] - r?: Database["public"]["Enums"]["confidentialite_option_crud"] - type_element?: Database["public"]["Enums"]["confidentialite_type_element"] - u?: Database["public"]["Enums"]["confidentialite_option_crud"] - } - Relationships: [] - } - cot: { - Row: { - actif: boolean - collectivite_id: number - signataire: number | null - } - Insert: { - actif: boolean - collectivite_id: number - signataire?: number | null - } - Update: { - actif?: boolean - collectivite_id?: number - signataire?: number | null - } - Relationships: [ - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - dcp: { - Row: { - cgu_acceptees_le: string | null - created_at: string - deleted: boolean - email: string - limited: boolean - modified_at: string - nom: string - prenom: string - telephone: string | null - user_id: string - } - Insert: { - cgu_acceptees_le?: string | null - created_at?: string - deleted?: boolean - email: string - limited?: boolean - modified_at?: string - nom: string - prenom: string - telephone?: string | null - user_id: string - } - Update: { - cgu_acceptees_le?: string | null - created_at?: string - deleted?: boolean - email?: string - limited?: boolean - modified_at?: string - nom?: string - prenom?: string - telephone?: string | null - user_id?: string - } - Relationships: [ - { - foreignKeyName: "dcp_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - effet_attendu: { - Row: { - id: number - nom: string - notice: string | null - } - Insert: { - id?: number - nom: string - notice?: string | null - } - Update: { - id?: number - nom?: string - notice?: string | null - } - Relationships: [] - } - epci: { - Row: { - collectivite_id: number | null - id: number - nature: Database["public"]["Enums"]["nature"] - nom: string - siren: string - } - Insert: { - collectivite_id?: number | null - id?: number - nature: Database["public"]["Enums"]["nature"] - nom: string - siren: string - } - Update: { - collectivite_id?: number | null - id?: number - nature?: Database["public"]["Enums"]["nature"] - nom?: string - siren?: string - } - Relationships: [ - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - fiche_action: { - Row: { - amelioration_continue: boolean | null - budget_previsionnel: number | null - calendrier: string | null - cibles: Database["public"]["Enums"]["fiche_action_cibles"][] | null - collectivite_id: number - created_at: string - date_debut: string | null - date_fin_provisoire: string | null - description: string | null - financements: string | null - id: number - maj_termine: boolean | null - modified_at: string - modified_by: string | null - niveau_priorite: - | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] - | null - notes_complementaires: string | null - objectifs: string | null - piliers_eci: - | Database["public"]["Enums"]["fiche_action_piliers_eci"][] - | null - ressources: string | null - restreint: boolean | null - resultats_attendus: - | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] - | null - statut: Database["public"]["Enums"]["fiche_action_statuts"] | null - titre: string | null - fiche_action_plan: unknown | null - } - Insert: { - amelioration_continue?: boolean | null - budget_previsionnel?: number | null - calendrier?: string | null - cibles?: Database["public"]["Enums"]["fiche_action_cibles"][] | null - collectivite_id: number - created_at?: string - date_debut?: string | null - date_fin_provisoire?: string | null - description?: string | null - financements?: string | null - id?: number - maj_termine?: boolean | null - modified_at?: string - modified_by?: string | null - niveau_priorite?: - | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] - | null - notes_complementaires?: string | null - objectifs?: string | null - piliers_eci?: - | Database["public"]["Enums"]["fiche_action_piliers_eci"][] - | null - ressources?: string | null - restreint?: boolean | null - resultats_attendus?: - | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] - | null - statut?: Database["public"]["Enums"]["fiche_action_statuts"] | null - titre?: string | null - } - Update: { - amelioration_continue?: boolean | null - budget_previsionnel?: number | null - calendrier?: string | null - cibles?: Database["public"]["Enums"]["fiche_action_cibles"][] | null - collectivite_id?: number - created_at?: string - date_debut?: string | null - date_fin_provisoire?: string | null - description?: string | null - financements?: string | null - id?: number - maj_termine?: boolean | null - modified_at?: string - modified_by?: string | null - niveau_priorite?: - | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] - | null - notes_complementaires?: string | null - objectifs?: string | null - piliers_eci?: - | Database["public"]["Enums"]["fiche_action_piliers_eci"][] - | null - ressources?: string | null - restreint?: boolean | null - resultats_attendus?: - | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] - | null - statut?: Database["public"]["Enums"]["fiche_action_statuts"] | null - titre?: string | null - } - Relationships: [ - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - fiche_action_action: { - Row: { - action_id: string - fiche_id: number - } - Insert: { - action_id: string - fiche_id: number - } - Update: { - action_id?: string - fiche_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_action_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - fiche_action_axe: { - Row: { - axe_id: number - fiche_id: number - } - Insert: { - axe_id: number - fiche_id: number - } - Update: { - axe_id?: number - fiche_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_axe_axe_id_fkey" - columns: ["axe_id"] - isOneToOne: false - referencedRelation: "axe" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_axe_id_fkey" - columns: ["axe_id"] - isOneToOne: false - referencedRelation: "plan_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_axe_id_fkey" - columns: ["axe_id"] - isOneToOne: false - referencedRelation: "plan_action_profondeur" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - fiche_action_effet_attendu: { - Row: { - effet_attendu_id: number - fiche_id: number - } - Insert: { - effet_attendu_id: number - fiche_id: number - } - Update: { - effet_attendu_id?: number - fiche_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_effet_attendu_effet_attendu_id_fkey" - columns: ["effet_attendu_id"] - isOneToOne: false - referencedRelation: "effet_attendu" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - fiche_action_financeur_tag: { - Row: { - fiche_id: number - financeur_tag_id: number - id: number - montant_ttc: number | null - } - Insert: { - fiche_id: number - financeur_tag_id: number - id?: number - montant_ttc?: number | null - } - Update: { - fiche_id?: number - financeur_tag_id?: number - id?: number - montant_ttc?: number | null - } - Relationships: [ - { - foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_financeur_tag_financeur_tag_id_fkey" - columns: ["financeur_tag_id"] - isOneToOne: false - referencedRelation: "financeur_tag" - referencedColumns: ["id"] - }, - ] - } - fiche_action_import_csv: { - Row: { - amelioration_continue: string | null - axe: string | null - budget: string | null - calendrier: string | null - cibles: string | null - collectivite_id: string | null - date_debut: string | null - date_fin: string | null - description: string | null - elu_referent: string | null - financements: string | null - financeur_deux: string | null - financeur_trois: string | null - financeur_un: string | null - montant_deux: string | null - montant_trois: string | null - montant_un: string | null - moyens: string | null - notes: string | null - num_action: string | null - objectifs: string | null - partenaires: string | null - personne_referente: string | null - plan_nom: string | null - priorite: string | null - resultats_attendus: string | null - service: string | null - sous_axe: string | null - sous_sous_axe: string | null - statut: string | null - structure_pilote: string | null - titre: string | null - } - Insert: { - amelioration_continue?: string | null - axe?: string | null - budget?: string | null - calendrier?: string | null - cibles?: string | null - collectivite_id?: string | null - date_debut?: string | null - date_fin?: string | null - description?: string | null - elu_referent?: string | null - financements?: string | null - financeur_deux?: string | null - financeur_trois?: string | null - financeur_un?: string | null - montant_deux?: string | null - montant_trois?: string | null - montant_un?: string | null - moyens?: string | null - notes?: string | null - num_action?: string | null - objectifs?: string | null - partenaires?: string | null - personne_referente?: string | null - plan_nom?: string | null - priorite?: string | null - resultats_attendus?: string | null - service?: string | null - sous_axe?: string | null - sous_sous_axe?: string | null - statut?: string | null - structure_pilote?: string | null - titre?: string | null - } - Update: { - amelioration_continue?: string | null - axe?: string | null - budget?: string | null - calendrier?: string | null - cibles?: string | null - collectivite_id?: string | null - date_debut?: string | null - date_fin?: string | null - description?: string | null - elu_referent?: string | null - financements?: string | null - financeur_deux?: string | null - financeur_trois?: string | null - financeur_un?: string | null - montant_deux?: string | null - montant_trois?: string | null - montant_un?: string | null - moyens?: string | null - notes?: string | null - num_action?: string | null - objectifs?: string | null - partenaires?: string | null - personne_referente?: string | null - plan_nom?: string | null - priorite?: string | null - resultats_attendus?: string | null - service?: string | null - sous_axe?: string | null - sous_sous_axe?: string | null - statut?: string | null - structure_pilote?: string | null - titre?: string | null - } - Relationships: [] - } - fiche_action_indicateur: { - Row: { - fiche_id: number - indicateur_id: number - } - Insert: { - fiche_id: number - indicateur_id: number - } - Update: { - fiche_id?: number - indicateur_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - fiche_action_lien: { - Row: { - fiche_deux: number - fiche_une: number - } - Insert: { - fiche_deux: number - fiche_une: number - } - Update: { - fiche_deux?: number - fiche_une?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_lien_fiche_deux_fkey" - columns: ["fiche_deux"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_deux_fkey" - columns: ["fiche_deux"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_deux_fkey" - columns: ["fiche_deux"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_deux_fkey" - columns: ["fiche_deux"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_deux_fkey" - columns: ["fiche_deux"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_une_fkey" - columns: ["fiche_une"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_une_fkey" - columns: ["fiche_une"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_une_fkey" - columns: ["fiche_une"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_une_fkey" - columns: ["fiche_une"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_une_fkey" - columns: ["fiche_une"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - fiche_action_partenaire_tag: { - Row: { - fiche_id: number - partenaire_tag_id: number - } - Insert: { - fiche_id: number - partenaire_tag_id: number - } - Update: { - fiche_id?: number - partenaire_tag_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_partenaire_tag_partenaire_tag_id_fkey" - columns: ["partenaire_tag_id"] - isOneToOne: false - referencedRelation: "partenaire_tag" - referencedColumns: ["id"] - }, - ] - } - fiche_action_pilote: { - Row: { - fiche_id: number - tag_id: number | null - user_id: string | null - } - Insert: { - fiche_id: number - tag_id?: number | null - user_id?: string | null - } - Update: { - fiche_id?: number - tag_id?: number | null - user_id?: string | null - } - Relationships: [ - { - foreignKeyName: "fiche_action_pilote_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_tag_id_fkey" - columns: ["tag_id"] - isOneToOne: false - referencedRelation: "personne_tag" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["user_id"] - }, - { - foreignKeyName: "fiche_action_pilote_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "crm_personnes" - referencedColumns: ["user_id"] - }, - { - foreignKeyName: "fiche_action_pilote_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "dcp" - referencedColumns: ["user_id"] - }, - { - foreignKeyName: "fiche_action_pilote_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "dcp_display" - referencedColumns: ["user_id"] - }, - ] - } - fiche_action_referent: { - Row: { - fiche_id: number - tag_id: number | null - user_id: string | null - } - Insert: { - fiche_id: number - tag_id?: number | null - user_id?: string | null - } - Update: { - fiche_id?: number - tag_id?: number | null - user_id?: string | null - } - Relationships: [ - { - foreignKeyName: "fiche_action_referent_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_tag_id_fkey" - columns: ["tag_id"] - isOneToOne: false - referencedRelation: "personne_tag" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - fiche_action_service_tag: { - Row: { - fiche_id: number - service_tag_id: number - } - Insert: { - fiche_id: number - service_tag_id: number - } - Update: { - fiche_id?: number - service_tag_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_service_tag_service_tag_id_fkey" - columns: ["service_tag_id"] - isOneToOne: false - referencedRelation: "service_tag" - referencedColumns: ["id"] - }, - ] - } - fiche_action_sous_thematique: { - Row: { - fiche_id: number - thematique_id: number - } - Insert: { - fiche_id: number - thematique_id: number - } - Update: { - fiche_id?: number - thematique_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_sous_thematique_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "sous_thematique" - referencedColumns: ["id"] - }, - ] - } - fiche_action_structure_tag: { - Row: { - fiche_id: number - structure_tag_id: number - } - Insert: { - fiche_id: number - structure_tag_id: number - } - Update: { - fiche_id?: number - structure_tag_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_structure_tag_structure_tag_id_fkey" - columns: ["structure_tag_id"] - isOneToOne: false - referencedRelation: "structure_tag" - referencedColumns: ["id"] - }, - ] - } - fiche_action_thematique: { - Row: { - fiche_id: number - thematique_id: number - } - Insert: { - fiche_id: number - thematique_id: number - } - Update: { - fiche_id?: number - thematique_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - filtre_intervalle: { - Row: { - id: string - intervalle: unknown - libelle: string - type: Database["public"]["Enums"]["collectivite_filtre_type"] - } - Insert: { - id: string - intervalle: unknown - libelle: string - type: Database["public"]["Enums"]["collectivite_filtre_type"] - } - Update: { - id?: string - intervalle?: unknown - libelle?: string - type?: Database["public"]["Enums"]["collectivite_filtre_type"] - } - Relationships: [] - } - financeur_tag: { - Row: { - collectivite_id: number - id: number - nom: string - } - Insert: { - collectivite_id: number - id?: number - nom: string - } - Update: { - collectivite_id?: number - id?: number - nom?: string - } - Relationships: [ - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - groupement: { - Row: { - id: number - nom: string - } - Insert: { - id?: number - nom: string - } - Update: { - id?: number - nom?: string - } - Relationships: [] - } - groupement_collectivite: { - Row: { - collectivite_id: number - groupement_id: number - } - Insert: { - collectivite_id: number - groupement_id: number - } - Update: { - collectivite_id?: number - groupement_id?: number - } - Relationships: [ - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_groupement_id_fkey" - columns: ["groupement_id"] - isOneToOne: false - referencedRelation: "groupement" - referencedColumns: ["id"] - }, - ] - } - indicateur_action: { - Row: { - action_id: string - indicateur_id: number - } - Insert: { - action_id: string - indicateur_id: number - } - Update: { - action_id?: string - indicateur_id?: number - } - Relationships: [ - { - foreignKeyName: "indicateur_action_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_action_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_action_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_action_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - indicateur_artificialisation: { - Row: { - activite: number - collectivite_id: number - ferroviaire: number - habitat: number - inconnue: number - mixte: number - routiere: number - total: number - } - Insert: { - activite: number - collectivite_id: number - ferroviaire: number - habitat: number - inconnue: number - mixte: number - routiere: number - total: number - } - Update: { - activite?: number - collectivite_id?: number - ferroviaire?: number - habitat?: number - inconnue?: number - mixte?: number - routiere?: number - total?: number - } - Relationships: [ - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - indicateur_categorie_tag: { - Row: { - categorie_tag_id: number - indicateur_id: number - } - Insert: { - categorie_tag_id: number - indicateur_id: number - } - Update: { - categorie_tag_id?: number - indicateur_id?: number - } - Relationships: [ - { - foreignKeyName: "indicateur_categorie_tag_categorie_tag_id_fkey" - columns: ["categorie_tag_id"] - isOneToOne: false - referencedRelation: "categorie_tag" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_categorie_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_categorie_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_categorie_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - indicateur_collectivite: { - Row: { - collectivite_id: number - commentaire: string | null - confidentiel: boolean - favoris: boolean - indicateur_id: number - } - Insert: { - collectivite_id: number - commentaire?: string | null - confidentiel?: boolean - favoris?: boolean - indicateur_id: number - } - Update: { - collectivite_id?: number - commentaire?: string | null - confidentiel?: boolean - favoris?: boolean - indicateur_id?: number - } - Relationships: [ - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_collectivite_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_collectivite_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - indicateur_definition: { - Row: { - borne_max: number | null - borne_min: number | null - collectivite_id: number | null - created_at: string - created_by: string | null - description: string | null - groupement_id: number | null - id: number - identifiant_referentiel: string | null - modified_at: string - modified_by: string | null - participation_score: boolean - sans_valeur_utilisateur: boolean - titre: string - titre_long: string | null - unite: string - valeur_calcule: string | null - indicateur_enfants: unknown | null - indicateur_parents: unknown | null - } - Insert: { - borne_max?: number | null - borne_min?: number | null - collectivite_id?: number | null - created_at?: string - created_by?: string | null - description?: string | null - groupement_id?: number | null - id?: number - identifiant_referentiel?: string | null - modified_at?: string - modified_by?: string | null - participation_score?: boolean - sans_valeur_utilisateur?: boolean - titre: string - titre_long?: string | null - unite: string - valeur_calcule?: string | null - } - Update: { - borne_max?: number | null - borne_min?: number | null - collectivite_id?: number | null - created_at?: string - created_by?: string | null - description?: string | null - groupement_id?: number | null - id?: number - identifiant_referentiel?: string | null - modified_at?: string - modified_by?: string | null - participation_score?: boolean - sans_valeur_utilisateur?: boolean - titre?: string - titre_long?: string | null - unite?: string - valeur_calcule?: string | null - } - Relationships: [ - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_created_by_fkey" - columns: ["created_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_definition_groupement_id_fkey" - columns: ["groupement_id"] - isOneToOne: false - referencedRelation: "groupement" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_definition_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - indicateur_groupe: { - Row: { - enfant: number - parent: number - } - Insert: { - enfant: number - parent: number - } - Update: { - enfant?: number - parent?: number - } - Relationships: [ - { - foreignKeyName: "indicateur_groupe_enfant_fkey" - columns: ["enfant"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_groupe_enfant_fkey" - columns: ["enfant"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_groupe_enfant_fkey" - columns: ["enfant"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_groupe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_groupe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_groupe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - indicateur_pilote: { - Row: { - collectivite_id: number - id: number - indicateur_id: number - tag_id: number | null - user_id: string | null - indicateur_pilote_user: unknown | null - } - Insert: { - collectivite_id: number - id?: number - indicateur_id: number - tag_id?: number | null - user_id?: string | null - } - Update: { - collectivite_id?: number - id?: number - indicateur_id?: number - tag_id?: number | null - user_id?: string | null - } - Relationships: [ - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_tag_id_fkey" - columns: ["tag_id"] - isOneToOne: false - referencedRelation: "personne_tag" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] + referencedRelation: "bibliotheque_fichier_snippet" + referencedColumns: ["id"] }, ] } - indicateur_service_tag: { + } + Views: { + action_snippet: { + Row: { + action_id: string | null + collectivite_id: number | null + snippet: Json | null + } + Relationships: [] + } + bibliotheque_fichier_snippet: { + Row: { + id: number | null + snippet: Json | null + } + Relationships: [] + } + export_score_audit: { + Row: { + collectivite: string | null + cot: boolean | null + date_cloture_cae: string | null + date_cloture_eci: string | null + points_cae: number | null + points_eci: number | null + programme_cae: number | null + programme_eci: number | null + realise_cae: number | null + realise_eci: number | null + region: string | null + signataire: string | null + } + Relationships: [] + } + } + Functions: { + active_audit: { + Args: { + collectivite_id: number + referentiel: Database["public"]["Enums"]["referentiel"] + } + Returns: { + clos: boolean + collectivite_id: number + date_cnl: string | null + date_debut: string | null + date_fin: string | null + demande_id: number | null + id: number + referentiel: Database["public"]["Enums"]["referentiel"] + valide: boolean + valide_labellisation: boolean | null + } + } + audit_evaluation_payload: { + Args: { + audit: unknown + pre_audit: boolean + labellisation: boolean + } + Returns: Record + } + audit_personnalisation_payload: { + Args: { + audit_id: number + pre_audit: boolean + scores_table: string + } + Returns: Json + } + critere_action: { + Args: { + collectivite_id: number + } + Returns: { + referentiel: Database["public"]["Enums"]["referentiel"] + etoiles: Database["labellisation"]["Enums"]["etoile"] + action_id: unknown + formulation: string + score_realise: number + min_score_realise: number + score_programme: number + min_score_programme: number + atteint: boolean + prio: number + }[] + } + critere_fichier: { + Args: { + collectivite_id: number + } + Returns: { + referentiel: Database["public"]["Enums"]["referentiel"] + preuve_nombre: number + atteint: boolean + }[] + } + critere_score_global: { + Args: { + collectivite_id: number + } + Returns: { + referentiel: Database["public"]["Enums"]["referentiel"] + etoile_objectif: Database["labellisation"]["Enums"]["etoile"] + score_a_realiser: number + score_fait: number + atteint: boolean + }[] + } + current_audit: { + Args: { + col: number + ref: Database["public"]["Enums"]["referentiel"] + } + Returns: { + clos: boolean + collectivite_id: number + date_cnl: string | null + date_debut: string | null + date_fin: string | null + demande_id: number | null + id: number + referentiel: Database["public"]["Enums"]["referentiel"] + valide: boolean + valide_labellisation: boolean | null + } + } + etoiles: { + Args: { + collectivite_id: number + } + Returns: { + referentiel: Database["public"]["Enums"]["referentiel"] + etoile_labellise: Database["labellisation"]["Enums"]["etoile"] + prochaine_etoile_labellisation: Database["labellisation"]["Enums"]["etoile"] + etoile_score_possible: Database["labellisation"]["Enums"]["etoile"] + etoile_objectif: Database["labellisation"]["Enums"]["etoile"] + }[] + } + evaluate_audit_statuts: { + Args: { + audit_id: number + pre_audit: boolean + scores_table: string + } + Returns: number + } + json_action_statuts_at: { + Args: { + collectivite_id: number + referentiel: Database["public"]["Enums"]["referentiel"] + date_at: string + } + Returns: Json + } + json_reponses_at: { + Args: { + collectivite_id: number + date_at: string + } + Returns: Json + } + referentiel_score: { + Args: { + collectivite_id: number + } + Returns: { + referentiel: Database["public"]["Enums"]["referentiel"] + score_fait: number + score_programme: number + completude: number + complet: boolean + }[] + } + upsert_preuves_reglementaire: { + Args: { + preuves: Json + } + Returns: undefined + } + } + Enums: { + etoile: "1" | "2" | "3" | "4" | "5" + sujet_demande: "labellisation" | "labellisation_cot" | "cot" + } + CompositeTypes: { + [_ in never]: never + } + } + public: { + Tables: { + abstract_any_indicateur_value: { + Row: { + annee: number + modified_at: string + valeur: number | null + } + Insert: { + annee: number + modified_at?: string + valeur?: number | null + } + Update: { + annee?: number + modified_at?: string + valeur?: number | null + } + Relationships: [] + } + abstract_modified_at: { + Row: { + modified_at: string + } + Insert: { + modified_at?: string + } + Update: { + modified_at?: string + } + Relationships: [] + } + action_commentaire: { Row: { + action_id: string collectivite_id: number - indicateur_id: number - service_tag_id: number + commentaire: string + modified_at: string + modified_by: string } Insert: { + action_id: string collectivite_id: number - indicateur_id: number - service_tag_id: number + commentaire: string + modified_at?: string + modified_by?: string } Update: { + action_id?: string collectivite_id?: number - indicateur_id?: number - service_tag_id?: number + commentaire?: string + modified_at?: string + modified_by?: string } Relationships: [ { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_commentaire_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "indicateur_service_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_service_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_service_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_service_tag_service_tag_id_fkey" - columns: ["service_tag_id"] - isOneToOne: false - referencedRelation: "service_tag" - referencedColumns: ["id"] - }, ] } - indicateur_source: { - Row: { - id: string - libelle: string - ordre_affichage: number | null - } - Insert: { - id: string - libelle: string - ordre_affichage?: number | null - } - Update: { - id?: string - libelle?: string - ordre_affichage?: number | null - } - Relationships: [] - } - indicateur_source_metadonnee: { + action_computed_points: { Row: { - date_version: string - diffuseur: string | null - id: number - limites: string | null - methodologie: string | null - nom_donnees: string | null - producteur: string | null - source_id: string + action_id: string + modified_at: string + value: number } Insert: { - date_version: string - diffuseur?: string | null - id?: number - limites?: string | null - methodologie?: string | null - nom_donnees?: string | null - producteur?: string | null - source_id: string + action_id: string + modified_at?: string + value: number } Update: { - date_version?: string - diffuseur?: string | null - id?: number - limites?: string | null - methodologie?: string | null - nom_donnees?: string | null - producteur?: string | null - source_id?: string + action_id?: string + modified_at?: string + value?: number } Relationships: [ { - foreignKeyName: "indicateur_source_metadonnee_source_id_fkey" - columns: ["source_id"] - isOneToOne: false - referencedRelation: "indicateur_source" + foreignKeyName: "action_computed_points_action_id_fkey" + columns: ["action_id"] + isOneToOne: true + referencedRelation: "action_relation" referencedColumns: ["id"] }, ] } - indicateur_sous_thematique: { + action_definition: { Row: { - indicateur_id: number - sous_thematique_id: number + action_id: string + categorie: Database["public"]["Enums"]["action_categorie"] | null + contexte: string + description: string + exemples: string + identifiant: string + modified_at: string + nom: string + perimetre_evaluation: string + points: number | null + pourcentage: number | null + preuve: string | null + reduction_potentiel: string + referentiel: Database["public"]["Enums"]["referentiel"] + referentiel_id: string + referentiel_version: string + ressources: string } Insert: { - indicateur_id: number - sous_thematique_id: number + action_id: string + categorie?: Database["public"]["Enums"]["action_categorie"] | null + contexte: string + description: string + exemples: string + identifiant: string + modified_at?: string + nom: string + perimetre_evaluation: string + points?: number | null + pourcentage?: number | null + preuve?: string | null + reduction_potentiel: string + referentiel: Database["public"]["Enums"]["referentiel"] + referentiel_id: string + referentiel_version: string + ressources: string } Update: { - indicateur_id?: number - sous_thematique_id?: number + action_id?: string + categorie?: Database["public"]["Enums"]["action_categorie"] | null + contexte?: string + description?: string + exemples?: string + identifiant?: string + modified_at?: string + nom?: string + perimetre_evaluation?: string + points?: number | null + pourcentage?: number | null + preuve?: string | null + reduction_potentiel?: string + referentiel?: Database["public"]["Enums"]["referentiel"] + referentiel_id?: string + referentiel_version?: string + ressources?: string } Relationships: [ { - foreignKeyName: "indicateur_sous_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_sous_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_sous_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" + foreignKeyName: "action_definition_action_id_fkey" + columns: ["action_id"] + isOneToOne: true + referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_sous_thematique_sous_thematique_id_fkey" - columns: ["sous_thematique_id"] + foreignKeyName: "referentiel_id_fkey" + columns: ["referentiel_id"] isOneToOne: false - referencedRelation: "sous_thematique" + referencedRelation: "referentiel_definition" referencedColumns: ["id"] }, ] } - indicateur_thematique: { + action_definition_tag: { Row: { - indicateur_id: number - thematique_id: number + action_id: string + referentiel_id: string + tag_ref: string } Insert: { - indicateur_id: number - thematique_id: number + action_id: string + referentiel_id: string + tag_ref: string } Update: { - indicateur_id?: number - thematique_id?: number + action_id?: string + referentiel_id?: string + tag_ref?: string } Relationships: [ { - foreignKeyName: "indicateur_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] + foreignKeyName: "action_definition_tag_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "crm_indicateurs" + referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] + foreignKeyName: "action_definition_tag_referentiel_id_fkey" + columns: ["referentiel_id"] isOneToOne: false - referencedRelation: "indicateur_definition" + referencedRelation: "referentiel_definition" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_thematique_thematique_id_fkey" - columns: ["thematique_id"] + foreignKeyName: "action_definition_tag_tag_ref_fkey" + columns: ["tag_ref"] isOneToOne: false - referencedRelation: "thematique" - referencedColumns: ["id"] + referencedRelation: "referentiel_tag" + referencedColumns: ["ref"] }, ] } - indicateur_valeur: { + action_discussion: { Row: { + action_id: string collectivite_id: number created_at: string - created_by: string | null - date_valeur: string - estimation: number | null + created_by: string id: number - indicateur_id: number - metadonnee_id: number | null modified_at: string - modified_by: string | null - objectif: number | null - objectif_commentaire: string | null - resultat: number | null - resultat_commentaire: string | null + status: Database["public"]["Enums"]["action_discussion_statut"] } Insert: { + action_id: string collectivite_id: number created_at?: string - created_by?: string | null - date_valeur: string - estimation?: number | null + created_by?: string id?: number - indicateur_id: number - metadonnee_id?: number | null modified_at?: string - modified_by?: string | null - objectif?: number | null - objectif_commentaire?: string | null - resultat?: number | null - resultat_commentaire?: string | null + status?: Database["public"]["Enums"]["action_discussion_statut"] } Update: { + action_id?: string collectivite_id?: number created_at?: string - created_by?: string | null - date_valeur?: string - estimation?: number | null + created_by?: string id?: number - indicateur_id?: number - metadonnee_id?: number | null modified_at?: string - modified_by?: string | null - objectif?: number | null - objectif_commentaire?: string | null - resultat?: number | null - resultat_commentaire?: string | null + status?: Database["public"]["Enums"]["action_discussion_statut"] } Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_discussion_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "action_discussion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + action_discussion_commentaire: { + Row: { + created_at: string + created_by: string + discussion_id: number + id: number + message: string + } + Insert: { + created_at?: string + created_by?: string + discussion_id: number + id?: number + message: string + } + Update: { + created_at?: string + created_by?: string + discussion_id?: number + id?: number + message?: string + } + Relationships: [ + { + foreignKeyName: "action_discussion_commentaire_discussion_id_fkey" + columns: ["discussion_id"] + isOneToOne: false + referencedRelation: "action_discussion" + referencedColumns: ["id"] + }, + { + foreignKeyName: "action_discussion_commentaire_discussion_id_fkey" + columns: ["discussion_id"] + isOneToOne: false + referencedRelation: "action_discussion_feed" + referencedColumns: ["id"] + }, + ] + } + action_impact: { + Row: { + action_continue: boolean + competences_communales: boolean + description: string + description_complementaire: string + fourchette_budgetaire: number + id: number + impact_tier: number + independamment_competences: boolean + nb_collectivite_en_cours: number + nb_collectivite_realise: number + ressources_externes: Json | null + rex: Json | null + subventions_mobilisables: Json | null + temps_de_mise_en_oeuvre: number + titre: string + typologie_id: number | null + } + Insert: { + action_continue?: boolean + competences_communales?: boolean + description: string + description_complementaire?: string + fourchette_budgetaire?: number + id?: number + impact_tier?: number + independamment_competences?: boolean + nb_collectivite_en_cours?: number + nb_collectivite_realise?: number + ressources_externes?: Json | null + rex?: Json | null + subventions_mobilisables?: Json | null + temps_de_mise_en_oeuvre?: number + titre: string + typologie_id?: number | null + } + Update: { + action_continue?: boolean + competences_communales?: boolean + description?: string + description_complementaire?: string + fourchette_budgetaire?: number + id?: number + impact_tier?: number + independamment_competences?: boolean + nb_collectivite_en_cours?: number + nb_collectivite_realise?: number + ressources_externes?: Json | null + rex?: Json | null + subventions_mobilisables?: Json | null + temps_de_mise_en_oeuvre?: number + titre?: string + typologie_id?: number | null + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_fourchette_budgetaire_fkey" + columns: ["fourchette_budgetaire"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact_fourchette_budgetaire" + referencedColumns: ["niveau"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_impact_tier_fkey" + columns: ["impact_tier"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact_tier" + referencedColumns: ["niveau"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_temps_de_mise_en_oeuvre_fkey" + columns: ["temps_de_mise_en_oeuvre"] isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact_temps_de_mise_en_oeuvre" + referencedColumns: ["niveau"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_typologie_id_fkey" + columns: ["typologie_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact_typologie" + referencedColumns: ["id"] }, + ] + } + action_impact_action: { + Row: { + action_id: string + action_impact_id: number + } + Insert: { + action_id: string + action_impact_id: number + } + Update: { + action_id?: string + action_impact_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_action_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_definition" + referencedColumns: ["action_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_action_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, + ] + } + action_impact_banatic_competence: { + Row: { + action_impact_id: number + competence_code: number + } + Insert: { + action_impact_id: number + competence_code: number + } + Update: { + action_impact_id?: number + competence_code?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_banatic_competence_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_banatic_competence_competence_code_fkey" + columns: ["competence_code"] isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] + referencedRelation: "banatic_competence" + referencedColumns: ["code"] }, + ] + } + action_impact_categorie: { + Row: { + id: string + nom: string + } + Insert: { + id: string + nom: string + } + Update: { + id?: string + nom?: string + } + Relationships: [] + } + action_impact_categorie_fnv: { + Row: { + action_impact_id: number + categorie_fnv_id: number + } + Insert: { + action_impact_id: number + categorie_fnv_id: number + } + Update: { + action_impact_id?: number + categorie_fnv_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_categorie_fnv_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_categorie_fnv_categorie_fnv_id_fkey" + columns: ["categorie_fnv_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] + referencedRelation: "categorie_fnv" + referencedColumns: ["id"] }, + ] + } + action_impact_complexite: { + Row: { + niveau: number + nom: string + } + Insert: { + niveau?: number + nom: string + } + Update: { + niveau?: number + nom?: string + } + Relationships: [] + } + action_impact_effet_attendu: { + Row: { + action_impact_id: number + effet_attendu_id: number + } + Insert: { + action_impact_id: number + effet_attendu_id: number + } + Update: { + action_impact_id?: number + effet_attendu_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_effet_attendu_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_effet_attendu_effet_attendu_id_fkey" + columns: ["effet_attendu_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "effet_attendu" + referencedColumns: ["id"] }, + ] + } + action_impact_fiche_action: { + Row: { + action_impact_id: number + fiche_id: number + } + Insert: { + action_impact_id: number + fiche_id: number + } + Update: { + action_impact_id?: number + fiche_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_fiche_action_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, + ] + } + action_impact_fourchette_budgetaire: { + Row: { + niveau: number + nom: string + } + Insert: { + niveau?: number + nom: string + } + Update: { + niveau?: number + nom?: string + } + Relationships: [] + } + action_impact_indicateur: { + Row: { + action_impact_id: number + indicateur_id: number + } + Insert: { + action_impact_id: number + indicateur_id: number + } + Update: { + action_impact_id?: number + indicateur_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_indicateur_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_indicateur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_indicateur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, + ] + } + action_impact_panier: { + Row: { + action_id: number + panier_id: string + } + Insert: { + action_id: number + panier_id: string + } + Update: { + action_id?: number + panier_id?: string + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_panier_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_panier_panier_id_fkey" + columns: ["panier_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "panier" + referencedColumns: ["id"] }, + ] + } + action_impact_partenaire: { + Row: { + action_impact_id: number + partenaire_id: number + } + Insert: { + action_impact_id: number + partenaire_id: number + } + Update: { + action_impact_id?: number + partenaire_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_partenaire_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_partenaire_partenaire_id_fkey" + columns: ["partenaire_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "panier_partenaire" + referencedColumns: ["id"] }, + ] + } + action_impact_sous_thematique: { + Row: { + action_impact_id: number + sous_thematique_id: number + } + Insert: { + action_impact_id: number + sous_thematique_id: number + } + Update: { + action_impact_id?: number + sous_thematique_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_sous_thematique_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_created_by_fkey" - columns: ["created_by"] + foreignKeyName: "action_impact_sous_thematique_sous_thematique_id_fkey" + columns: ["sous_thematique_id"] isOneToOne: false - referencedRelation: "users" + referencedRelation: "sous_thematique" referencedColumns: ["id"] }, + ] + } + action_impact_state: { + Row: { + action: Database["public"]["Tables"]["action_impact"]["Row"] | null + isinpanier: boolean | null + panier: Database["public"]["Tables"]["panier"]["Row"] | null + statut: + | Database["public"]["Tables"]["action_impact_statut"]["Row"] + | null + action_definition: unknown | null + action_impact_fourchette_budgetaire: unknown | null + action_impact_temps_de_mise_en_oeuvre: unknown | null + action_impact_thematique: unknown | null + action_impact_typologie: unknown | null + matches_competences: boolean | null + thematique: unknown | null + } + Insert: { + action?: Database["public"]["Tables"]["action_impact"]["Row"] | null + isinpanier?: boolean | null + panier?: Database["public"]["Tables"]["panier"]["Row"] | null + statut?: + | Database["public"]["Tables"]["action_impact_statut"]["Row"] + | null + } + Update: { + action?: Database["public"]["Tables"]["action_impact"]["Row"] | null + isinpanier?: boolean | null + panier?: Database["public"]["Tables"]["panier"]["Row"] | null + statut?: + | Database["public"]["Tables"]["action_impact_statut"]["Row"] + | null + } + Relationships: [] + } + action_impact_statut: { + Row: { + action_id: number + categorie_id: string + panier_id: string + } + Insert: { + action_id: number + categorie_id: string + panier_id: string + } + Update: { + action_id?: number + categorie_id?: string + panier_id?: string + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_indicateur_id_fkey" - columns: ["indicateur_id"] + foreignKeyName: "action_impact_statut_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "crm_indicateurs" + referencedRelation: "action_impact" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_indicateur_id_fkey" - columns: ["indicateur_id"] + foreignKeyName: "action_impact_statut_categorie_id_fkey" + columns: ["categorie_id"] isOneToOne: false - referencedRelation: "crm_indicateurs" + referencedRelation: "action_impact_categorie" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_indicateur_id_fkey" - columns: ["indicateur_id"] + foreignKeyName: "action_impact_statut_panier_id_fkey" + columns: ["panier_id"] isOneToOne: false - referencedRelation: "indicateur_definition" + referencedRelation: "panier" referencedColumns: ["id"] }, + ] + } + action_impact_temps_de_mise_en_oeuvre: { + Row: { + niveau: number + nom: string + } + Insert: { + niveau?: number + nom: string + } + Update: { + niveau?: number + nom?: string + } + Relationships: [] + } + action_impact_thematique: { + Row: { + action_impact_id: number + ordre: number + thematique_id: number + } + Insert: { + action_impact_id: number + ordre?: number + thematique_id: number + } + Update: { + action_impact_id?: number + ordre?: number + thematique_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_metadonnee_id_fkey" - columns: ["metadonnee_id"] + foreignKeyName: "action_impact_thematique_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "indicateur_source_metadonnee" + referencedRelation: "action_impact" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_modified_by_fkey" - columns: ["modified_by"] + foreignKeyName: "action_impact_thematique_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "users" + referencedRelation: "thematique" referencedColumns: ["id"] }, ] } - indicateurs_json: { + action_impact_tier: { + Row: { + niveau: number + nom: string + } + Insert: { + niveau?: number + nom: string + } + Update: { + niveau?: number + nom?: string + } + Relationships: [] + } + action_impact_typologie: { Row: { - created_at: string - indicateurs: Json + id: number + nom: string } Insert: { - created_at?: string - indicateurs: Json + id?: number + nom: string } Update: { - created_at?: string - indicateurs?: Json + id?: number + nom?: string } Relationships: [] } - justification: { + action_origine: { Row: { - collectivite_id: number - modified_at: string - modified_by: string - question_id: string - texte: string + action_id: string + origine_action_id: string + origine_referentiel_id: string + ponderation: number + referentiel_id: string } Insert: { - collectivite_id: number - modified_at: string - modified_by?: string - question_id: string - texte: string + action_id: string + origine_action_id: string + origine_referentiel_id: string + ponderation?: number + referentiel_id: string } Update: { - collectivite_id?: number - modified_at?: string - modified_by?: string - question_id?: string - texte?: string + action_id?: string + origine_action_id?: string + origine_referentiel_id?: string + ponderation?: number + referentiel_id?: string } Relationships: [ { - foreignKeyName: "justification_modified_by_fkey" - columns: ["modified_by"] + foreignKeyName: "action_origine_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "users" + referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "justification_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "action_origine_origine_action_id_fkey" + columns: ["origine_action_id"] isOneToOne: false - referencedRelation: "question" + referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "justification_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "action_origine_origine_referentiel_id_fkey" + columns: ["origine_referentiel_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "referentiel_definition" referencedColumns: ["id"] }, { - foreignKeyName: "justification_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "action_origine_referentiel_id_fkey" + columns: ["referentiel_id"] isOneToOne: false - referencedRelation: "report_question" + referencedRelation: "referentiel_definition" referencedColumns: ["id"] }, ] } - justification_ajustement: { + action_relation: { + Row: { + id: string + parent: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + } + Insert: { + id: string + parent?: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + } + Update: { + id?: string + parent?: string | null + referentiel?: Database["public"]["Enums"]["referentiel"] + } + Relationships: [ + { + foreignKeyName: "action_relation_parent_fkey" + columns: ["parent"] + isOneToOne: false + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + ] + } + action_statut: { Row: { action_id: string + avancement: Database["public"]["Enums"]["avancement"] + avancement_detaille: number[] | null collectivite_id: number + concerne: boolean modified_at: string modified_by: string - texte: string } Insert: { action_id: string + avancement: Database["public"]["Enums"]["avancement"] + avancement_detaille?: number[] | null collectivite_id: number - modified_at: string + concerne: boolean + modified_at?: string modified_by?: string - texte: string } Update: { action_id?: string + avancement?: Database["public"]["Enums"]["avancement"] + avancement_detaille?: number[] | null collectivite_id?: number + concerne?: boolean modified_at?: string modified_by?: string - texte?: string } Relationships: [ { - foreignKeyName: "justification_ajustement_action_id_fkey" + foreignKeyName: "action_statut_action_id_fkey" columns: ["action_id"] isOneToOne: false referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "justification_ajustement_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, ] } - labellisation: { + annexe: { Row: { - annee: number | null - collectivite_id: number | null - etoiles: number + collectivite_id: number + commentaire: string + fiche_id: number + fichier_id: number | null id: number - obtenue_le: string - referentiel: Database["public"]["Enums"]["referentiel"] - score_programme: number | null - score_realise: number | null + lien: Json | null + modified_at: string + modified_by: string + titre: string + url: string | null } Insert: { - annee?: number | null - collectivite_id?: number | null - etoiles: number + collectivite_id: number + commentaire?: string + fiche_id: number + fichier_id?: number | null id?: number - obtenue_le: string - referentiel: Database["public"]["Enums"]["referentiel"] - score_programme?: number | null - score_realise?: number | null + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Update: { - annee?: number | null - collectivite_id?: number | null - etoiles?: number + collectivite_id?: number + commentaire?: string + fiche_id?: number + fichier_id?: number | null id?: number - obtenue_le?: string - referentiel?: Database["public"]["Enums"]["referentiel"] - score_programme?: number | null - score_realise?: number | null + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Relationships: [ { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "fiche_action" referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_identite" + referencedRelation: "fiches_action" referencedColumns: ["id"] }, + ] + } + audit_auditeur: { + Row: { + audit_id: number + auditeur: string + created_at: string | null + } + Insert: { + audit_id: number + auditeur: string + created_at?: string | null + } + Update: { + audit_id?: number + auditeur?: string + created_at?: string | null + } + Relationships: [ { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_auditeur_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_audit_state" + referencedColumns: ["audit_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_auditeur_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_auditeur_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit_en_cours" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_auditeur_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "retool_audit" + referencedColumns: ["audit_id"] }, + ] + } + axe: { + Row: { + collectivite_id: number + created_at: string + id: number + modified_at: string + modified_by: string | null + nom: string | null + panier_id: string | null + parent: number | null + plan: number | null + type: number | null + axe_enfant: unknown | null + collectivite_card: unknown | null + plan_action_type: unknown | null + vide: boolean | null + } + Insert: { + collectivite_id: number + created_at?: string + id?: number + modified_at?: string + modified_by?: string | null + nom?: string | null + panier_id?: string | null + parent?: number | null + plan?: number | null + type?: number | null + } + Update: { + collectivite_id?: number + created_at?: string + id?: number + modified_at?: string + modified_by?: string | null + nom?: string | null + panier_id?: string | null + parent?: number | null + plan?: number | null + type?: number | null + } + Relationships: [ { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_panier_id_fkey" + columns: ["panier_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "panier" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_parent_fkey" + columns: ["parent"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "axe" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_parent_fkey" + columns: ["parent"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "plan_action" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_parent_fkey" + columns: ["parent"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "plan_action_profondeur" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_plan_fkey" + columns: ["plan"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "axe" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_plan_fkey" + columns: ["plan"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "plan_action" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_plan_fkey" + columns: ["plan"] isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "plan_action_profondeur" + referencedColumns: ["id"] }, - ] - } - labellisation_action_critere: { - Row: { - action_id: string - etoile: Database["labellisation"]["Enums"]["etoile"] - formulation: string - min_programme_percentage: number | null - min_programme_score: number | null - min_realise_percentage: number | null - min_realise_score: number | null - prio: number - referentiel: Database["public"]["Enums"]["referentiel"] - } - Insert: { - action_id: string - etoile: Database["labellisation"]["Enums"]["etoile"] - formulation: string - min_programme_percentage?: number | null - min_programme_score?: number | null - min_realise_percentage?: number | null - min_realise_score?: number | null - prio: number - referentiel: Database["public"]["Enums"]["referentiel"] - } - Update: { - action_id?: string - etoile?: Database["labellisation"]["Enums"]["etoile"] - formulation?: string - min_programme_percentage?: number | null - min_programme_score?: number | null - min_realise_percentage?: number | null - min_realise_score?: number | null - prio?: number - referentiel?: Database["public"]["Enums"]["referentiel"] - } - Relationships: [ { - foreignKeyName: "labellisation_action_critere_action_id_fkey" - columns: ["action_id"] + foreignKeyName: "axe_type_fkey" + columns: ["type"] isOneToOne: false - referencedRelation: "action_relation" + referencedRelation: "plan_action_type" referencedColumns: ["id"] }, ] } - labellisation_calendrier: { - Row: { - information: string - referentiel: Database["public"]["Enums"]["referentiel"] - } - Insert: { - information: string - referentiel: Database["public"]["Enums"]["referentiel"] - } - Update: { - information?: string - referentiel?: Database["public"]["Enums"]["referentiel"] - } - Relationships: [] - } - labellisation_fichier_critere: { + banatic_competence: { Row: { - description: string - etoile: Database["labellisation"]["Enums"]["etoile"] - referentiel: Database["public"]["Enums"]["referentiel"] + code: number + nom: string } Insert: { - description: string - etoile: Database["labellisation"]["Enums"]["etoile"] - referentiel: Database["public"]["Enums"]["referentiel"] + code: number + nom: string } Update: { - description?: string - etoile?: Database["labellisation"]["Enums"]["etoile"] - referentiel?: Database["public"]["Enums"]["referentiel"] + code?: number + nom?: string } Relationships: [] } - maintenance: { + categorie_fnv: { Row: { - begins_at: string - ends_at: string id: number + nom: string } Insert: { - begins_at: string - ends_at: string id?: number + nom: string } Update: { - begins_at?: string - ends_at?: string id?: number + nom?: string } Relationships: [] } - panier: { + categorie_tag: { Row: { collectivite_id: number | null - collectivite_preset: number | null - created_at: string - created_by: string | null - id: string - latest_update: string - private: boolean | null - action_impact_state: unknown | null + created_at: string + created_by: string | null + groupement_id: number | null + id: number + nom: string + visible: boolean } Insert: { collectivite_id?: number | null - collectivite_preset?: number | null created_at?: string created_by?: string | null - id?: string - latest_update?: string - private?: boolean | null + groupement_id?: number | null + id?: number + nom: string + visible?: boolean } Update: { collectivite_id?: number | null - collectivite_preset?: number | null created_at?: string created_by?: string | null - id?: string - latest_update?: string - private?: boolean | null + groupement_id?: number | null + id?: number + nom?: string + visible?: boolean } Relationships: [ { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "categorie_tag_groupement_id_fkey" + columns: ["groupement_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "groupement" + referencedColumns: ["id"] }, + ] + } + client_scores: { + Row: { + collectivite_id: number + modified_at: string + payload_timestamp: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json + } + Insert: { + collectivite_id: number + modified_at: string + payload_timestamp?: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json + } + Update: { + collectivite_id?: number + modified_at?: string + payload_timestamp?: string | null + referentiel?: Database["public"]["Enums"]["referentiel"] + scores?: Json + } + Relationships: [ { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + client_scores_update: { + Row: { + collectivite_id: number + modified_at: string + referentiel: Database["public"]["Enums"]["referentiel"] + } + Insert: { + collectivite_id: number + modified_at: string + referentiel: Database["public"]["Enums"]["referentiel"] + } + Update: { + collectivite_id?: number + modified_at?: string + referentiel?: Database["public"]["Enums"]["referentiel"] + } + Relationships: [ { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "panier_created_by_fkey" - columns: ["created_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, ] } - panier_partenaire: { + collectivite: { Row: { + access_restreint: boolean + created_at: string id: number - nom: string | null + modified_at: string + active: boolean | null + collectivite_thematique: unknown | null + collectivite_utilisateur: unknown | null } Insert: { + access_restreint?: boolean + created_at?: string id?: number - nom?: string | null + modified_at?: string } Update: { + access_restreint?: boolean + created_at?: string id?: number - nom?: string | null + modified_at?: string } Relationships: [] } - partenaire_tag: { + collectivite_banatic_competence: { Row: { collectivite_id: number - id: number - nom: string + competence_code: number } Insert: { collectivite_id: number - id?: number - nom: string + competence_code: number } Update: { collectivite_id?: number - id?: number - nom?: string + competence_code?: number } Relationships: [ { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "stats_active_real_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_competence_code_fkey" + columns: ["competence_code"] + isOneToOne: false + referencedRelation: "banatic_competence" + referencedColumns: ["code"] + }, + ] + } + collectivite_bucket: { + Row: { + bucket_id: string + collectivite_id: number + } + Insert: { + bucket_id: string + collectivite_id: number + } + Update: { + bucket_id?: string + collectivite_id?: number + } + Relationships: [ + { + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" @@ -15690,6014 +3521,6743 @@ export type Database = { }, ] } - personnalisation: { + collectivite_test: { Row: { - action_id: string - description: string - titre: string + collectivite_id: number | null + id: number + nom: string } Insert: { - action_id: string - description: string - titre: string + collectivite_id?: number | null + id?: number + nom: string } Update: { - action_id?: string - description?: string - titre?: string + collectivite_id?: number | null + id?: number + nom?: string } Relationships: [ { - foreignKeyName: "personnalisation_action_id_fkey" - columns: ["action_id"] - isOneToOne: true - referencedRelation: "action_relation" - referencedColumns: ["id"] + foreignKeyName: "collectivite_test_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] }, - ] - } - personnalisation_consequence: { - Row: { - collectivite_id: number - consequences: Json - modified_at: string - payload_timestamp: string | null - } - Insert: { - collectivite_id: number - consequences: Json - modified_at?: string - payload_timestamp?: string | null - } - Update: { - collectivite_id?: number - consequences?: Json - modified_at?: string - payload_timestamp?: string | null - } - Relationships: [ { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_snippet" + isOneToOne: false + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_statuts" + isOneToOne: false + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "active_collectivite" + isOneToOne: false + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "audits" + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "carte_collectivite_active" + isOneToOne: false + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" + isOneToOne: false + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" + isOneToOne: false + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_action_statut" + isOneToOne: false + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_card" + isOneToOne: false + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_carte_identite" + isOneToOne: false + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + isOneToOne: false + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_test_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_test_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "question_thematique_completude" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_test_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "retool_active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_test_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "retool_completude" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_labellisation" + isOneToOne: false + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" + isOneToOne: false + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_niveau_acces" + isOneToOne: false + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" + isOneToOne: false + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" + isOneToOne: false + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_referentiel" + isOneToOne: false + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_utilisateur" + isOneToOne: false + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivites_crm" + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "comparaison_scores_audit" + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_collectivites" + isOneToOne: false + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + commune: { + Row: { + code: string + collectivite_id: number | null + id: number + nom: string + } + Insert: { + code: string + collectivite_id?: number | null + id?: number + nom: string + } + Update: { + code?: string + collectivite_id?: number | null + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" + isOneToOne: false + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" + isOneToOne: false + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "engagement_collectivite" + isOneToOne: false + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "late_collectivite" + isOneToOne: false + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_pourcentage_completude" + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "named_collectivite" + isOneToOne: false + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_thematique_completude" + isOneToOne: false + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "rattachement" + isOneToOne: false + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_indicateur_resultat" + isOneToOne: false + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_binaire" + isOneToOne: false + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_choix" + isOneToOne: false + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_proportion" + isOneToOne: false + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_scores" + isOneToOne: false + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, ] } - personnalisation_regle: { - Row: { - action_id: string - description: string - formule: string - modified_at: string - type: Database["public"]["Enums"]["regle_type"] - } - Insert: { - action_id: string - description: string - formule: string - modified_at?: string - type: Database["public"]["Enums"]["regle_type"] - } - Update: { - action_id?: string - description?: string - formule?: string - modified_at?: string - type?: Database["public"]["Enums"]["regle_type"] - } - Relationships: [ - { - foreignKeyName: "personnalisation_regle_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "personnalisation" - referencedColumns: ["action_id"] - }, - ] - } - personnalisations_json: { + confidentialite_crud: { Row: { - created_at: string - questions: Json - regles: Json + c: Database["public"]["Enums"]["confidentialite_option_crud"] + d: Database["public"]["Enums"]["confidentialite_option_crud"] + nom_element: string + profil: Database["public"]["Enums"]["confidentialite_profil"] + r: Database["public"]["Enums"]["confidentialite_option_crud"] + type_element: Database["public"]["Enums"]["confidentialite_type_element"] + u: Database["public"]["Enums"]["confidentialite_option_crud"] } Insert: { - created_at?: string - questions: Json - regles: Json + c: Database["public"]["Enums"]["confidentialite_option_crud"] + d: Database["public"]["Enums"]["confidentialite_option_crud"] + nom_element: string + profil: Database["public"]["Enums"]["confidentialite_profil"] + r: Database["public"]["Enums"]["confidentialite_option_crud"] + type_element: Database["public"]["Enums"]["confidentialite_type_element"] + u: Database["public"]["Enums"]["confidentialite_option_crud"] } Update: { - created_at?: string - questions?: Json - regles?: Json + c?: Database["public"]["Enums"]["confidentialite_option_crud"] + d?: Database["public"]["Enums"]["confidentialite_option_crud"] + nom_element?: string + profil?: Database["public"]["Enums"]["confidentialite_profil"] + r?: Database["public"]["Enums"]["confidentialite_option_crud"] + type_element?: Database["public"]["Enums"]["confidentialite_type_element"] + u?: Database["public"]["Enums"]["confidentialite_option_crud"] } Relationships: [] } - personne_tag: { + cot: { Row: { + actif: boolean collectivite_id: number - id: number - nom: string + signataire: number | null } Insert: { + actif: boolean collectivite_id: number - id?: number - nom: string + signataire?: number | null } Update: { + actif?: boolean collectivite_id?: number - id?: number - nom?: string + signataire?: number | null } Relationships: [ { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" + isOneToOne: true + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "cot_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" + isOneToOne: true + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "cot_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" + isOneToOne: true + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" + isOneToOne: true + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" + isOneToOne: true + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" + isOneToOne: true + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + isOneToOne: true + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" + isOneToOne: true + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" + isOneToOne: true + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + isOneToOne: true + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" + isOneToOne: true + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" + isOneToOne: true + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" + isOneToOne: true + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" + isOneToOne: true + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" + isOneToOne: true + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" + isOneToOne: true + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" + isOneToOne: true + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" + isOneToOne: true + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" + isOneToOne: true + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" + isOneToOne: true + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] + isOneToOne: false + referencedRelation: "crm_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, ] } - plan_action_type: { + dcp: { Row: { - categorie: string - detail: string | null - id: number - type: string + cgu_acceptees_le: string | null + created_at: string + deleted: boolean + email: string + limited: boolean + modified_at: string + nom: string + prenom: string + telephone: string | null + user_id: string } Insert: { - categorie: string - detail?: string | null - id?: number - type: string + cgu_acceptees_le?: string | null + created_at?: string + deleted?: boolean + email: string + limited?: boolean + modified_at?: string + nom: string + prenom: string + telephone?: string | null + user_id: string } Update: { - categorie?: string - detail?: string | null - id?: number - type?: string + cgu_acceptees_le?: string | null + created_at?: string + deleted?: boolean + email?: string + limited?: boolean + modified_at?: string + nom?: string + prenom?: string + telephone?: string | null + user_id?: string } - Relationships: [ - { - foreignKeyName: "plan_action_type_categorie_fkey" - columns: ["categorie"] - isOneToOne: false - referencedRelation: "plan_action_type_categorie" - referencedColumns: ["categorie"] - }, - ] + Relationships: [] } - plan_action_type_categorie: { + effet_attendu: { Row: { - categorie: string + id: number + nom: string + notice: string | null } Insert: { - categorie: string + id?: number + nom: string + notice?: string | null } Update: { - categorie?: string + id?: number + nom?: string + notice?: string | null } Relationships: [] } - post_audit_scores: { + epci: { Row: { - audit_id: number - collectivite_id: number - modified_at: string - payload_timestamp: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json + collectivite_id: number | null + id: number + nature: Database["public"]["Enums"]["nature"] + nom: string + siren: string } Insert: { - audit_id: number - collectivite_id: number - modified_at: string - payload_timestamp?: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json + collectivite_id?: number | null + id?: number + nature: Database["public"]["Enums"]["nature"] + nom: string + siren: string } Update: { - audit_id?: number - collectivite_id?: number - modified_at?: string - payload_timestamp?: string | null - referentiel?: Database["public"]["Enums"]["referentiel"] - scores?: Json + collectivite_id?: number | null + id?: number + nature?: Database["public"]["Enums"]["nature"] + nom?: string + siren?: string } Relationships: [ { - foreignKeyName: "post_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_niveau_acces" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "comparaison_scores_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "crm_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "crm_usages" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_audit_state" - referencedColumns: ["audit_id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "post_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "post_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] + referencedRelation: "question_thematique_completude" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "post_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit_en_cours" - referencedColumns: ["id"] + referencedRelation: "retool_active_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "post_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["audit_id"] + referencedRelation: "retool_completude" + referencedColumns: ["collectivite_id"] }, - ] - } - pre_audit_scores: { - Row: { - audit_id: number - collectivite_id: number - modified_at: string - payload_timestamp: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json - } - Insert: { - audit_id: number - collectivite_id: number - modified_at: string - payload_timestamp?: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json - } - Update: { - audit_id?: number - collectivite_id?: number - modified_at?: string - payload_timestamp?: string | null - referentiel?: Database["public"]["Enums"]["referentiel"] - scores?: Json - } - Relationships: [ { - foreignKeyName: "pre_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_audit_state" - referencedColumns: ["audit_id"] + referencedRelation: "retool_completude_compute" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "pre_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_hebdo" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "pre_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_premier_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "pre_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit_en_cours" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "pre_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["audit_id"] + referencedRelation: "retool_score" + referencedColumns: ["collectivite_id"] }, - ] - } - preuve_action: { - Row: { - action_id: string - preuve_id: string - } - Insert: { - action_id: string - preuve_id: string - } - Update: { - action_id?: string - preuve_id?: string - } - Relationships: [ { - foreignKeyName: "preuve_action_action_id_fkey" - columns: ["action_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] + referencedRelation: "site_labellisation" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_action_preuve_id_fkey" - columns: ["preuve_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "preuve_reglementaire_definition" - referencedColumns: ["id"] + referencedRelation: "stats_active_real_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] }, ] } - preuve_audit: { + fiche_action: { Row: { - audit_id: number + amelioration_continue: boolean | null + budget_previsionnel: number | null + calendrier: string | null + cibles: string[] | null collectivite_id: number - commentaire: string - fichier_id: number | null + created_at: string + date_debut: string | null + date_fin_provisoire: string | null + description: string | null + financements: string | null id: number - lien: Json | null + instance_gouvernance: string | null + maj_termine: boolean | null modified_at: string - modified_by: string - titre: string - url: string | null + modified_by: string | null + niveau_priorite: + | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] + | null + notes_complementaires: string | null + objectifs: string | null + participation_citoyenne: string | null + participation_citoyenne_type: string | null + piliers_eci: + | Database["public"]["Enums"]["fiche_action_piliers_eci"][] + | null + ressources: string | null + restreint: boolean | null + resultats_attendus: + | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] + | null + statut: Database["public"]["Enums"]["fiche_action_statuts"] | null + temps_de_mise_en_oeuvre_id: number | null + titre: string | null + fiche_action_plan: unknown | null } Insert: { - audit_id: number + amelioration_continue?: boolean | null + budget_previsionnel?: number | null + calendrier?: string | null + cibles?: string[] | null collectivite_id: number - commentaire?: string - fichier_id?: number | null + created_at?: string + date_debut?: string | null + date_fin_provisoire?: string | null + description?: string | null + financements?: string | null id?: number - lien?: Json | null + instance_gouvernance?: string | null + maj_termine?: boolean | null modified_at?: string - modified_by?: string - titre?: string - url?: string | null + modified_by?: string | null + niveau_priorite?: + | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] + | null + notes_complementaires?: string | null + objectifs?: string | null + participation_citoyenne?: string | null + participation_citoyenne_type?: string | null + piliers_eci?: + | Database["public"]["Enums"]["fiche_action_piliers_eci"][] + | null + ressources?: string | null + restreint?: boolean | null + resultats_attendus?: + | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] + | null + statut?: Database["public"]["Enums"]["fiche_action_statuts"] | null + temps_de_mise_en_oeuvre_id?: number | null + titre?: string | null } Update: { - audit_id?: number + amelioration_continue?: boolean | null + budget_previsionnel?: number | null + calendrier?: string | null + cibles?: string[] | null collectivite_id?: number - commentaire?: string - fichier_id?: number | null + created_at?: string + date_debut?: string | null + date_fin_provisoire?: string | null + description?: string | null + financements?: string | null id?: number - lien?: Json | null + instance_gouvernance?: string | null + maj_termine?: boolean | null modified_at?: string - modified_by?: string - titre?: string - url?: string | null + modified_by?: string | null + niveau_priorite?: + | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] + | null + notes_complementaires?: string | null + objectifs?: string | null + participation_citoyenne?: string | null + participation_citoyenne_type?: string | null + piliers_eci?: + | Database["public"]["Enums"]["fiche_action_piliers_eci"][] + | null + ressources?: string | null + restreint?: boolean | null + resultats_attendus?: + | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] + | null + statut?: Database["public"]["Enums"]["fiche_action_statuts"] | null + temps_de_mise_en_oeuvre_id?: number | null + titre?: string | null } Relationships: [ { - foreignKeyName: "preuve_audit_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_audit_state" - referencedColumns: ["audit_id"] + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_audit_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_audit_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_audit_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit_en_cours" + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_audit_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["audit_id"] + referencedRelation: "collectivite_niveau_acces" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "retool_active_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "site_labellisation" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_temps_de_mise_en_oeuvre_id_fkey" + columns: ["temps_de_mise_en_oeuvre_id"] + isOneToOne: false + referencedRelation: "action_impact_temps_de_mise_en_oeuvre" + referencedColumns: ["niveau"] + }, + ] + } + fiche_action_action: { + Row: { + action_id: string + fiche_id: number + } + Insert: { + action_id: string + fiche_id: number + } + Update: { + action_id?: string + fiche_id?: number + } + Relationships: [ + { + foreignKeyName: "fiche_action_action_action_id_fkey" + columns: ["action_id"] + isOneToOne: false + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_action_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiche_action" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_action_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiche_resume" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_action_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiches_action" + referencedColumns: ["id"] + }, + ] + } + fiche_action_axe: { + Row: { + axe_id: number + fiche_id: number + } + Insert: { + axe_id: number + fiche_id: number + } + Update: { + axe_id?: number + fiche_id?: number + } + Relationships: [ + { + foreignKeyName: "fiche_action_axe_axe_id_fkey" + columns: ["axe_id"] + isOneToOne: false + referencedRelation: "axe" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_axe_axe_id_fkey" + columns: ["axe_id"] + isOneToOne: false + referencedRelation: "plan_action" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_axe_axe_id_fkey" + columns: ["axe_id"] + isOneToOne: false + referencedRelation: "plan_action_profondeur" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_axe_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiche_action" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_axe_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiche_resume" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_axe_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiches_action" + referencedColumns: ["id"] + }, + ] + } + fiche_action_effet_attendu: { + Row: { + effet_attendu_id: number + fiche_id: number + } + Insert: { + effet_attendu_id: number + fiche_id: number + } + Update: { + effet_attendu_id?: number + fiche_id?: number + } + Relationships: [ + { + foreignKeyName: "fiche_action_effet_attendu_effet_attendu_id_fkey" + columns: ["effet_attendu_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] + referencedRelation: "effet_attendu" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, + ] + } + fiche_action_financeur_tag: { + Row: { + fiche_id: number + financeur_tag_id: number + id: number + montant_ttc: number | null + } + Insert: { + fiche_id: number + financeur_tag_id: number + id?: number + montant_ttc?: number | null + } + Update: { + fiche_id?: number + financeur_tag_id?: number + id?: number + montant_ttc?: number | null + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_financeur_tag_financeur_tag_id_fkey" + columns: ["financeur_tag_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "financeur_tag" + referencedColumns: ["id"] }, + ] + } + fiche_action_import_csv: { + Row: { + amelioration_continue: string | null + axe: string | null + budget: string | null + calendrier: string | null + cibles: string | null + collectivite_id: string | null + date_debut: string | null + date_fin: string | null + description: string | null + elu_referent: string | null + financements: string | null + financeur_deux: string | null + financeur_trois: string | null + financeur_un: string | null + montant_deux: string | null + montant_trois: string | null + montant_un: string | null + moyens: string | null + notes: string | null + num_action: string | null + objectifs: string | null + partenaires: string | null + personne_referente: string | null + plan_nom: string | null + priorite: string | null + resultats_attendus: string | null + service: string | null + sous_axe: string | null + sous_sous_axe: string | null + statut: string | null + structure_pilote: string | null + titre: string | null + } + Insert: { + amelioration_continue?: string | null + axe?: string | null + budget?: string | null + calendrier?: string | null + cibles?: string | null + collectivite_id?: string | null + date_debut?: string | null + date_fin?: string | null + description?: string | null + elu_referent?: string | null + financements?: string | null + financeur_deux?: string | null + financeur_trois?: string | null + financeur_un?: string | null + montant_deux?: string | null + montant_trois?: string | null + montant_un?: string | null + moyens?: string | null + notes?: string | null + num_action?: string | null + objectifs?: string | null + partenaires?: string | null + personne_referente?: string | null + plan_nom?: string | null + priorite?: string | null + resultats_attendus?: string | null + service?: string | null + sous_axe?: string | null + sous_sous_axe?: string | null + statut?: string | null + structure_pilote?: string | null + titre?: string | null + } + Update: { + amelioration_continue?: string | null + axe?: string | null + budget?: string | null + calendrier?: string | null + cibles?: string | null + collectivite_id?: string | null + date_debut?: string | null + date_fin?: string | null + description?: string | null + elu_referent?: string | null + financements?: string | null + financeur_deux?: string | null + financeur_trois?: string | null + financeur_un?: string | null + montant_deux?: string | null + montant_trois?: string | null + montant_un?: string | null + moyens?: string | null + notes?: string | null + num_action?: string | null + objectifs?: string | null + partenaires?: string | null + personne_referente?: string | null + plan_nom?: string | null + priorite?: string | null + resultats_attendus?: string | null + service?: string | null + sous_axe?: string | null + sous_sous_axe?: string | null + statut?: string | null + structure_pilote?: string | null + titre?: string | null + } + Relationships: [] + } + fiche_action_indicateur: { + Row: { + fiche_id: number + indicateur_id: number + } + Insert: { + fiche_id: number + indicateur_id: number + } + Update: { + fiche_id?: number + indicateur_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_indicateur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_indicateur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, + ] + } + fiche_action_libre_tag: { + Row: { + created_at: string + created_by: string | null + fiche_id: number + libre_tag_id: number + } + Insert: { + created_at?: string + created_by?: string | null + fiche_id: number + libre_tag_id: number + } + Update: { + created_at?: string + created_by?: string | null + fiche_id?: number + libre_tag_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_libre_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_libre_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_libre_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_libre_tag_libre_tag_id_fkey" + columns: ["libre_tag_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] + referencedRelation: "libre_tag" + referencedColumns: ["id"] }, + ] + } + fiche_action_lien: { + Row: { + fiche_deux: number + fiche_une: number + } + Insert: { + fiche_deux: number + fiche_une: number + } + Update: { + fiche_deux?: number + fiche_une?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_deux_fkey" + columns: ["fiche_deux"] isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_deux_fkey" + columns: ["fiche_deux"] isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_deux_fkey" + columns: ["fiche_deux"] isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_une_fkey" + columns: ["fiche_une"] isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_une_fkey" + columns: ["fiche_une"] isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_une_fkey" + columns: ["fiche_une"] isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, + ] + } + fiche_action_partenaire_tag: { + Row: { + fiche_id: number + partenaire_tag_id: number + } + Insert: { + fiche_id: number + partenaire_tag_id: number + } + Update: { + fiche_id?: number + partenaire_tag_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_partenaire_tag_partenaire_tag_id_fkey" + columns: ["partenaire_tag_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "partenaire_tag" + referencedColumns: ["id"] }, + ] + } + fiche_action_pilote: { + Row: { + fiche_id: number + tag_id: number | null + user_id: string | null + } + Insert: { + fiche_id: number + tag_id?: number | null + user_id?: string | null + } + Update: { + fiche_id?: number + tag_id?: number | null + user_id?: string | null + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_tag_id_fkey" + columns: ["tag_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "personne_tag" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_personnes" + referencedColumns: ["user_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "dcp" + referencedColumns: ["user_id"] }, ] } - preuve_complementaire: { + fiche_action_referent: { Row: { - action_id: string - collectivite_id: number - commentaire: string - fichier_id: number | null - id: number - lien: Json | null - modified_at: string - modified_by: string - titre: string - url: string | null + fiche_id: number + tag_id: number | null + user_id: string | null } Insert: { - action_id: string - collectivite_id: number - commentaire?: string - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + fiche_id: number + tag_id?: number | null + user_id?: string | null } Update: { - action_id?: string - collectivite_id?: number - commentaire?: string - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + fiche_id?: number + tag_id?: number | null + user_id?: string | null } Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_tag_id_fkey" + columns: ["tag_id"] isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] + referencedRelation: "personne_tag" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_personnes" + referencedColumns: ["user_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "dcp" + referencedColumns: ["user_id"] }, + ] + } + fiche_action_service_tag: { + Row: { + fiche_id: number + service_tag_id: number + } + Insert: { + fiche_id: number + service_tag_id: number + } + Update: { + fiche_id?: number + service_tag_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "fiche_action" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_service_tag_service_tag_id_fkey" + columns: ["service_tag_id"] isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] + referencedRelation: "service_tag" + referencedColumns: ["id"] }, + ] + } + fiche_action_sous_thematique: { + Row: { + fiche_id: number + thematique_id: number + } + Insert: { + fiche_id: number + thematique_id: number + } + Update: { + fiche_id?: number + thematique_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_identite" + referencedRelation: "fiche_resume" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_sous_thematique_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "sous_thematique" + referencedColumns: ["id"] }, + ] + } + fiche_action_structure_tag: { + Row: { + fiche_id: number + structure_tag_id: number + } + Insert: { + fiche_id: number + structure_tag_id: number + } + Update: { + fiche_id?: number + structure_tag_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_structure_tag_structure_tag_id_fkey" + columns: ["structure_tag_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] + referencedRelation: "structure_tag" + referencedColumns: ["id"] }, + ] + } + fiche_action_thematique: { + Row: { + fiche_id: number + thematique_id: number + } + Insert: { + fiche_id: number + thematique_id: number + } + Update: { + fiche_id?: number + thematique_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_thematique_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "thematique" + referencedColumns: ["id"] }, + ] + } + filtre_intervalle: { + Row: { + id: string + intervalle: unknown + libelle: string + type: Database["public"]["Enums"]["collectivite_filtre_type"] + } + Insert: { + id: string + intervalle: unknown + libelle: string + type: Database["public"]["Enums"]["collectivite_filtre_type"] + } + Update: { + id?: string + intervalle?: unknown + libelle?: string + type?: Database["public"]["Enums"]["collectivite_filtre_type"] + } + Relationships: [] + } + financeur_tag: { + Row: { + collectivite_id: number + id: number + nom: string + } + Insert: { + collectivite_id: number + id?: number + nom: string + } + Update: { + collectivite_id?: number + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "preuve_complementaire_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, ] } - preuve_labellisation: { + groupement: { Row: { - collectivite_id: number - commentaire: string - demande_id: number - fichier_id: number | null id: number - lien: Json | null - modified_at: string - modified_by: string - titre: string - url: string | null + nom: string } Insert: { - collectivite_id: number - commentaire?: string - demande_id: number - fichier_id?: number | null id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + nom: string } Update: { - collectivite_id?: number - commentaire?: string - demande_id?: number - fichier_id?: number | null id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + nom?: string + } + Relationships: [] + } + groupement_collectivite: { + Row: { + collectivite_id: number + groupement_id: number + } + Insert: { + collectivite_id: number + groupement_id: number + } + Update: { + collectivite_id?: number + groupement_id?: number } Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_labellisation_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "groupement_collectivite_groupement_id_fkey" + columns: ["groupement_id"] isOneToOne: false - referencedRelation: "demande" + referencedRelation: "groupement" + referencedColumns: ["id"] + }, + ] + } + indicateur_action: { + Row: { + action_id: string + indicateur_id: number + } + Insert: { + action_id: string + indicateur_id: number + } + Update: { + action_id?: string + indicateur_id?: number + } + Relationships: [ + { + foreignKeyName: "indicateur_action_action_id_fkey" + columns: ["action_id"] + isOneToOne: false + referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_labellisation_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "indicateur_action_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["demande_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_labellisation_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "indicateur_action_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "retool_labellisation_demande" + referencedRelation: "indicateur_definition" referencedColumns: ["id"] }, ] } - preuve_rapport: { + indicateur_artificialisation: { Row: { + activite: number collectivite_id: number - commentaire: string - date: string - fichier_id: number | null - id: number - lien: Json | null - modified_at: string - modified_by: string - titre: string - url: string | null + ferroviaire: number + habitat: number + inconnue: number + mixte: number + routiere: number + total: number } Insert: { + activite: number collectivite_id: number - commentaire?: string - date: string - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + ferroviaire: number + habitat: number + inconnue: number + mixte: number + routiere: number + total: number } Update: { + activite?: number collectivite_id?: number - commentaire?: string - date?: string - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + ferroviaire?: number + habitat?: number + inconnue?: number + mixte?: number + routiere?: number + total?: number } Relationships: [ { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" + isOneToOne: true + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" + isOneToOne: true + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" + isOneToOne: true + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" + isOneToOne: true + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" + isOneToOne: true + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + isOneToOne: true + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" + isOneToOne: true + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" + isOneToOne: true + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" + isOneToOne: true + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" + isOneToOne: true + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + isOneToOne: true + referencedRelation: "retool_plan_action_hebdo" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" + isOneToOne: true + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" + isOneToOne: true + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + isOneToOne: true + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" + isOneToOne: true + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" + isOneToOne: true + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" + isOneToOne: true + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" + isOneToOne: true + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" + isOneToOne: true + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + indicateur_categorie_tag: { + Row: { + categorie_tag_id: number + indicateur_id: number + } + Insert: { + categorie_tag_id: number + indicateur_id: number + } + Update: { + categorie_tag_id?: number + indicateur_id?: number + } + Relationships: [ + { + foreignKeyName: "indicateur_categorie_tag_categorie_tag_id_fkey" + columns: ["categorie_tag_id"] + isOneToOne: false + referencedRelation: "categorie_tag" + referencedColumns: ["id"] + }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_categorie_tag_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_categorie_tag_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, + ] + } + indicateur_collectivite: { + Row: { + collectivite_id: number + commentaire: string | null + confidentiel: boolean + favoris: boolean + indicateur_id: number + } + Insert: { + collectivite_id: number + commentaire?: string | null + confidentiel?: boolean + favoris?: boolean + indicateur_id: number + } + Update: { + collectivite_id?: number + commentaire?: string | null + confidentiel?: boolean + favoris?: boolean + indicateur_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + { + foreignKeyName: "indicateur_collectivite_indicateur_id_fkey" + columns: ["indicateur_id"] + isOneToOne: false + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_collectivite_indicateur_id_fkey" + columns: ["indicateur_id"] + isOneToOne: false + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] + }, ] } - preuve_reglementaire: { + indicateur_definition: { Row: { - collectivite_id: number - commentaire: string - fichier_id: number | null + borne_max: number | null + borne_min: number | null + collectivite_id: number | null + created_at: string + created_by: string | null + description: string | null + groupement_id: number | null id: number - lien: Json | null + identifiant_referentiel: string | null modified_at: string - modified_by: string - preuve_id: string + modified_by: string | null + participation_score: boolean + sans_valeur_utilisateur: boolean titre: string - url: string | null + titre_long: string | null + unite: string + valeur_calcule: string | null + indicateur_enfants: unknown | null + indicateur_parents: unknown | null } Insert: { - collectivite_id: number - commentaire?: string - fichier_id?: number | null + borne_max?: number | null + borne_min?: number | null + collectivite_id?: number | null + created_at?: string + created_by?: string | null + description?: string | null + groupement_id?: number | null id?: number - lien?: Json | null + identifiant_referentiel?: string | null modified_at?: string - modified_by?: string - preuve_id: string - titre?: string - url?: string | null + modified_by?: string | null + participation_score?: boolean + sans_valeur_utilisateur?: boolean + titre: string + titre_long?: string | null + unite: string + valeur_calcule?: string | null } Update: { - collectivite_id?: number - commentaire?: string - fichier_id?: number | null + borne_max?: number | null + borne_min?: number | null + collectivite_id?: number | null + created_at?: string + created_by?: string | null + description?: string | null + groupement_id?: number | null id?: number - lien?: Json | null + identifiant_referentiel?: string | null modified_at?: string - modified_by?: string - preuve_id?: string + modified_by?: string | null + participation_score?: boolean + sans_valeur_utilisateur?: boolean titre?: string - url?: string | null + titre_long?: string | null + unite?: string + valeur_calcule?: string | null } Relationships: [ { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_score" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "site_labellisation" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_definition_groupement_id_fkey" + columns: ["groupement_id"] + isOneToOne: false + referencedRelation: "groupement" + referencedColumns: ["id"] + }, + ] + } + indicateur_groupe: { + Row: { + enfant: number + parent: number + } + Insert: { + enfant: number + parent: number + } + Update: { + enfant?: number + parent?: number + } + Relationships: [ + { + foreignKeyName: "indicateur_groupe_enfant_fkey" + columns: ["enfant"] + isOneToOne: false + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_groupe_enfant_fkey" + columns: ["enfant"] + isOneToOne: false + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_groupe_parent_fkey" + columns: ["parent"] + isOneToOne: false + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_groupe_parent_fkey" + columns: ["parent"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, + ] + } + indicateur_pilote: { + Row: { + collectivite_id: number + id: number + indicateur_id: number + tag_id: number | null + user_id: string | null + indicateur_pilote_user: unknown | null + } + Insert: { + collectivite_id: number + id?: number + indicateur_id: number + tag_id?: number | null + user_id?: string | null + } + Update: { + collectivite_id?: number + id?: number + indicateur_id?: number + tag_id?: number | null + user_id?: string | null + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_reglementaire_preuve_id_fkey" - columns: ["preuve_id"] + foreignKeyName: "indicateur_pilote_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "preuve_reglementaire_definition" + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_pilote_indicateur_id_fkey" + columns: ["indicateur_id"] + isOneToOne: false + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_pilote_tag_id_fkey" + columns: ["tag_id"] + isOneToOne: false + referencedRelation: "personne_tag" referencedColumns: ["id"] }, ] } - preuve_reglementaire_definition: { - Row: { - description: string - id: string - nom: string - } - Insert: { - description: string - id: string - nom: string - } - Update: { - description?: string - id?: string - nom?: string - } - Relationships: [] - } - preuve_reglementaire_json: { - Row: { - created_at: string - preuves: Json - } - Insert: { - created_at?: string - preuves: Json - } - Update: { - created_at?: string - preuves?: Json - } - Relationships: [] - } - private_collectivite_membre: { + indicateur_service_tag: { Row: { - champ_intervention: - | Database["public"]["Enums"]["referentiel"][] - | null collectivite_id: number - created_at: string - details_fonction: string | null - est_referent: boolean | null - fonction: Database["public"]["Enums"]["membre_fonction"] | null - modified_at: string - user_id: string + indicateur_id: number + service_tag_id: number } Insert: { - champ_intervention?: - | Database["public"]["Enums"]["referentiel"][] - | null collectivite_id: number - created_at?: string - details_fonction?: string | null - est_referent?: boolean | null - fonction?: Database["public"]["Enums"]["membre_fonction"] | null - modified_at?: string - user_id: string + indicateur_id: number + service_tag_id: number } Update: { - champ_intervention?: - | Database["public"]["Enums"]["referentiel"][] - | null collectivite_id?: number - created_at?: string - details_fonction?: string | null - est_referent?: boolean | null - fonction?: Database["public"]["Enums"]["membre_fonction"] | null - modified_at?: string - user_id?: string + indicateur_id?: number + service_tag_id?: number } Relationships: [ { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "comparaison_scores_audit" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_service_tag_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_service_tag_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_service_tag_service_tag_id_fkey" + columns: ["service_tag_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "service_tag" + referencedColumns: ["id"] + }, + ] + } + indicateur_source: { + Row: { + id: string + libelle: string + ordre_affichage: number | null + } + Insert: { + id: string + libelle: string + ordre_affichage?: number | null + } + Update: { + id?: string + libelle?: string + ordre_affichage?: number | null + } + Relationships: [] + } + indicateur_source_metadonnee: { + Row: { + date_version: string + diffuseur: string | null + id: number + limites: string | null + methodologie: string | null + nom_donnees: string | null + producteur: string | null + source_id: string + } + Insert: { + date_version: string + diffuseur?: string | null + id?: number + limites?: string | null + methodologie?: string | null + nom_donnees?: string | null + producteur?: string | null + source_id: string + } + Update: { + date_version?: string + diffuseur?: string | null + id?: number + limites?: string | null + methodologie?: string | null + nom_donnees?: string | null + producteur?: string | null + source_id?: string + } + Relationships: [ + { + foreignKeyName: "indicateur_source_metadonnee_source_id_fkey" + columns: ["source_id"] + isOneToOne: false + referencedRelation: "indicateur_source" + referencedColumns: ["id"] }, + ] + } + indicateur_sous_thematique: { + Row: { + indicateur_id: number + sous_thematique_id: number + } + Insert: { + indicateur_id: number + sous_thematique_id: number + } + Update: { + indicateur_id?: number + sous_thematique_id?: number + } + Relationships: [ { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_sous_thematique_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_sous_thematique_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_sous_thematique_sous_thematique_id_fkey" + columns: ["sous_thematique_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] + referencedRelation: "sous_thematique" + referencedColumns: ["id"] }, + ] + } + indicateur_thematique: { + Row: { + indicateur_id: number + thematique_id: number + } + Insert: { + indicateur_id: number + thematique_id: number + } + Update: { + indicateur_id?: number + thematique_id?: number + } + Relationships: [ { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_thematique_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_thematique_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_thematique_thematique_id_fkey" + columns: ["thematique_id"] + isOneToOne: false + referencedRelation: "thematique" + referencedColumns: ["id"] }, + ] + } + indicateur_valeur: { + Row: { + collectivite_id: number + created_at: string + created_by: string | null + date_valeur: string + estimation: number | null + id: number + indicateur_id: number + metadonnee_id: number | null + modified_at: string + modified_by: string | null + objectif: number | null + objectif_commentaire: string | null + resultat: number | null + resultat_commentaire: string | null + } + Insert: { + collectivite_id: number + created_at?: string + created_by?: string | null + date_valeur: string + estimation?: number | null + id?: number + indicateur_id: number + metadonnee_id?: number | null + modified_at?: string + modified_by?: string | null + objectif?: number | null + objectif_commentaire?: string | null + resultat?: number | null + resultat_commentaire?: string | null + } + Update: { + collectivite_id?: number + created_at?: string + created_by?: string | null + date_valeur?: string + estimation?: number | null + id?: number + indicateur_id?: number + metadonnee_id?: number | null + modified_at?: string + modified_by?: string | null + objectif?: number | null + objectif_commentaire?: string | null + resultat?: number | null + resultat_commentaire?: string | null + } + Relationships: [ { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - private_utilisateur_droit: { - Row: { - active: boolean - collectivite_id: number - created_at: string - id: number - invitation_id: string | null - modified_at: string - niveau_acces: Database["public"]["Enums"]["niveau_acces"] - user_id: string - } - Insert: { - active: boolean - collectivite_id: number - created_at?: string - id?: number - invitation_id?: string | null - modified_at?: string - niveau_acces?: Database["public"]["Enums"]["niveau_acces"] - user_id: string - } - Update: { - active?: boolean - collectivite_id?: number - created_at?: string - id?: number - invitation_id?: string | null - modified_at?: string - niveau_acces?: Database["public"]["Enums"]["niveau_acces"] - user_id?: string - } - Relationships: [ - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_valeur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_valeur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_valeur_metadonnee_id_fkey" + columns: ["metadonnee_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_source_metadonnee" + referencedColumns: ["id"] }, + ] + } + indicateurs_json: { + Row: { + created_at: string + indicateurs: Json + } + Insert: { + created_at?: string + indicateurs: Json + } + Update: { + created_at?: string + indicateurs?: Json + } + Relationships: [] + } + justification: { + Row: { + collectivite_id: number + modified_at: string + modified_by: string + question_id: string + texte: string + } + Insert: { + collectivite_id: number + modified_at: string + modified_by?: string + question_id: string + texte: string + } + Update: { + collectivite_id?: number + modified_at?: string + modified_by?: string + question_id?: string + texte?: string + } + Relationships: [ { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "justification_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "question" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "justification_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_display" + referencedColumns: ["id"] }, + ] + } + justification_ajustement: { + Row: { + action_id: string + collectivite_id: number + modified_at: string + modified_by: string + texte: string + } + Insert: { + action_id: string + collectivite_id: number + modified_at: string + modified_by?: string + texte: string + } + Update: { + action_id?: string + collectivite_id?: number + modified_at?: string + modified_by?: string + texte?: string + } + Relationships: [ { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "justification_ajustement_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "private_utilisateur_droit_invitation_id_fkey" - columns: ["invitation_id"] - isOneToOne: false - referencedRelation: "invitation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "private_utilisateur_droit_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, ] } - question: { + labellisation: { Row: { - description: string - formulation: string - id: string - ordonnancement: number | null - thematique_id: string | null - type: Database["public"]["Enums"]["question_type"] - types_collectivites_concernees: - | Database["public"]["Enums"]["type_collectivite"][] - | null + annee: number | null + collectivite_id: number | null + etoiles: number + id: number + obtenue_le: string + referentiel: Database["public"]["Enums"]["referentiel"] + score_programme: number | null + score_realise: number | null } Insert: { - description: string - formulation: string - id: string - ordonnancement?: number | null - thematique_id?: string | null - type: Database["public"]["Enums"]["question_type"] - types_collectivites_concernees?: - | Database["public"]["Enums"]["type_collectivite"][] - | null + annee?: number | null + collectivite_id?: number | null + etoiles: number + id?: number + obtenue_le: string + referentiel: Database["public"]["Enums"]["referentiel"] + score_programme?: number | null + score_realise?: number | null } Update: { - description?: string - formulation?: string - id?: string - ordonnancement?: number | null - thematique_id?: string | null - type?: Database["public"]["Enums"]["question_type"] - types_collectivites_concernees?: - | Database["public"]["Enums"]["type_collectivite"][] - | null + annee?: number | null + collectivite_id?: number | null + etoiles?: number + id?: number + obtenue_le?: string + referentiel?: Database["public"]["Enums"]["referentiel"] + score_programme?: number | null + score_realise?: number | null } Relationships: [ { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "question_thematique" - referencedColumns: ["id"] - }, - { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["id"] + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_display" - referencedColumns: ["id"] + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] }, - ] - } - question_action: { - Row: { - action_id: string - question_id: string - } - Insert: { - action_id: string - question_id: string - } - Update: { - action_id?: string - question_id?: string - } - Relationships: [ { - foreignKeyName: "question_action_action_id_fkey" - columns: ["action_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "question_action_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question" - referencedColumns: ["id"] + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "question_action_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "question_action_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_question" - referencedColumns: ["id"] - }, - ] - } - question_choix: { - Row: { - formulation: string | null - id: string - ordonnancement: number | null - question_id: string | null - } - Insert: { - formulation?: string | null - id: string - ordonnancement?: number | null - question_id?: string | null - } - Update: { - formulation?: string | null - id?: string - ordonnancement?: number | null - question_id?: string | null - } - Relationships: [ + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] + }, { - foreignKeyName: "question_choix_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question" - referencedColumns: ["id"] + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "question_choix_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "question_choix_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_question" - referencedColumns: ["id"] + referencedRelation: "collectivite_niveau_acces" + referencedColumns: ["collectivite_id"] }, - ] - } - question_thematique: { - Row: { - id: string - nom: string | null - } - Insert: { - id: string - nom?: string | null - } - Update: { - id?: string - nom?: string | null - } - Relationships: [] - } - referentiel_json: { - Row: { - children: Json - created_at: string - definitions: Json - } - Insert: { - children: Json - created_at?: string - definitions: Json - } - Update: { - children?: Json - created_at?: string - definitions?: Json - } - Relationships: [] - } - reponse_binaire: { - Row: { - collectivite_id: number - modified_at: string - question_id: string - reponse: boolean | null - } - Insert: { - collectivite_id: number - modified_at?: string - question_id: string - reponse?: boolean | null - } - Update: { - collectivite_id?: number - modified_at?: string - question_id?: string - reponse?: boolean | null - } - Relationships: [ { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "retool_active_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + labellisation_action_critere: { + Row: { + action_id: string + etoile: Database["labellisation"]["Enums"]["etoile"] + formulation: string + min_programme_percentage: number | null + min_programme_score: number | null + min_realise_percentage: number | null + min_realise_score: number | null + prio: number + referentiel: Database["public"]["Enums"]["referentiel"] + } + Insert: { + action_id: string + etoile: Database["labellisation"]["Enums"]["etoile"] + formulation: string + min_programme_percentage?: number | null + min_programme_score?: number | null + min_realise_percentage?: number | null + min_realise_score?: number | null + prio: number + referentiel: Database["public"]["Enums"]["referentiel"] + } + Update: { + action_id?: string + etoile?: Database["labellisation"]["Enums"]["etoile"] + formulation?: string + min_programme_percentage?: number | null + min_programme_score?: number | null + min_realise_percentage?: number | null + min_realise_score?: number | null + prio?: number + referentiel?: Database["public"]["Enums"]["referentiel"] + } + Relationships: [ + { + foreignKeyName: "labellisation_action_critere_action_id_fkey" + columns: ["action_id"] + isOneToOne: false + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + ] + } + labellisation_calendrier: { + Row: { + information: string + referentiel: Database["public"]["Enums"]["referentiel"] + } + Insert: { + information: string + referentiel: Database["public"]["Enums"]["referentiel"] + } + Update: { + information?: string + referentiel?: Database["public"]["Enums"]["referentiel"] + } + Relationships: [] + } + labellisation_fichier_critere: { + Row: { + description: string + etoile: Database["labellisation"]["Enums"]["etoile"] + referentiel: Database["public"]["Enums"]["referentiel"] + } + Insert: { + description: string + etoile: Database["labellisation"]["Enums"]["etoile"] + referentiel: Database["public"]["Enums"]["referentiel"] + } + Update: { + description?: string + etoile?: Database["labellisation"]["Enums"]["etoile"] + referentiel?: Database["public"]["Enums"]["referentiel"] + } + Relationships: [] + } + libre_tag: { + Row: { + collectivite_id: number | null + created_at: string + created_by: string | null + id: number + nom: string + } + Insert: { + collectivite_id?: number | null + created_at?: string + created_by?: string | null + id?: number + nom: string + } + Update: { + collectivite_id?: number | null + created_at?: string + created_by?: string | null + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "reponse_binaire_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "question" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_binaire_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_binaire_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "report_question" - referencedColumns: ["id"] - }, ] } - reponse_choix: { + maintenance: { Row: { - collectivite_id: number - modified_at: string - question_id: string - reponse: string | null + begins_at: string + ends_at: string + id: number } Insert: { - collectivite_id: number - modified_at?: string - question_id: string - reponse?: string | null + begins_at: string + ends_at: string + id?: number } Update: { - collectivite_id?: number - modified_at?: string - question_id?: string - reponse?: string | null + begins_at?: string + ends_at?: string + id?: number + } + Relationships: [] + } + panier: { + Row: { + collectivite_id: number | null + collectivite_preset: number | null + created_at: string + created_by: string | null + id: string + latest_update: string + private: boolean | null + action_impact_state: unknown | null + } + Insert: { + collectivite_id?: number | null + collectivite_preset?: number | null + created_at?: string + created_by?: string | null + id?: string + latest_update?: string + private?: boolean | null + } + Update: { + collectivite_id?: number | null + collectivite_preset?: number | null + created_at?: string + created_by?: string | null + id?: string + latest_update?: string + private?: boolean | null } Relationships: [ { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" + isOneToOne: true + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" + isOneToOne: true + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" + isOneToOne: true + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" + isOneToOne: true + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" + isOneToOne: true + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" + isOneToOne: true + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + isOneToOne: true + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + isOneToOne: true + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" + isOneToOne: true + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" + isOneToOne: true + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" + isOneToOne: true + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" + isOneToOne: true + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" + isOneToOne: true + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" + isOneToOne: true + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" + isOneToOne: true + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" + isOneToOne: true + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" + isOneToOne: true + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" + isOneToOne: true + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_score" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "question" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false referencedRelation: "question_display" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_choix_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "report_question" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_choix_reponse_fkey" - columns: ["reponse"] - isOneToOne: false - referencedRelation: "question_choix" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_choix_reponse_fkey" - columns: ["reponse"] - isOneToOne: false - referencedRelation: "report_choix" - referencedColumns: ["id"] + referencedColumns: ["collectivite_id"] }, - ] - } - reponse_proportion: { - Row: { - collectivite_id: number - modified_at: string - question_id: string - reponse: number | null - } - Insert: { - collectivite_id: number - modified_at?: string - question_id: string - reponse?: number | null - } - Update: { - collectivite_id?: number - modified_at?: string - question_id?: string - reponse?: number | null - } - Relationships: [ { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + panier_partenaire: { + Row: { + id: number + nom: string | null + } + Insert: { + id?: number + nom?: string | null + } + Update: { + id?: number + nom?: string | null + } + Relationships: [] + } + partenaire_tag: { + Row: { + collectivite_id: number + id: number + nom: string + } + Insert: { + collectivite_id: number + id?: number + nom: string + } + Update: { + collectivite_id?: number + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + personnalisation: { + Row: { + action_id: string + description: string + titre: string + } + Insert: { + action_id: string + description: string + titre: string + } + Update: { + action_id?: string + description?: string + titre?: string + } + Relationships: [ { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_action_id_fkey" + columns: ["action_id"] + isOneToOne: true + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + ] + } + personnalisation_consequence: { + Row: { + collectivite_id: number + consequences: Json + modified_at: string + payload_timestamp: string | null + } + Insert: { + collectivite_id: number + consequences: Json + modified_at?: string + payload_timestamp?: string | null + } + Update: { + collectivite_id?: number + consequences?: Json + modified_at?: string + payload_timestamp?: string | null + } + Relationships: [ + { + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + isOneToOne: true + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + isOneToOne: true + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + isOneToOne: true + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" + isOneToOne: true + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" + isOneToOne: true + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + isOneToOne: true + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + isOneToOne: true + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" + isOneToOne: true + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "question" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_proportion_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["id"] + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "crm_collectivites" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "report_question" - referencedColumns: ["id"] + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "crm_usages" + referencedColumns: ["collectivite_id"] }, - ] - } - service_tag: { - Row: { - collectivite_id: number - id: number - nom: string - } - Insert: { - collectivite_id: number - id?: number - nom: string - } - Update: { - collectivite_id?: number - id?: number - nom?: string - } - Relationships: [ { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" + isOneToOne: true + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" + isOneToOne: true + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" + isOneToOne: true + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" + isOneToOne: true + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" + isOneToOne: true + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" + isOneToOne: true + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + isOneToOne: true + referencedRelation: "retool_plan_action_hebdo" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" + isOneToOne: true + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" + isOneToOne: true + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" + isOneToOne: true + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" + isOneToOne: true + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + isOneToOne: true + referencedRelation: "stats_active_real_collectivites" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" + isOneToOne: true + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" + isOneToOne: true + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + isOneToOne: true + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + personnalisation_regle: { + Row: { + action_id: string + description: string + formule: string + modified_at: string + type: Database["public"]["Enums"]["regle_type"] + } + Insert: { + action_id: string + description: string + formule: string + modified_at?: string + type: Database["public"]["Enums"]["regle_type"] + } + Update: { + action_id?: string + description?: string + formule?: string + modified_at?: string + type?: Database["public"]["Enums"]["regle_type"] + } + Relationships: [ { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "personnalisation_regle_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "personnalisation" + referencedColumns: ["action_id"] }, + ] + } + personnalisations_json: { + Row: { + created_at: string + questions: Json + regles: Json + } + Insert: { + created_at?: string + questions: Json + regles: Json + } + Update: { + created_at?: string + questions?: Json + regles?: Json + } + Relationships: [] + } + personne_tag: { + Row: { + collectivite_id: number + id: number + nom: string + } + Insert: { + collectivite_id: number + id?: number + nom: string + } + Update: { + collectivite_id?: number + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + plan_action_type: { + Row: { + categorie: string + detail: string | null + id: number + type: string + } + Insert: { + categorie: string + detail?: string | null + id?: number + type: string + } + Update: { + categorie?: string + detail?: string | null + id?: number + type?: string + } + Relationships: [ { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "plan_action_type_categorie_fkey" + columns: ["categorie"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "plan_action_type_categorie" + referencedColumns: ["categorie"] }, + ] + } + plan_action_type_categorie: { + Row: { + categorie: string + } + Insert: { + categorie: string + } + Update: { + categorie?: string + } + Relationships: [] + } + post_audit_scores: { + Row: { + audit_id: number + collectivite_id: number + modified_at: string + payload_timestamp: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json + } + Insert: { + audit_id: number + collectivite_id: number + modified_at: string + payload_timestamp?: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json + } + Update: { + audit_id?: number + collectivite_id?: number + modified_at?: string + payload_timestamp?: string | null + referentiel?: Database["public"]["Enums"]["referentiel"] + scores?: Json + } + Relationships: [ { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "post_audit_scores_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_audit_state" + referencedColumns: ["audit_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "post_audit_scores_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit" + referencedColumns: ["id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "post_audit_scores_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit_en_cours" + referencedColumns: ["id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "post_audit_scores_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "retool_audit" + referencedColumns: ["audit_id"] }, ] } - site_contact: { + pre_audit_scores: { Row: { - email: string - formulaire: Json + audit_id: number + collectivite_id: number modified_at: string + payload_timestamp: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json } Insert: { - email: string - formulaire: Json - modified_at?: string + audit_id: number + collectivite_id: number + modified_at: string + payload_timestamp?: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json } Update: { - email?: string - formulaire?: Json + audit_id?: number + collectivite_id?: number modified_at?: string + payload_timestamp?: string | null + referentiel?: Database["public"]["Enums"]["referentiel"] + scores?: Json } - Relationships: [] + Relationships: [ + { + foreignKeyName: "pre_audit_scores_audit_id_fkey" + columns: ["audit_id"] + isOneToOne: false + referencedRelation: "action_audit_state" + referencedColumns: ["audit_id"] + }, + { + foreignKeyName: "pre_audit_scores_audit_id_fkey" + columns: ["audit_id"] + isOneToOne: false + referencedRelation: "audit" + referencedColumns: ["id"] + }, + { + foreignKeyName: "pre_audit_scores_audit_id_fkey" + columns: ["audit_id"] + isOneToOne: false + referencedRelation: "audit_en_cours" + referencedColumns: ["id"] + }, + { + foreignKeyName: "pre_audit_scores_audit_id_fkey" + columns: ["audit_id"] + isOneToOne: false + referencedRelation: "retool_audit" + referencedColumns: ["audit_id"] + }, + ] } - sous_thematique: { + preuve_action: { Row: { - id: number - sous_thematique: string - thematique_id: number + action_id: string + preuve_id: string } Insert: { - id?: number - sous_thematique: string - thematique_id: number + action_id: string + preuve_id: string } Update: { - id?: number - sous_thematique?: string - thematique_id?: number + action_id?: string + preuve_id?: string } Relationships: [ { - foreignKeyName: "sous_thematique_thematique_id_fkey" - columns: ["thematique_id"] + foreignKeyName: "preuve_action_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "thematique" + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + { + foreignKeyName: "preuve_action_preuve_id_fkey" + columns: ["preuve_id"] + isOneToOne: false + referencedRelation: "preuve_reglementaire_definition" referencedColumns: ["id"] }, ] } - structure_tag: { + preuve_audit: { Row: { + audit_id: number collectivite_id: number + commentaire: string + fichier_id: number | null id: number - nom: string + lien: Json | null + modified_at: string + modified_by: string + titre: string + url: string | null } Insert: { + audit_id: number collectivite_id: number + commentaire?: string + fichier_id?: number | null id?: number - nom: string + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Update: { + audit_id?: number collectivite_id?: number + commentaire?: string + fichier_id?: number | null id?: number - nom?: string + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Relationships: [ { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_audit_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_audit_state" + referencedColumns: ["audit_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_audit_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit" + referencedColumns: ["id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_audit_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit_en_cours" + referencedColumns: ["id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_audit_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] + referencedRelation: "retool_audit" + referencedColumns: ["audit_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" @@ -21705,4711 +10265,4768 @@ export type Database = { }, ] } - tableau_de_bord_module: { + preuve_complementaire: { Row: { + action_id: string collectivite_id: number - created_at: string - id: string + commentaire: string + fichier_id: number | null + id: number + lien: Json | null modified_at: string - options: Json - slug: string + modified_by: string titre: string - type: string - user_id: string | null + url: string | null } Insert: { + action_id: string collectivite_id: number - created_at?: string - id?: string + commentaire?: string + fichier_id?: number | null + id?: number + lien?: Json | null modified_at?: string - options: Json - slug: string - titre: string - type: string - user_id?: string | null + modified_by?: string + titre?: string + url?: string | null } Update: { + action_id?: string collectivite_id?: number - created_at?: string - id?: string + commentaire?: string + fichier_id?: number | null + id?: number + lien?: Json | null modified_at?: string - options?: Json - slug?: string + modified_by?: string titre?: string - type?: string - user_id?: string | null + url?: string | null } Relationships: [ { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_complementaire_action_id_fkey" + columns: ["action_id"] + isOneToOne: false + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + ] + } + preuve_labellisation: { + Row: { + collectivite_id: number + commentaire: string + demande_id: number + fichier_id: number | null + id: number + lien: Json | null + modified_at: string + modified_by: string + titre: string + url: string | null + } + Insert: { + collectivite_id: number + commentaire?: string + demande_id: number + fichier_id?: number | null + id?: number + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null + } + Update: { + collectivite_id?: number + commentaire?: string + demande_id?: number + fichier_id?: number | null + id?: number + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null + } + Relationships: [ + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["user_id"] - }, - { - foreignKeyName: "tableau_de_bord_module_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "crm_personnes" - referencedColumns: ["user_id"] - }, - { - foreignKeyName: "tableau_de_bord_module_user_id_fkey" - columns: ["user_id"] + foreignKeyName: "preuve_labellisation_demande_id_fkey" + columns: ["demande_id"] isOneToOne: false - referencedRelation: "dcp" - referencedColumns: ["user_id"] + referencedRelation: "retool_audit" + referencedColumns: ["demande_id"] }, { - foreignKeyName: "tableau_de_bord_module_user_id_fkey" - columns: ["user_id"] + foreignKeyName: "preuve_labellisation_demande_id_fkey" + columns: ["demande_id"] isOneToOne: false - referencedRelation: "dcp_display" - referencedColumns: ["user_id"] + referencedRelation: "retool_labellisation_demande" + referencedColumns: ["id"] }, ] } - thematique: { + preuve_rapport: { Row: { + collectivite_id: number + commentaire: string + date: string + fichier_id: number | null id: number - md_id: string | null - nom: string + lien: Json | null + modified_at: string + modified_by: string + titre: string + url: string | null } Insert: { + collectivite_id: number + commentaire?: string + date: string + fichier_id?: number | null id?: number - md_id?: string | null - nom: string + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Update: { + collectivite_id?: number + commentaire?: string + date?: string + fichier_id?: number | null id?: number - md_id?: string | null - nom?: string - } - Relationships: [] - } - type_tabular_score: { - Row: { - action_id: string | null - avancement: Database["public"]["Enums"]["avancement"] | null - concerne: boolean | null - desactive: boolean | null - points_max_personnalises: number | null - points_max_referentiel: number | null - points_programmes: number | null - points_realises: number | null - points_restants: number | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - score_non_renseigne: number | null - score_pas_fait: number | null - score_programme: number | null - score_realise: number | null - score_realise_plus_programme: number | null - } - Insert: { - action_id?: string | null - avancement?: Database["public"]["Enums"]["avancement"] | null - concerne?: boolean | null - desactive?: boolean | null - points_max_personnalises?: number | null - points_max_referentiel?: number | null - points_programmes?: number | null - points_realises?: number | null - points_restants?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - score_non_renseigne?: number | null - score_pas_fait?: number | null - score_programme?: number | null - score_realise?: number | null - score_realise_plus_programme?: number | null - } - Update: { - action_id?: string | null - avancement?: Database["public"]["Enums"]["avancement"] | null - concerne?: boolean | null - desactive?: boolean | null - points_max_personnalises?: number | null - points_max_referentiel?: number | null - points_programmes?: number | null - points_realises?: number | null - points_restants?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - score_non_renseigne?: number | null - score_pas_fait?: number | null - score_programme?: number | null - score_realise?: number | null - score_realise_plus_programme?: number | null - } - Relationships: [] - } - usage: { - Row: { - action: Database["public"]["Enums"]["usage_action"] - collectivite_id: number | null - fonction: Database["public"]["Enums"]["usage_fonction"] - page: Database["public"]["Enums"]["visite_page"] | null - time: string - user_id: string | null - } - Insert: { - action: Database["public"]["Enums"]["usage_action"] - collectivite_id?: number | null - fonction: Database["public"]["Enums"]["usage_fonction"] - page?: Database["public"]["Enums"]["visite_page"] | null - time?: string - user_id?: string | null - } - Update: { - action?: Database["public"]["Enums"]["usage_action"] - collectivite_id?: number | null - fonction?: Database["public"]["Enums"]["usage_fonction"] - page?: Database["public"]["Enums"]["visite_page"] | null - time?: string - user_id?: string | null - } - Relationships: [] - } - utilisateur_support: { - Row: { - support: boolean - user_id: string - } - Insert: { - support?: boolean - user_id: string - } - Update: { - support?: boolean - user_id?: string + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Relationships: [ { - foreignKeyName: "utilisateur_support_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "utilisateur_support_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "crm_personnes" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "utilisateur_support_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "dcp" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "utilisateur_support_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "dcp_display" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_niveau_acces" + referencedColumns: ["collectivite_id"] }, - ] - } - utilisateur_verifie: { - Row: { - user_id: string - verifie: boolean - } - Insert: { - user_id: string - verifie?: boolean - } - Update: { - user_id?: string - verifie?: boolean - } - Relationships: [ { - foreignKeyName: "utilisateur_verifie_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "comparaison_scores_audit" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "utilisateur_verifie_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "crm_personnes" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "crm_collectivites" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "utilisateur_verifie_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "dcp" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "crm_usages" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "utilisateur_verifie_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "dcp_display" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, - ] - } - visite: { - Row: { - collectivite_id: number | null - onglet: Database["public"]["Enums"]["visite_onglet"] | null - page: Database["public"]["Enums"]["visite_page"] - tag: Database["public"]["Enums"]["visite_tag"] | null - time: string - user_id: string | null - } - Insert: { - collectivite_id?: number | null - onglet?: Database["public"]["Enums"]["visite_onglet"] | null - page: Database["public"]["Enums"]["visite_page"] - tag?: Database["public"]["Enums"]["visite_tag"] | null - time?: string - user_id?: string | null - } - Update: { - collectivite_id?: number | null - onglet?: Database["public"]["Enums"]["visite_onglet"] | null - page?: Database["public"]["Enums"]["visite_page"] - tag?: Database["public"]["Enums"]["visite_tag"] | null - time?: string - user_id?: string | null - } - Relationships: [] - } - } - Views: { - action_audit_state: { - Row: { - action_id: string | null - audit_id: number | null - avis: string | null - collectivite_id: number | null - ordre_du_jour: boolean | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - state_id: number | null - statut: Database["public"]["Enums"]["audit_statut"] | null - } - Relationships: [ { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "retool_score" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "site_labellisation" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_active_real_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] + }, + ] + } + preuve_reglementaire: { + Row: { + collectivite_id: number + commentaire: string + fichier_id: number | null + id: number + lien: Json | null + modified_at: string + modified_by: string + preuve_id: string + titre: string + url: string | null + } + Insert: { + collectivite_id: number + commentaire?: string + fichier_id?: number | null + id?: number + lien?: Json | null + modified_at?: string + modified_by?: string + preuve_id: string + titre?: string + url?: string | null + } + Update: { + collectivite_id?: number + commentaire?: string + fichier_id?: number | null + id?: number + lien?: Json | null + modified_at?: string + modified_by?: string + preuve_id?: string + titre?: string + url?: string | null + } + Relationships: [ + { + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_reglementaire_preuve_id_fkey" + columns: ["preuve_id"] + isOneToOne: false + referencedRelation: "preuve_reglementaire_definition" + referencedColumns: ["id"] + }, + ] + } + preuve_reglementaire_definition: { + Row: { + description: string + id: string + nom: string + } + Insert: { + description: string + id: string + nom: string + } + Update: { + description?: string + id?: string + nom?: string + } + Relationships: [] + } + preuve_reglementaire_json: { + Row: { + created_at: string + preuves: Json + } + Insert: { + created_at?: string + preuves: Json + } + Update: { + created_at?: string + preuves?: Json + } + Relationships: [] + } + private_collectivite_membre: { + Row: { + champ_intervention: + | Database["public"]["Enums"]["referentiel"][] + | null + collectivite_id: number + created_at: string + details_fonction: string | null + est_referent: boolean | null + fonction: Database["public"]["Enums"]["membre_fonction"] | null + modified_at: string + user_id: string + } + Insert: { + champ_intervention?: + | Database["public"]["Enums"]["referentiel"][] + | null + collectivite_id: number + created_at?: string + details_fonction?: string | null + est_referent?: boolean | null + fonction?: Database["public"]["Enums"]["membre_fonction"] | null + modified_at?: string + user_id: string + } + Update: { + champ_intervention?: + | Database["public"]["Enums"]["referentiel"][] + | null + collectivite_id?: number + created_at?: string + details_fonction?: string | null + est_referent?: boolean | null + fonction?: Database["public"]["Enums"]["membre_fonction"] | null + modified_at?: string + user_id?: string + } + Relationships: [ + { + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, - ] - } - action_children: { - Row: { - children: unknown[] | null - depth: number | null - id: string | null - } - Relationships: [] - } - action_definition_summary: { - Row: { - children: unknown[] | null - depth: number | null - description: string | null - have_contexte: boolean | null - have_exemples: boolean | null - have_perimetre_evaluation: boolean | null - have_preuve: boolean | null - have_questions: boolean | null - have_reduction_potentiel: boolean | null - have_ressources: boolean | null - id: string | null - identifiant: string | null - nom: string | null - phase: Database["public"]["Enums"]["action_categorie"] | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - type: Database["public"]["Enums"]["action_type"] | null - } - Relationships: [] - } - action_discussion_feed: { - Row: { - action_id: string | null - collectivite_id: number | null - commentaires: Json[] | null - created_at: string | null - created_by: string | null - id: number | null - modified_at: string | null - status: Database["public"]["Enums"]["action_discussion_statut"] | null - } - Relationships: [ { - foreignKeyName: "action_discussion_action_id_fkey" - columns: ["action_id"] + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_premier_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + private_utilisateur_droit: { + Row: { + active: boolean + collectivite_id: number + created_at: string + id: number + invitation_id: string | null + modified_at: string + niveau_acces: Database["public"]["Enums"]["niveau_acces"] + user_id: string + } + Insert: { + active: boolean + collectivite_id: number + created_at?: string + id?: number + invitation_id?: string | null + modified_at?: string + niveau_acces?: Database["public"]["Enums"]["niveau_acces"] + user_id: string + } + Update: { + active?: boolean + collectivite_id?: number + created_at?: string + id?: number + invitation_id?: string | null + modified_at?: string + niveau_acces?: Database["public"]["Enums"]["niveau_acces"] + user_id?: string + } + Relationships: [ { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + question: { + Row: { + description: string + formulation: string + id: string + ordonnancement: number | null + thematique_id: string | null + type: Database["public"]["Enums"]["question_type"] + types_collectivites_concernees: + | Database["public"]["Enums"]["type_collectivite"][] + | null + } + Insert: { + description: string + formulation: string + id: string + ordonnancement?: number | null + thematique_id?: string | null + type: Database["public"]["Enums"]["question_type"] + types_collectivites_concernees?: + | Database["public"]["Enums"]["type_collectivite"][] + | null + } + Update: { + description?: string + formulation?: string + id?: string + ordonnancement?: number | null + thematique_id?: string | null + type?: Database["public"]["Enums"]["question_type"] + types_collectivites_concernees?: + | Database["public"]["Enums"]["type_collectivite"][] + | null + } + Relationships: [ { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_thematique" + referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_thematique_completude" + referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_thematique_display" + referencedColumns: ["id"] }, + ] + } + question_action: { + Row: { + action_id: string + question_id: string + } + Insert: { + action_id: string + question_id: string + } + Update: { + action_id?: string + question_id?: string + } + Relationships: [ { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_action_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_action_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] + referencedRelation: "question" + referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_action_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_display" + referencedColumns: ["id"] }, + ] + } + question_choix: { + Row: { + formulation: string | null + id: string + ordonnancement: number | null + question_id: string | null + } + Insert: { + formulation?: string | null + id: string + ordonnancement?: number | null + question_id?: string | null + } + Update: { + formulation?: string | null + id?: string + ordonnancement?: number | null + question_id?: string | null + } + Relationships: [ { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_choix_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] + referencedRelation: "question" + referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_created_by_fkey" - columns: ["created_by"] + foreignKeyName: "question_choix_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "users" + referencedRelation: "question_display" referencedColumns: ["id"] }, ] } - action_referentiel: { + question_thematique: { Row: { - action_id: string | null - ascendants: unknown[] | null - depth: number | null - descendants: unknown[] | null - description: string | null - have_children: boolean | null - have_contexte: boolean | null - have_exemples: boolean | null - have_perimetre_evaluation: boolean | null - have_preuve: boolean | null - have_reduction_potentiel: boolean | null - have_ressources: boolean | null - identifiant: string | null - leaves: unknown[] | null + id: string nom: string | null - phase: Database["public"]["Enums"]["action_categorie"] | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - type: Database["public"]["Enums"]["action_type"] | null + } + Insert: { + id: string + nom?: string | null + } + Update: { + id?: string + nom?: string | null } Relationships: [] } - action_statuts: { + referentiel_definition: { Row: { - action_id: string | null - ascendants: unknown[] | null - avancement: Database["public"]["Enums"]["avancement"] | null - avancement_descendants: - | Database["public"]["Enums"]["avancement"][] - | null - avancement_detaille: number[] | null - collectivite_id: number | null - concerne: boolean | null - depth: number | null - desactive: boolean | null - descendants: unknown[] | null - description: string | null - have_children: boolean | null - have_contexte: boolean | null - have_exemples: boolean | null - have_perimetre_evaluation: boolean | null - have_preuve: boolean | null - have_reduction_potentiel: boolean | null - have_ressources: boolean | null - identifiant: string | null - nom: string | null - non_concerne: boolean | null - phase: Database["public"]["Enums"]["action_categorie"] | null - points_max_personnalises: number | null - points_max_referentiel: number | null - points_programmes: number | null - points_realises: number | null - points_restants: number | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - renseigne: boolean | null - score_non_renseigne: number | null - score_pas_fait: number | null - score_programme: number | null - score_realise: number | null - score_realise_plus_programme: number | null - type: Database["public"]["Enums"]["action_type"] | null + created_at: string + hierarchie: Database["public"]["Enums"]["action_type"][] + id: string + modified_at: string + nom: string + version: string + } + Insert: { + created_at?: string + hierarchie: Database["public"]["Enums"]["action_type"][] + id: string + modified_at?: string + nom: string + version?: string + } + Update: { + created_at?: string + hierarchie?: Database["public"]["Enums"]["action_type"][] + id?: string + modified_at?: string + nom?: string + version?: string } Relationships: [] } - action_title: { + referentiel_json: { Row: { - children: unknown[] | null - id: string | null - identifiant: string | null - nom: string | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - type: Database["public"]["Enums"]["action_type"] | null + children: Json + created_at: string + definitions: Json + } + Insert: { + children: Json + created_at?: string + definitions: Json + } + Update: { + children?: Json + created_at?: string + definitions?: Json } Relationships: [] } - active_collectivite: { + referentiel_tag: { Row: { - collectivite_id: number | null - nom: string | null + nom: string + ref: string + type: string + } + Insert: { + nom: string + ref: string + type: string + } + Update: { + nom?: string + ref?: string + type?: string } Relationships: [] } - audit: { + reponse_binaire: { Row: { - clos: boolean | null - collectivite_id: number | null - date_cnl: string | null - date_debut: string | null - date_fin: string | null - demande_id: number | null - id: number | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - valide: boolean | null - valide_labellisation: boolean | null + collectivite_id: number + modified_at: string + question_id: string + reponse: boolean | null } Insert: { - clos?: boolean | null - collectivite_id?: number | null - date_cnl?: string | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - valide?: boolean | null - valide_labellisation?: boolean | null + collectivite_id: number + modified_at?: string + question_id: string + reponse?: boolean | null } Update: { - clos?: boolean | null - collectivite_id?: number | null - date_cnl?: string | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - valide?: boolean | null - valide_labellisation?: boolean | null + collectivite_id?: number + modified_at?: string + question_id?: string + reponse?: boolean | null } - Relationships: [ - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, + Relationships: [ { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "demande" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["demande_id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "retool_labellisation_demande" - referencedColumns: ["id"] - }, - ] - } - audit_en_cours: { - Row: { - collectivite_id: number | null - date_debut: string | null - date_fin: string | null - demande_id: number | null - id: number | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - valide: boolean | null - } - Insert: { - collectivite_id?: number | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - valide?: boolean | null - } - Update: { - collectivite_id?: number | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - valide?: boolean | null - } - Relationships: [ - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "reponse_binaire_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "question" referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "reponse_binaire_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_display" + referencedColumns: ["id"] }, + ] + } + reponse_choix: { + Row: { + collectivite_id: number + modified_at: string + question_id: string + reponse: string | null + } + Insert: { + collectivite_id: number + modified_at?: string + question_id: string + reponse?: string | null + } + Update: { + collectivite_id?: number + modified_at?: string + question_id?: string + reponse?: string | null + } + Relationships: [ { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_question_id_fkey" + columns: ["question_id"] + isOneToOne: false + referencedRelation: "question" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_choix_question_id_fkey" + columns: ["question_id"] + isOneToOne: false + referencedRelation: "question_display" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_choix_reponse_fkey" + columns: ["reponse"] + isOneToOne: false + referencedRelation: "question_choix" + referencedColumns: ["id"] + }, + ] + } + reponse_proportion: { + Row: { + collectivite_id: number + modified_at: string + question_id: string + reponse: number | null + } + Insert: { + collectivite_id: number + modified_at?: string + question_id: string + reponse?: number | null + } + Update: { + collectivite_id?: number + modified_at?: string + question_id?: string + reponse?: number | null + } + Relationships: [ + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "comparaison_scores_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "crm_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "demande" - referencedColumns: ["id"] + referencedRelation: "retool_score" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["demande_id"] + referencedRelation: "site_labellisation" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_active_real_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_question_id_fkey" + columns: ["question_id"] + isOneToOne: false + referencedRelation: "question" + referencedColumns: ["id"] }, { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "reponse_proportion_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "retool_labellisation_demande" + referencedRelation: "question_display" referencedColumns: ["id"] }, ] } - auditeurs: { - Row: { - audit_id: number | null - collectivite_id: number | null - noms: Json | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - } - Relationships: [] - } - audits: { + service_tag: { Row: { - audit: Database["labellisation"]["Tables"]["audit"]["Row"] | null - collectivite_id: number | null - demande: Database["labellisation"]["Tables"]["demande"]["Row"] | null - is_cot: boolean | null - referentiel: Database["public"]["Enums"]["referentiel"] | null + collectivite_id: number + id: number + nom: string } - Relationships: [] - } - axe_descendants: { - Row: { - axe_id: number | null - depth: number | null - descendants: number[] | null - parents: number[] | null + Insert: { + collectivite_id: number + id?: number + nom: string } - Relationships: [] - } - bibliotheque_annexe: { - Row: { - collectivite_id: number | null - commentaire: string | null - created_at: string | null - created_by: string | null - created_by_nom: string | null - fiche_id: number | null - fichier: Json | null - id: number | null - lien: Json | null - plan_ids: number[] | null + Update: { + collectivite_id?: number + id?: number + nom?: string } Relationships: [ { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] + foreignKeyName: "service_tag_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] + foreignKeyName: "service_tag_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] + foreignKeyName: "service_tag_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] + foreignKeyName: "service_tag_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] }, - ] - } - bibliotheque_fichier: { - Row: { - bucket_id: string | null - collectivite_id: number | null - confidentiel: boolean | null - file_id: string | null - filename: string | null - filesize: number | null - hash: string | null - id: number | null - } - Relationships: [ { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_completude_compute" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + site_contact: { + Row: { + email: string + formulaire: Json + modified_at: string + } + Insert: { + email: string + formulaire: Json + modified_at?: string + } + Update: { + email?: string + formulaire?: Json + modified_at?: string + } + Relationships: [] + } + sous_thematique: { + Row: { + id: number + sous_thematique: string + thematique_id: number + } + Insert: { + id?: number + sous_thematique: string + thematique_id: number + } + Update: { + id?: number + sous_thematique?: string + thematique_id?: number + } + Relationships: [ + { + foreignKeyName: "sous_thematique_thematique_id_fkey" + columns: ["thematique_id"] + isOneToOne: false + referencedRelation: "thematique" + referencedColumns: ["id"] + }, + ] + } + structure_tag: { + Row: { + collectivite_id: number + id: number + nom: string + } + Insert: { + collectivite_id: number + id?: number + nom: string + } + Update: { + collectivite_id?: number + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "objects_bucketId_fkey" - columns: ["bucket_id"] - isOneToOne: false - referencedRelation: "buckets" - referencedColumns: ["id"] - }, ] } - client_action_statut: { + tableau_de_bord_module: { Row: { - action_id: string | null - avancement: Database["public"]["Enums"]["avancement"] | null - collectivite_id: number | null - concerne: boolean | null - modified_by: string | null + collectivite_id: number + created_at: string + id: string + modified_at: string + options: Json + slug: string + titre: string + type: string + user_id: string | null } Insert: { - action_id?: string | null - avancement?: Database["public"]["Enums"]["avancement"] | null - collectivite_id?: number | null - concerne?: boolean | null - modified_by?: string | null + collectivite_id: number + created_at?: string + id?: string + modified_at?: string + options: Json + slug: string + titre: string + type: string + user_id?: string | null } Update: { - action_id?: string | null - avancement?: Database["public"]["Enums"]["avancement"] | null - collectivite_id?: number | null - concerne?: boolean | null - modified_by?: string | null + collectivite_id?: number + created_at?: string + id?: string + modified_at?: string + options?: Json + slug?: string + titre?: string + type?: string + user_id?: string | null } Relationships: [ { - foreignKeyName: "action_statut_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "tableau_de_bord_module_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_personnes" + referencedColumns: ["user_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "tableau_de_bord_module_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "dcp" + referencedColumns: ["user_id"] + }, + ] + } + thematique: { + Row: { + id: number + md_id: string | null + nom: string + } + Insert: { + id?: number + md_id?: string | null + nom: string + } + Update: { + id?: number + md_id?: string | null + nom?: string + } + Relationships: [] + } + type_tabular_score: { + Row: { + action_id: string | null + avancement: Database["public"]["Enums"]["avancement"] | null + concerne: boolean | null + desactive: boolean | null + points_max_personnalises: number | null + points_max_referentiel: number | null + points_programmes: number | null + points_realises: number | null + points_restants: number | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + score_non_renseigne: number | null + score_pas_fait: number | null + score_programme: number | null + score_realise: number | null + score_realise_plus_programme: number | null + } + Insert: { + action_id?: string | null + avancement?: Database["public"]["Enums"]["avancement"] | null + concerne?: boolean | null + desactive?: boolean | null + points_max_personnalises?: number | null + points_max_referentiel?: number | null + points_programmes?: number | null + points_realises?: number | null + points_restants?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + score_non_renseigne?: number | null + score_pas_fait?: number | null + score_programme?: number | null + score_realise?: number | null + score_realise_plus_programme?: number | null + } + Update: { + action_id?: string | null + avancement?: Database["public"]["Enums"]["avancement"] | null + concerne?: boolean | null + desactive?: boolean | null + points_max_personnalises?: number | null + points_max_referentiel?: number | null + points_programmes?: number | null + points_realises?: number | null + points_restants?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + score_non_renseigne?: number | null + score_pas_fait?: number | null + score_programme?: number | null + score_realise?: number | null + score_realise_plus_programme?: number | null + } + Relationships: [] + } + usage: { + Row: { + action: Database["public"]["Enums"]["usage_action"] + collectivite_id: number | null + fonction: Database["public"]["Enums"]["usage_fonction"] + page: Database["public"]["Enums"]["visite_page"] | null + time: string + user_id: string | null + } + Insert: { + action: Database["public"]["Enums"]["usage_action"] + collectivite_id?: number | null + fonction: Database["public"]["Enums"]["usage_fonction"] + page?: Database["public"]["Enums"]["visite_page"] | null + time?: string + user_id?: string | null + } + Update: { + action?: Database["public"]["Enums"]["usage_action"] + collectivite_id?: number | null + fonction?: Database["public"]["Enums"]["usage_fonction"] + page?: Database["public"]["Enums"]["visite_page"] | null + time?: string + user_id?: string | null + } + Relationships: [] + } + utilisateur_support: { + Row: { + support: boolean + user_id: string + } + Insert: { + support?: boolean + user_id: string + } + Update: { + support?: boolean + user_id?: string + } + Relationships: [ + { + foreignKeyName: "utilisateur_support_user_id_fkey" + columns: ["user_id"] + isOneToOne: true + referencedRelation: "crm_personnes" + referencedColumns: ["user_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "utilisateur_support_user_id_fkey" + columns: ["user_id"] + isOneToOne: true + referencedRelation: "dcp" + referencedColumns: ["user_id"] + }, + ] + } + utilisateur_verifie: { + Row: { + user_id: string + verifie: boolean + } + Insert: { + user_id: string + verifie?: boolean + } + Update: { + user_id?: string + verifie?: boolean + } + Relationships: [ + { + foreignKeyName: "utilisateur_verifie_user_id_fkey" + columns: ["user_id"] + isOneToOne: true + referencedRelation: "crm_personnes" + referencedColumns: ["user_id"] + }, + { + foreignKeyName: "utilisateur_verifie_user_id_fkey" + columns: ["user_id"] + isOneToOne: true + referencedRelation: "dcp" + referencedColumns: ["user_id"] + }, + ] + } + visite: { + Row: { + collectivite_id: number | null + onglet: Database["public"]["Enums"]["visite_onglet"] | null + page: Database["public"]["Enums"]["visite_page"] + tag: Database["public"]["Enums"]["visite_tag"] | null + time: string + user_id: string | null + } + Insert: { + collectivite_id?: number | null + onglet?: Database["public"]["Enums"]["visite_onglet"] | null + page: Database["public"]["Enums"]["visite_page"] + tag?: Database["public"]["Enums"]["visite_tag"] | null + time?: string + user_id?: string | null + } + Update: { + collectivite_id?: number | null + onglet?: Database["public"]["Enums"]["visite_onglet"] | null + page?: Database["public"]["Enums"]["visite_page"] + tag?: Database["public"]["Enums"]["visite_tag"] | null + time?: string + user_id?: string | null + } + Relationships: [] + } + } + Views: { + action_audit_state: { + Row: { + action_id: string | null + audit_id: number | null + avis: string | null + collectivite_id: number | null + ordre_du_jour: boolean | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + state_id: number | null + statut: Database["public"]["Enums"]["audit_statut"] | null + } + Relationships: [ + { + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] + referencedColumns: ["id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_modified_by_fkey" - columns: ["modified_by"] + foreignKeyName: "audit_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, - ] - } - collectivite_card: { - Row: { - code_siren_insee: string | null - collectivite_id: number | null - completude_cae: number | null - completude_cae_intervalle: string | null - completude_eci: number | null - completude_eci_intervalle: string | null - completude_intervalles: string[] | null - completude_max: number | null - completude_min: number | null - departement_code: string | null - etoiles_all: number[] | null - etoiles_cae: number | null - etoiles_eci: number | null - fait_cae_intervalle: string | null - fait_eci_intervalle: string | null - fait_intervalles: string[] | null - nom: string | null - population: number | null - population_intervalle: string | null - region_code: string | null - score_fait_cae: number | null - score_fait_eci: number | null - score_fait_max: number | null - score_fait_min: number | null - score_fait_sum: number | null - score_programme_cae: number | null - score_programme_eci: number | null - score_programme_max: number | null - score_programme_sum: number | null - type_collectivite: - | Database["public"]["Enums"]["filterable_type_collectivite"] - | null - } - Relationships: [] - } - collectivite_carte_identite: { - Row: { - code_siren_insee: string | null - collectivite_id: number | null - departement_name: string | null - is_cot: boolean | null - nom: string | null - population_source: string | null - population_totale: number | null - region_name: string | null - type_collectivite: - | Database["public"]["Enums"]["type_collectivite"] - | null - } - Relationships: [] - } - collectivite_identite: { - Row: { - id: number | null - localisation: string[] | null - population: string[] | null - type: Database["public"]["Enums"]["type_collectivite"][] | null - } - Relationships: [] - } - collectivite_niveau_acces: { - Row: { - access_restreint: boolean | null - collectivite_id: number | null - est_auditeur: boolean | null - niveau_acces: Database["public"]["Enums"]["niveau_acces"] | null - nom: string | null - } - Relationships: [] - } - comparaison_scores_audit: { - Row: { - action_id: string | null - collectivite_id: number | null - courant: Database["public"]["CompositeTypes"]["tabular_score"] | null - pre_audit: - | Database["public"]["CompositeTypes"]["tabular_score"] - | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - } - Relationships: [] - } - confidentialite_cle_primaire_compose: { - Row: { - table_name: unknown | null - } - Relationships: [] - } - confidentialite_fonctions_a_tester: { - Row: { - element: unknown | null - id_element: unknown | null - } - Relationships: [] - } - confidentialite_fonctions_parametres: { - Row: { - colonne: unknown | null - element: unknown | null - type: unknown | null - } - Relationships: [] - } - confidentialite_tables_a_tester: { - Row: { - element: unknown | null - id_element: string | null - } - Relationships: [] - } - confidentialite_tables_colonnes: { - Row: { - colonne: unknown | null - element: unknown | null - type: unknown | null - } - Relationships: [] - } - confidentialite_types_enum: { - Row: { - enum_nom: string | null - type_nom: unknown | null - } - Relationships: [] - } - confidentialite_vues_a_tester: { - Row: { - c: boolean | null - d: boolean | null - element: unknown | null - id_element: string | null - u: boolean | null - } - Relationships: [] - } - confidentialite_vues_colonnes: { - Row: { - colonne: unknown | null - element: unknown | null - type: unknown | null - } - Relationships: [] - } - crm_collectivites: { - Row: { - code_siren_insee: string | null - collectivite_id: number | null - cot: boolean | null - departement_code: string | null - departement_name: string | null - key: string | null - lab_cae_annee: number | null - lab_cae_etoiles: number | null - lab_cae_programme: number | null - lab_cae_realise: number | null - lab_eci_annee: number | null - lab_eci_etoiles: number | null - lab_eci_programme: number | null - lab_eci_realise: number | null - nature_collectivite: string | null - nom: string | null - population_totale: number | null - region_code: string | null - region_name: string | null - type_collectivite: - | Database["public"]["Enums"]["type_collectivite"] - | null - } - Relationships: [] - } - crm_droits: { - Row: { - champ_intervention: string | null - collectivite_id: number | null - collectivite_key: string | null - details_fonction: string | null - fonction: Database["public"]["Enums"]["membre_fonction"] | null - key: string | null - niveau_acces: Database["public"]["Enums"]["niveau_acces"] | null - user_id: string | null - user_key: string | null - } - Relationships: [ { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "retool_score" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + action_children: { + Row: { + children: unknown[] | null + depth: number | null + id: string | null + } + Relationships: [] + } + action_definition_summary: { + Row: { + children: unknown[] | null + depth: number | null + description: string | null + have_contexte: boolean | null + have_exemples: boolean | null + have_perimetre_evaluation: boolean | null + have_preuve: boolean | null + have_questions: boolean | null + have_reduction_potentiel: boolean | null + have_ressources: boolean | null + id: string | null + identifiant: string | null + nom: string | null + phase: Database["public"]["Enums"]["action_categorie"] | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + type: Database["public"]["Enums"]["action_type"] | null + } + Relationships: [] + } + action_discussion_feed: { + Row: { + action_id: string | null + collectivite_id: number | null + commentaires: Json[] | null + created_at: string | null + created_by: string | null + id: number | null + modified_at: string | null + status: Database["public"]["Enums"]["action_discussion_statut"] | null + } + Relationships: [ { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_discussion_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + action_referentiel: { + Row: { + action_id: string | null + ascendants: unknown[] | null + depth: number | null + descendants: unknown[] | null + description: string | null + have_children: boolean | null + have_contexte: boolean | null + have_exemples: boolean | null + have_perimetre_evaluation: boolean | null + have_preuve: boolean | null + have_reduction_potentiel: boolean | null + have_ressources: boolean | null + identifiant: string | null + leaves: unknown[] | null + nom: string | null + phase: Database["public"]["Enums"]["action_categorie"] | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + type: Database["public"]["Enums"]["action_type"] | null + } + Relationships: [] + } + action_statuts: { + Row: { + action_id: string | null + ascendants: unknown[] | null + avancement: Database["public"]["Enums"]["avancement"] | null + avancement_descendants: + | Database["public"]["Enums"]["avancement"][] + | null + avancement_detaille: number[] | null + collectivite_id: number | null + concerne: boolean | null + depth: number | null + desactive: boolean | null + descendants: unknown[] | null + description: string | null + have_children: boolean | null + have_contexte: boolean | null + have_exemples: boolean | null + have_perimetre_evaluation: boolean | null + have_preuve: boolean | null + have_reduction_potentiel: boolean | null + have_ressources: boolean | null + identifiant: string | null + nom: string | null + non_concerne: boolean | null + phase: Database["public"]["Enums"]["action_categorie"] | null + points_max_personnalises: number | null + points_max_referentiel: number | null + points_programmes: number | null + points_realises: number | null + points_restants: number | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + renseigne: boolean | null + score_non_renseigne: number | null + score_pas_fait: number | null + score_programme: number | null + score_realise: number | null + score_realise_plus_programme: number | null + type: Database["public"]["Enums"]["action_type"] | null + } + Relationships: [] + } + action_title: { + Row: { + children: unknown[] | null + id: string | null + identifiant: string | null + nom: string | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + type: Database["public"]["Enums"]["action_type"] | null + } + Relationships: [] + } + active_collectivite: { + Row: { + collectivite_id: number | null + nom: string | null + } + Relationships: [] + } + audit: { + Row: { + clos: boolean | null + collectivite_id: number | null + date_cnl: string | null + date_debut: string | null + date_fin: string | null + demande_id: number | null + id: number | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + valide: boolean | null + valide_labellisation: boolean | null + } + Insert: { + clos?: boolean | null + collectivite_id?: number | null + date_cnl?: string | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + valide?: boolean | null + valide_labellisation?: boolean | null + } + Update: { + clos?: boolean | null + collectivite_id?: number | null + date_cnl?: string | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + valide?: boolean | null + valide_labellisation?: boolean | null + } + Relationships: [ { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - crm_indicateurs: { - Row: { - id: number | null - nb_prive: number | null - pourcentage_prive: number | null - titre: string | null - } - Relationships: [] - } - crm_labellisations: { - Row: { - annee: number | null - collectivite_key: string | null - etoiles: number | null - id: number | null - obtenue_le: string | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - score_programme: number | null - score_realise: number | null - } - Relationships: [] - } - crm_personnes: { - Row: { - email: string | null - key: string | null - nom: string | null - prenom: string | null - telephone: string | null - user_id: string | null - } - Insert: { - email?: never - key?: never - nom?: never - prenom?: never - telephone?: never - user_id?: string | null - } - Update: { - email?: never - key?: never - nom?: never - prenom?: never - telephone?: never - user_id?: string | null - } - Relationships: [ - { - foreignKeyName: "dcp_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - crm_plans: { - Row: { - nb_plan: number | null - nb_plan_90pc_fa_privees: number | null - type: string | null - } - Relationships: [] - } - crm_usages: { - Row: { - _5fiches_1pilotage: boolean | null - collectivite_id: number | null - completude_cae: number | null - completude_eci: number | null - fiches: number | null - fiches_action_referentiel: number | null - fiches_changement_statut: number | null - fiches_fiche_liee: number | null - fiches_indicateur: number | null - fiches_initiees: number | null - fiches_mod_1mois: number | null - fiches_mod_3mois: number | null - fiches_mod_6mois: number | null - fiches_non_vides: number | null - fiches_pai: number | null - fiches_pilotables: number | null - fiches_pilotage: number | null - indicateur_prive: number | null - indicateurs_perso: number | null - key: string | null - min1_indicateur_perso_prive: boolean | null - min1_indicateur_predef_prive: boolean | null - min1_indicateur_prive: boolean | null - pa_date_creation: string | null - pa_non_vides: number | null - pa_pilotables: number | null - pa_view_2mois: number | null - pa_view_6mois: number | null - pai: number | null - plans: number | null - pourcentage_fa_pilotable_privee: number | null - pourcentage_fa_privee: number | null - pourcentage_indicateur_predef_prives: number | null - premier_rattachement: string | null - resultats_indicateurs: number | null - resultats_indicateurs_perso: number | null - type_pa_non_vides: string | null - } - Relationships: [] - } - departement: { - Row: { - code: string | null - libelle: string | null - region_code: string | null - } - Insert: { - code?: string | null - libelle?: string | null - region_code?: string | null - } - Update: { - code?: string | null - libelle?: string | null - region_code?: string | null - } - Relationships: [ - { - foreignKeyName: "departement_region_code_fkey" - columns: ["region_code"] - isOneToOne: false - referencedRelation: "region" - referencedColumns: ["code"] - }, - { - foreignKeyName: "departement_region_code_fkey" - columns: ["region_code"] - isOneToOne: false - referencedRelation: "region" - referencedColumns: ["code"] - }, - ] - } - export_score_audit: { - Row: { - collectivite: string | null - cot: boolean | null - date_cloture_cae: string | null - date_cloture_eci: string | null - points_cae: number | null - points_eci: number | null - programme_cae: number | null - programme_eci: number | null - realise_cae: number | null - realise_eci: number | null - region: string | null - signataire: string | null - } - Relationships: [] - } - fiche_action_personne_pilote: { - Row: { - collectivite_id: number | null - nom: string | null - tag_id: number | null - user_id: string | null - } - Relationships: [] - } - fiche_action_personne_referente: { - Row: { - collectivite_id: number | null - nom: string | null - tag_id: number | null - user_id: string | null - } - Relationships: [] - } - fiche_resume: { - Row: { - amelioration_continue: boolean | null - collectivite_id: number | null - date_fin_provisoire: string | null - id: number | null - modified_at: string | null - niveau_priorite: - | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] - | null - pilotes: Database["public"]["CompositeTypes"]["personne"][] | null - plans: Database["public"]["Tables"]["axe"]["Row"][] | null - restreint: boolean | null - statut: Database["public"]["Enums"]["fiche_action_statuts"] | null - titre: string | null - } - Relationships: [ - { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "audit_demande_id_fkey" + columns: ["demande_id"] + isOneToOne: false + referencedRelation: "retool_audit" + referencedColumns: ["demande_id"] + }, + { + foreignKeyName: "audit_demande_id_fkey" + columns: ["demande_id"] + isOneToOne: false + referencedRelation: "retool_labellisation_demande" referencedColumns: ["id"] }, + ] + } + audit_en_cours: { + Row: { + collectivite_id: number | null + date_debut: string | null + date_fin: string | null + demande_id: number | null + id: number | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + valide: boolean | null + } + Insert: { + collectivite_id?: number | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + valide?: boolean | null + } + Update: { + collectivite_id?: number | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + valide?: boolean | null + } + Relationships: [ { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_demande_id_fkey" + columns: ["demande_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "retool_audit" + referencedColumns: ["demande_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_demande_id_fkey" + columns: ["demande_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "retool_labellisation_demande" + referencedColumns: ["id"] }, + ] + } + auditeurs: { + Row: { + audit_id: number | null + collectivite_id: number | null + noms: Json | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + } + Relationships: [] + } + audits: { + Row: { + audit: Database["labellisation"]["Tables"]["audit"]["Row"] | null + collectivite_id: number | null + demande: Database["labellisation"]["Tables"]["demande"]["Row"] | null + is_cot: boolean | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + } + Relationships: [] + } + axe_descendants: { + Row: { + axe_id: number | null + depth: number | null + descendants: number[] | null + parents: number[] | null + } + Relationships: [] + } + bibliotheque_annexe: { + Row: { + collectivite_id: number | null + commentaire: string | null + created_at: string | null + created_by: string | null + created_by_nom: string | null + fiche_id: number | null + fichier: Json | null + id: number | null + lien: Json | null + plan_ids: number[] | null + } + Relationships: [ { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, + ] + } + bibliotheque_fichier: { + Row: { + bucket_id: string | null + collectivite_id: number | null + confidentiel: boolean | null + file_id: string | null + filename: string | null + filesize: number | null + hash: string | null + id: number | null + } + Relationships: [ { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, - ] - } - fiches_action: { - Row: { - actions: - | Database["public"]["Tables"]["action_relation"]["Row"][] - | null - amelioration_continue: boolean | null - axes: Database["public"]["Tables"]["axe"]["Row"][] | null - budget_previsionnel: number | null - calendrier: string | null - cibles: Database["public"]["Enums"]["fiche_action_cibles"][] | null - collectivite_id: number | null - created_at: string | null - date_debut: string | null - date_fin_provisoire: string | null - description: string | null - fiches_liees: - | Database["public"]["Views"]["fiche_resume"]["Row"][] - | null - financements: string | null - financeurs: - | Database["public"]["CompositeTypes"]["financeur_montant"][] - | null - id: number | null - indicateurs: - | Database["public"]["Tables"]["indicateur_definition"]["Row"][] - | null - maj_termine: boolean | null - modified_at: string | null - modified_by: string | null - niveau_priorite: - | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] - | null - notes_complementaires: string | null - objectifs: string | null - partenaires: - | Database["public"]["Tables"]["partenaire_tag"]["Row"][] - | null - piliers_eci: - | Database["public"]["Enums"]["fiche_action_piliers_eci"][] - | null - pilotes: Database["public"]["CompositeTypes"]["personne"][] | null - referents: Database["public"]["CompositeTypes"]["personne"][] | null - ressources: string | null - restreint: boolean | null - resultats_attendus: - | Database["public"]["Tables"]["effet_attendu"]["Row"][] - | null - services: Database["public"]["Tables"]["service_tag"]["Row"][] | null - sous_thematiques: - | Database["public"]["Tables"]["sous_thematique"]["Row"][] - | null - statut: Database["public"]["Enums"]["fiche_action_statuts"] | null - structures: - | Database["public"]["Tables"]["structure_tag"]["Row"][] - | null - thematiques: - | Database["public"]["Tables"]["thematique"]["Row"][] - | null - titre: string | null - } - Relationships: [ { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_completude_compute" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + client_action_statut: { + Row: { + action_id: string | null + avancement: Database["public"]["Enums"]["avancement"] | null + collectivite_id: number | null + concerne: boolean | null + modified_by: string | null + } + Insert: { + action_id?: string | null + avancement?: Database["public"]["Enums"]["avancement"] | null + collectivite_id?: number | null + concerne?: boolean | null + modified_by?: string | null + } + Update: { + action_id?: string | null + avancement?: Database["public"]["Enums"]["avancement"] | null + collectivite_id?: number | null + concerne?: boolean | null + modified_by?: string | null + } + Relationships: [ { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_statut_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_modified_by_fkey" - columns: ["modified_by"] + foreignKeyName: "action_statut_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] }, ] } - fiches_liees_par_fiche: { - Row: { - fiche_id: number | null - fiche_liee_id: number | null - } - Relationships: [] - } - historique: { + collectivite_card: { Row: { - action_id: string | null - action_identifiant: string | null - action_ids: unknown[] | null - action_nom: string | null - avancement: Database["public"]["Enums"]["avancement"] | null - avancement_detaille: number[] | null + code_siren_insee: string | null collectivite_id: number | null - concerne: boolean | null - justification: string | null - modified_at: string | null - modified_by_id: string | null - modified_by_nom: string | null - precision: string | null - previous_avancement: Database["public"]["Enums"]["avancement"] | null - previous_avancement_detaille: number[] | null - previous_concerne: boolean | null - previous_justification: string | null - previous_modified_at: string | null - previous_modified_by_id: string | null - previous_precision: string | null - previous_reponse: Json | null - question_formulation: string | null - question_id: string | null - question_type: Database["public"]["Enums"]["question_type"] | null - reponse: Json | null - tache_identifiant: string | null - tache_nom: string | null - thematique_id: string | null - thematique_nom: string | null - type: string | null + completude_cae: number | null + completude_cae_intervalle: string | null + completude_eci: number | null + completude_eci_intervalle: string | null + completude_intervalles: string[] | null + completude_max: number | null + completude_min: number | null + departement_code: string | null + etoiles_all: number[] | null + etoiles_cae: number | null + etoiles_eci: number | null + fait_cae_intervalle: string | null + fait_eci_intervalle: string | null + fait_intervalles: string[] | null + nom: string | null + population: number | null + population_intervalle: string | null + region_code: string | null + score_fait_cae: number | null + score_fait_eci: number | null + score_fait_max: number | null + score_fait_min: number | null + score_fait_sum: number | null + score_programme_cae: number | null + score_programme_eci: number | null + score_programme_max: number | null + score_programme_sum: number | null + type_collectivite: + | Database["public"]["Enums"]["filterable_type_collectivite"] + | null } Relationships: [] } - historique_utilisateur: { + collectivite_carte_identite: { Row: { + code_siren_insee: string | null collectivite_id: number | null - modified_by_id: string | null - modified_by_nom: string | null + departement_name: string | null + is_cot: boolean | null + nom: string | null + population_source: string | null + population_totale: number | null + region_name: string | null + type_collectivite: + | Database["public"]["Enums"]["type_collectivite"] + | null } Relationships: [] } - indicateur_summary: { + collectivite_identite: { Row: { - categorie: string | null - collectivite_id: number | null - nombre: number | null - rempli: number | null + id: number | null + localisation: string[] | null + population: string[] | null + type: Database["public"]["Enums"]["type_collectivite"][] | null } Relationships: [] } - mes_collectivites: { + collectivite_niveau_acces: { Row: { access_restreint: boolean | null collectivite_id: number | null @@ -26419,2029 +15036,2222 @@ export type Database = { } Relationships: [] } - named_collectivite: { + comparaison_scores_audit: { Row: { + action_id: string | null collectivite_id: number | null - nom: string | null + courant: Database["public"]["CompositeTypes"]["tabular_score"] | null + pre_audit: + | Database["public"]["CompositeTypes"]["tabular_score"] + | null + referentiel: Database["public"]["Enums"]["referentiel"] | null } Relationships: [] } - ongoing_maintenance: { + confidentialite_cle_primaire_compose: { Row: { - begins_at: string | null - ends_at: string | null - now: string | null + table_name: unknown | null } Relationships: [] } - pg_all_foreign_keys: { + confidentialite_fonctions_a_tester: { Row: { - fk_columns: unknown[] | null - fk_constraint_name: unknown | null - fk_schema_name: unknown | null - fk_table_name: unknown | null - fk_table_oid: unknown | null - is_deferrable: boolean | null - is_deferred: boolean | null - match_type: string | null - on_delete: string | null - on_update: string | null - pk_columns: unknown[] | null - pk_constraint_name: unknown | null - pk_index_name: unknown | null - pk_schema_name: unknown | null - pk_table_name: unknown | null - pk_table_oid: unknown | null + element: unknown | null + id_element: unknown | null + } + Relationships: [] + } + confidentialite_fonctions_parametres: { + Row: { + colonne: unknown | null + element: unknown | null + type: unknown | null + } + Relationships: [] + } + confidentialite_tables_a_tester: { + Row: { + element: unknown | null + id_element: string | null + } + Relationships: [] + } + confidentialite_tables_colonnes: { + Row: { + colonne: unknown | null + element: unknown | null + type: unknown | null + } + Relationships: [] + } + confidentialite_types_enum: { + Row: { + enum_nom: string | null + type_nom: unknown | null + } + Relationships: [] + } + confidentialite_vues_a_tester: { + Row: { + c: boolean | null + d: boolean | null + element: unknown | null + id_element: string | null + u: boolean | null + } + Relationships: [] + } + confidentialite_vues_colonnes: { + Row: { + colonne: unknown | null + element: unknown | null + type: unknown | null + } + Relationships: [] + } + crm_collectivites: { + Row: { + code_siren_insee: string | null + collectivite_id: number | null + cot: boolean | null + departement_code: string | null + departement_name: string | null + key: string | null + lab_cae_annee: number | null + lab_cae_etoiles: number | null + lab_cae_programme: number | null + lab_cae_realise: number | null + lab_eci_annee: number | null + lab_eci_etoiles: number | null + lab_eci_programme: number | null + lab_eci_realise: number | null + nature_collectivite: string | null + nom: string | null + population_totale: number | null + region_code: string | null + region_name: string | null + type_collectivite: + | Database["public"]["Enums"]["type_collectivite"] + | null } Relationships: [] } - plan_action: { + crm_droits: { Row: { + champ_intervention: string | null collectivite_id: number | null - id: number | null - plan: Json | null - } - Insert: { - collectivite_id?: number | null - id?: number | null - plan?: never - } - Update: { - collectivite_id?: number | null - id?: number | null - plan?: never + collectivite_key: string | null + details_fonction: string | null + fonction: Database["public"]["Enums"]["membre_fonction"] | null + key: string | null + niveau_acces: Database["public"]["Enums"]["niveau_acces"] | null + user_id: string | null + user_key: string | null } Relationships: [ { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + crm_indicateurs: { + Row: { + id: number | null + nb_prive: number | null + pourcentage_prive: number | null + titre: string | null + } + Relationships: [] + } + crm_labellisations: { + Row: { + annee: number | null + collectivite_key: string | null + etoiles: number | null + id: number | null + obtenue_le: string | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + score_programme: number | null + score_realise: number | null + } + Relationships: [] + } + crm_personnes: { + Row: { + email: string | null + key: string | null + nom: string | null + prenom: string | null + telephone: string | null + user_id: string | null + } + Insert: { + email?: never + key?: never + nom?: never + prenom?: never + telephone?: never + user_id?: string | null + } + Update: { + email?: never + key?: never + nom?: never + prenom?: never + telephone?: never + user_id?: string | null + } + Relationships: [] + } + crm_plans: { + Row: { + nb_plan: number | null + nb_plan_90pc_fa_privees: number | null + type: string | null + } + Relationships: [] + } + crm_usages: { + Row: { + _5fiches_1pilotage: boolean | null + collectivite_id: number | null + completude_cae: number | null + completude_eci: number | null + fiches: number | null + fiches_action_referentiel: number | null + fiches_changement_statut: number | null + fiches_fiche_liee: number | null + fiches_indicateur: number | null + fiches_initiees: number | null + fiches_mod_1mois: number | null + fiches_mod_3mois: number | null + fiches_mod_6mois: number | null + fiches_non_vides: number | null + fiches_pai: number | null + fiches_pilotables: number | null + fiches_pilotage: number | null + indicateur_prive: number | null + indicateurs_perso: number | null + key: string | null + min1_indicateur_perso_prive: boolean | null + min1_indicateur_predef_prive: boolean | null + min1_indicateur_prive: boolean | null + pa_date_creation: string | null + pa_non_vides: number | null + pa_pilotables: number | null + pa_view_2mois: number | null + pa_view_6mois: number | null + pai: number | null + plans: number | null + pourcentage_fa_pilotable_privee: number | null + pourcentage_fa_privee: number | null + pourcentage_indicateur_predef_prives: number | null + premier_rattachement: string | null + resultats_indicateurs: number | null + resultats_indicateurs_perso: number | null + type_pa_non_vides: string | null + } + Relationships: [] + } + departement: { + Row: { + code: string | null + libelle: string | null + region_code: string | null + } + Insert: { + code?: string | null + libelle?: string | null + region_code?: string | null + } + Update: { + code?: string | null + libelle?: string | null + region_code?: string | null + } + Relationships: [ { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "departement_region_code_fkey" + columns: ["region_code"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "region" + referencedColumns: ["code"] }, + ] + } + export_score_audit: { + Row: { + collectivite: string | null + cot: boolean | null + date_cloture_cae: string | null + date_cloture_eci: string | null + points_cae: number | null + points_eci: number | null + programme_cae: number | null + programme_eci: number | null + realise_cae: number | null + realise_eci: number | null + region: string | null + signataire: string | null + } + Relationships: [] + } + fiche_action_personne_pilote: { + Row: { + collectivite_id: number | null + nom: string | null + tag_id: number | null + user_id: string | null + } + Relationships: [] + } + fiche_action_personne_referente: { + Row: { + collectivite_id: number | null + nom: string | null + tag_id: number | null + user_id: string | null + } + Relationships: [] + } + fiche_resume: { + Row: { + amelioration_continue: boolean | null + collectivite_id: number | null + date_fin_provisoire: string | null + id: number | null + modified_at: string | null + niveau_priorite: + | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] + | null + pilotes: Database["public"]["CompositeTypes"]["personne"][] | null + plans: Database["public"]["Tables"]["axe"]["Row"][] | null + restreint: boolean | null + statut: Database["public"]["Enums"]["fiche_action_statuts"] | null + titre: string | null + } + Relationships: [ { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, - ] - } - plan_action_chemin: { - Row: { - axe_id: number | null - chemin: Database["public"]["Tables"]["axe"]["Row"][] | null - collectivite_id: number | null - plan_id: number | null - } - Relationships: [] - } - plan_action_profondeur: { - Row: { - collectivite_id: number | null - id: number | null - plan: Json | null - } - Insert: { - collectivite_id?: number | null - id?: number | null - plan?: never - } - Update: { - collectivite_id?: number | null - id?: number | null - plan?: never - } - Relationships: [ { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_completude_compute" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + fiches_action: { + Row: { + actions: + | Database["public"]["Tables"]["action_relation"]["Row"][] + | null + amelioration_continue: boolean | null + axes: Database["public"]["Tables"]["axe"]["Row"][] | null + budget_previsionnel: number | null + calendrier: string | null + cibles: string[] | null + collectivite_id: number | null + created_at: string | null + date_debut: string | null + date_fin_provisoire: string | null + description: string | null + fiches_liees: + | Database["public"]["Views"]["fiche_resume"]["Row"][] + | null + financements: string | null + financeurs: + | Database["public"]["CompositeTypes"]["financeur_montant"][] + | null + id: number | null + indicateurs: + | Database["public"]["Tables"]["indicateur_definition"]["Row"][] + | null + instance_gouvernance: string | null + libres_tag: Database["public"]["Tables"]["libre_tag"]["Row"][] | null + maj_termine: boolean | null + modified_at: string | null + modified_by: string | null + niveau_priorite: + | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] + | null + notes_complementaires: string | null + objectifs: string | null + partenaires: + | Database["public"]["Tables"]["partenaire_tag"]["Row"][] + | null + participation_citoyenne: string | null + participation_citoyenne_type: string | null + piliers_eci: + | Database["public"]["Enums"]["fiche_action_piliers_eci"][] + | null + pilotes: Database["public"]["CompositeTypes"]["personne"][] | null + referents: Database["public"]["CompositeTypes"]["personne"][] | null + ressources: string | null + restreint: boolean | null + resultats_attendus: + | Database["public"]["Tables"]["effet_attendu"]["Row"][] + | null + services: Database["public"]["Tables"]["service_tag"]["Row"][] | null + sous_thematiques: + | Database["public"]["Tables"]["sous_thematique"]["Row"][] + | null + statut: Database["public"]["Enums"]["fiche_action_statuts"] | null + structures: + | Database["public"]["Tables"]["structure_tag"]["Row"][] + | null + temps_de_mise_en_oeuvre: Json | null + thematiques: + | Database["public"]["Tables"]["thematique"]["Row"][] + | null + titre: string | null + } + Relationships: [ { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, ] } - preuve: { + fiches_liees_par_fiche: { Row: { - action: Json | null - audit: Json | null - collectivite_id: number | null - commentaire: string | null - created_at: string | null - created_by: string | null - created_by_nom: string | null - demande: Json | null - fichier: Json | null - id: number | null - lien: Json | null - preuve_reglementaire: Json | null - preuve_type: Database["public"]["Enums"]["preuve_type"] | null - rapport: Json | null + fiche_id: number | null + fiche_liee_id: number | null } Relationships: [] } - question_display: { + historique: { Row: { + action_id: string | null + action_identifiant: string | null action_ids: unknown[] | null - choix: Json[] | null + action_nom: string | null + avancement: Database["public"]["Enums"]["avancement"] | null + avancement_detaille: number[] | null collectivite_id: number | null - description: string | null - formulation: string | null - id: string | null - localisation: string[] | null - ordonnancement: number | null - population: string[] | null - thematique_id: string | null - thematique_nom: string | null - type: Database["public"]["Enums"]["question_type"] | null - types_collectivites_concernees: - | Database["public"]["Enums"]["type_collectivite"][] - | null - } - Relationships: [ - { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "question_thematique" - referencedColumns: ["id"] - }, - { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["id"] - }, - { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "question_thematique_display" - referencedColumns: ["id"] - }, - ] + concerne: boolean | null + justification: string | null + modified_at: string | null + modified_by_id: string | null + modified_by_nom: string | null + precision: string | null + previous_avancement: Database["public"]["Enums"]["avancement"] | null + previous_avancement_detaille: number[] | null + previous_concerne: boolean | null + previous_justification: string | null + previous_modified_at: string | null + previous_modified_by_id: string | null + previous_precision: string | null + previous_reponse: Json | null + question_formulation: string | null + question_id: string | null + question_type: Database["public"]["Enums"]["question_type"] | null + reponse: Json | null + tache_identifiant: string | null + tache_nom: string | null + thematique_id: string | null + thematique_nom: string | null + type: string | null + } + Relationships: [] } - question_thematique_completude: { + historique_utilisateur: { Row: { collectivite_id: number | null - completude: - | Database["public"]["Enums"]["thematique_completude"] - | null - id: string | null - nom: string | null - referentiels: Database["public"]["Enums"]["referentiel"][] | null + modified_by_id: string | null + modified_by_nom: string | null } Relationships: [] } - question_thematique_display: { + indicateur_summary: { Row: { - id: string | null - nom: string | null - referentiels: Database["public"]["Enums"]["referentiel"][] | null + categorie: string | null + collectivite_id: number | null + nombre: number | null + rempli: number | null } Relationships: [] } - region: { + mes_collectivites: { Row: { - code: string | null - libelle: string | null - } - Insert: { - code?: string | null - libelle?: string | null - } - Update: { - code?: string | null - libelle?: string | null + access_restreint: boolean | null + collectivite_id: number | null + est_auditeur: boolean | null + niveau_acces: Database["public"]["Enums"]["niveau_acces"] | null + nom: string | null } Relationships: [] } - reponse_display: { + named_collectivite: { Row: { collectivite_id: number | null - justification: string | null - question_id: string | null - reponse: Json | null + nom: string | null } Relationships: [] } - retool_active_collectivite: { + ongoing_maintenance: { Row: { - collectivite_id: number | null - nom: string | null + begins_at: string | null + ends_at: string | null + now: string | null } Relationships: [] } - retool_audit: { + pg_all_foreign_keys: { + Row: { + fk_columns: unknown[] | null + fk_constraint_name: unknown | null + fk_schema_name: unknown | null + fk_table_name: unknown | null + fk_table_oid: unknown | null + is_deferrable: boolean | null + is_deferred: boolean | null + match_type: string | null + on_delete: string | null + on_update: string | null + pk_columns: unknown[] | null + pk_constraint_name: unknown | null + pk_index_name: unknown | null + pk_schema_name: unknown | null + pk_table_name: unknown | null + pk_table_oid: unknown | null + } + Relationships: [] + } + plan_action: { Row: { - audit_id: number | null - clos: boolean | null collectivite_id: number | null - date_attribution_auditeur: string | null - date_cnl: string | null - date_debut: string | null - date_demande: string | null - date_fin: string | null - demande_id: number | null - etoiles: Database["labellisation"]["Enums"]["etoile"] | null - nom: string | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - type_audit: string | null - valide_labellisation: boolean | null + id: number | null + plan: Json | null + } + Insert: { + collectivite_id?: number | null + id?: number | null + plan?: never + } + Update: { + collectivite_id?: number | null + id?: number | null + plan?: never } Relationships: [ { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "axe_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "axe_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "axe_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_completude_compute" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + plan_action_chemin: { + Row: { + axe_id: number | null + chemin: Database["public"]["Tables"]["axe"]["Row"][] | null + collectivite_id: number | null + plan_id: number | null + } + Relationships: [] + } + plan_action_profondeur: { + Row: { + collectivite_id: number | null + id: number | null + plan: Json | null + } + Insert: { + collectivite_id?: number | null + id?: number | null + plan?: never + } + Update: { + collectivite_id?: number | null + id?: number | null + plan?: never + } + Relationships: [ { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, ] } - retool_completude: { - Row: { - code_siren_insee: string | null - collectivite_id: number | null - completude_cae: number | null - completude_eci: number | null - departement_name: string | null - nom: string | null - population_totale: number | null - region_name: string | null - type_collectivite: - | Database["public"]["Enums"]["type_collectivite"] - | null - } - Relationships: [] - } - retool_completude_compute: { + preuve: { Row: { + action: Json | null + audit: Json | null collectivite_id: number | null - completude_cae: number | null - completude_eci: number | null - nom: string | null + commentaire: string | null + created_at: string | null + created_by: string | null + created_by_nom: string | null + demande: Json | null + fichier: Json | null + id: number | null + lien: Json | null + preuve_reglementaire: Json | null + preuve_type: Database["public"]["Enums"]["preuve_type"] | null + rapport: Json | null } Relationships: [] } - retool_labellisation: { + question_display: { Row: { - annee: number | null + action_ids: unknown[] | null + choix: Json[] | null collectivite_id: number | null - collectivite_nom: string | null - etoiles: number | null - id: number | null - obtenue_le: string | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - score_programme: number | null - score_realise: number | null + description: string | null + formulation: string | null + id: string | null + localisation: string[] | null + ordonnancement: number | null + population: string[] | null + thematique_id: string | null + thematique_nom: string | null + type: Database["public"]["Enums"]["question_type"] | null + types_collectivites_concernees: + | Database["public"]["Enums"]["type_collectivite"][] + | null } Relationships: [ { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "question_thematique" referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_thematique_completude" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_thematique_display" + referencedColumns: ["id"] }, + ] + } + question_thematique_completude: { + Row: { + collectivite_id: number | null + completude: + | Database["public"]["Enums"]["thematique_completude"] + | null + id: string | null + nom: string | null + referentiels: Database["public"]["Enums"]["referentiel"][] | null + } + Relationships: [] + } + question_thematique_display: { + Row: { + id: string | null + nom: string | null + referentiels: Database["public"]["Enums"]["referentiel"][] | null + } + Relationships: [] + } + region: { + Row: { + code: string | null + libelle: string | null + } + Insert: { + code?: string | null + libelle?: string | null + } + Update: { + code?: string | null + libelle?: string | null + } + Relationships: [] + } + reponse_display: { + Row: { + collectivite_id: number | null + justification: string | null + question_id: string | null + reponse: Json | null + } + Relationships: [] + } + retool_active_collectivite: { + Row: { + collectivite_id: number | null + nom: string | null + } + Relationships: [] + } + retool_audit: { + Row: { + audit_id: number | null + clos: boolean | null + collectivite_id: number | null + date_attribution_auditeur: string | null + date_cnl: string | null + date_debut: string | null + date_demande: string | null + date_fin: string | null + demande_id: number | null + etoiles: Database["labellisation"]["Enums"]["etoile"] | null + nom: string | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + type_audit: string | null + valide_labellisation: boolean | null + } + Relationships: [ { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + retool_completude: { + Row: { + code_siren_insee: string | null + collectivite_id: number | null + completude_cae: number | null + completude_eci: number | null + departement_name: string | null + nom: string | null + population_totale: number | null + region_name: string | null + type_collectivite: + | Database["public"]["Enums"]["type_collectivite"] + | null + } + Relationships: [] + } + retool_completude_compute: { + Row: { + collectivite_id: number | null + completude_cae: number | null + completude_eci: number | null + nom: string | null + } + Relationships: [] + } + retool_labellisation: { + Row: { + annee: number | null + collectivite_id: number | null + collectivite_nom: string | null + etoiles: number | null + id: number | null + obtenue_le: string | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + score_programme: number | null + score_realise: number | null + } + Relationships: [ { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - ] - } - retool_labellisation_demande: { - Row: { - collectivite_id: number | null - date: string | null - demandeur_email: string | null - demandeur_fonction: - | Database["public"]["Enums"]["membre_fonction"] - | null - demandeur_nom: string | null - demandeur_prenom: string | null - en_cours: boolean | null - envoyee_le: string | null - etoiles: Database["labellisation"]["Enums"]["etoile"] | null - id: number | null - modified_at: string | null - nom: string | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - sujet: Database["labellisation"]["Enums"]["sujet_demande"] | null - } - Relationships: [ - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + retool_labellisation_demande: { + Row: { + collectivite_id: number | null + date: string | null + demandeur_email: string | null + demandeur_fonction: + | Database["public"]["Enums"]["membre_fonction"] + | null + demandeur_nom: string | null + demandeur_prenom: string | null + en_cours: boolean | null + envoyee_le: string | null + etoiles: Database["labellisation"]["Enums"]["etoile"] | null + id: number | null + modified_at: string | null + nom: string | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + sujet: Database["labellisation"]["Enums"]["sujet_demande"] | null + } + Relationships: [ { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, ] @@ -28547,78 +17357,36 @@ export type Database = { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" @@ -28774,132 +17542,6 @@ export type Database = { referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, ] } site_labellisation: { @@ -29598,6 +18240,8 @@ export type Database = { preuve: string | null reduction_potentiel: string referentiel: Database["public"]["Enums"]["referentiel"] + referentiel_id: string + referentiel_version: string ressources: string }[] } @@ -29924,6 +18568,7 @@ export type Database = { modified_at: string modified_by: string | null nom: string | null + panier_id: string | null parent: number | null plan: number | null type: number | null @@ -32732,6 +21377,7 @@ export type Database = { | "action" | "sous-action" | "tache" + | "exemple" audit_statut: "non_audite" | "en_cours" | "audite" avancement: | "fait" @@ -32853,7 +21499,7 @@ export type Database = { | "audit" | "rapport" question_type: "choix" | "binaire" | "proportion" - referentiel: "eci" | "cae" + referentiel: "eci" | "cae" | "te" | "te-test" regle_type: "score" | "desactivation" | "reduction" role_name: "agent" | "referent" | "conseiller" | "auditeur" | "aucun" thematique_completude: "complete" | "a_completer" @@ -33110,3 +21756,18 @@ export type Enums< ? PublicSchema["Enums"][PublicEnumNameOrOptions] : never +export type CompositeTypes< + PublicCompositeTypeNameOrOptions extends + | keyof PublicSchema["CompositeTypes"] + | { schema: keyof Database }, + CompositeTypeName extends PublicCompositeTypeNameOrOptions extends { + schema: keyof Database + } + ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] + : never = never, +> = PublicCompositeTypeNameOrOptions extends { schema: keyof Database } + ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] + : PublicCompositeTypeNameOrOptions extends keyof PublicSchema["CompositeTypes"] + ? PublicSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] + : never + diff --git a/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/ExportPdf/FicheActionPdf/Description.tsx b/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/ExportPdf/FicheActionPdf/Description.tsx index f413f6e2ea..a2034785ee 100644 --- a/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/ExportPdf/FicheActionPdf/Description.tsx +++ b/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/ExportPdf/FicheActionPdf/Description.tsx @@ -8,12 +8,15 @@ const Description = ({ fiche }: FicheActionPdfProps) => { description, ressources, instanceGouvernance, + libresTag, } = fiche; return ( {/* Liste des thématiques et sous-thématiques sous forme de badges */} - {(thematiques?.length || sousThematiques?.length) && ( + {(thematiques?.length || + sousThematiques?.length || + libresTag?.length) && ( {thematiques?.map((thematique) => ( @@ -25,6 +28,9 @@ const Description = ({ fiche }: FicheActionPdfProps) => { state="info" /> ))} + {libresTag?.map((tagPerso) => ( + + ))} )} diff --git a/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/FicheAction/FicheActionDescription/FicheActionDescription.tsx b/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/FicheAction/FicheActionDescription/FicheActionDescription.tsx index 207e81ffb2..80f21cc055 100644 --- a/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/FicheAction/FicheActionDescription/FicheActionDescription.tsx +++ b/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/FicheAction/FicheActionDescription/FicheActionDescription.tsx @@ -29,6 +29,7 @@ const FicheActionDescription = ({ description, ressources, instanceGouvernance, + libresTag, } = fiche; const { @@ -77,6 +78,14 @@ const FicheActionDescription = ({ state="info" /> ))} + {libresTag?.map((tagPerso) => ( + + ))} )} diff --git a/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/FicheAction/FicheActionDescription/ModaleDescription.tsx b/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/FicheAction/FicheActionDescription/ModaleDescription.tsx index ebc063f875..2a52b6b28d 100644 --- a/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/FicheAction/FicheActionDescription/ModaleDescription.tsx +++ b/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/FicheAction/FicheActionDescription/ModaleDescription.tsx @@ -13,6 +13,7 @@ import { import { FicheAction } from '@tet/api/plan-actions'; import ThematiquesDropdown from 'ui/dropdownLists/ThematiquesDropdown/ThematiquesDropdown'; import SousThematiquesDropdown from 'ui/dropdownLists/SousThematiquesDropdown/SousThematiquesDropdown'; +import TagsSuiviPersoDropdown from 'ui/dropdownLists/TagsSuiviPersoDropdown/TagsSuiviPersoDropdown'; import { useCurrentCollectivite } from 'core-logic/hooks/useCurrentCollectivite'; import { getMaxLengthMessage } from 'utils/formatUtils'; import { Thematique } from '@tet/api/shared/domain'; @@ -67,7 +68,7 @@ const ModaleDescription = ({ fiche, updateFiche }: ModaleDescriptionProps) => { {/* Dropdown thématiques */} - + t.id)} onChange={({ thematiques }) => @@ -80,7 +81,7 @@ const ModaleDescription = ({ fiche, updateFiche }: ModaleDescriptionProps) => { {/* Dropdown sous-thématiques */} - + t.id @@ -95,6 +96,16 @@ const ModaleDescription = ({ fiche, updateFiche }: ModaleDescriptionProps) => { /> + {/* Dropdown tags personnalisés */} + + t.id)} + onChange={({ libresTag }) => + setEditedFiche((prevState) => ({ ...prevState, libresTag })) + } + /> + + {/* Description */} & { + values?: number[]; + onChange: ({ + libresTag, + selectedLibreTag, + }: { + libresTag: Tag[]; + selectedLibreTag: Tag; + }) => void; +}; + +const TagsSuiviPersoDropdown = (props: TagsSuiviPersoDropdownProps) => { + const { data, refetch } = useTagsSuiviPersoListe(); + + return ( + { + props.onChange({ + libresTag: values, + selectedLibreTag: selectedValue, + }); + }} + /> + ); +}; + +export default TagsSuiviPersoDropdown; diff --git a/app.territoiresentransitions.react/src/ui/dropdownLists/TagsSuiviPersoDropdown/useTagsSuiviPersoListe.ts b/app.territoiresentransitions.react/src/ui/dropdownLists/TagsSuiviPersoDropdown/useTagsSuiviPersoListe.ts new file mode 100644 index 0000000000..ed34d3d30a --- /dev/null +++ b/app.territoiresentransitions.react/src/ui/dropdownLists/TagsSuiviPersoDropdown/useTagsSuiviPersoListe.ts @@ -0,0 +1,23 @@ +import { Tag } from '@tet/api/shared/domain'; +import { supabaseClient } from 'core-logic/api/supabase'; +import { useCollectiviteId } from 'core-logic/hooks/params'; +import { useQuery } from 'react-query'; +import { objectToCamel } from 'ts-case-convert'; + +export const useTagsSuiviPersoListe = () => { + const collectiviteId = useCollectiviteId()!; + + return useQuery(['tags_suivi_perso', collectiviteId], async () => { + const { error, data } = await supabaseClient + .from('libre_tag') + .select() + .eq('collectivite_id', collectiviteId) + .order('nom'); + + if (error) { + throw new Error(error.message); + } + + return objectToCamel(data) as Tag[]; + }); +}; diff --git a/packages/api/src/database.types.ts b/packages/api/src/database.types.ts index a4d2aee316..721665834f 100644 --- a/packages/api/src/database.types.ts +++ b/packages/api/src/database.types.ts @@ -44,27 +44,6 @@ export type Database = { statut?: Database["public"]["Enums"]["audit_statut"] } Relationships: [ - { - foreignKeyName: "action_audit_state_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_audit_state_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "action_audit_state" - referencedColumns: ["audit_id"] - }, - { - foreignKeyName: "action_audit_state_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] - }, { foreignKeyName: "action_audit_state_audit_id_fkey" columns: ["audit_id"] @@ -72,20 +51,6 @@ export type Database = { referencedRelation: "audit" referencedColumns: ["id"] }, - { - foreignKeyName: "action_audit_state_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "audit_en_cours" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_audit_state_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["audit_id"] - }, { foreignKeyName: "action_audit_state_collectivite_id_fkey" columns: ["collectivite_id"] @@ -93,15596 +58,3462 @@ export type Database = { referencedRelation: "action_snippet" referencedColumns: ["collectivite_id"] }, + ] + } + audit: { + Row: { + clos: boolean + collectivite_id: number + date_cnl: string | null + date_debut: string | null + date_fin: string | null + demande_id: number | null + id: number + referentiel: Database["public"]["Enums"]["referentiel"] + valide: boolean + valide_labellisation: boolean | null + } + Insert: { + clos?: boolean + collectivite_id: number + date_cnl?: string | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number + referentiel: Database["public"]["Enums"]["referentiel"] + valide?: boolean + valide_labellisation?: boolean | null + } + Update: { + clos?: boolean + collectivite_id?: number + date_cnl?: string | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number + referentiel?: Database["public"]["Enums"]["referentiel"] + valide?: boolean + valide_labellisation?: boolean | null + } + Relationships: [ { - foreignKeyName: "action_audit_state_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "action_snippet" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_demande_id_fkey" + columns: ["demande_id"] isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "demande" + referencedColumns: ["id"] }, + ] + } + bibliotheque_fichier: { + Row: { + collectivite_id: number | null + confidentiel: boolean + filename: string | null + hash: string | null + id: number + } + Insert: { + collectivite_id?: number | null + confidentiel?: boolean + filename?: string | null + hash?: string | null + id?: number + } + Update: { + collectivite_id?: number | null + confidentiel?: boolean + filename?: string | null + hash?: string | null + id?: number + } + Relationships: [ { - foreignKeyName: "action_audit_state_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "action_snippet" referencedColumns: ["collectivite_id"] }, + ] + } + demande: { + Row: { + collectivite_id: number + date: string + demandeur: string | null + en_cours: boolean + envoyee_le: string | null + etoiles: Database["labellisation"]["Enums"]["etoile"] | null + id: number + modified_at: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + sujet: Database["labellisation"]["Enums"]["sujet_demande"] | null + } + Insert: { + collectivite_id: number + date?: string + demandeur?: string | null + en_cours?: boolean + envoyee_le?: string | null + etoiles?: Database["labellisation"]["Enums"]["etoile"] | null + id?: number + modified_at?: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + sujet?: Database["labellisation"]["Enums"]["sujet_demande"] | null + } + Update: { + collectivite_id?: number + date?: string + demandeur?: string | null + en_cours?: boolean + envoyee_le?: string | null + etoiles?: Database["labellisation"]["Enums"]["etoile"] | null + id?: number + modified_at?: string | null + referentiel?: Database["public"]["Enums"]["referentiel"] + sujet?: Database["labellisation"]["Enums"]["sujet_demande"] | null + } + Relationships: [ { - foreignKeyName: "action_audit_state_collectivite_id_fkey" + foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "action_snippet" referencedColumns: ["collectivite_id"] }, + ] + } + etoile_meta: { + Row: { + etoile: Database["labellisation"]["Enums"]["etoile"] + long_label: string + min_realise_percentage: number + min_realise_score: number | null + prochaine_etoile: Database["labellisation"]["Enums"]["etoile"] | null + short_label: string + } + Insert: { + etoile: Database["labellisation"]["Enums"]["etoile"] + long_label: string + min_realise_percentage: number + min_realise_score?: number | null + prochaine_etoile?: Database["labellisation"]["Enums"]["etoile"] | null + short_label: string + } + Update: { + etoile?: Database["labellisation"]["Enums"]["etoile"] + long_label?: string + min_realise_percentage?: number + min_realise_score?: number | null + prochaine_etoile?: Database["labellisation"]["Enums"]["etoile"] | null + short_label?: string + } + Relationships: [] + } + preuve_base: { + Row: { + collectivite_id: number + commentaire: string + fichier_id: number | null + lien: Json | null + modified_at: string + modified_by: string + titre: string + url: string | null + } + Insert: { + collectivite_id: number + commentaire?: string + fichier_id?: number | null + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null + } + Update: { + collectivite_id?: number + commentaire?: string + fichier_id?: number | null + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null + } + Relationships: [ { - foreignKeyName: "action_audit_state_collectivite_id_fkey" + foreignKeyName: "preuve_base_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "action_snippet" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_base_fichier_id_fkey" + columns: ["fichier_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "bibliotheque_fichier" referencedColumns: ["id"] }, { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_base_fichier_id_fkey" + columns: ["fichier_id"] isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - audit: { - Row: { - clos: boolean - collectivite_id: number - date_cnl: string | null - date_debut: string | null - date_fin: string | null - demande_id: number | null - id: number - referentiel: Database["public"]["Enums"]["referentiel"] - valide: boolean - valide_labellisation: boolean | null - } - Insert: { - clos?: boolean - collectivite_id: number - date_cnl?: string | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number - referentiel: Database["public"]["Enums"]["referentiel"] - valide?: boolean - valide_labellisation?: boolean | null - } - Update: { - clos?: boolean - collectivite_id?: number - date_cnl?: string | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number - referentiel?: Database["public"]["Enums"]["referentiel"] - valide?: boolean - valide_labellisation?: boolean | null - } - Relationships: [ - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "demande" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["demande_id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "retool_labellisation_demande" - referencedColumns: ["id"] - }, - ] - } - bibliotheque_fichier: { - Row: { - collectivite_id: number | null - confidentiel: boolean - filename: string | null - hash: string | null - id: number - } - Insert: { - collectivite_id?: number | null - confidentiel?: boolean - filename?: string | null - hash?: string | null - id?: number - } - Update: { - collectivite_id?: number | null - confidentiel?: boolean - filename?: string | null - hash?: string | null - id?: number - } - Relationships: [ - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - demande: { - Row: { - collectivite_id: number - date: string - demandeur: string | null - en_cours: boolean - envoyee_le: string | null - etoiles: Database["labellisation"]["Enums"]["etoile"] | null - id: number - modified_at: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - sujet: Database["labellisation"]["Enums"]["sujet_demande"] | null - } - Insert: { - collectivite_id: number - date?: string - demandeur?: string | null - en_cours?: boolean - envoyee_le?: string | null - etoiles?: Database["labellisation"]["Enums"]["etoile"] | null - id?: number - modified_at?: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - sujet?: Database["labellisation"]["Enums"]["sujet_demande"] | null - } - Update: { - collectivite_id?: number - date?: string - demandeur?: string | null - en_cours?: boolean - envoyee_le?: string | null - etoiles?: Database["labellisation"]["Enums"]["etoile"] | null - id?: number - modified_at?: string | null - referentiel?: Database["public"]["Enums"]["referentiel"] - sujet?: Database["labellisation"]["Enums"]["sujet_demande"] | null - } - Relationships: [ - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_demandeur_fkey" - columns: ["demandeur"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - etoile_meta: { - Row: { - etoile: Database["labellisation"]["Enums"]["etoile"] - long_label: string - min_realise_percentage: number - min_realise_score: number | null - prochaine_etoile: Database["labellisation"]["Enums"]["etoile"] | null - short_label: string - } - Insert: { - etoile: Database["labellisation"]["Enums"]["etoile"] - long_label: string - min_realise_percentage: number - min_realise_score?: number | null - prochaine_etoile?: Database["labellisation"]["Enums"]["etoile"] | null - short_label: string - } - Update: { - etoile?: Database["labellisation"]["Enums"]["etoile"] - long_label?: string - min_realise_percentage?: number - min_realise_score?: number | null - prochaine_etoile?: Database["labellisation"]["Enums"]["etoile"] | null - short_label?: string - } - Relationships: [] - } - preuve_base: { - Row: { - collectivite_id: number - commentaire: string - fichier_id: number | null - lien: Json | null - modified_at: string - modified_by: string - titre: string - url: string | null - } - Insert: { - collectivite_id: number - commentaire?: string - fichier_id?: number | null - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null - } - Update: { - collectivite_id?: number - commentaire?: string - fichier_id?: number | null - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null - } - Relationships: [ - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_fichier_id_fkey" - columns: ["fichier_id"] - isOneToOne: false - referencedRelation: "bibliotheque_fichier" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_base_fichier_id_fkey" - columns: ["fichier_id"] - isOneToOne: false - referencedRelation: "bibliotheque_fichier" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_base_fichier_id_fkey" - columns: ["fichier_id"] - isOneToOne: false - referencedRelation: "bibliotheque_fichier_snippet" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_base_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - } - Views: { - action_snippet: { - Row: { - action_id: string | null - collectivite_id: number | null - snippet: Json | null - } - Relationships: [] - } - bibliotheque_fichier_snippet: { - Row: { - id: number | null - snippet: Json | null - } - Relationships: [] - } - export_score_audit: { - Row: { - collectivite: string | null - cot: boolean | null - date_cloture_cae: string | null - date_cloture_eci: string | null - points_cae: number | null - points_eci: number | null - programme_cae: number | null - programme_eci: number | null - realise_cae: number | null - realise_eci: number | null - region: string | null - signataire: string | null - } - Relationships: [] - } - } - Functions: { - active_audit: { - Args: { - collectivite_id: number - referentiel: Database["public"]["Enums"]["referentiel"] - } - Returns: { - clos: boolean - collectivite_id: number - date_cnl: string | null - date_debut: string | null - date_fin: string | null - demande_id: number | null - id: number - referentiel: Database["public"]["Enums"]["referentiel"] - valide: boolean - valide_labellisation: boolean | null - } - } - audit_evaluation_payload: { - Args: { - audit: unknown - pre_audit: boolean - labellisation: boolean - } - Returns: Record - } - audit_personnalisation_payload: { - Args: { - audit_id: number - pre_audit: boolean - scores_table: string - } - Returns: Json - } - critere_action: { - Args: { - collectivite_id: number - } - Returns: { - referentiel: Database["public"]["Enums"]["referentiel"] - etoiles: Database["labellisation"]["Enums"]["etoile"] - action_id: unknown - formulation: string - score_realise: number - min_score_realise: number - score_programme: number - min_score_programme: number - atteint: boolean - prio: number - }[] - } - critere_fichier: { - Args: { - collectivite_id: number - } - Returns: { - referentiel: Database["public"]["Enums"]["referentiel"] - preuve_nombre: number - atteint: boolean - }[] - } - critere_score_global: { - Args: { - collectivite_id: number - } - Returns: { - referentiel: Database["public"]["Enums"]["referentiel"] - etoile_objectif: Database["labellisation"]["Enums"]["etoile"] - score_a_realiser: number - score_fait: number - atteint: boolean - }[] - } - current_audit: { - Args: { - col: number - ref: Database["public"]["Enums"]["referentiel"] - } - Returns: { - clos: boolean - collectivite_id: number - date_cnl: string | null - date_debut: string | null - date_fin: string | null - demande_id: number | null - id: number - referentiel: Database["public"]["Enums"]["referentiel"] - valide: boolean - valide_labellisation: boolean | null - } - } - etoiles: { - Args: { - collectivite_id: number - } - Returns: { - referentiel: Database["public"]["Enums"]["referentiel"] - etoile_labellise: Database["labellisation"]["Enums"]["etoile"] - prochaine_etoile_labellisation: Database["labellisation"]["Enums"]["etoile"] - etoile_score_possible: Database["labellisation"]["Enums"]["etoile"] - etoile_objectif: Database["labellisation"]["Enums"]["etoile"] - }[] - } - evaluate_audit_statuts: { - Args: { - audit_id: number - pre_audit: boolean - scores_table: string - } - Returns: number - } - json_action_statuts_at: { - Args: { - collectivite_id: number - referentiel: Database["public"]["Enums"]["referentiel"] - date_at: string - } - Returns: Json - } - json_reponses_at: { - Args: { - collectivite_id: number - date_at: string - } - Returns: Json - } - referentiel_score: { - Args: { - collectivite_id: number - } - Returns: { - referentiel: Database["public"]["Enums"]["referentiel"] - score_fait: number - score_programme: number - completude: number - complet: boolean - }[] - } - upsert_preuves_reglementaire: { - Args: { - preuves: Json - } - Returns: undefined - } - } - Enums: { - etoile: "1" | "2" | "3" | "4" | "5" - sujet_demande: "labellisation" | "labellisation_cot" | "cot" - } - CompositeTypes: { - [_ in never]: never - } - } - public: { - Tables: { - abstract_any_indicateur_value: { - Row: { - annee: number - modified_at: string - valeur: number | null - } - Insert: { - annee: number - modified_at?: string - valeur?: number | null - } - Update: { - annee?: number - modified_at?: string - valeur?: number | null - } - Relationships: [] - } - abstract_modified_at: { - Row: { - modified_at: string - } - Insert: { - modified_at?: string - } - Update: { - modified_at?: string - } - Relationships: [] - } - action_commentaire: { - Row: { - action_id: string - collectivite_id: number - commentaire: string - modified_at: string - modified_by: string - } - Insert: { - action_id: string - collectivite_id: number - commentaire: string - modified_at?: string - modified_by?: string - } - Update: { - action_id?: string - collectivite_id?: number - commentaire?: string - modified_at?: string - modified_by?: string - } - Relationships: [ - { - foreignKeyName: "action_commentaire_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - action_computed_points: { - Row: { - action_id: string - modified_at: string - value: number - } - Insert: { - action_id: string - modified_at?: string - value: number - } - Update: { - action_id?: string - modified_at?: string - value?: number - } - Relationships: [ - { - foreignKeyName: "action_computed_points_action_id_fkey" - columns: ["action_id"] - isOneToOne: true - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - ] - } - action_definition: { - Row: { - action_id: string - categorie: Database["public"]["Enums"]["action_categorie"] | null - contexte: string - description: string - exemples: string - identifiant: string - modified_at: string - nom: string - perimetre_evaluation: string - points: number | null - pourcentage: number | null - preuve: string | null - reduction_potentiel: string - referentiel: Database["public"]["Enums"]["referentiel"] - ressources: string - } - Insert: { - action_id: string - categorie?: Database["public"]["Enums"]["action_categorie"] | null - contexte: string - description: string - exemples: string - identifiant: string - modified_at?: string - nom: string - perimetre_evaluation: string - points?: number | null - pourcentage?: number | null - preuve?: string | null - reduction_potentiel: string - referentiel: Database["public"]["Enums"]["referentiel"] - ressources: string - } - Update: { - action_id?: string - categorie?: Database["public"]["Enums"]["action_categorie"] | null - contexte?: string - description?: string - exemples?: string - identifiant?: string - modified_at?: string - nom?: string - perimetre_evaluation?: string - points?: number | null - pourcentage?: number | null - preuve?: string | null - reduction_potentiel?: string - referentiel?: Database["public"]["Enums"]["referentiel"] - ressources?: string - } - Relationships: [ - { - foreignKeyName: "action_definition_action_id_fkey" - columns: ["action_id"] - isOneToOne: true - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - ] - } - action_discussion: { - Row: { - action_id: string - collectivite_id: number - created_at: string - created_by: string - id: number - modified_at: string - status: Database["public"]["Enums"]["action_discussion_statut"] - } - Insert: { - action_id: string - collectivite_id: number - created_at?: string - created_by?: string - id?: number - modified_at?: string - status?: Database["public"]["Enums"]["action_discussion_statut"] - } - Update: { - action_id?: string - collectivite_id?: number - created_at?: string - created_by?: string - id?: number - modified_at?: string - status?: Database["public"]["Enums"]["action_discussion_statut"] - } - Relationships: [ - { - foreignKeyName: "action_discussion_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_created_by_fkey" - columns: ["created_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - action_discussion_commentaire: { - Row: { - created_at: string - created_by: string - discussion_id: number - id: number - message: string - } - Insert: { - created_at?: string - created_by?: string - discussion_id: number - id?: number - message: string - } - Update: { - created_at?: string - created_by?: string - discussion_id?: number - id?: number - message?: string - } - Relationships: [ - { - foreignKeyName: "action_discussion_commentaire_created_by_fkey" - columns: ["created_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_discussion_commentaire_discussion_id_fkey" - columns: ["discussion_id"] - isOneToOne: false - referencedRelation: "action_discussion" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_discussion_commentaire_discussion_id_fkey" - columns: ["discussion_id"] - isOneToOne: false - referencedRelation: "action_discussion_feed" - referencedColumns: ["id"] - }, - ] - } - action_impact: { - Row: { - action_continue: boolean - competences_communales: boolean - description: string - description_complementaire: string - fourchette_budgetaire: number - id: number - impact_tier: number - independamment_competences: boolean - nb_collectivite_en_cours: number - nb_collectivite_realise: number - ressources_externes: Json | null - rex: Json | null - subventions_mobilisables: Json | null - temps_de_mise_en_oeuvre: number - titre: string - typologie_id: number | null - } - Insert: { - action_continue?: boolean - competences_communales?: boolean - description: string - description_complementaire?: string - fourchette_budgetaire?: number - id?: number - impact_tier?: number - independamment_competences?: boolean - nb_collectivite_en_cours?: number - nb_collectivite_realise?: number - ressources_externes?: Json | null - rex?: Json | null - subventions_mobilisables?: Json | null - temps_de_mise_en_oeuvre?: number - titre: string - typologie_id?: number | null - } - Update: { - action_continue?: boolean - competences_communales?: boolean - description?: string - description_complementaire?: string - fourchette_budgetaire?: number - id?: number - impact_tier?: number - independamment_competences?: boolean - nb_collectivite_en_cours?: number - nb_collectivite_realise?: number - ressources_externes?: Json | null - rex?: Json | null - subventions_mobilisables?: Json | null - temps_de_mise_en_oeuvre?: number - titre?: string - typologie_id?: number | null - } - Relationships: [ - { - foreignKeyName: "action_impact_fourchette_budgetaire_fkey" - columns: ["fourchette_budgetaire"] - isOneToOne: false - referencedRelation: "action_impact_fourchette_budgetaire" - referencedColumns: ["niveau"] - }, - { - foreignKeyName: "action_impact_impact_tier_fkey" - columns: ["impact_tier"] - isOneToOne: false - referencedRelation: "action_impact_tier" - referencedColumns: ["niveau"] - }, - { - foreignKeyName: "action_impact_temps_de_mise_en_oeuvre_fkey" - columns: ["temps_de_mise_en_oeuvre"] - isOneToOne: false - referencedRelation: "action_impact_temps_de_mise_en_oeuvre" - referencedColumns: ["niveau"] - }, - { - foreignKeyName: "action_impact_typologie_id_fkey" - columns: ["typologie_id"] - isOneToOne: false - referencedRelation: "action_impact_typologie" - referencedColumns: ["id"] - }, - ] - } - action_impact_action: { - Row: { - action_id: string - action_impact_id: number - } - Insert: { - action_id: string - action_impact_id: number - } - Update: { - action_id?: string - action_impact_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_action_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_definition" - referencedColumns: ["action_id"] - }, - { - foreignKeyName: "action_impact_action_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - ] - } - action_impact_banatic_competence: { - Row: { - action_impact_id: number - competence_code: number - } - Insert: { - action_impact_id: number - competence_code: number - } - Update: { - action_impact_id?: number - competence_code?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_banatic_competence_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_banatic_competence_competence_code_fkey" - columns: ["competence_code"] - isOneToOne: false - referencedRelation: "banatic_competence" - referencedColumns: ["code"] - }, - ] - } - action_impact_categorie: { - Row: { - id: string - nom: string - } - Insert: { - id: string - nom: string - } - Update: { - id?: string - nom?: string - } - Relationships: [] - } - action_impact_categorie_fnv: { - Row: { - action_impact_id: number - categorie_fnv_id: number - } - Insert: { - action_impact_id: number - categorie_fnv_id: number - } - Update: { - action_impact_id?: number - categorie_fnv_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_categorie_fnv_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_categorie_fnv_categorie_fnv_id_fkey" - columns: ["categorie_fnv_id"] - isOneToOne: false - referencedRelation: "categorie_fnv" - referencedColumns: ["id"] - }, - ] - } - action_impact_complexite: { - Row: { - niveau: number - nom: string - } - Insert: { - niveau?: number - nom: string - } - Update: { - niveau?: number - nom?: string - } - Relationships: [] - } - action_impact_effet_attendu: { - Row: { - action_impact_id: number - effet_attendu_id: number - } - Insert: { - action_impact_id: number - effet_attendu_id: number - } - Update: { - action_impact_id?: number - effet_attendu_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_effet_attendu_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_effet_attendu_effet_attendu_id_fkey" - columns: ["effet_attendu_id"] - isOneToOne: false - referencedRelation: "effet_attendu" - referencedColumns: ["id"] - }, - ] - } - action_impact_fiche_action: { - Row: { - action_impact_id: number - fiche_id: number - } - Insert: { - action_impact_id: number - fiche_id: number - } - Update: { - action_impact_id?: number - fiche_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_fiche_action_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - action_impact_fourchette_budgetaire: { - Row: { - niveau: number - nom: string - } - Insert: { - niveau?: number - nom: string - } - Update: { - niveau?: number - nom?: string - } - Relationships: [] - } - action_impact_indicateur: { - Row: { - action_impact_id: number - indicateur_id: number - } - Insert: { - action_impact_id: number - indicateur_id: number - } - Update: { - action_impact_id?: number - indicateur_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_indicateur_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - action_impact_panier: { - Row: { - action_id: number - panier_id: string - } - Insert: { - action_id: number - panier_id: string - } - Update: { - action_id?: number - panier_id?: string - } - Relationships: [ - { - foreignKeyName: "action_impact_panier_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_panier_panier_id_fkey" - columns: ["panier_id"] - isOneToOne: false - referencedRelation: "panier" - referencedColumns: ["id"] - }, - ] - } - action_impact_partenaire: { - Row: { - action_impact_id: number - partenaire_id: number - } - Insert: { - action_impact_id: number - partenaire_id: number - } - Update: { - action_impact_id?: number - partenaire_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_partenaire_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_partenaire_partenaire_id_fkey" - columns: ["partenaire_id"] - isOneToOne: false - referencedRelation: "panier_partenaire" - referencedColumns: ["id"] - }, - ] - } - action_impact_sous_thematique: { - Row: { - action_impact_id: number - sous_thematique_id: number - } - Insert: { - action_impact_id: number - sous_thematique_id: number - } - Update: { - action_impact_id?: number - sous_thematique_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_sous_thematique_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_sous_thematique_sous_thematique_id_fkey" - columns: ["sous_thematique_id"] - isOneToOne: false - referencedRelation: "sous_thematique" - referencedColumns: ["id"] - }, - ] - } - action_impact_state: { - Row: { - action: Database["public"]["Tables"]["action_impact"]["Row"] | null - isinpanier: boolean | null - panier: Database["public"]["Tables"]["panier"]["Row"] | null - statut: - | Database["public"]["Tables"]["action_impact_statut"]["Row"] - | null - action_definition: unknown | null - action_impact_fourchette_budgetaire: unknown | null - action_impact_temps_de_mise_en_oeuvre: unknown | null - action_impact_thematique: unknown | null - action_impact_typologie: unknown | null - matches_competences: boolean | null - thematique: unknown | null - } - Insert: { - action?: Database["public"]["Tables"]["action_impact"]["Row"] | null - isinpanier?: boolean | null - panier?: Database["public"]["Tables"]["panier"]["Row"] | null - statut?: - | Database["public"]["Tables"]["action_impact_statut"]["Row"] - | null - } - Update: { - action?: Database["public"]["Tables"]["action_impact"]["Row"] | null - isinpanier?: boolean | null - panier?: Database["public"]["Tables"]["panier"]["Row"] | null - statut?: - | Database["public"]["Tables"]["action_impact_statut"]["Row"] - | null - } - Relationships: [] - } - action_impact_statut: { - Row: { - action_id: number - categorie_id: string - panier_id: string - } - Insert: { - action_id: number - categorie_id: string - panier_id: string - } - Update: { - action_id?: number - categorie_id?: string - panier_id?: string - } - Relationships: [ - { - foreignKeyName: "action_impact_statut_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_statut_categorie_id_fkey" - columns: ["categorie_id"] - isOneToOne: false - referencedRelation: "action_impact_categorie" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_statut_panier_id_fkey" - columns: ["panier_id"] - isOneToOne: false - referencedRelation: "panier" - referencedColumns: ["id"] - }, - ] - } - action_impact_temps_de_mise_en_oeuvre: { - Row: { - niveau: number - nom: string - } - Insert: { - niveau?: number - nom: string - } - Update: { - niveau?: number - nom?: string - } - Relationships: [] - } - action_impact_thematique: { - Row: { - action_impact_id: number - ordre: number - thematique_id: number - } - Insert: { - action_impact_id: number - ordre?: number - thematique_id: number - } - Update: { - action_impact_id?: number - ordre?: number - thematique_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_thematique_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_thematique_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "thematique" - referencedColumns: ["id"] - }, - ] - } - action_impact_tier: { - Row: { - niveau: number - nom: string - } - Insert: { - niveau?: number - nom: string - } - Update: { - niveau?: number - nom?: string - } - Relationships: [] - } - action_impact_typologie: { - Row: { - id: number - nom: string - } - Insert: { - id?: number - nom: string - } - Update: { - id?: number - nom?: string - } - Relationships: [] - } - action_relation: { - Row: { - id: string - parent: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - } - Insert: { - id: string - parent?: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - } - Update: { - id?: string - parent?: string | null - referentiel?: Database["public"]["Enums"]["referentiel"] - } - Relationships: [ - { - foreignKeyName: "action_relation_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - ] - } - action_statut: { - Row: { - action_id: string - avancement: Database["public"]["Enums"]["avancement"] - avancement_detaille: number[] | null - collectivite_id: number - concerne: boolean - modified_at: string - modified_by: string - } - Insert: { - action_id: string - avancement: Database["public"]["Enums"]["avancement"] - avancement_detaille?: number[] | null - collectivite_id: number - concerne: boolean - modified_at?: string - modified_by?: string - } - Update: { - action_id?: string - avancement?: Database["public"]["Enums"]["avancement"] - avancement_detaille?: number[] | null - collectivite_id?: number - concerne?: boolean - modified_at?: string - modified_by?: string - } - Relationships: [ - { - foreignKeyName: "action_statut_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - annexe: { - Row: { - collectivite_id: number - commentaire: string - fiche_id: number - fichier_id: number | null - id: number - lien: Json | null - modified_at: string - modified_by: string - titre: string - url: string | null - } - Insert: { - collectivite_id: number - commentaire?: string - fiche_id: number - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null - } - Update: { - collectivite_id?: number - commentaire?: string - fiche_id?: number - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null - } - Relationships: [ - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - audit_auditeur: { - Row: { - audit_id: number - auditeur: string - created_at: string | null - } - Insert: { - audit_id: number - auditeur: string - created_at?: string | null - } - Update: { - audit_id?: number - auditeur?: string - created_at?: string | null - } - Relationships: [ - { - foreignKeyName: "audit_auditeur_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "action_audit_state" - referencedColumns: ["audit_id"] - }, - { - foreignKeyName: "audit_auditeur_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_auditeur_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_auditeur_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "audit_en_cours" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_auditeur_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["audit_id"] - }, - { - foreignKeyName: "audit_auditeur_auditeur_fkey" - columns: ["auditeur"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - axe: { - Row: { - collectivite_id: number - created_at: string - id: number - modified_at: string - modified_by: string | null - nom: string | null - panier_id: string | null - parent: number | null - plan: number | null - type: number | null - axe_enfant: unknown | null - collectivite_card: unknown | null - plan_action_type: unknown | null - vide: boolean | null - } - Insert: { - collectivite_id: number - created_at?: string - id?: number - modified_at?: string - modified_by?: string | null - nom?: string | null - panier_id?: string | null - parent?: number | null - plan?: number | null - type?: number | null - } - Update: { - collectivite_id?: number - created_at?: string - id?: number - modified_at?: string - modified_by?: string | null - nom?: string | null - panier_id?: string | null - parent?: number | null - plan?: number | null - type?: number | null - } - Relationships: [ - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_panier_id_fkey" - columns: ["panier_id"] - isOneToOne: false - referencedRelation: "panier" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "axe" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "plan_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "plan_action_profondeur" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_plan_fkey" - columns: ["plan"] - isOneToOne: false - referencedRelation: "axe" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_plan_fkey" - columns: ["plan"] - isOneToOne: false - referencedRelation: "plan_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_plan_fkey" - columns: ["plan"] - isOneToOne: false - referencedRelation: "plan_action_profondeur" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_type_fkey" - columns: ["type"] - isOneToOne: false - referencedRelation: "plan_action_type" - referencedColumns: ["id"] - }, - ] - } - banatic_competence: { - Row: { - code: number - nom: string - } - Insert: { - code: number - nom: string - } - Update: { - code?: number - nom?: string - } - Relationships: [] - } - categorie_fnv: { - Row: { - id: number - nom: string - } - Insert: { - id?: number - nom: string - } - Update: { - id?: number - nom?: string - } - Relationships: [] - } - categorie_tag: { - Row: { - collectivite_id: number | null - created_at: string - created_by: string | null - groupement_id: number | null - id: number - nom: string - visible: boolean - } - Insert: { - collectivite_id?: number | null - created_at?: string - created_by?: string | null - groupement_id?: number | null - id?: number - nom: string - visible?: boolean - } - Update: { - collectivite_id?: number | null - created_at?: string - created_by?: string | null - groupement_id?: number | null - id?: number - nom?: string - visible?: boolean - } - Relationships: [ - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_created_by_fkey" - columns: ["created_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - { - foreignKeyName: "categorie_tag_groupement_id_fkey" - columns: ["groupement_id"] - isOneToOne: false - referencedRelation: "groupement" - referencedColumns: ["id"] - }, - ] - } - client_scores: { - Row: { - collectivite_id: number - modified_at: string - payload_timestamp: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json - } - Insert: { - collectivite_id: number - modified_at: string - payload_timestamp?: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json - } - Update: { - collectivite_id?: number - modified_at?: string - payload_timestamp?: string | null - referentiel?: Database["public"]["Enums"]["referentiel"] - scores?: Json - } - Relationships: [ - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - client_scores_update: { - Row: { - collectivite_id: number - modified_at: string - referentiel: Database["public"]["Enums"]["referentiel"] - } - Insert: { - collectivite_id: number - modified_at: string - referentiel: Database["public"]["Enums"]["referentiel"] - } - Update: { - collectivite_id?: number - modified_at?: string - referentiel?: Database["public"]["Enums"]["referentiel"] - } - Relationships: [ - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - collectivite: { - Row: { - access_restreint: boolean - created_at: string - id: number - modified_at: string - active: boolean | null - collectivite_thematique: unknown | null - collectivite_utilisateur: unknown | null - } - Insert: { - access_restreint?: boolean - created_at?: string - id?: number - modified_at?: string - } - Update: { - access_restreint?: boolean - created_at?: string - id?: number - modified_at?: string - } - Relationships: [] - } - collectivite_banatic_competence: { - Row: { - collectivite_id: number - competence_code: number - } - Insert: { - collectivite_id: number - competence_code: number - } - Update: { - collectivite_id?: number - competence_code?: number - } - Relationships: [ - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_competence_code_fkey" - columns: ["competence_code"] - isOneToOne: false - referencedRelation: "banatic_competence" - referencedColumns: ["code"] - }, - ] - } - collectivite_bucket: { - Row: { - bucket_id: string - collectivite_id: number - } - Insert: { - bucket_id: string - collectivite_id: number - } - Update: { - bucket_id?: string - collectivite_id?: number - } - Relationships: [ - { - foreignKeyName: "collectivite_bucket_bucket_id_fkey" - columns: ["bucket_id"] - isOneToOne: false - referencedRelation: "buckets" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - collectivite_test: { - Row: { - collectivite_id: number | null - id: number - nom: string - } - Insert: { - collectivite_id?: number | null - id?: number - nom: string - } - Update: { - collectivite_id?: number | null - id?: number - nom?: string - } - Relationships: [ - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - commune: { - Row: { - code: string - collectivite_id: number | null - id: number - nom: string - } - Insert: { - code: string - collectivite_id?: number | null - id?: number - nom: string - } - Update: { - code?: string - collectivite_id?: number | null - id?: number - nom?: string - } - Relationships: [ - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - confidentialite_crud: { - Row: { - c: Database["public"]["Enums"]["confidentialite_option_crud"] - d: Database["public"]["Enums"]["confidentialite_option_crud"] - nom_element: string - profil: Database["public"]["Enums"]["confidentialite_profil"] - r: Database["public"]["Enums"]["confidentialite_option_crud"] - type_element: Database["public"]["Enums"]["confidentialite_type_element"] - u: Database["public"]["Enums"]["confidentialite_option_crud"] - } - Insert: { - c: Database["public"]["Enums"]["confidentialite_option_crud"] - d: Database["public"]["Enums"]["confidentialite_option_crud"] - nom_element: string - profil: Database["public"]["Enums"]["confidentialite_profil"] - r: Database["public"]["Enums"]["confidentialite_option_crud"] - type_element: Database["public"]["Enums"]["confidentialite_type_element"] - u: Database["public"]["Enums"]["confidentialite_option_crud"] - } - Update: { - c?: Database["public"]["Enums"]["confidentialite_option_crud"] - d?: Database["public"]["Enums"]["confidentialite_option_crud"] - nom_element?: string - profil?: Database["public"]["Enums"]["confidentialite_profil"] - r?: Database["public"]["Enums"]["confidentialite_option_crud"] - type_element?: Database["public"]["Enums"]["confidentialite_type_element"] - u?: Database["public"]["Enums"]["confidentialite_option_crud"] - } - Relationships: [] - } - cot: { - Row: { - actif: boolean - collectivite_id: number - signataire: number | null - } - Insert: { - actif: boolean - collectivite_id: number - signataire?: number | null - } - Update: { - actif?: boolean - collectivite_id?: number - signataire?: number | null - } - Relationships: [ - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - dcp: { - Row: { - cgu_acceptees_le: string | null - created_at: string - deleted: boolean - email: string - limited: boolean - modified_at: string - nom: string - prenom: string - telephone: string | null - user_id: string - } - Insert: { - cgu_acceptees_le?: string | null - created_at?: string - deleted?: boolean - email: string - limited?: boolean - modified_at?: string - nom: string - prenom: string - telephone?: string | null - user_id: string - } - Update: { - cgu_acceptees_le?: string | null - created_at?: string - deleted?: boolean - email?: string - limited?: boolean - modified_at?: string - nom?: string - prenom?: string - telephone?: string | null - user_id?: string - } - Relationships: [ - { - foreignKeyName: "dcp_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - effet_attendu: { - Row: { - id: number - nom: string - notice: string | null - } - Insert: { - id?: number - nom: string - notice?: string | null - } - Update: { - id?: number - nom?: string - notice?: string | null - } - Relationships: [] - } - epci: { - Row: { - collectivite_id: number | null - id: number - nature: Database["public"]["Enums"]["nature"] - nom: string - siren: string - } - Insert: { - collectivite_id?: number | null - id?: number - nature: Database["public"]["Enums"]["nature"] - nom: string - siren: string - } - Update: { - collectivite_id?: number | null - id?: number - nature?: Database["public"]["Enums"]["nature"] - nom?: string - siren?: string - } - Relationships: [ - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - fiche_action: { - Row: { - amelioration_continue: boolean | null - budget_previsionnel: number | null - calendrier: string | null - cibles: Database["public"]["Enums"]["fiche_action_cibles"][] | null - collectivite_id: number - created_at: string - date_debut: string | null - date_fin_provisoire: string | null - description: string | null - financements: string | null - id: number - maj_termine: boolean | null - modified_at: string - modified_by: string | null - niveau_priorite: - | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] - | null - notes_complementaires: string | null - objectifs: string | null - piliers_eci: - | Database["public"]["Enums"]["fiche_action_piliers_eci"][] - | null - ressources: string | null - restreint: boolean | null - resultats_attendus: - | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] - | null - statut: Database["public"]["Enums"]["fiche_action_statuts"] | null - titre: string | null - fiche_action_plan: unknown | null - } - Insert: { - amelioration_continue?: boolean | null - budget_previsionnel?: number | null - calendrier?: string | null - cibles?: Database["public"]["Enums"]["fiche_action_cibles"][] | null - collectivite_id: number - created_at?: string - date_debut?: string | null - date_fin_provisoire?: string | null - description?: string | null - financements?: string | null - id?: number - maj_termine?: boolean | null - modified_at?: string - modified_by?: string | null - niveau_priorite?: - | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] - | null - notes_complementaires?: string | null - objectifs?: string | null - piliers_eci?: - | Database["public"]["Enums"]["fiche_action_piliers_eci"][] - | null - ressources?: string | null - restreint?: boolean | null - resultats_attendus?: - | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] - | null - statut?: Database["public"]["Enums"]["fiche_action_statuts"] | null - titre?: string | null - } - Update: { - amelioration_continue?: boolean | null - budget_previsionnel?: number | null - calendrier?: string | null - cibles?: Database["public"]["Enums"]["fiche_action_cibles"][] | null - collectivite_id?: number - created_at?: string - date_debut?: string | null - date_fin_provisoire?: string | null - description?: string | null - financements?: string | null - id?: number - maj_termine?: boolean | null - modified_at?: string - modified_by?: string | null - niveau_priorite?: - | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] - | null - notes_complementaires?: string | null - objectifs?: string | null - piliers_eci?: - | Database["public"]["Enums"]["fiche_action_piliers_eci"][] - | null - ressources?: string | null - restreint?: boolean | null - resultats_attendus?: - | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] - | null - statut?: Database["public"]["Enums"]["fiche_action_statuts"] | null - titre?: string | null - } - Relationships: [ - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - fiche_action_action: { - Row: { - action_id: string - fiche_id: number - } - Insert: { - action_id: string - fiche_id: number - } - Update: { - action_id?: string - fiche_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_action_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - fiche_action_axe: { - Row: { - axe_id: number - fiche_id: number - } - Insert: { - axe_id: number - fiche_id: number - } - Update: { - axe_id?: number - fiche_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_axe_axe_id_fkey" - columns: ["axe_id"] - isOneToOne: false - referencedRelation: "axe" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_axe_id_fkey" - columns: ["axe_id"] - isOneToOne: false - referencedRelation: "plan_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_axe_id_fkey" - columns: ["axe_id"] - isOneToOne: false - referencedRelation: "plan_action_profondeur" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - fiche_action_effet_attendu: { - Row: { - effet_attendu_id: number - fiche_id: number - } - Insert: { - effet_attendu_id: number - fiche_id: number - } - Update: { - effet_attendu_id?: number - fiche_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_effet_attendu_effet_attendu_id_fkey" - columns: ["effet_attendu_id"] - isOneToOne: false - referencedRelation: "effet_attendu" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - fiche_action_financeur_tag: { - Row: { - fiche_id: number - financeur_tag_id: number - id: number - montant_ttc: number | null - } - Insert: { - fiche_id: number - financeur_tag_id: number - id?: number - montant_ttc?: number | null - } - Update: { - fiche_id?: number - financeur_tag_id?: number - id?: number - montant_ttc?: number | null - } - Relationships: [ - { - foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_financeur_tag_financeur_tag_id_fkey" - columns: ["financeur_tag_id"] - isOneToOne: false - referencedRelation: "financeur_tag" - referencedColumns: ["id"] - }, - ] - } - fiche_action_import_csv: { - Row: { - amelioration_continue: string | null - axe: string | null - budget: string | null - calendrier: string | null - cibles: string | null - collectivite_id: string | null - date_debut: string | null - date_fin: string | null - description: string | null - elu_referent: string | null - financements: string | null - financeur_deux: string | null - financeur_trois: string | null - financeur_un: string | null - montant_deux: string | null - montant_trois: string | null - montant_un: string | null - moyens: string | null - notes: string | null - num_action: string | null - objectifs: string | null - partenaires: string | null - personne_referente: string | null - plan_nom: string | null - priorite: string | null - resultats_attendus: string | null - service: string | null - sous_axe: string | null - sous_sous_axe: string | null - statut: string | null - structure_pilote: string | null - titre: string | null - } - Insert: { - amelioration_continue?: string | null - axe?: string | null - budget?: string | null - calendrier?: string | null - cibles?: string | null - collectivite_id?: string | null - date_debut?: string | null - date_fin?: string | null - description?: string | null - elu_referent?: string | null - financements?: string | null - financeur_deux?: string | null - financeur_trois?: string | null - financeur_un?: string | null - montant_deux?: string | null - montant_trois?: string | null - montant_un?: string | null - moyens?: string | null - notes?: string | null - num_action?: string | null - objectifs?: string | null - partenaires?: string | null - personne_referente?: string | null - plan_nom?: string | null - priorite?: string | null - resultats_attendus?: string | null - service?: string | null - sous_axe?: string | null - sous_sous_axe?: string | null - statut?: string | null - structure_pilote?: string | null - titre?: string | null - } - Update: { - amelioration_continue?: string | null - axe?: string | null - budget?: string | null - calendrier?: string | null - cibles?: string | null - collectivite_id?: string | null - date_debut?: string | null - date_fin?: string | null - description?: string | null - elu_referent?: string | null - financements?: string | null - financeur_deux?: string | null - financeur_trois?: string | null - financeur_un?: string | null - montant_deux?: string | null - montant_trois?: string | null - montant_un?: string | null - moyens?: string | null - notes?: string | null - num_action?: string | null - objectifs?: string | null - partenaires?: string | null - personne_referente?: string | null - plan_nom?: string | null - priorite?: string | null - resultats_attendus?: string | null - service?: string | null - sous_axe?: string | null - sous_sous_axe?: string | null - statut?: string | null - structure_pilote?: string | null - titre?: string | null - } - Relationships: [] - } - fiche_action_indicateur: { - Row: { - fiche_id: number - indicateur_id: number - } - Insert: { - fiche_id: number - indicateur_id: number - } - Update: { - fiche_id?: number - indicateur_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - fiche_action_lien: { - Row: { - fiche_deux: number - fiche_une: number - } - Insert: { - fiche_deux: number - fiche_une: number - } - Update: { - fiche_deux?: number - fiche_une?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_lien_fiche_deux_fkey" - columns: ["fiche_deux"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_deux_fkey" - columns: ["fiche_deux"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_deux_fkey" - columns: ["fiche_deux"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_deux_fkey" - columns: ["fiche_deux"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_deux_fkey" - columns: ["fiche_deux"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_une_fkey" - columns: ["fiche_une"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_une_fkey" - columns: ["fiche_une"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_une_fkey" - columns: ["fiche_une"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_une_fkey" - columns: ["fiche_une"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_une_fkey" - columns: ["fiche_une"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - fiche_action_partenaire_tag: { - Row: { - fiche_id: number - partenaire_tag_id: number - } - Insert: { - fiche_id: number - partenaire_tag_id: number - } - Update: { - fiche_id?: number - partenaire_tag_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_partenaire_tag_partenaire_tag_id_fkey" - columns: ["partenaire_tag_id"] - isOneToOne: false - referencedRelation: "partenaire_tag" - referencedColumns: ["id"] - }, - ] - } - fiche_action_pilote: { - Row: { - fiche_id: number - tag_id: number | null - user_id: string | null - } - Insert: { - fiche_id: number - tag_id?: number | null - user_id?: string | null - } - Update: { - fiche_id?: number - tag_id?: number | null - user_id?: string | null - } - Relationships: [ - { - foreignKeyName: "fiche_action_pilote_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_tag_id_fkey" - columns: ["tag_id"] - isOneToOne: false - referencedRelation: "personne_tag" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["user_id"] - }, - { - foreignKeyName: "fiche_action_pilote_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "crm_personnes" - referencedColumns: ["user_id"] - }, - { - foreignKeyName: "fiche_action_pilote_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "dcp" - referencedColumns: ["user_id"] - }, - { - foreignKeyName: "fiche_action_pilote_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "dcp_display" - referencedColumns: ["user_id"] - }, - ] - } - fiche_action_referent: { - Row: { - fiche_id: number - tag_id: number | null - user_id: string | null - } - Insert: { - fiche_id: number - tag_id?: number | null - user_id?: string | null - } - Update: { - fiche_id?: number - tag_id?: number | null - user_id?: string | null - } - Relationships: [ - { - foreignKeyName: "fiche_action_referent_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_tag_id_fkey" - columns: ["tag_id"] - isOneToOne: false - referencedRelation: "personne_tag" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - fiche_action_service_tag: { - Row: { - fiche_id: number - service_tag_id: number - } - Insert: { - fiche_id: number - service_tag_id: number - } - Update: { - fiche_id?: number - service_tag_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_service_tag_service_tag_id_fkey" - columns: ["service_tag_id"] - isOneToOne: false - referencedRelation: "service_tag" - referencedColumns: ["id"] - }, - ] - } - fiche_action_sous_thematique: { - Row: { - fiche_id: number - thematique_id: number - } - Insert: { - fiche_id: number - thematique_id: number - } - Update: { - fiche_id?: number - thematique_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_sous_thematique_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "sous_thematique" - referencedColumns: ["id"] - }, - ] - } - fiche_action_structure_tag: { - Row: { - fiche_id: number - structure_tag_id: number - } - Insert: { - fiche_id: number - structure_tag_id: number - } - Update: { - fiche_id?: number - structure_tag_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_structure_tag_structure_tag_id_fkey" - columns: ["structure_tag_id"] - isOneToOne: false - referencedRelation: "structure_tag" - referencedColumns: ["id"] - }, - ] - } - fiche_action_thematique: { - Row: { - fiche_id: number - thematique_id: number - } - Insert: { - fiche_id: number - thematique_id: number - } - Update: { - fiche_id?: number - thematique_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - filtre_intervalle: { - Row: { - id: string - intervalle: unknown - libelle: string - type: Database["public"]["Enums"]["collectivite_filtre_type"] - } - Insert: { - id: string - intervalle: unknown - libelle: string - type: Database["public"]["Enums"]["collectivite_filtre_type"] - } - Update: { - id?: string - intervalle?: unknown - libelle?: string - type?: Database["public"]["Enums"]["collectivite_filtre_type"] - } - Relationships: [] - } - financeur_tag: { - Row: { - collectivite_id: number - id: number - nom: string - } - Insert: { - collectivite_id: number - id?: number - nom: string - } - Update: { - collectivite_id?: number - id?: number - nom?: string - } - Relationships: [ - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - groupement: { - Row: { - id: number - nom: string - } - Insert: { - id?: number - nom: string - } - Update: { - id?: number - nom?: string - } - Relationships: [] - } - groupement_collectivite: { - Row: { - collectivite_id: number - groupement_id: number - } - Insert: { - collectivite_id: number - groupement_id: number - } - Update: { - collectivite_id?: number - groupement_id?: number - } - Relationships: [ - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_groupement_id_fkey" - columns: ["groupement_id"] - isOneToOne: false - referencedRelation: "groupement" - referencedColumns: ["id"] - }, - ] - } - indicateur_action: { - Row: { - action_id: string - indicateur_id: number - } - Insert: { - action_id: string - indicateur_id: number - } - Update: { - action_id?: string - indicateur_id?: number - } - Relationships: [ - { - foreignKeyName: "indicateur_action_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_action_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_action_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_action_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - indicateur_artificialisation: { - Row: { - activite: number - collectivite_id: number - ferroviaire: number - habitat: number - inconnue: number - mixte: number - routiere: number - total: number - } - Insert: { - activite: number - collectivite_id: number - ferroviaire: number - habitat: number - inconnue: number - mixte: number - routiere: number - total: number - } - Update: { - activite?: number - collectivite_id?: number - ferroviaire?: number - habitat?: number - inconnue?: number - mixte?: number - routiere?: number - total?: number - } - Relationships: [ - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - indicateur_categorie_tag: { - Row: { - categorie_tag_id: number - indicateur_id: number - } - Insert: { - categorie_tag_id: number - indicateur_id: number - } - Update: { - categorie_tag_id?: number - indicateur_id?: number - } - Relationships: [ - { - foreignKeyName: "indicateur_categorie_tag_categorie_tag_id_fkey" - columns: ["categorie_tag_id"] - isOneToOne: false - referencedRelation: "categorie_tag" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_categorie_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_categorie_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_categorie_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - indicateur_collectivite: { - Row: { - collectivite_id: number - commentaire: string | null - confidentiel: boolean - favoris: boolean - indicateur_id: number - } - Insert: { - collectivite_id: number - commentaire?: string | null - confidentiel?: boolean - favoris?: boolean - indicateur_id: number - } - Update: { - collectivite_id?: number - commentaire?: string | null - confidentiel?: boolean - favoris?: boolean - indicateur_id?: number - } - Relationships: [ - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_collectivite_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_collectivite_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - indicateur_definition: { - Row: { - borne_max: number | null - borne_min: number | null - collectivite_id: number | null - created_at: string - created_by: string | null - description: string | null - groupement_id: number | null - id: number - identifiant_referentiel: string | null - modified_at: string - modified_by: string | null - participation_score: boolean - sans_valeur_utilisateur: boolean - titre: string - titre_long: string | null - unite: string - valeur_calcule: string | null - indicateur_enfants: unknown | null - indicateur_parents: unknown | null - } - Insert: { - borne_max?: number | null - borne_min?: number | null - collectivite_id?: number | null - created_at?: string - created_by?: string | null - description?: string | null - groupement_id?: number | null - id?: number - identifiant_referentiel?: string | null - modified_at?: string - modified_by?: string | null - participation_score?: boolean - sans_valeur_utilisateur?: boolean - titre: string - titre_long?: string | null - unite: string - valeur_calcule?: string | null - } - Update: { - borne_max?: number | null - borne_min?: number | null - collectivite_id?: number | null - created_at?: string - created_by?: string | null - description?: string | null - groupement_id?: number | null - id?: number - identifiant_referentiel?: string | null - modified_at?: string - modified_by?: string | null - participation_score?: boolean - sans_valeur_utilisateur?: boolean - titre?: string - titre_long?: string | null - unite?: string - valeur_calcule?: string | null - } - Relationships: [ - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_created_by_fkey" - columns: ["created_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_definition_groupement_id_fkey" - columns: ["groupement_id"] - isOneToOne: false - referencedRelation: "groupement" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_definition_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - indicateur_groupe: { - Row: { - enfant: number - parent: number - } - Insert: { - enfant: number - parent: number - } - Update: { - enfant?: number - parent?: number - } - Relationships: [ - { - foreignKeyName: "indicateur_groupe_enfant_fkey" - columns: ["enfant"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_groupe_enfant_fkey" - columns: ["enfant"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_groupe_enfant_fkey" - columns: ["enfant"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_groupe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_groupe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_groupe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - indicateur_pilote: { - Row: { - collectivite_id: number - id: number - indicateur_id: number - tag_id: number | null - user_id: string | null - indicateur_pilote_user: unknown | null - } - Insert: { - collectivite_id: number - id?: number - indicateur_id: number - tag_id?: number | null - user_id?: string | null - } - Update: { - collectivite_id?: number - id?: number - indicateur_id?: number - tag_id?: number | null - user_id?: string | null - } - Relationships: [ - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_tag_id_fkey" - columns: ["tag_id"] - isOneToOne: false - referencedRelation: "personne_tag" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] + referencedRelation: "bibliotheque_fichier_snippet" + referencedColumns: ["id"] }, ] } - indicateur_service_tag: { + } + Views: { + action_snippet: { + Row: { + action_id: string | null + collectivite_id: number | null + snippet: Json | null + } + Relationships: [] + } + bibliotheque_fichier_snippet: { + Row: { + id: number | null + snippet: Json | null + } + Relationships: [] + } + export_score_audit: { + Row: { + collectivite: string | null + cot: boolean | null + date_cloture_cae: string | null + date_cloture_eci: string | null + points_cae: number | null + points_eci: number | null + programme_cae: number | null + programme_eci: number | null + realise_cae: number | null + realise_eci: number | null + region: string | null + signataire: string | null + } + Relationships: [] + } + } + Functions: { + active_audit: { + Args: { + collectivite_id: number + referentiel: Database["public"]["Enums"]["referentiel"] + } + Returns: { + clos: boolean + collectivite_id: number + date_cnl: string | null + date_debut: string | null + date_fin: string | null + demande_id: number | null + id: number + referentiel: Database["public"]["Enums"]["referentiel"] + valide: boolean + valide_labellisation: boolean | null + } + } + audit_evaluation_payload: { + Args: { + audit: unknown + pre_audit: boolean + labellisation: boolean + } + Returns: Record + } + audit_personnalisation_payload: { + Args: { + audit_id: number + pre_audit: boolean + scores_table: string + } + Returns: Json + } + critere_action: { + Args: { + collectivite_id: number + } + Returns: { + referentiel: Database["public"]["Enums"]["referentiel"] + etoiles: Database["labellisation"]["Enums"]["etoile"] + action_id: unknown + formulation: string + score_realise: number + min_score_realise: number + score_programme: number + min_score_programme: number + atteint: boolean + prio: number + }[] + } + critere_fichier: { + Args: { + collectivite_id: number + } + Returns: { + referentiel: Database["public"]["Enums"]["referentiel"] + preuve_nombre: number + atteint: boolean + }[] + } + critere_score_global: { + Args: { + collectivite_id: number + } + Returns: { + referentiel: Database["public"]["Enums"]["referentiel"] + etoile_objectif: Database["labellisation"]["Enums"]["etoile"] + score_a_realiser: number + score_fait: number + atteint: boolean + }[] + } + current_audit: { + Args: { + col: number + ref: Database["public"]["Enums"]["referentiel"] + } + Returns: { + clos: boolean + collectivite_id: number + date_cnl: string | null + date_debut: string | null + date_fin: string | null + demande_id: number | null + id: number + referentiel: Database["public"]["Enums"]["referentiel"] + valide: boolean + valide_labellisation: boolean | null + } + } + etoiles: { + Args: { + collectivite_id: number + } + Returns: { + referentiel: Database["public"]["Enums"]["referentiel"] + etoile_labellise: Database["labellisation"]["Enums"]["etoile"] + prochaine_etoile_labellisation: Database["labellisation"]["Enums"]["etoile"] + etoile_score_possible: Database["labellisation"]["Enums"]["etoile"] + etoile_objectif: Database["labellisation"]["Enums"]["etoile"] + }[] + } + evaluate_audit_statuts: { + Args: { + audit_id: number + pre_audit: boolean + scores_table: string + } + Returns: number + } + json_action_statuts_at: { + Args: { + collectivite_id: number + referentiel: Database["public"]["Enums"]["referentiel"] + date_at: string + } + Returns: Json + } + json_reponses_at: { + Args: { + collectivite_id: number + date_at: string + } + Returns: Json + } + referentiel_score: { + Args: { + collectivite_id: number + } + Returns: { + referentiel: Database["public"]["Enums"]["referentiel"] + score_fait: number + score_programme: number + completude: number + complet: boolean + }[] + } + upsert_preuves_reglementaire: { + Args: { + preuves: Json + } + Returns: undefined + } + } + Enums: { + etoile: "1" | "2" | "3" | "4" | "5" + sujet_demande: "labellisation" | "labellisation_cot" | "cot" + } + CompositeTypes: { + [_ in never]: never + } + } + public: { + Tables: { + abstract_any_indicateur_value: { + Row: { + annee: number + modified_at: string + valeur: number | null + } + Insert: { + annee: number + modified_at?: string + valeur?: number | null + } + Update: { + annee?: number + modified_at?: string + valeur?: number | null + } + Relationships: [] + } + abstract_modified_at: { + Row: { + modified_at: string + } + Insert: { + modified_at?: string + } + Update: { + modified_at?: string + } + Relationships: [] + } + action_commentaire: { Row: { + action_id: string collectivite_id: number - indicateur_id: number - service_tag_id: number + commentaire: string + modified_at: string + modified_by: string } Insert: { + action_id: string collectivite_id: number - indicateur_id: number - service_tag_id: number + commentaire: string + modified_at?: string + modified_by?: string } Update: { + action_id?: string collectivite_id?: number - indicateur_id?: number - service_tag_id?: number + commentaire?: string + modified_at?: string + modified_by?: string } Relationships: [ { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_commentaire_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "indicateur_service_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_service_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_service_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_service_tag_service_tag_id_fkey" - columns: ["service_tag_id"] - isOneToOne: false - referencedRelation: "service_tag" - referencedColumns: ["id"] - }, ] } - indicateur_source: { - Row: { - id: string - libelle: string - ordre_affichage: number | null - } - Insert: { - id: string - libelle: string - ordre_affichage?: number | null - } - Update: { - id?: string - libelle?: string - ordre_affichage?: number | null - } - Relationships: [] - } - indicateur_source_metadonnee: { + action_computed_points: { Row: { - date_version: string - diffuseur: string | null - id: number - limites: string | null - methodologie: string | null - nom_donnees: string | null - producteur: string | null - source_id: string + action_id: string + modified_at: string + value: number } Insert: { - date_version: string - diffuseur?: string | null - id?: number - limites?: string | null - methodologie?: string | null - nom_donnees?: string | null - producteur?: string | null - source_id: string + action_id: string + modified_at?: string + value: number } Update: { - date_version?: string - diffuseur?: string | null - id?: number - limites?: string | null - methodologie?: string | null - nom_donnees?: string | null - producteur?: string | null - source_id?: string + action_id?: string + modified_at?: string + value?: number } Relationships: [ { - foreignKeyName: "indicateur_source_metadonnee_source_id_fkey" - columns: ["source_id"] - isOneToOne: false - referencedRelation: "indicateur_source" + foreignKeyName: "action_computed_points_action_id_fkey" + columns: ["action_id"] + isOneToOne: true + referencedRelation: "action_relation" referencedColumns: ["id"] }, ] } - indicateur_sous_thematique: { + action_definition: { Row: { - indicateur_id: number - sous_thematique_id: number + action_id: string + categorie: Database["public"]["Enums"]["action_categorie"] | null + contexte: string + description: string + exemples: string + identifiant: string + modified_at: string + nom: string + perimetre_evaluation: string + points: number | null + pourcentage: number | null + preuve: string | null + reduction_potentiel: string + referentiel: Database["public"]["Enums"]["referentiel"] + referentiel_id: string + referentiel_version: string + ressources: string } Insert: { - indicateur_id: number - sous_thematique_id: number + action_id: string + categorie?: Database["public"]["Enums"]["action_categorie"] | null + contexte: string + description: string + exemples: string + identifiant: string + modified_at?: string + nom: string + perimetre_evaluation: string + points?: number | null + pourcentage?: number | null + preuve?: string | null + reduction_potentiel: string + referentiel: Database["public"]["Enums"]["referentiel"] + referentiel_id: string + referentiel_version: string + ressources: string } Update: { - indicateur_id?: number - sous_thematique_id?: number + action_id?: string + categorie?: Database["public"]["Enums"]["action_categorie"] | null + contexte?: string + description?: string + exemples?: string + identifiant?: string + modified_at?: string + nom?: string + perimetre_evaluation?: string + points?: number | null + pourcentage?: number | null + preuve?: string | null + reduction_potentiel?: string + referentiel?: Database["public"]["Enums"]["referentiel"] + referentiel_id?: string + referentiel_version?: string + ressources?: string } Relationships: [ { - foreignKeyName: "indicateur_sous_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_sous_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_sous_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" + foreignKeyName: "action_definition_action_id_fkey" + columns: ["action_id"] + isOneToOne: true + referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_sous_thematique_sous_thematique_id_fkey" - columns: ["sous_thematique_id"] + foreignKeyName: "referentiel_id_fkey" + columns: ["referentiel_id"] isOneToOne: false - referencedRelation: "sous_thematique" + referencedRelation: "referentiel_definition" referencedColumns: ["id"] }, ] } - indicateur_thematique: { + action_definition_tag: { Row: { - indicateur_id: number - thematique_id: number + action_id: string + referentiel_id: string + tag_ref: string } Insert: { - indicateur_id: number - thematique_id: number + action_id: string + referentiel_id: string + tag_ref: string } Update: { - indicateur_id?: number - thematique_id?: number + action_id?: string + referentiel_id?: string + tag_ref?: string } Relationships: [ { - foreignKeyName: "indicateur_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] + foreignKeyName: "action_definition_tag_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "crm_indicateurs" + referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] + foreignKeyName: "action_definition_tag_referentiel_id_fkey" + columns: ["referentiel_id"] isOneToOne: false - referencedRelation: "indicateur_definition" + referencedRelation: "referentiel_definition" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_thematique_thematique_id_fkey" - columns: ["thematique_id"] + foreignKeyName: "action_definition_tag_tag_ref_fkey" + columns: ["tag_ref"] isOneToOne: false - referencedRelation: "thematique" - referencedColumns: ["id"] + referencedRelation: "referentiel_tag" + referencedColumns: ["ref"] }, ] } - indicateur_valeur: { + action_discussion: { Row: { + action_id: string collectivite_id: number created_at: string - created_by: string | null - date_valeur: string - estimation: number | null + created_by: string id: number - indicateur_id: number - metadonnee_id: number | null modified_at: string - modified_by: string | null - objectif: number | null - objectif_commentaire: string | null - resultat: number | null - resultat_commentaire: string | null + status: Database["public"]["Enums"]["action_discussion_statut"] } Insert: { + action_id: string collectivite_id: number created_at?: string - created_by?: string | null - date_valeur: string - estimation?: number | null + created_by?: string id?: number - indicateur_id: number - metadonnee_id?: number | null modified_at?: string - modified_by?: string | null - objectif?: number | null - objectif_commentaire?: string | null - resultat?: number | null - resultat_commentaire?: string | null + status?: Database["public"]["Enums"]["action_discussion_statut"] } Update: { + action_id?: string collectivite_id?: number created_at?: string - created_by?: string | null - date_valeur?: string - estimation?: number | null + created_by?: string id?: number - indicateur_id?: number - metadonnee_id?: number | null modified_at?: string - modified_by?: string | null - objectif?: number | null - objectif_commentaire?: string | null - resultat?: number | null - resultat_commentaire?: string | null + status?: Database["public"]["Enums"]["action_discussion_statut"] } Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_discussion_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "action_discussion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + action_discussion_commentaire: { + Row: { + created_at: string + created_by: string + discussion_id: number + id: number + message: string + } + Insert: { + created_at?: string + created_by?: string + discussion_id: number + id?: number + message: string + } + Update: { + created_at?: string + created_by?: string + discussion_id?: number + id?: number + message?: string + } + Relationships: [ + { + foreignKeyName: "action_discussion_commentaire_discussion_id_fkey" + columns: ["discussion_id"] + isOneToOne: false + referencedRelation: "action_discussion" + referencedColumns: ["id"] + }, + { + foreignKeyName: "action_discussion_commentaire_discussion_id_fkey" + columns: ["discussion_id"] + isOneToOne: false + referencedRelation: "action_discussion_feed" + referencedColumns: ["id"] + }, + ] + } + action_impact: { + Row: { + action_continue: boolean + competences_communales: boolean + description: string + description_complementaire: string + fourchette_budgetaire: number + id: number + impact_tier: number + independamment_competences: boolean + nb_collectivite_en_cours: number + nb_collectivite_realise: number + ressources_externes: Json | null + rex: Json | null + subventions_mobilisables: Json | null + temps_de_mise_en_oeuvre: number + titre: string + typologie_id: number | null + } + Insert: { + action_continue?: boolean + competences_communales?: boolean + description: string + description_complementaire?: string + fourchette_budgetaire?: number + id?: number + impact_tier?: number + independamment_competences?: boolean + nb_collectivite_en_cours?: number + nb_collectivite_realise?: number + ressources_externes?: Json | null + rex?: Json | null + subventions_mobilisables?: Json | null + temps_de_mise_en_oeuvre?: number + titre: string + typologie_id?: number | null + } + Update: { + action_continue?: boolean + competences_communales?: boolean + description?: string + description_complementaire?: string + fourchette_budgetaire?: number + id?: number + impact_tier?: number + independamment_competences?: boolean + nb_collectivite_en_cours?: number + nb_collectivite_realise?: number + ressources_externes?: Json | null + rex?: Json | null + subventions_mobilisables?: Json | null + temps_de_mise_en_oeuvre?: number + titre?: string + typologie_id?: number | null + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_fourchette_budgetaire_fkey" + columns: ["fourchette_budgetaire"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact_fourchette_budgetaire" + referencedColumns: ["niveau"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_impact_tier_fkey" + columns: ["impact_tier"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact_tier" + referencedColumns: ["niveau"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_temps_de_mise_en_oeuvre_fkey" + columns: ["temps_de_mise_en_oeuvre"] isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact_temps_de_mise_en_oeuvre" + referencedColumns: ["niveau"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_typologie_id_fkey" + columns: ["typologie_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact_typologie" + referencedColumns: ["id"] }, + ] + } + action_impact_action: { + Row: { + action_id: string + action_impact_id: number + } + Insert: { + action_id: string + action_impact_id: number + } + Update: { + action_id?: string + action_impact_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_action_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_definition" + referencedColumns: ["action_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_action_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, + ] + } + action_impact_banatic_competence: { + Row: { + action_impact_id: number + competence_code: number + } + Insert: { + action_impact_id: number + competence_code: number + } + Update: { + action_impact_id?: number + competence_code?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_banatic_competence_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_banatic_competence_competence_code_fkey" + columns: ["competence_code"] isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] + referencedRelation: "banatic_competence" + referencedColumns: ["code"] }, + ] + } + action_impact_categorie: { + Row: { + id: string + nom: string + } + Insert: { + id: string + nom: string + } + Update: { + id?: string + nom?: string + } + Relationships: [] + } + action_impact_categorie_fnv: { + Row: { + action_impact_id: number + categorie_fnv_id: number + } + Insert: { + action_impact_id: number + categorie_fnv_id: number + } + Update: { + action_impact_id?: number + categorie_fnv_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_categorie_fnv_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_categorie_fnv_categorie_fnv_id_fkey" + columns: ["categorie_fnv_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] + referencedRelation: "categorie_fnv" + referencedColumns: ["id"] }, + ] + } + action_impact_complexite: { + Row: { + niveau: number + nom: string + } + Insert: { + niveau?: number + nom: string + } + Update: { + niveau?: number + nom?: string + } + Relationships: [] + } + action_impact_effet_attendu: { + Row: { + action_impact_id: number + effet_attendu_id: number + } + Insert: { + action_impact_id: number + effet_attendu_id: number + } + Update: { + action_impact_id?: number + effet_attendu_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_effet_attendu_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_effet_attendu_effet_attendu_id_fkey" + columns: ["effet_attendu_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "effet_attendu" + referencedColumns: ["id"] }, + ] + } + action_impact_fiche_action: { + Row: { + action_impact_id: number + fiche_id: number + } + Insert: { + action_impact_id: number + fiche_id: number + } + Update: { + action_impact_id?: number + fiche_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_fiche_action_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, + ] + } + action_impact_fourchette_budgetaire: { + Row: { + niveau: number + nom: string + } + Insert: { + niveau?: number + nom: string + } + Update: { + niveau?: number + nom?: string + } + Relationships: [] + } + action_impact_indicateur: { + Row: { + action_impact_id: number + indicateur_id: number + } + Insert: { + action_impact_id: number + indicateur_id: number + } + Update: { + action_impact_id?: number + indicateur_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_indicateur_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_indicateur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_indicateur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, + ] + } + action_impact_panier: { + Row: { + action_id: number + panier_id: string + } + Insert: { + action_id: number + panier_id: string + } + Update: { + action_id?: number + panier_id?: string + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_panier_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_panier_panier_id_fkey" + columns: ["panier_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "panier" + referencedColumns: ["id"] }, + ] + } + action_impact_partenaire: { + Row: { + action_impact_id: number + partenaire_id: number + } + Insert: { + action_impact_id: number + partenaire_id: number + } + Update: { + action_impact_id?: number + partenaire_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_partenaire_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_partenaire_partenaire_id_fkey" + columns: ["partenaire_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "panier_partenaire" + referencedColumns: ["id"] }, + ] + } + action_impact_sous_thematique: { + Row: { + action_impact_id: number + sous_thematique_id: number + } + Insert: { + action_impact_id: number + sous_thematique_id: number + } + Update: { + action_impact_id?: number + sous_thematique_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_sous_thematique_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_created_by_fkey" - columns: ["created_by"] + foreignKeyName: "action_impact_sous_thematique_sous_thematique_id_fkey" + columns: ["sous_thematique_id"] isOneToOne: false - referencedRelation: "users" + referencedRelation: "sous_thematique" referencedColumns: ["id"] }, + ] + } + action_impact_state: { + Row: { + action: Database["public"]["Tables"]["action_impact"]["Row"] | null + isinpanier: boolean | null + panier: Database["public"]["Tables"]["panier"]["Row"] | null + statut: + | Database["public"]["Tables"]["action_impact_statut"]["Row"] + | null + action_definition: unknown | null + action_impact_fourchette_budgetaire: unknown | null + action_impact_temps_de_mise_en_oeuvre: unknown | null + action_impact_thematique: unknown | null + action_impact_typologie: unknown | null + matches_competences: boolean | null + thematique: unknown | null + } + Insert: { + action?: Database["public"]["Tables"]["action_impact"]["Row"] | null + isinpanier?: boolean | null + panier?: Database["public"]["Tables"]["panier"]["Row"] | null + statut?: + | Database["public"]["Tables"]["action_impact_statut"]["Row"] + | null + } + Update: { + action?: Database["public"]["Tables"]["action_impact"]["Row"] | null + isinpanier?: boolean | null + panier?: Database["public"]["Tables"]["panier"]["Row"] | null + statut?: + | Database["public"]["Tables"]["action_impact_statut"]["Row"] + | null + } + Relationships: [] + } + action_impact_statut: { + Row: { + action_id: number + categorie_id: string + panier_id: string + } + Insert: { + action_id: number + categorie_id: string + panier_id: string + } + Update: { + action_id?: number + categorie_id?: string + panier_id?: string + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_indicateur_id_fkey" - columns: ["indicateur_id"] + foreignKeyName: "action_impact_statut_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "crm_indicateurs" + referencedRelation: "action_impact" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_indicateur_id_fkey" - columns: ["indicateur_id"] + foreignKeyName: "action_impact_statut_categorie_id_fkey" + columns: ["categorie_id"] isOneToOne: false - referencedRelation: "crm_indicateurs" + referencedRelation: "action_impact_categorie" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_indicateur_id_fkey" - columns: ["indicateur_id"] + foreignKeyName: "action_impact_statut_panier_id_fkey" + columns: ["panier_id"] isOneToOne: false - referencedRelation: "indicateur_definition" + referencedRelation: "panier" referencedColumns: ["id"] }, + ] + } + action_impact_temps_de_mise_en_oeuvre: { + Row: { + niveau: number + nom: string + } + Insert: { + niveau?: number + nom: string + } + Update: { + niveau?: number + nom?: string + } + Relationships: [] + } + action_impact_thematique: { + Row: { + action_impact_id: number + ordre: number + thematique_id: number + } + Insert: { + action_impact_id: number + ordre?: number + thematique_id: number + } + Update: { + action_impact_id?: number + ordre?: number + thematique_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_metadonnee_id_fkey" - columns: ["metadonnee_id"] + foreignKeyName: "action_impact_thematique_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "indicateur_source_metadonnee" + referencedRelation: "action_impact" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_modified_by_fkey" - columns: ["modified_by"] + foreignKeyName: "action_impact_thematique_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "users" + referencedRelation: "thematique" referencedColumns: ["id"] }, ] } - indicateurs_json: { + action_impact_tier: { + Row: { + niveau: number + nom: string + } + Insert: { + niveau?: number + nom: string + } + Update: { + niveau?: number + nom?: string + } + Relationships: [] + } + action_impact_typologie: { Row: { - created_at: string - indicateurs: Json + id: number + nom: string } Insert: { - created_at?: string - indicateurs: Json + id?: number + nom: string } Update: { - created_at?: string - indicateurs?: Json + id?: number + nom?: string } Relationships: [] } - justification: { + action_origine: { Row: { - collectivite_id: number - modified_at: string - modified_by: string - question_id: string - texte: string + action_id: string + origine_action_id: string + origine_referentiel_id: string + ponderation: number + referentiel_id: string } Insert: { - collectivite_id: number - modified_at: string - modified_by?: string - question_id: string - texte: string + action_id: string + origine_action_id: string + origine_referentiel_id: string + ponderation?: number + referentiel_id: string } Update: { - collectivite_id?: number - modified_at?: string - modified_by?: string - question_id?: string - texte?: string + action_id?: string + origine_action_id?: string + origine_referentiel_id?: string + ponderation?: number + referentiel_id?: string } Relationships: [ { - foreignKeyName: "justification_modified_by_fkey" - columns: ["modified_by"] + foreignKeyName: "action_origine_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "users" + referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "justification_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "action_origine_origine_action_id_fkey" + columns: ["origine_action_id"] isOneToOne: false - referencedRelation: "question" + referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "justification_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "action_origine_origine_referentiel_id_fkey" + columns: ["origine_referentiel_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "referentiel_definition" referencedColumns: ["id"] }, { - foreignKeyName: "justification_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "action_origine_referentiel_id_fkey" + columns: ["referentiel_id"] isOneToOne: false - referencedRelation: "report_question" + referencedRelation: "referentiel_definition" referencedColumns: ["id"] }, ] } - justification_ajustement: { + action_relation: { + Row: { + id: string + parent: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + } + Insert: { + id: string + parent?: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + } + Update: { + id?: string + parent?: string | null + referentiel?: Database["public"]["Enums"]["referentiel"] + } + Relationships: [ + { + foreignKeyName: "action_relation_parent_fkey" + columns: ["parent"] + isOneToOne: false + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + ] + } + action_statut: { Row: { action_id: string + avancement: Database["public"]["Enums"]["avancement"] + avancement_detaille: number[] | null collectivite_id: number + concerne: boolean modified_at: string modified_by: string - texte: string } Insert: { action_id: string + avancement: Database["public"]["Enums"]["avancement"] + avancement_detaille?: number[] | null collectivite_id: number - modified_at: string + concerne: boolean + modified_at?: string modified_by?: string - texte: string } Update: { action_id?: string + avancement?: Database["public"]["Enums"]["avancement"] + avancement_detaille?: number[] | null collectivite_id?: number + concerne?: boolean modified_at?: string modified_by?: string - texte?: string } Relationships: [ { - foreignKeyName: "justification_ajustement_action_id_fkey" + foreignKeyName: "action_statut_action_id_fkey" columns: ["action_id"] isOneToOne: false referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "justification_ajustement_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, ] } - labellisation: { + annexe: { Row: { - annee: number | null - collectivite_id: number | null - etoiles: number + collectivite_id: number + commentaire: string + fiche_id: number + fichier_id: number | null id: number - obtenue_le: string - referentiel: Database["public"]["Enums"]["referentiel"] - score_programme: number | null - score_realise: number | null + lien: Json | null + modified_at: string + modified_by: string + titre: string + url: string | null } Insert: { - annee?: number | null - collectivite_id?: number | null - etoiles: number + collectivite_id: number + commentaire?: string + fiche_id: number + fichier_id?: number | null id?: number - obtenue_le: string - referentiel: Database["public"]["Enums"]["referentiel"] - score_programme?: number | null - score_realise?: number | null + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Update: { - annee?: number | null - collectivite_id?: number | null - etoiles?: number + collectivite_id?: number + commentaire?: string + fiche_id?: number + fichier_id?: number | null id?: number - obtenue_le?: string - referentiel?: Database["public"]["Enums"]["referentiel"] - score_programme?: number | null - score_realise?: number | null + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Relationships: [ { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "fiche_action" referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_identite" + referencedRelation: "fiches_action" referencedColumns: ["id"] }, + ] + } + audit_auditeur: { + Row: { + audit_id: number + auditeur: string + created_at: string | null + } + Insert: { + audit_id: number + auditeur: string + created_at?: string | null + } + Update: { + audit_id?: number + auditeur?: string + created_at?: string | null + } + Relationships: [ { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_auditeur_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_audit_state" + referencedColumns: ["audit_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_auditeur_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_auditeur_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit_en_cours" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_auditeur_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "retool_audit" + referencedColumns: ["audit_id"] }, + ] + } + axe: { + Row: { + collectivite_id: number + created_at: string + id: number + modified_at: string + modified_by: string | null + nom: string | null + panier_id: string | null + parent: number | null + plan: number | null + type: number | null + axe_enfant: unknown | null + collectivite_card: unknown | null + plan_action_type: unknown | null + vide: boolean | null + } + Insert: { + collectivite_id: number + created_at?: string + id?: number + modified_at?: string + modified_by?: string | null + nom?: string | null + panier_id?: string | null + parent?: number | null + plan?: number | null + type?: number | null + } + Update: { + collectivite_id?: number + created_at?: string + id?: number + modified_at?: string + modified_by?: string | null + nom?: string | null + panier_id?: string | null + parent?: number | null + plan?: number | null + type?: number | null + } + Relationships: [ { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_panier_id_fkey" + columns: ["panier_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "panier" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_parent_fkey" + columns: ["parent"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "axe" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_parent_fkey" + columns: ["parent"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "plan_action" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_parent_fkey" + columns: ["parent"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "plan_action_profondeur" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_plan_fkey" + columns: ["plan"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "axe" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_plan_fkey" + columns: ["plan"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "plan_action" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_plan_fkey" + columns: ["plan"] isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "plan_action_profondeur" + referencedColumns: ["id"] }, - ] - } - labellisation_action_critere: { - Row: { - action_id: string - etoile: Database["labellisation"]["Enums"]["etoile"] - formulation: string - min_programme_percentage: number | null - min_programme_score: number | null - min_realise_percentage: number | null - min_realise_score: number | null - prio: number - referentiel: Database["public"]["Enums"]["referentiel"] - } - Insert: { - action_id: string - etoile: Database["labellisation"]["Enums"]["etoile"] - formulation: string - min_programme_percentage?: number | null - min_programme_score?: number | null - min_realise_percentage?: number | null - min_realise_score?: number | null - prio: number - referentiel: Database["public"]["Enums"]["referentiel"] - } - Update: { - action_id?: string - etoile?: Database["labellisation"]["Enums"]["etoile"] - formulation?: string - min_programme_percentage?: number | null - min_programme_score?: number | null - min_realise_percentage?: number | null - min_realise_score?: number | null - prio?: number - referentiel?: Database["public"]["Enums"]["referentiel"] - } - Relationships: [ { - foreignKeyName: "labellisation_action_critere_action_id_fkey" - columns: ["action_id"] + foreignKeyName: "axe_type_fkey" + columns: ["type"] isOneToOne: false - referencedRelation: "action_relation" + referencedRelation: "plan_action_type" referencedColumns: ["id"] }, ] } - labellisation_calendrier: { - Row: { - information: string - referentiel: Database["public"]["Enums"]["referentiel"] - } - Insert: { - information: string - referentiel: Database["public"]["Enums"]["referentiel"] - } - Update: { - information?: string - referentiel?: Database["public"]["Enums"]["referentiel"] - } - Relationships: [] - } - labellisation_fichier_critere: { + banatic_competence: { Row: { - description: string - etoile: Database["labellisation"]["Enums"]["etoile"] - referentiel: Database["public"]["Enums"]["referentiel"] + code: number + nom: string } Insert: { - description: string - etoile: Database["labellisation"]["Enums"]["etoile"] - referentiel: Database["public"]["Enums"]["referentiel"] + code: number + nom: string } Update: { - description?: string - etoile?: Database["labellisation"]["Enums"]["etoile"] - referentiel?: Database["public"]["Enums"]["referentiel"] + code?: number + nom?: string } Relationships: [] } - maintenance: { + categorie_fnv: { Row: { - begins_at: string - ends_at: string id: number + nom: string } Insert: { - begins_at: string - ends_at: string id?: number + nom: string } Update: { - begins_at?: string - ends_at?: string id?: number + nom?: string } Relationships: [] } - panier: { + categorie_tag: { Row: { collectivite_id: number | null - collectivite_preset: number | null - created_at: string - created_by: string | null - id: string - latest_update: string - private: boolean | null - action_impact_state: unknown | null + created_at: string + created_by: string | null + groupement_id: number | null + id: number + nom: string + visible: boolean } Insert: { collectivite_id?: number | null - collectivite_preset?: number | null created_at?: string created_by?: string | null - id?: string - latest_update?: string - private?: boolean | null + groupement_id?: number | null + id?: number + nom: string + visible?: boolean } Update: { collectivite_id?: number | null - collectivite_preset?: number | null created_at?: string created_by?: string | null - id?: string - latest_update?: string - private?: boolean | null + groupement_id?: number | null + id?: number + nom?: string + visible?: boolean } Relationships: [ { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "categorie_tag_groupement_id_fkey" + columns: ["groupement_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "groupement" + referencedColumns: ["id"] }, + ] + } + client_scores: { + Row: { + collectivite_id: number + modified_at: string + payload_timestamp: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json + } + Insert: { + collectivite_id: number + modified_at: string + payload_timestamp?: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json + } + Update: { + collectivite_id?: number + modified_at?: string + payload_timestamp?: string | null + referentiel?: Database["public"]["Enums"]["referentiel"] + scores?: Json + } + Relationships: [ { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + client_scores_update: { + Row: { + collectivite_id: number + modified_at: string + referentiel: Database["public"]["Enums"]["referentiel"] + } + Insert: { + collectivite_id: number + modified_at: string + referentiel: Database["public"]["Enums"]["referentiel"] + } + Update: { + collectivite_id?: number + modified_at?: string + referentiel?: Database["public"]["Enums"]["referentiel"] + } + Relationships: [ { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "panier_created_by_fkey" - columns: ["created_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, ] } - panier_partenaire: { + collectivite: { Row: { + access_restreint: boolean + created_at: string id: number - nom: string | null + modified_at: string + active: boolean | null + collectivite_thematique: unknown | null + collectivite_utilisateur: unknown | null } Insert: { + access_restreint?: boolean + created_at?: string id?: number - nom?: string | null + modified_at?: string } Update: { + access_restreint?: boolean + created_at?: string id?: number - nom?: string | null + modified_at?: string } Relationships: [] } - partenaire_tag: { + collectivite_banatic_competence: { Row: { collectivite_id: number - id: number - nom: string + competence_code: number } Insert: { collectivite_id: number - id?: number - nom: string + competence_code: number } Update: { collectivite_id?: number - id?: number - nom?: string + competence_code?: number } Relationships: [ { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "stats_active_real_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_competence_code_fkey" + columns: ["competence_code"] + isOneToOne: false + referencedRelation: "banatic_competence" + referencedColumns: ["code"] + }, + ] + } + collectivite_bucket: { + Row: { + bucket_id: string + collectivite_id: number + } + Insert: { + bucket_id: string + collectivite_id: number + } + Update: { + bucket_id?: string + collectivite_id?: number + } + Relationships: [ + { + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" @@ -15690,6014 +3521,6743 @@ export type Database = { }, ] } - personnalisation: { + collectivite_test: { Row: { - action_id: string - description: string - titre: string + collectivite_id: number | null + id: number + nom: string } Insert: { - action_id: string - description: string - titre: string + collectivite_id?: number | null + id?: number + nom: string } Update: { - action_id?: string - description?: string - titre?: string + collectivite_id?: number | null + id?: number + nom?: string } Relationships: [ { - foreignKeyName: "personnalisation_action_id_fkey" - columns: ["action_id"] - isOneToOne: true - referencedRelation: "action_relation" - referencedColumns: ["id"] + foreignKeyName: "collectivite_test_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] }, - ] - } - personnalisation_consequence: { - Row: { - collectivite_id: number - consequences: Json - modified_at: string - payload_timestamp: string | null - } - Insert: { - collectivite_id: number - consequences: Json - modified_at?: string - payload_timestamp?: string | null - } - Update: { - collectivite_id?: number - consequences?: Json - modified_at?: string - payload_timestamp?: string | null - } - Relationships: [ { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_snippet" + isOneToOne: false + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_statuts" + isOneToOne: false + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "active_collectivite" + isOneToOne: false + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "audits" + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "carte_collectivite_active" + isOneToOne: false + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" + isOneToOne: false + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" + isOneToOne: false + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_action_statut" + isOneToOne: false + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_card" + isOneToOne: false + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_carte_identite" + isOneToOne: false + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + isOneToOne: false + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_test_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_test_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "question_thematique_completude" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_test_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "retool_active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_test_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "retool_completude" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_labellisation" + isOneToOne: false + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" + isOneToOne: false + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_niveau_acces" + isOneToOne: false + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" + isOneToOne: false + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" + isOneToOne: false + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_referentiel" + isOneToOne: false + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_utilisateur" + isOneToOne: false + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivites_crm" + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "comparaison_scores_audit" + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_collectivites" + isOneToOne: false + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + commune: { + Row: { + code: string + collectivite_id: number | null + id: number + nom: string + } + Insert: { + code: string + collectivite_id?: number | null + id?: number + nom: string + } + Update: { + code?: string + collectivite_id?: number | null + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" + isOneToOne: false + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" + isOneToOne: false + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "engagement_collectivite" + isOneToOne: false + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "late_collectivite" + isOneToOne: false + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_pourcentage_completude" + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "named_collectivite" + isOneToOne: false + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_thematique_completude" + isOneToOne: false + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "rattachement" + isOneToOne: false + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_indicateur_resultat" + isOneToOne: false + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_binaire" + isOneToOne: false + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_choix" + isOneToOne: false + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_proportion" + isOneToOne: false + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_scores" + isOneToOne: false + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, ] } - personnalisation_regle: { - Row: { - action_id: string - description: string - formule: string - modified_at: string - type: Database["public"]["Enums"]["regle_type"] - } - Insert: { - action_id: string - description: string - formule: string - modified_at?: string - type: Database["public"]["Enums"]["regle_type"] - } - Update: { - action_id?: string - description?: string - formule?: string - modified_at?: string - type?: Database["public"]["Enums"]["regle_type"] - } - Relationships: [ - { - foreignKeyName: "personnalisation_regle_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "personnalisation" - referencedColumns: ["action_id"] - }, - ] - } - personnalisations_json: { + confidentialite_crud: { Row: { - created_at: string - questions: Json - regles: Json + c: Database["public"]["Enums"]["confidentialite_option_crud"] + d: Database["public"]["Enums"]["confidentialite_option_crud"] + nom_element: string + profil: Database["public"]["Enums"]["confidentialite_profil"] + r: Database["public"]["Enums"]["confidentialite_option_crud"] + type_element: Database["public"]["Enums"]["confidentialite_type_element"] + u: Database["public"]["Enums"]["confidentialite_option_crud"] } Insert: { - created_at?: string - questions: Json - regles: Json + c: Database["public"]["Enums"]["confidentialite_option_crud"] + d: Database["public"]["Enums"]["confidentialite_option_crud"] + nom_element: string + profil: Database["public"]["Enums"]["confidentialite_profil"] + r: Database["public"]["Enums"]["confidentialite_option_crud"] + type_element: Database["public"]["Enums"]["confidentialite_type_element"] + u: Database["public"]["Enums"]["confidentialite_option_crud"] } Update: { - created_at?: string - questions?: Json - regles?: Json + c?: Database["public"]["Enums"]["confidentialite_option_crud"] + d?: Database["public"]["Enums"]["confidentialite_option_crud"] + nom_element?: string + profil?: Database["public"]["Enums"]["confidentialite_profil"] + r?: Database["public"]["Enums"]["confidentialite_option_crud"] + type_element?: Database["public"]["Enums"]["confidentialite_type_element"] + u?: Database["public"]["Enums"]["confidentialite_option_crud"] } Relationships: [] } - personne_tag: { + cot: { Row: { + actif: boolean collectivite_id: number - id: number - nom: string + signataire: number | null } Insert: { + actif: boolean collectivite_id: number - id?: number - nom: string + signataire?: number | null } Update: { + actif?: boolean collectivite_id?: number - id?: number - nom?: string + signataire?: number | null } Relationships: [ { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" + isOneToOne: true + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "cot_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" + isOneToOne: true + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "cot_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" + isOneToOne: true + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" + isOneToOne: true + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" + isOneToOne: true + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" + isOneToOne: true + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + isOneToOne: true + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" + isOneToOne: true + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" + isOneToOne: true + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + isOneToOne: true + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" + isOneToOne: true + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" + isOneToOne: true + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" + isOneToOne: true + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" + isOneToOne: true + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" + isOneToOne: true + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" + isOneToOne: true + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" + isOneToOne: true + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" + isOneToOne: true + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" + isOneToOne: true + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" + isOneToOne: true + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] + isOneToOne: false + referencedRelation: "crm_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, ] } - plan_action_type: { + dcp: { Row: { - categorie: string - detail: string | null - id: number - type: string + cgu_acceptees_le: string | null + created_at: string + deleted: boolean + email: string + limited: boolean + modified_at: string + nom: string + prenom: string + telephone: string | null + user_id: string } Insert: { - categorie: string - detail?: string | null - id?: number - type: string + cgu_acceptees_le?: string | null + created_at?: string + deleted?: boolean + email: string + limited?: boolean + modified_at?: string + nom: string + prenom: string + telephone?: string | null + user_id: string } Update: { - categorie?: string - detail?: string | null - id?: number - type?: string + cgu_acceptees_le?: string | null + created_at?: string + deleted?: boolean + email?: string + limited?: boolean + modified_at?: string + nom?: string + prenom?: string + telephone?: string | null + user_id?: string } - Relationships: [ - { - foreignKeyName: "plan_action_type_categorie_fkey" - columns: ["categorie"] - isOneToOne: false - referencedRelation: "plan_action_type_categorie" - referencedColumns: ["categorie"] - }, - ] + Relationships: [] } - plan_action_type_categorie: { + effet_attendu: { Row: { - categorie: string + id: number + nom: string + notice: string | null } Insert: { - categorie: string + id?: number + nom: string + notice?: string | null } Update: { - categorie?: string + id?: number + nom?: string + notice?: string | null } Relationships: [] } - post_audit_scores: { + epci: { Row: { - audit_id: number - collectivite_id: number - modified_at: string - payload_timestamp: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json + collectivite_id: number | null + id: number + nature: Database["public"]["Enums"]["nature"] + nom: string + siren: string } Insert: { - audit_id: number - collectivite_id: number - modified_at: string - payload_timestamp?: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json + collectivite_id?: number | null + id?: number + nature: Database["public"]["Enums"]["nature"] + nom: string + siren: string } Update: { - audit_id?: number - collectivite_id?: number - modified_at?: string - payload_timestamp?: string | null - referentiel?: Database["public"]["Enums"]["referentiel"] - scores?: Json + collectivite_id?: number | null + id?: number + nature?: Database["public"]["Enums"]["nature"] + nom?: string + siren?: string } Relationships: [ { - foreignKeyName: "post_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_niveau_acces" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "comparaison_scores_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "crm_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "crm_usages" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_audit_state" - referencedColumns: ["audit_id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "post_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "post_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] + referencedRelation: "question_thematique_completude" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "post_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit_en_cours" - referencedColumns: ["id"] + referencedRelation: "retool_active_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "post_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["audit_id"] + referencedRelation: "retool_completude" + referencedColumns: ["collectivite_id"] }, - ] - } - pre_audit_scores: { - Row: { - audit_id: number - collectivite_id: number - modified_at: string - payload_timestamp: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json - } - Insert: { - audit_id: number - collectivite_id: number - modified_at: string - payload_timestamp?: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json - } - Update: { - audit_id?: number - collectivite_id?: number - modified_at?: string - payload_timestamp?: string | null - referentiel?: Database["public"]["Enums"]["referentiel"] - scores?: Json - } - Relationships: [ { - foreignKeyName: "pre_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_audit_state" - referencedColumns: ["audit_id"] + referencedRelation: "retool_completude_compute" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "pre_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_hebdo" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "pre_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_premier_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "pre_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit_en_cours" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "pre_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["audit_id"] + referencedRelation: "retool_score" + referencedColumns: ["collectivite_id"] }, - ] - } - preuve_action: { - Row: { - action_id: string - preuve_id: string - } - Insert: { - action_id: string - preuve_id: string - } - Update: { - action_id?: string - preuve_id?: string - } - Relationships: [ { - foreignKeyName: "preuve_action_action_id_fkey" - columns: ["action_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] + referencedRelation: "site_labellisation" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_action_preuve_id_fkey" - columns: ["preuve_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "preuve_reglementaire_definition" - referencedColumns: ["id"] + referencedRelation: "stats_active_real_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] }, ] } - preuve_audit: { + fiche_action: { Row: { - audit_id: number + amelioration_continue: boolean | null + budget_previsionnel: number | null + calendrier: string | null + cibles: string[] | null collectivite_id: number - commentaire: string - fichier_id: number | null + created_at: string + date_debut: string | null + date_fin_provisoire: string | null + description: string | null + financements: string | null id: number - lien: Json | null + instance_gouvernance: string | null + maj_termine: boolean | null modified_at: string - modified_by: string - titre: string - url: string | null + modified_by: string | null + niveau_priorite: + | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] + | null + notes_complementaires: string | null + objectifs: string | null + participation_citoyenne: string | null + participation_citoyenne_type: string | null + piliers_eci: + | Database["public"]["Enums"]["fiche_action_piliers_eci"][] + | null + ressources: string | null + restreint: boolean | null + resultats_attendus: + | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] + | null + statut: Database["public"]["Enums"]["fiche_action_statuts"] | null + temps_de_mise_en_oeuvre_id: number | null + titre: string | null + fiche_action_plan: unknown | null } Insert: { - audit_id: number + amelioration_continue?: boolean | null + budget_previsionnel?: number | null + calendrier?: string | null + cibles?: string[] | null collectivite_id: number - commentaire?: string - fichier_id?: number | null + created_at?: string + date_debut?: string | null + date_fin_provisoire?: string | null + description?: string | null + financements?: string | null id?: number - lien?: Json | null + instance_gouvernance?: string | null + maj_termine?: boolean | null modified_at?: string - modified_by?: string - titre?: string - url?: string | null + modified_by?: string | null + niveau_priorite?: + | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] + | null + notes_complementaires?: string | null + objectifs?: string | null + participation_citoyenne?: string | null + participation_citoyenne_type?: string | null + piliers_eci?: + | Database["public"]["Enums"]["fiche_action_piliers_eci"][] + | null + ressources?: string | null + restreint?: boolean | null + resultats_attendus?: + | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] + | null + statut?: Database["public"]["Enums"]["fiche_action_statuts"] | null + temps_de_mise_en_oeuvre_id?: number | null + titre?: string | null } Update: { - audit_id?: number + amelioration_continue?: boolean | null + budget_previsionnel?: number | null + calendrier?: string | null + cibles?: string[] | null collectivite_id?: number - commentaire?: string - fichier_id?: number | null + created_at?: string + date_debut?: string | null + date_fin_provisoire?: string | null + description?: string | null + financements?: string | null id?: number - lien?: Json | null + instance_gouvernance?: string | null + maj_termine?: boolean | null modified_at?: string - modified_by?: string - titre?: string - url?: string | null + modified_by?: string | null + niveau_priorite?: + | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] + | null + notes_complementaires?: string | null + objectifs?: string | null + participation_citoyenne?: string | null + participation_citoyenne_type?: string | null + piliers_eci?: + | Database["public"]["Enums"]["fiche_action_piliers_eci"][] + | null + ressources?: string | null + restreint?: boolean | null + resultats_attendus?: + | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] + | null + statut?: Database["public"]["Enums"]["fiche_action_statuts"] | null + temps_de_mise_en_oeuvre_id?: number | null + titre?: string | null } Relationships: [ { - foreignKeyName: "preuve_audit_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_audit_state" - referencedColumns: ["audit_id"] + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_audit_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_audit_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_audit_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit_en_cours" + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_audit_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["audit_id"] + referencedRelation: "collectivite_niveau_acces" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "retool_active_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "site_labellisation" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_temps_de_mise_en_oeuvre_id_fkey" + columns: ["temps_de_mise_en_oeuvre_id"] + isOneToOne: false + referencedRelation: "action_impact_temps_de_mise_en_oeuvre" + referencedColumns: ["niveau"] + }, + ] + } + fiche_action_action: { + Row: { + action_id: string + fiche_id: number + } + Insert: { + action_id: string + fiche_id: number + } + Update: { + action_id?: string + fiche_id?: number + } + Relationships: [ + { + foreignKeyName: "fiche_action_action_action_id_fkey" + columns: ["action_id"] + isOneToOne: false + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_action_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiche_action" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_action_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiche_resume" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_action_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiches_action" + referencedColumns: ["id"] + }, + ] + } + fiche_action_axe: { + Row: { + axe_id: number + fiche_id: number + } + Insert: { + axe_id: number + fiche_id: number + } + Update: { + axe_id?: number + fiche_id?: number + } + Relationships: [ + { + foreignKeyName: "fiche_action_axe_axe_id_fkey" + columns: ["axe_id"] + isOneToOne: false + referencedRelation: "axe" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_axe_axe_id_fkey" + columns: ["axe_id"] + isOneToOne: false + referencedRelation: "plan_action" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_axe_axe_id_fkey" + columns: ["axe_id"] + isOneToOne: false + referencedRelation: "plan_action_profondeur" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_axe_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiche_action" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_axe_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiche_resume" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_axe_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiches_action" + referencedColumns: ["id"] + }, + ] + } + fiche_action_effet_attendu: { + Row: { + effet_attendu_id: number + fiche_id: number + } + Insert: { + effet_attendu_id: number + fiche_id: number + } + Update: { + effet_attendu_id?: number + fiche_id?: number + } + Relationships: [ + { + foreignKeyName: "fiche_action_effet_attendu_effet_attendu_id_fkey" + columns: ["effet_attendu_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] + referencedRelation: "effet_attendu" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, + ] + } + fiche_action_financeur_tag: { + Row: { + fiche_id: number + financeur_tag_id: number + id: number + montant_ttc: number | null + } + Insert: { + fiche_id: number + financeur_tag_id: number + id?: number + montant_ttc?: number | null + } + Update: { + fiche_id?: number + financeur_tag_id?: number + id?: number + montant_ttc?: number | null + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_financeur_tag_financeur_tag_id_fkey" + columns: ["financeur_tag_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "financeur_tag" + referencedColumns: ["id"] }, + ] + } + fiche_action_import_csv: { + Row: { + amelioration_continue: string | null + axe: string | null + budget: string | null + calendrier: string | null + cibles: string | null + collectivite_id: string | null + date_debut: string | null + date_fin: string | null + description: string | null + elu_referent: string | null + financements: string | null + financeur_deux: string | null + financeur_trois: string | null + financeur_un: string | null + montant_deux: string | null + montant_trois: string | null + montant_un: string | null + moyens: string | null + notes: string | null + num_action: string | null + objectifs: string | null + partenaires: string | null + personne_referente: string | null + plan_nom: string | null + priorite: string | null + resultats_attendus: string | null + service: string | null + sous_axe: string | null + sous_sous_axe: string | null + statut: string | null + structure_pilote: string | null + titre: string | null + } + Insert: { + amelioration_continue?: string | null + axe?: string | null + budget?: string | null + calendrier?: string | null + cibles?: string | null + collectivite_id?: string | null + date_debut?: string | null + date_fin?: string | null + description?: string | null + elu_referent?: string | null + financements?: string | null + financeur_deux?: string | null + financeur_trois?: string | null + financeur_un?: string | null + montant_deux?: string | null + montant_trois?: string | null + montant_un?: string | null + moyens?: string | null + notes?: string | null + num_action?: string | null + objectifs?: string | null + partenaires?: string | null + personne_referente?: string | null + plan_nom?: string | null + priorite?: string | null + resultats_attendus?: string | null + service?: string | null + sous_axe?: string | null + sous_sous_axe?: string | null + statut?: string | null + structure_pilote?: string | null + titre?: string | null + } + Update: { + amelioration_continue?: string | null + axe?: string | null + budget?: string | null + calendrier?: string | null + cibles?: string | null + collectivite_id?: string | null + date_debut?: string | null + date_fin?: string | null + description?: string | null + elu_referent?: string | null + financements?: string | null + financeur_deux?: string | null + financeur_trois?: string | null + financeur_un?: string | null + montant_deux?: string | null + montant_trois?: string | null + montant_un?: string | null + moyens?: string | null + notes?: string | null + num_action?: string | null + objectifs?: string | null + partenaires?: string | null + personne_referente?: string | null + plan_nom?: string | null + priorite?: string | null + resultats_attendus?: string | null + service?: string | null + sous_axe?: string | null + sous_sous_axe?: string | null + statut?: string | null + structure_pilote?: string | null + titre?: string | null + } + Relationships: [] + } + fiche_action_indicateur: { + Row: { + fiche_id: number + indicateur_id: number + } + Insert: { + fiche_id: number + indicateur_id: number + } + Update: { + fiche_id?: number + indicateur_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_indicateur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_indicateur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, + ] + } + fiche_action_libre_tag: { + Row: { + created_at: string + created_by: string | null + fiche_id: number + libre_tag_id: number + } + Insert: { + created_at?: string + created_by?: string | null + fiche_id: number + libre_tag_id: number + } + Update: { + created_at?: string + created_by?: string | null + fiche_id?: number + libre_tag_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_libre_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_libre_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_libre_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_libre_tag_libre_tag_id_fkey" + columns: ["libre_tag_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] + referencedRelation: "libre_tag" + referencedColumns: ["id"] }, + ] + } + fiche_action_lien: { + Row: { + fiche_deux: number + fiche_une: number + } + Insert: { + fiche_deux: number + fiche_une: number + } + Update: { + fiche_deux?: number + fiche_une?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_deux_fkey" + columns: ["fiche_deux"] isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_deux_fkey" + columns: ["fiche_deux"] isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_deux_fkey" + columns: ["fiche_deux"] isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_une_fkey" + columns: ["fiche_une"] isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_une_fkey" + columns: ["fiche_une"] isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_une_fkey" + columns: ["fiche_une"] isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, + ] + } + fiche_action_partenaire_tag: { + Row: { + fiche_id: number + partenaire_tag_id: number + } + Insert: { + fiche_id: number + partenaire_tag_id: number + } + Update: { + fiche_id?: number + partenaire_tag_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_partenaire_tag_partenaire_tag_id_fkey" + columns: ["partenaire_tag_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "partenaire_tag" + referencedColumns: ["id"] }, + ] + } + fiche_action_pilote: { + Row: { + fiche_id: number + tag_id: number | null + user_id: string | null + } + Insert: { + fiche_id: number + tag_id?: number | null + user_id?: string | null + } + Update: { + fiche_id?: number + tag_id?: number | null + user_id?: string | null + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_tag_id_fkey" + columns: ["tag_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "personne_tag" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_personnes" + referencedColumns: ["user_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "dcp" + referencedColumns: ["user_id"] }, ] } - preuve_complementaire: { + fiche_action_referent: { Row: { - action_id: string - collectivite_id: number - commentaire: string - fichier_id: number | null - id: number - lien: Json | null - modified_at: string - modified_by: string - titre: string - url: string | null + fiche_id: number + tag_id: number | null + user_id: string | null } Insert: { - action_id: string - collectivite_id: number - commentaire?: string - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + fiche_id: number + tag_id?: number | null + user_id?: string | null } Update: { - action_id?: string - collectivite_id?: number - commentaire?: string - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + fiche_id?: number + tag_id?: number | null + user_id?: string | null } Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_tag_id_fkey" + columns: ["tag_id"] isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] + referencedRelation: "personne_tag" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_personnes" + referencedColumns: ["user_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "dcp" + referencedColumns: ["user_id"] }, + ] + } + fiche_action_service_tag: { + Row: { + fiche_id: number + service_tag_id: number + } + Insert: { + fiche_id: number + service_tag_id: number + } + Update: { + fiche_id?: number + service_tag_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "fiche_action" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_service_tag_service_tag_id_fkey" + columns: ["service_tag_id"] isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] + referencedRelation: "service_tag" + referencedColumns: ["id"] }, + ] + } + fiche_action_sous_thematique: { + Row: { + fiche_id: number + thematique_id: number + } + Insert: { + fiche_id: number + thematique_id: number + } + Update: { + fiche_id?: number + thematique_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_identite" + referencedRelation: "fiche_resume" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_sous_thematique_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "sous_thematique" + referencedColumns: ["id"] }, + ] + } + fiche_action_structure_tag: { + Row: { + fiche_id: number + structure_tag_id: number + } + Insert: { + fiche_id: number + structure_tag_id: number + } + Update: { + fiche_id?: number + structure_tag_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_structure_tag_structure_tag_id_fkey" + columns: ["structure_tag_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] + referencedRelation: "structure_tag" + referencedColumns: ["id"] }, + ] + } + fiche_action_thematique: { + Row: { + fiche_id: number + thematique_id: number + } + Insert: { + fiche_id: number + thematique_id: number + } + Update: { + fiche_id?: number + thematique_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_thematique_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "thematique" + referencedColumns: ["id"] }, + ] + } + filtre_intervalle: { + Row: { + id: string + intervalle: unknown + libelle: string + type: Database["public"]["Enums"]["collectivite_filtre_type"] + } + Insert: { + id: string + intervalle: unknown + libelle: string + type: Database["public"]["Enums"]["collectivite_filtre_type"] + } + Update: { + id?: string + intervalle?: unknown + libelle?: string + type?: Database["public"]["Enums"]["collectivite_filtre_type"] + } + Relationships: [] + } + financeur_tag: { + Row: { + collectivite_id: number + id: number + nom: string + } + Insert: { + collectivite_id: number + id?: number + nom: string + } + Update: { + collectivite_id?: number + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "preuve_complementaire_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, ] } - preuve_labellisation: { + groupement: { Row: { - collectivite_id: number - commentaire: string - demande_id: number - fichier_id: number | null id: number - lien: Json | null - modified_at: string - modified_by: string - titre: string - url: string | null + nom: string } Insert: { - collectivite_id: number - commentaire?: string - demande_id: number - fichier_id?: number | null id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + nom: string } Update: { - collectivite_id?: number - commentaire?: string - demande_id?: number - fichier_id?: number | null id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + nom?: string + } + Relationships: [] + } + groupement_collectivite: { + Row: { + collectivite_id: number + groupement_id: number + } + Insert: { + collectivite_id: number + groupement_id: number + } + Update: { + collectivite_id?: number + groupement_id?: number } Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_labellisation_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "groupement_collectivite_groupement_id_fkey" + columns: ["groupement_id"] isOneToOne: false - referencedRelation: "demande" + referencedRelation: "groupement" + referencedColumns: ["id"] + }, + ] + } + indicateur_action: { + Row: { + action_id: string + indicateur_id: number + } + Insert: { + action_id: string + indicateur_id: number + } + Update: { + action_id?: string + indicateur_id?: number + } + Relationships: [ + { + foreignKeyName: "indicateur_action_action_id_fkey" + columns: ["action_id"] + isOneToOne: false + referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_labellisation_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "indicateur_action_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["demande_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_labellisation_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "indicateur_action_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "retool_labellisation_demande" + referencedRelation: "indicateur_definition" referencedColumns: ["id"] }, ] } - preuve_rapport: { + indicateur_artificialisation: { Row: { + activite: number collectivite_id: number - commentaire: string - date: string - fichier_id: number | null - id: number - lien: Json | null - modified_at: string - modified_by: string - titre: string - url: string | null + ferroviaire: number + habitat: number + inconnue: number + mixte: number + routiere: number + total: number } Insert: { + activite: number collectivite_id: number - commentaire?: string - date: string - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + ferroviaire: number + habitat: number + inconnue: number + mixte: number + routiere: number + total: number } Update: { + activite?: number collectivite_id?: number - commentaire?: string - date?: string - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + ferroviaire?: number + habitat?: number + inconnue?: number + mixte?: number + routiere?: number + total?: number } Relationships: [ { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" + isOneToOne: true + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" + isOneToOne: true + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" + isOneToOne: true + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" + isOneToOne: true + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" + isOneToOne: true + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + isOneToOne: true + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" + isOneToOne: true + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" + isOneToOne: true + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" + isOneToOne: true + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" + isOneToOne: true + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + isOneToOne: true + referencedRelation: "retool_plan_action_hebdo" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" + isOneToOne: true + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" + isOneToOne: true + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + isOneToOne: true + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" + isOneToOne: true + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" + isOneToOne: true + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" + isOneToOne: true + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" + isOneToOne: true + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" + isOneToOne: true + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + indicateur_categorie_tag: { + Row: { + categorie_tag_id: number + indicateur_id: number + } + Insert: { + categorie_tag_id: number + indicateur_id: number + } + Update: { + categorie_tag_id?: number + indicateur_id?: number + } + Relationships: [ + { + foreignKeyName: "indicateur_categorie_tag_categorie_tag_id_fkey" + columns: ["categorie_tag_id"] + isOneToOne: false + referencedRelation: "categorie_tag" + referencedColumns: ["id"] + }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_categorie_tag_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_categorie_tag_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, + ] + } + indicateur_collectivite: { + Row: { + collectivite_id: number + commentaire: string | null + confidentiel: boolean + favoris: boolean + indicateur_id: number + } + Insert: { + collectivite_id: number + commentaire?: string | null + confidentiel?: boolean + favoris?: boolean + indicateur_id: number + } + Update: { + collectivite_id?: number + commentaire?: string | null + confidentiel?: boolean + favoris?: boolean + indicateur_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + { + foreignKeyName: "indicateur_collectivite_indicateur_id_fkey" + columns: ["indicateur_id"] + isOneToOne: false + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_collectivite_indicateur_id_fkey" + columns: ["indicateur_id"] + isOneToOne: false + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] + }, ] } - preuve_reglementaire: { + indicateur_definition: { Row: { - collectivite_id: number - commentaire: string - fichier_id: number | null + borne_max: number | null + borne_min: number | null + collectivite_id: number | null + created_at: string + created_by: string | null + description: string | null + groupement_id: number | null id: number - lien: Json | null + identifiant_referentiel: string | null modified_at: string - modified_by: string - preuve_id: string + modified_by: string | null + participation_score: boolean + sans_valeur_utilisateur: boolean titre: string - url: string | null + titre_long: string | null + unite: string + valeur_calcule: string | null + indicateur_enfants: unknown | null + indicateur_parents: unknown | null } Insert: { - collectivite_id: number - commentaire?: string - fichier_id?: number | null + borne_max?: number | null + borne_min?: number | null + collectivite_id?: number | null + created_at?: string + created_by?: string | null + description?: string | null + groupement_id?: number | null id?: number - lien?: Json | null + identifiant_referentiel?: string | null modified_at?: string - modified_by?: string - preuve_id: string - titre?: string - url?: string | null + modified_by?: string | null + participation_score?: boolean + sans_valeur_utilisateur?: boolean + titre: string + titre_long?: string | null + unite: string + valeur_calcule?: string | null } Update: { - collectivite_id?: number - commentaire?: string - fichier_id?: number | null + borne_max?: number | null + borne_min?: number | null + collectivite_id?: number | null + created_at?: string + created_by?: string | null + description?: string | null + groupement_id?: number | null id?: number - lien?: Json | null + identifiant_referentiel?: string | null modified_at?: string - modified_by?: string - preuve_id?: string + modified_by?: string | null + participation_score?: boolean + sans_valeur_utilisateur?: boolean titre?: string - url?: string | null + titre_long?: string | null + unite?: string + valeur_calcule?: string | null } Relationships: [ { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_score" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "site_labellisation" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_definition_groupement_id_fkey" + columns: ["groupement_id"] + isOneToOne: false + referencedRelation: "groupement" + referencedColumns: ["id"] + }, + ] + } + indicateur_groupe: { + Row: { + enfant: number + parent: number + } + Insert: { + enfant: number + parent: number + } + Update: { + enfant?: number + parent?: number + } + Relationships: [ + { + foreignKeyName: "indicateur_groupe_enfant_fkey" + columns: ["enfant"] + isOneToOne: false + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_groupe_enfant_fkey" + columns: ["enfant"] + isOneToOne: false + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_groupe_parent_fkey" + columns: ["parent"] + isOneToOne: false + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_groupe_parent_fkey" + columns: ["parent"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, + ] + } + indicateur_pilote: { + Row: { + collectivite_id: number + id: number + indicateur_id: number + tag_id: number | null + user_id: string | null + indicateur_pilote_user: unknown | null + } + Insert: { + collectivite_id: number + id?: number + indicateur_id: number + tag_id?: number | null + user_id?: string | null + } + Update: { + collectivite_id?: number + id?: number + indicateur_id?: number + tag_id?: number | null + user_id?: string | null + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_reglementaire_preuve_id_fkey" - columns: ["preuve_id"] + foreignKeyName: "indicateur_pilote_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "preuve_reglementaire_definition" + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_pilote_indicateur_id_fkey" + columns: ["indicateur_id"] + isOneToOne: false + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_pilote_tag_id_fkey" + columns: ["tag_id"] + isOneToOne: false + referencedRelation: "personne_tag" referencedColumns: ["id"] }, ] } - preuve_reglementaire_definition: { - Row: { - description: string - id: string - nom: string - } - Insert: { - description: string - id: string - nom: string - } - Update: { - description?: string - id?: string - nom?: string - } - Relationships: [] - } - preuve_reglementaire_json: { - Row: { - created_at: string - preuves: Json - } - Insert: { - created_at?: string - preuves: Json - } - Update: { - created_at?: string - preuves?: Json - } - Relationships: [] - } - private_collectivite_membre: { + indicateur_service_tag: { Row: { - champ_intervention: - | Database["public"]["Enums"]["referentiel"][] - | null collectivite_id: number - created_at: string - details_fonction: string | null - est_referent: boolean | null - fonction: Database["public"]["Enums"]["membre_fonction"] | null - modified_at: string - user_id: string + indicateur_id: number + service_tag_id: number } Insert: { - champ_intervention?: - | Database["public"]["Enums"]["referentiel"][] - | null collectivite_id: number - created_at?: string - details_fonction?: string | null - est_referent?: boolean | null - fonction?: Database["public"]["Enums"]["membre_fonction"] | null - modified_at?: string - user_id: string + indicateur_id: number + service_tag_id: number } Update: { - champ_intervention?: - | Database["public"]["Enums"]["referentiel"][] - | null collectivite_id?: number - created_at?: string - details_fonction?: string | null - est_referent?: boolean | null - fonction?: Database["public"]["Enums"]["membre_fonction"] | null - modified_at?: string - user_id?: string + indicateur_id?: number + service_tag_id?: number } Relationships: [ { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "comparaison_scores_audit" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_service_tag_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_service_tag_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_service_tag_service_tag_id_fkey" + columns: ["service_tag_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "service_tag" + referencedColumns: ["id"] + }, + ] + } + indicateur_source: { + Row: { + id: string + libelle: string + ordre_affichage: number | null + } + Insert: { + id: string + libelle: string + ordre_affichage?: number | null + } + Update: { + id?: string + libelle?: string + ordre_affichage?: number | null + } + Relationships: [] + } + indicateur_source_metadonnee: { + Row: { + date_version: string + diffuseur: string | null + id: number + limites: string | null + methodologie: string | null + nom_donnees: string | null + producteur: string | null + source_id: string + } + Insert: { + date_version: string + diffuseur?: string | null + id?: number + limites?: string | null + methodologie?: string | null + nom_donnees?: string | null + producteur?: string | null + source_id: string + } + Update: { + date_version?: string + diffuseur?: string | null + id?: number + limites?: string | null + methodologie?: string | null + nom_donnees?: string | null + producteur?: string | null + source_id?: string + } + Relationships: [ + { + foreignKeyName: "indicateur_source_metadonnee_source_id_fkey" + columns: ["source_id"] + isOneToOne: false + referencedRelation: "indicateur_source" + referencedColumns: ["id"] }, + ] + } + indicateur_sous_thematique: { + Row: { + indicateur_id: number + sous_thematique_id: number + } + Insert: { + indicateur_id: number + sous_thematique_id: number + } + Update: { + indicateur_id?: number + sous_thematique_id?: number + } + Relationships: [ { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_sous_thematique_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_sous_thematique_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_sous_thematique_sous_thematique_id_fkey" + columns: ["sous_thematique_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] + referencedRelation: "sous_thematique" + referencedColumns: ["id"] }, + ] + } + indicateur_thematique: { + Row: { + indicateur_id: number + thematique_id: number + } + Insert: { + indicateur_id: number + thematique_id: number + } + Update: { + indicateur_id?: number + thematique_id?: number + } + Relationships: [ { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_thematique_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_thematique_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_thematique_thematique_id_fkey" + columns: ["thematique_id"] + isOneToOne: false + referencedRelation: "thematique" + referencedColumns: ["id"] }, + ] + } + indicateur_valeur: { + Row: { + collectivite_id: number + created_at: string + created_by: string | null + date_valeur: string + estimation: number | null + id: number + indicateur_id: number + metadonnee_id: number | null + modified_at: string + modified_by: string | null + objectif: number | null + objectif_commentaire: string | null + resultat: number | null + resultat_commentaire: string | null + } + Insert: { + collectivite_id: number + created_at?: string + created_by?: string | null + date_valeur: string + estimation?: number | null + id?: number + indicateur_id: number + metadonnee_id?: number | null + modified_at?: string + modified_by?: string | null + objectif?: number | null + objectif_commentaire?: string | null + resultat?: number | null + resultat_commentaire?: string | null + } + Update: { + collectivite_id?: number + created_at?: string + created_by?: string | null + date_valeur?: string + estimation?: number | null + id?: number + indicateur_id?: number + metadonnee_id?: number | null + modified_at?: string + modified_by?: string | null + objectif?: number | null + objectif_commentaire?: string | null + resultat?: number | null + resultat_commentaire?: string | null + } + Relationships: [ { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - private_utilisateur_droit: { - Row: { - active: boolean - collectivite_id: number - created_at: string - id: number - invitation_id: string | null - modified_at: string - niveau_acces: Database["public"]["Enums"]["niveau_acces"] - user_id: string - } - Insert: { - active: boolean - collectivite_id: number - created_at?: string - id?: number - invitation_id?: string | null - modified_at?: string - niveau_acces?: Database["public"]["Enums"]["niveau_acces"] - user_id: string - } - Update: { - active?: boolean - collectivite_id?: number - created_at?: string - id?: number - invitation_id?: string | null - modified_at?: string - niveau_acces?: Database["public"]["Enums"]["niveau_acces"] - user_id?: string - } - Relationships: [ - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_valeur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_valeur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_valeur_metadonnee_id_fkey" + columns: ["metadonnee_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_source_metadonnee" + referencedColumns: ["id"] }, + ] + } + indicateurs_json: { + Row: { + created_at: string + indicateurs: Json + } + Insert: { + created_at?: string + indicateurs: Json + } + Update: { + created_at?: string + indicateurs?: Json + } + Relationships: [] + } + justification: { + Row: { + collectivite_id: number + modified_at: string + modified_by: string + question_id: string + texte: string + } + Insert: { + collectivite_id: number + modified_at: string + modified_by?: string + question_id: string + texte: string + } + Update: { + collectivite_id?: number + modified_at?: string + modified_by?: string + question_id?: string + texte?: string + } + Relationships: [ { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "justification_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "question" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "justification_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_display" + referencedColumns: ["id"] }, + ] + } + justification_ajustement: { + Row: { + action_id: string + collectivite_id: number + modified_at: string + modified_by: string + texte: string + } + Insert: { + action_id: string + collectivite_id: number + modified_at: string + modified_by?: string + texte: string + } + Update: { + action_id?: string + collectivite_id?: number + modified_at?: string + modified_by?: string + texte?: string + } + Relationships: [ { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "justification_ajustement_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "private_utilisateur_droit_invitation_id_fkey" - columns: ["invitation_id"] - isOneToOne: false - referencedRelation: "invitation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "private_utilisateur_droit_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, ] } - question: { + labellisation: { Row: { - description: string - formulation: string - id: string - ordonnancement: number | null - thematique_id: string | null - type: Database["public"]["Enums"]["question_type"] - types_collectivites_concernees: - | Database["public"]["Enums"]["type_collectivite"][] - | null + annee: number | null + collectivite_id: number | null + etoiles: number + id: number + obtenue_le: string + referentiel: Database["public"]["Enums"]["referentiel"] + score_programme: number | null + score_realise: number | null } Insert: { - description: string - formulation: string - id: string - ordonnancement?: number | null - thematique_id?: string | null - type: Database["public"]["Enums"]["question_type"] - types_collectivites_concernees?: - | Database["public"]["Enums"]["type_collectivite"][] - | null + annee?: number | null + collectivite_id?: number | null + etoiles: number + id?: number + obtenue_le: string + referentiel: Database["public"]["Enums"]["referentiel"] + score_programme?: number | null + score_realise?: number | null } Update: { - description?: string - formulation?: string - id?: string - ordonnancement?: number | null - thematique_id?: string | null - type?: Database["public"]["Enums"]["question_type"] - types_collectivites_concernees?: - | Database["public"]["Enums"]["type_collectivite"][] - | null + annee?: number | null + collectivite_id?: number | null + etoiles?: number + id?: number + obtenue_le?: string + referentiel?: Database["public"]["Enums"]["referentiel"] + score_programme?: number | null + score_realise?: number | null } Relationships: [ { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "question_thematique" - referencedColumns: ["id"] - }, - { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["id"] + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_display" - referencedColumns: ["id"] + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] }, - ] - } - question_action: { - Row: { - action_id: string - question_id: string - } - Insert: { - action_id: string - question_id: string - } - Update: { - action_id?: string - question_id?: string - } - Relationships: [ { - foreignKeyName: "question_action_action_id_fkey" - columns: ["action_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "question_action_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question" - referencedColumns: ["id"] + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "question_action_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "question_action_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_question" - referencedColumns: ["id"] - }, - ] - } - question_choix: { - Row: { - formulation: string | null - id: string - ordonnancement: number | null - question_id: string | null - } - Insert: { - formulation?: string | null - id: string - ordonnancement?: number | null - question_id?: string | null - } - Update: { - formulation?: string | null - id?: string - ordonnancement?: number | null - question_id?: string | null - } - Relationships: [ + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] + }, { - foreignKeyName: "question_choix_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question" - referencedColumns: ["id"] + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "question_choix_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "question_choix_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_question" - referencedColumns: ["id"] + referencedRelation: "collectivite_niveau_acces" + referencedColumns: ["collectivite_id"] }, - ] - } - question_thematique: { - Row: { - id: string - nom: string | null - } - Insert: { - id: string - nom?: string | null - } - Update: { - id?: string - nom?: string | null - } - Relationships: [] - } - referentiel_json: { - Row: { - children: Json - created_at: string - definitions: Json - } - Insert: { - children: Json - created_at?: string - definitions: Json - } - Update: { - children?: Json - created_at?: string - definitions?: Json - } - Relationships: [] - } - reponse_binaire: { - Row: { - collectivite_id: number - modified_at: string - question_id: string - reponse: boolean | null - } - Insert: { - collectivite_id: number - modified_at?: string - question_id: string - reponse?: boolean | null - } - Update: { - collectivite_id?: number - modified_at?: string - question_id?: string - reponse?: boolean | null - } - Relationships: [ { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "retool_active_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + labellisation_action_critere: { + Row: { + action_id: string + etoile: Database["labellisation"]["Enums"]["etoile"] + formulation: string + min_programme_percentage: number | null + min_programme_score: number | null + min_realise_percentage: number | null + min_realise_score: number | null + prio: number + referentiel: Database["public"]["Enums"]["referentiel"] + } + Insert: { + action_id: string + etoile: Database["labellisation"]["Enums"]["etoile"] + formulation: string + min_programme_percentage?: number | null + min_programme_score?: number | null + min_realise_percentage?: number | null + min_realise_score?: number | null + prio: number + referentiel: Database["public"]["Enums"]["referentiel"] + } + Update: { + action_id?: string + etoile?: Database["labellisation"]["Enums"]["etoile"] + formulation?: string + min_programme_percentage?: number | null + min_programme_score?: number | null + min_realise_percentage?: number | null + min_realise_score?: number | null + prio?: number + referentiel?: Database["public"]["Enums"]["referentiel"] + } + Relationships: [ + { + foreignKeyName: "labellisation_action_critere_action_id_fkey" + columns: ["action_id"] + isOneToOne: false + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + ] + } + labellisation_calendrier: { + Row: { + information: string + referentiel: Database["public"]["Enums"]["referentiel"] + } + Insert: { + information: string + referentiel: Database["public"]["Enums"]["referentiel"] + } + Update: { + information?: string + referentiel?: Database["public"]["Enums"]["referentiel"] + } + Relationships: [] + } + labellisation_fichier_critere: { + Row: { + description: string + etoile: Database["labellisation"]["Enums"]["etoile"] + referentiel: Database["public"]["Enums"]["referentiel"] + } + Insert: { + description: string + etoile: Database["labellisation"]["Enums"]["etoile"] + referentiel: Database["public"]["Enums"]["referentiel"] + } + Update: { + description?: string + etoile?: Database["labellisation"]["Enums"]["etoile"] + referentiel?: Database["public"]["Enums"]["referentiel"] + } + Relationships: [] + } + libre_tag: { + Row: { + collectivite_id: number | null + created_at: string + created_by: string | null + id: number + nom: string + } + Insert: { + collectivite_id?: number | null + created_at?: string + created_by?: string | null + id?: number + nom: string + } + Update: { + collectivite_id?: number | null + created_at?: string + created_by?: string | null + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "reponse_binaire_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "question" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_binaire_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_binaire_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "report_question" - referencedColumns: ["id"] - }, ] } - reponse_choix: { + maintenance: { Row: { - collectivite_id: number - modified_at: string - question_id: string - reponse: string | null + begins_at: string + ends_at: string + id: number } Insert: { - collectivite_id: number - modified_at?: string - question_id: string - reponse?: string | null + begins_at: string + ends_at: string + id?: number } Update: { - collectivite_id?: number - modified_at?: string - question_id?: string - reponse?: string | null + begins_at?: string + ends_at?: string + id?: number + } + Relationships: [] + } + panier: { + Row: { + collectivite_id: number | null + collectivite_preset: number | null + created_at: string + created_by: string | null + id: string + latest_update: string + private: boolean | null + action_impact_state: unknown | null + } + Insert: { + collectivite_id?: number | null + collectivite_preset?: number | null + created_at?: string + created_by?: string | null + id?: string + latest_update?: string + private?: boolean | null + } + Update: { + collectivite_id?: number | null + collectivite_preset?: number | null + created_at?: string + created_by?: string | null + id?: string + latest_update?: string + private?: boolean | null } Relationships: [ { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" + isOneToOne: true + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" + isOneToOne: true + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" + isOneToOne: true + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" + isOneToOne: true + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" + isOneToOne: true + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" + isOneToOne: true + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + isOneToOne: true + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + isOneToOne: true + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" + isOneToOne: true + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" + isOneToOne: true + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" + isOneToOne: true + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" + isOneToOne: true + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" + isOneToOne: true + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" + isOneToOne: true + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" + isOneToOne: true + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" + isOneToOne: true + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" + isOneToOne: true + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" + isOneToOne: true + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_score" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "question" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false referencedRelation: "question_display" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_choix_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "report_question" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_choix_reponse_fkey" - columns: ["reponse"] - isOneToOne: false - referencedRelation: "question_choix" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_choix_reponse_fkey" - columns: ["reponse"] - isOneToOne: false - referencedRelation: "report_choix" - referencedColumns: ["id"] + referencedColumns: ["collectivite_id"] }, - ] - } - reponse_proportion: { - Row: { - collectivite_id: number - modified_at: string - question_id: string - reponse: number | null - } - Insert: { - collectivite_id: number - modified_at?: string - question_id: string - reponse?: number | null - } - Update: { - collectivite_id?: number - modified_at?: string - question_id?: string - reponse?: number | null - } - Relationships: [ { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + panier_partenaire: { + Row: { + id: number + nom: string | null + } + Insert: { + id?: number + nom?: string | null + } + Update: { + id?: number + nom?: string | null + } + Relationships: [] + } + partenaire_tag: { + Row: { + collectivite_id: number + id: number + nom: string + } + Insert: { + collectivite_id: number + id?: number + nom: string + } + Update: { + collectivite_id?: number + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + personnalisation: { + Row: { + action_id: string + description: string + titre: string + } + Insert: { + action_id: string + description: string + titre: string + } + Update: { + action_id?: string + description?: string + titre?: string + } + Relationships: [ { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_action_id_fkey" + columns: ["action_id"] + isOneToOne: true + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + ] + } + personnalisation_consequence: { + Row: { + collectivite_id: number + consequences: Json + modified_at: string + payload_timestamp: string | null + } + Insert: { + collectivite_id: number + consequences: Json + modified_at?: string + payload_timestamp?: string | null + } + Update: { + collectivite_id?: number + consequences?: Json + modified_at?: string + payload_timestamp?: string | null + } + Relationships: [ + { + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + isOneToOne: true + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + isOneToOne: true + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + isOneToOne: true + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" + isOneToOne: true + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" + isOneToOne: true + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + isOneToOne: true + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + isOneToOne: true + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" + isOneToOne: true + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "question" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_proportion_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["id"] + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "crm_collectivites" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "report_question" - referencedColumns: ["id"] + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "crm_usages" + referencedColumns: ["collectivite_id"] }, - ] - } - service_tag: { - Row: { - collectivite_id: number - id: number - nom: string - } - Insert: { - collectivite_id: number - id?: number - nom: string - } - Update: { - collectivite_id?: number - id?: number - nom?: string - } - Relationships: [ { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" + isOneToOne: true + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" + isOneToOne: true + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" + isOneToOne: true + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" + isOneToOne: true + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" + isOneToOne: true + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" + isOneToOne: true + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + isOneToOne: true + referencedRelation: "retool_plan_action_hebdo" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" + isOneToOne: true + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" + isOneToOne: true + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" + isOneToOne: true + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" + isOneToOne: true + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + isOneToOne: true + referencedRelation: "stats_active_real_collectivites" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" + isOneToOne: true + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" + isOneToOne: true + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + isOneToOne: true + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + personnalisation_regle: { + Row: { + action_id: string + description: string + formule: string + modified_at: string + type: Database["public"]["Enums"]["regle_type"] + } + Insert: { + action_id: string + description: string + formule: string + modified_at?: string + type: Database["public"]["Enums"]["regle_type"] + } + Update: { + action_id?: string + description?: string + formule?: string + modified_at?: string + type?: Database["public"]["Enums"]["regle_type"] + } + Relationships: [ { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "personnalisation_regle_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "personnalisation" + referencedColumns: ["action_id"] }, + ] + } + personnalisations_json: { + Row: { + created_at: string + questions: Json + regles: Json + } + Insert: { + created_at?: string + questions: Json + regles: Json + } + Update: { + created_at?: string + questions?: Json + regles?: Json + } + Relationships: [] + } + personne_tag: { + Row: { + collectivite_id: number + id: number + nom: string + } + Insert: { + collectivite_id: number + id?: number + nom: string + } + Update: { + collectivite_id?: number + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + plan_action_type: { + Row: { + categorie: string + detail: string | null + id: number + type: string + } + Insert: { + categorie: string + detail?: string | null + id?: number + type: string + } + Update: { + categorie?: string + detail?: string | null + id?: number + type?: string + } + Relationships: [ { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "plan_action_type_categorie_fkey" + columns: ["categorie"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "plan_action_type_categorie" + referencedColumns: ["categorie"] }, + ] + } + plan_action_type_categorie: { + Row: { + categorie: string + } + Insert: { + categorie: string + } + Update: { + categorie?: string + } + Relationships: [] + } + post_audit_scores: { + Row: { + audit_id: number + collectivite_id: number + modified_at: string + payload_timestamp: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json + } + Insert: { + audit_id: number + collectivite_id: number + modified_at: string + payload_timestamp?: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json + } + Update: { + audit_id?: number + collectivite_id?: number + modified_at?: string + payload_timestamp?: string | null + referentiel?: Database["public"]["Enums"]["referentiel"] + scores?: Json + } + Relationships: [ { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "post_audit_scores_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_audit_state" + referencedColumns: ["audit_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "post_audit_scores_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit" + referencedColumns: ["id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "post_audit_scores_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit_en_cours" + referencedColumns: ["id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "post_audit_scores_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "retool_audit" + referencedColumns: ["audit_id"] }, ] } - site_contact: { + pre_audit_scores: { Row: { - email: string - formulaire: Json + audit_id: number + collectivite_id: number modified_at: string + payload_timestamp: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json } Insert: { - email: string - formulaire: Json - modified_at?: string + audit_id: number + collectivite_id: number + modified_at: string + payload_timestamp?: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json } Update: { - email?: string - formulaire?: Json + audit_id?: number + collectivite_id?: number modified_at?: string + payload_timestamp?: string | null + referentiel?: Database["public"]["Enums"]["referentiel"] + scores?: Json } - Relationships: [] + Relationships: [ + { + foreignKeyName: "pre_audit_scores_audit_id_fkey" + columns: ["audit_id"] + isOneToOne: false + referencedRelation: "action_audit_state" + referencedColumns: ["audit_id"] + }, + { + foreignKeyName: "pre_audit_scores_audit_id_fkey" + columns: ["audit_id"] + isOneToOne: false + referencedRelation: "audit" + referencedColumns: ["id"] + }, + { + foreignKeyName: "pre_audit_scores_audit_id_fkey" + columns: ["audit_id"] + isOneToOne: false + referencedRelation: "audit_en_cours" + referencedColumns: ["id"] + }, + { + foreignKeyName: "pre_audit_scores_audit_id_fkey" + columns: ["audit_id"] + isOneToOne: false + referencedRelation: "retool_audit" + referencedColumns: ["audit_id"] + }, + ] } - sous_thematique: { + preuve_action: { Row: { - id: number - sous_thematique: string - thematique_id: number + action_id: string + preuve_id: string } Insert: { - id?: number - sous_thematique: string - thematique_id: number + action_id: string + preuve_id: string } Update: { - id?: number - sous_thematique?: string - thematique_id?: number + action_id?: string + preuve_id?: string } Relationships: [ { - foreignKeyName: "sous_thematique_thematique_id_fkey" - columns: ["thematique_id"] + foreignKeyName: "preuve_action_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "thematique" + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + { + foreignKeyName: "preuve_action_preuve_id_fkey" + columns: ["preuve_id"] + isOneToOne: false + referencedRelation: "preuve_reglementaire_definition" referencedColumns: ["id"] }, ] } - structure_tag: { + preuve_audit: { Row: { + audit_id: number collectivite_id: number + commentaire: string + fichier_id: number | null id: number - nom: string + lien: Json | null + modified_at: string + modified_by: string + titre: string + url: string | null } Insert: { + audit_id: number collectivite_id: number + commentaire?: string + fichier_id?: number | null id?: number - nom: string + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Update: { + audit_id?: number collectivite_id?: number + commentaire?: string + fichier_id?: number | null id?: number - nom?: string + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Relationships: [ { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_audit_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_audit_state" + referencedColumns: ["audit_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_audit_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit" + referencedColumns: ["id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_audit_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit_en_cours" + referencedColumns: ["id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_audit_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] + referencedRelation: "retool_audit" + referencedColumns: ["audit_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" @@ -21705,4711 +10265,4768 @@ export type Database = { }, ] } - tableau_de_bord_module: { + preuve_complementaire: { Row: { + action_id: string collectivite_id: number - created_at: string - id: string + commentaire: string + fichier_id: number | null + id: number + lien: Json | null modified_at: string - options: Json - slug: string + modified_by: string titre: string - type: string - user_id: string | null + url: string | null } Insert: { + action_id: string collectivite_id: number - created_at?: string - id?: string + commentaire?: string + fichier_id?: number | null + id?: number + lien?: Json | null modified_at?: string - options: Json - slug: string - titre: string - type: string - user_id?: string | null + modified_by?: string + titre?: string + url?: string | null } Update: { + action_id?: string collectivite_id?: number - created_at?: string - id?: string + commentaire?: string + fichier_id?: number | null + id?: number + lien?: Json | null modified_at?: string - options?: Json - slug?: string + modified_by?: string titre?: string - type?: string - user_id?: string | null + url?: string | null } Relationships: [ { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_complementaire_action_id_fkey" + columns: ["action_id"] + isOneToOne: false + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + ] + } + preuve_labellisation: { + Row: { + collectivite_id: number + commentaire: string + demande_id: number + fichier_id: number | null + id: number + lien: Json | null + modified_at: string + modified_by: string + titre: string + url: string | null + } + Insert: { + collectivite_id: number + commentaire?: string + demande_id: number + fichier_id?: number | null + id?: number + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null + } + Update: { + collectivite_id?: number + commentaire?: string + demande_id?: number + fichier_id?: number | null + id?: number + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null + } + Relationships: [ + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["user_id"] - }, - { - foreignKeyName: "tableau_de_bord_module_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "crm_personnes" - referencedColumns: ["user_id"] - }, - { - foreignKeyName: "tableau_de_bord_module_user_id_fkey" - columns: ["user_id"] + foreignKeyName: "preuve_labellisation_demande_id_fkey" + columns: ["demande_id"] isOneToOne: false - referencedRelation: "dcp" - referencedColumns: ["user_id"] + referencedRelation: "retool_audit" + referencedColumns: ["demande_id"] }, { - foreignKeyName: "tableau_de_bord_module_user_id_fkey" - columns: ["user_id"] + foreignKeyName: "preuve_labellisation_demande_id_fkey" + columns: ["demande_id"] isOneToOne: false - referencedRelation: "dcp_display" - referencedColumns: ["user_id"] + referencedRelation: "retool_labellisation_demande" + referencedColumns: ["id"] }, ] } - thematique: { + preuve_rapport: { Row: { + collectivite_id: number + commentaire: string + date: string + fichier_id: number | null id: number - md_id: string | null - nom: string + lien: Json | null + modified_at: string + modified_by: string + titre: string + url: string | null } Insert: { + collectivite_id: number + commentaire?: string + date: string + fichier_id?: number | null id?: number - md_id?: string | null - nom: string + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Update: { + collectivite_id?: number + commentaire?: string + date?: string + fichier_id?: number | null id?: number - md_id?: string | null - nom?: string - } - Relationships: [] - } - type_tabular_score: { - Row: { - action_id: string | null - avancement: Database["public"]["Enums"]["avancement"] | null - concerne: boolean | null - desactive: boolean | null - points_max_personnalises: number | null - points_max_referentiel: number | null - points_programmes: number | null - points_realises: number | null - points_restants: number | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - score_non_renseigne: number | null - score_pas_fait: number | null - score_programme: number | null - score_realise: number | null - score_realise_plus_programme: number | null - } - Insert: { - action_id?: string | null - avancement?: Database["public"]["Enums"]["avancement"] | null - concerne?: boolean | null - desactive?: boolean | null - points_max_personnalises?: number | null - points_max_referentiel?: number | null - points_programmes?: number | null - points_realises?: number | null - points_restants?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - score_non_renseigne?: number | null - score_pas_fait?: number | null - score_programme?: number | null - score_realise?: number | null - score_realise_plus_programme?: number | null - } - Update: { - action_id?: string | null - avancement?: Database["public"]["Enums"]["avancement"] | null - concerne?: boolean | null - desactive?: boolean | null - points_max_personnalises?: number | null - points_max_referentiel?: number | null - points_programmes?: number | null - points_realises?: number | null - points_restants?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - score_non_renseigne?: number | null - score_pas_fait?: number | null - score_programme?: number | null - score_realise?: number | null - score_realise_plus_programme?: number | null - } - Relationships: [] - } - usage: { - Row: { - action: Database["public"]["Enums"]["usage_action"] - collectivite_id: number | null - fonction: Database["public"]["Enums"]["usage_fonction"] - page: Database["public"]["Enums"]["visite_page"] | null - time: string - user_id: string | null - } - Insert: { - action: Database["public"]["Enums"]["usage_action"] - collectivite_id?: number | null - fonction: Database["public"]["Enums"]["usage_fonction"] - page?: Database["public"]["Enums"]["visite_page"] | null - time?: string - user_id?: string | null - } - Update: { - action?: Database["public"]["Enums"]["usage_action"] - collectivite_id?: number | null - fonction?: Database["public"]["Enums"]["usage_fonction"] - page?: Database["public"]["Enums"]["visite_page"] | null - time?: string - user_id?: string | null - } - Relationships: [] - } - utilisateur_support: { - Row: { - support: boolean - user_id: string - } - Insert: { - support?: boolean - user_id: string - } - Update: { - support?: boolean - user_id?: string + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Relationships: [ { - foreignKeyName: "utilisateur_support_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "utilisateur_support_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "crm_personnes" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "utilisateur_support_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "dcp" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "utilisateur_support_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "dcp_display" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_niveau_acces" + referencedColumns: ["collectivite_id"] }, - ] - } - utilisateur_verifie: { - Row: { - user_id: string - verifie: boolean - } - Insert: { - user_id: string - verifie?: boolean - } - Update: { - user_id?: string - verifie?: boolean - } - Relationships: [ { - foreignKeyName: "utilisateur_verifie_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "comparaison_scores_audit" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "utilisateur_verifie_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "crm_personnes" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "crm_collectivites" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "utilisateur_verifie_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "dcp" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "crm_usages" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "utilisateur_verifie_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "dcp_display" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, - ] - } - visite: { - Row: { - collectivite_id: number | null - onglet: Database["public"]["Enums"]["visite_onglet"] | null - page: Database["public"]["Enums"]["visite_page"] - tag: Database["public"]["Enums"]["visite_tag"] | null - time: string - user_id: string | null - } - Insert: { - collectivite_id?: number | null - onglet?: Database["public"]["Enums"]["visite_onglet"] | null - page: Database["public"]["Enums"]["visite_page"] - tag?: Database["public"]["Enums"]["visite_tag"] | null - time?: string - user_id?: string | null - } - Update: { - collectivite_id?: number | null - onglet?: Database["public"]["Enums"]["visite_onglet"] | null - page?: Database["public"]["Enums"]["visite_page"] - tag?: Database["public"]["Enums"]["visite_tag"] | null - time?: string - user_id?: string | null - } - Relationships: [] - } - } - Views: { - action_audit_state: { - Row: { - action_id: string | null - audit_id: number | null - avis: string | null - collectivite_id: number | null - ordre_du_jour: boolean | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - state_id: number | null - statut: Database["public"]["Enums"]["audit_statut"] | null - } - Relationships: [ { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "retool_score" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "site_labellisation" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_active_real_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] + }, + ] + } + preuve_reglementaire: { + Row: { + collectivite_id: number + commentaire: string + fichier_id: number | null + id: number + lien: Json | null + modified_at: string + modified_by: string + preuve_id: string + titre: string + url: string | null + } + Insert: { + collectivite_id: number + commentaire?: string + fichier_id?: number | null + id?: number + lien?: Json | null + modified_at?: string + modified_by?: string + preuve_id: string + titre?: string + url?: string | null + } + Update: { + collectivite_id?: number + commentaire?: string + fichier_id?: number | null + id?: number + lien?: Json | null + modified_at?: string + modified_by?: string + preuve_id?: string + titre?: string + url?: string | null + } + Relationships: [ + { + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_reglementaire_preuve_id_fkey" + columns: ["preuve_id"] + isOneToOne: false + referencedRelation: "preuve_reglementaire_definition" + referencedColumns: ["id"] + }, + ] + } + preuve_reglementaire_definition: { + Row: { + description: string + id: string + nom: string + } + Insert: { + description: string + id: string + nom: string + } + Update: { + description?: string + id?: string + nom?: string + } + Relationships: [] + } + preuve_reglementaire_json: { + Row: { + created_at: string + preuves: Json + } + Insert: { + created_at?: string + preuves: Json + } + Update: { + created_at?: string + preuves?: Json + } + Relationships: [] + } + private_collectivite_membre: { + Row: { + champ_intervention: + | Database["public"]["Enums"]["referentiel"][] + | null + collectivite_id: number + created_at: string + details_fonction: string | null + est_referent: boolean | null + fonction: Database["public"]["Enums"]["membre_fonction"] | null + modified_at: string + user_id: string + } + Insert: { + champ_intervention?: + | Database["public"]["Enums"]["referentiel"][] + | null + collectivite_id: number + created_at?: string + details_fonction?: string | null + est_referent?: boolean | null + fonction?: Database["public"]["Enums"]["membre_fonction"] | null + modified_at?: string + user_id: string + } + Update: { + champ_intervention?: + | Database["public"]["Enums"]["referentiel"][] + | null + collectivite_id?: number + created_at?: string + details_fonction?: string | null + est_referent?: boolean | null + fonction?: Database["public"]["Enums"]["membre_fonction"] | null + modified_at?: string + user_id?: string + } + Relationships: [ + { + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, - ] - } - action_children: { - Row: { - children: unknown[] | null - depth: number | null - id: string | null - } - Relationships: [] - } - action_definition_summary: { - Row: { - children: unknown[] | null - depth: number | null - description: string | null - have_contexte: boolean | null - have_exemples: boolean | null - have_perimetre_evaluation: boolean | null - have_preuve: boolean | null - have_questions: boolean | null - have_reduction_potentiel: boolean | null - have_ressources: boolean | null - id: string | null - identifiant: string | null - nom: string | null - phase: Database["public"]["Enums"]["action_categorie"] | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - type: Database["public"]["Enums"]["action_type"] | null - } - Relationships: [] - } - action_discussion_feed: { - Row: { - action_id: string | null - collectivite_id: number | null - commentaires: Json[] | null - created_at: string | null - created_by: string | null - id: number | null - modified_at: string | null - status: Database["public"]["Enums"]["action_discussion_statut"] | null - } - Relationships: [ { - foreignKeyName: "action_discussion_action_id_fkey" - columns: ["action_id"] + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_premier_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + private_utilisateur_droit: { + Row: { + active: boolean + collectivite_id: number + created_at: string + id: number + invitation_id: string | null + modified_at: string + niveau_acces: Database["public"]["Enums"]["niveau_acces"] + user_id: string + } + Insert: { + active: boolean + collectivite_id: number + created_at?: string + id?: number + invitation_id?: string | null + modified_at?: string + niveau_acces?: Database["public"]["Enums"]["niveau_acces"] + user_id: string + } + Update: { + active?: boolean + collectivite_id?: number + created_at?: string + id?: number + invitation_id?: string | null + modified_at?: string + niveau_acces?: Database["public"]["Enums"]["niveau_acces"] + user_id?: string + } + Relationships: [ { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + question: { + Row: { + description: string + formulation: string + id: string + ordonnancement: number | null + thematique_id: string | null + type: Database["public"]["Enums"]["question_type"] + types_collectivites_concernees: + | Database["public"]["Enums"]["type_collectivite"][] + | null + } + Insert: { + description: string + formulation: string + id: string + ordonnancement?: number | null + thematique_id?: string | null + type: Database["public"]["Enums"]["question_type"] + types_collectivites_concernees?: + | Database["public"]["Enums"]["type_collectivite"][] + | null + } + Update: { + description?: string + formulation?: string + id?: string + ordonnancement?: number | null + thematique_id?: string | null + type?: Database["public"]["Enums"]["question_type"] + types_collectivites_concernees?: + | Database["public"]["Enums"]["type_collectivite"][] + | null + } + Relationships: [ { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_thematique" + referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_thematique_completude" + referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_thematique_display" + referencedColumns: ["id"] }, + ] + } + question_action: { + Row: { + action_id: string + question_id: string + } + Insert: { + action_id: string + question_id: string + } + Update: { + action_id?: string + question_id?: string + } + Relationships: [ { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_action_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_action_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] + referencedRelation: "question" + referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_action_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_display" + referencedColumns: ["id"] }, + ] + } + question_choix: { + Row: { + formulation: string | null + id: string + ordonnancement: number | null + question_id: string | null + } + Insert: { + formulation?: string | null + id: string + ordonnancement?: number | null + question_id?: string | null + } + Update: { + formulation?: string | null + id?: string + ordonnancement?: number | null + question_id?: string | null + } + Relationships: [ { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_choix_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] + referencedRelation: "question" + referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_created_by_fkey" - columns: ["created_by"] + foreignKeyName: "question_choix_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "users" + referencedRelation: "question_display" referencedColumns: ["id"] }, ] } - action_referentiel: { + question_thematique: { Row: { - action_id: string | null - ascendants: unknown[] | null - depth: number | null - descendants: unknown[] | null - description: string | null - have_children: boolean | null - have_contexte: boolean | null - have_exemples: boolean | null - have_perimetre_evaluation: boolean | null - have_preuve: boolean | null - have_reduction_potentiel: boolean | null - have_ressources: boolean | null - identifiant: string | null - leaves: unknown[] | null + id: string nom: string | null - phase: Database["public"]["Enums"]["action_categorie"] | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - type: Database["public"]["Enums"]["action_type"] | null + } + Insert: { + id: string + nom?: string | null + } + Update: { + id?: string + nom?: string | null } Relationships: [] } - action_statuts: { + referentiel_definition: { Row: { - action_id: string | null - ascendants: unknown[] | null - avancement: Database["public"]["Enums"]["avancement"] | null - avancement_descendants: - | Database["public"]["Enums"]["avancement"][] - | null - avancement_detaille: number[] | null - collectivite_id: number | null - concerne: boolean | null - depth: number | null - desactive: boolean | null - descendants: unknown[] | null - description: string | null - have_children: boolean | null - have_contexte: boolean | null - have_exemples: boolean | null - have_perimetre_evaluation: boolean | null - have_preuve: boolean | null - have_reduction_potentiel: boolean | null - have_ressources: boolean | null - identifiant: string | null - nom: string | null - non_concerne: boolean | null - phase: Database["public"]["Enums"]["action_categorie"] | null - points_max_personnalises: number | null - points_max_referentiel: number | null - points_programmes: number | null - points_realises: number | null - points_restants: number | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - renseigne: boolean | null - score_non_renseigne: number | null - score_pas_fait: number | null - score_programme: number | null - score_realise: number | null - score_realise_plus_programme: number | null - type: Database["public"]["Enums"]["action_type"] | null + created_at: string + hierarchie: Database["public"]["Enums"]["action_type"][] + id: string + modified_at: string + nom: string + version: string + } + Insert: { + created_at?: string + hierarchie: Database["public"]["Enums"]["action_type"][] + id: string + modified_at?: string + nom: string + version?: string + } + Update: { + created_at?: string + hierarchie?: Database["public"]["Enums"]["action_type"][] + id?: string + modified_at?: string + nom?: string + version?: string } Relationships: [] } - action_title: { + referentiel_json: { Row: { - children: unknown[] | null - id: string | null - identifiant: string | null - nom: string | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - type: Database["public"]["Enums"]["action_type"] | null + children: Json + created_at: string + definitions: Json + } + Insert: { + children: Json + created_at?: string + definitions: Json + } + Update: { + children?: Json + created_at?: string + definitions?: Json } Relationships: [] } - active_collectivite: { + referentiel_tag: { Row: { - collectivite_id: number | null - nom: string | null + nom: string + ref: string + type: string + } + Insert: { + nom: string + ref: string + type: string + } + Update: { + nom?: string + ref?: string + type?: string } Relationships: [] } - audit: { + reponse_binaire: { Row: { - clos: boolean | null - collectivite_id: number | null - date_cnl: string | null - date_debut: string | null - date_fin: string | null - demande_id: number | null - id: number | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - valide: boolean | null - valide_labellisation: boolean | null + collectivite_id: number + modified_at: string + question_id: string + reponse: boolean | null } Insert: { - clos?: boolean | null - collectivite_id?: number | null - date_cnl?: string | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - valide?: boolean | null - valide_labellisation?: boolean | null + collectivite_id: number + modified_at?: string + question_id: string + reponse?: boolean | null } Update: { - clos?: boolean | null - collectivite_id?: number | null - date_cnl?: string | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - valide?: boolean | null - valide_labellisation?: boolean | null + collectivite_id?: number + modified_at?: string + question_id?: string + reponse?: boolean | null } - Relationships: [ - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, + Relationships: [ { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "demande" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["demande_id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "retool_labellisation_demande" - referencedColumns: ["id"] - }, - ] - } - audit_en_cours: { - Row: { - collectivite_id: number | null - date_debut: string | null - date_fin: string | null - demande_id: number | null - id: number | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - valide: boolean | null - } - Insert: { - collectivite_id?: number | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - valide?: boolean | null - } - Update: { - collectivite_id?: number | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - valide?: boolean | null - } - Relationships: [ - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "reponse_binaire_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "question" referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "reponse_binaire_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_display" + referencedColumns: ["id"] }, + ] + } + reponse_choix: { + Row: { + collectivite_id: number + modified_at: string + question_id: string + reponse: string | null + } + Insert: { + collectivite_id: number + modified_at?: string + question_id: string + reponse?: string | null + } + Update: { + collectivite_id?: number + modified_at?: string + question_id?: string + reponse?: string | null + } + Relationships: [ { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_question_id_fkey" + columns: ["question_id"] + isOneToOne: false + referencedRelation: "question" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_choix_question_id_fkey" + columns: ["question_id"] + isOneToOne: false + referencedRelation: "question_display" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_choix_reponse_fkey" + columns: ["reponse"] + isOneToOne: false + referencedRelation: "question_choix" + referencedColumns: ["id"] + }, + ] + } + reponse_proportion: { + Row: { + collectivite_id: number + modified_at: string + question_id: string + reponse: number | null + } + Insert: { + collectivite_id: number + modified_at?: string + question_id: string + reponse?: number | null + } + Update: { + collectivite_id?: number + modified_at?: string + question_id?: string + reponse?: number | null + } + Relationships: [ + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "comparaison_scores_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "crm_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "demande" - referencedColumns: ["id"] + referencedRelation: "retool_score" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["demande_id"] + referencedRelation: "site_labellisation" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_active_real_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_question_id_fkey" + columns: ["question_id"] + isOneToOne: false + referencedRelation: "question" + referencedColumns: ["id"] }, { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "reponse_proportion_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "retool_labellisation_demande" + referencedRelation: "question_display" referencedColumns: ["id"] }, ] } - auditeurs: { - Row: { - audit_id: number | null - collectivite_id: number | null - noms: Json | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - } - Relationships: [] - } - audits: { + service_tag: { Row: { - audit: Database["labellisation"]["Tables"]["audit"]["Row"] | null - collectivite_id: number | null - demande: Database["labellisation"]["Tables"]["demande"]["Row"] | null - is_cot: boolean | null - referentiel: Database["public"]["Enums"]["referentiel"] | null + collectivite_id: number + id: number + nom: string } - Relationships: [] - } - axe_descendants: { - Row: { - axe_id: number | null - depth: number | null - descendants: number[] | null - parents: number[] | null + Insert: { + collectivite_id: number + id?: number + nom: string } - Relationships: [] - } - bibliotheque_annexe: { - Row: { - collectivite_id: number | null - commentaire: string | null - created_at: string | null - created_by: string | null - created_by_nom: string | null - fiche_id: number | null - fichier: Json | null - id: number | null - lien: Json | null - plan_ids: number[] | null + Update: { + collectivite_id?: number + id?: number + nom?: string } Relationships: [ { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] + foreignKeyName: "service_tag_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] + foreignKeyName: "service_tag_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] + foreignKeyName: "service_tag_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] + foreignKeyName: "service_tag_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] }, - ] - } - bibliotheque_fichier: { - Row: { - bucket_id: string | null - collectivite_id: number | null - confidentiel: boolean | null - file_id: string | null - filename: string | null - filesize: number | null - hash: string | null - id: number | null - } - Relationships: [ { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_completude_compute" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + site_contact: { + Row: { + email: string + formulaire: Json + modified_at: string + } + Insert: { + email: string + formulaire: Json + modified_at?: string + } + Update: { + email?: string + formulaire?: Json + modified_at?: string + } + Relationships: [] + } + sous_thematique: { + Row: { + id: number + sous_thematique: string + thematique_id: number + } + Insert: { + id?: number + sous_thematique: string + thematique_id: number + } + Update: { + id?: number + sous_thematique?: string + thematique_id?: number + } + Relationships: [ + { + foreignKeyName: "sous_thematique_thematique_id_fkey" + columns: ["thematique_id"] + isOneToOne: false + referencedRelation: "thematique" + referencedColumns: ["id"] + }, + ] + } + structure_tag: { + Row: { + collectivite_id: number + id: number + nom: string + } + Insert: { + collectivite_id: number + id?: number + nom: string + } + Update: { + collectivite_id?: number + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "objects_bucketId_fkey" - columns: ["bucket_id"] - isOneToOne: false - referencedRelation: "buckets" - referencedColumns: ["id"] - }, ] } - client_action_statut: { + tableau_de_bord_module: { Row: { - action_id: string | null - avancement: Database["public"]["Enums"]["avancement"] | null - collectivite_id: number | null - concerne: boolean | null - modified_by: string | null + collectivite_id: number + created_at: string + id: string + modified_at: string + options: Json + slug: string + titre: string + type: string + user_id: string | null } Insert: { - action_id?: string | null - avancement?: Database["public"]["Enums"]["avancement"] | null - collectivite_id?: number | null - concerne?: boolean | null - modified_by?: string | null + collectivite_id: number + created_at?: string + id?: string + modified_at?: string + options: Json + slug: string + titre: string + type: string + user_id?: string | null } Update: { - action_id?: string | null - avancement?: Database["public"]["Enums"]["avancement"] | null - collectivite_id?: number | null - concerne?: boolean | null - modified_by?: string | null + collectivite_id?: number + created_at?: string + id?: string + modified_at?: string + options?: Json + slug?: string + titre?: string + type?: string + user_id?: string | null } Relationships: [ { - foreignKeyName: "action_statut_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "tableau_de_bord_module_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_personnes" + referencedColumns: ["user_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "tableau_de_bord_module_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "dcp" + referencedColumns: ["user_id"] + }, + ] + } + thematique: { + Row: { + id: number + md_id: string | null + nom: string + } + Insert: { + id?: number + md_id?: string | null + nom: string + } + Update: { + id?: number + md_id?: string | null + nom?: string + } + Relationships: [] + } + type_tabular_score: { + Row: { + action_id: string | null + avancement: Database["public"]["Enums"]["avancement"] | null + concerne: boolean | null + desactive: boolean | null + points_max_personnalises: number | null + points_max_referentiel: number | null + points_programmes: number | null + points_realises: number | null + points_restants: number | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + score_non_renseigne: number | null + score_pas_fait: number | null + score_programme: number | null + score_realise: number | null + score_realise_plus_programme: number | null + } + Insert: { + action_id?: string | null + avancement?: Database["public"]["Enums"]["avancement"] | null + concerne?: boolean | null + desactive?: boolean | null + points_max_personnalises?: number | null + points_max_referentiel?: number | null + points_programmes?: number | null + points_realises?: number | null + points_restants?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + score_non_renseigne?: number | null + score_pas_fait?: number | null + score_programme?: number | null + score_realise?: number | null + score_realise_plus_programme?: number | null + } + Update: { + action_id?: string | null + avancement?: Database["public"]["Enums"]["avancement"] | null + concerne?: boolean | null + desactive?: boolean | null + points_max_personnalises?: number | null + points_max_referentiel?: number | null + points_programmes?: number | null + points_realises?: number | null + points_restants?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + score_non_renseigne?: number | null + score_pas_fait?: number | null + score_programme?: number | null + score_realise?: number | null + score_realise_plus_programme?: number | null + } + Relationships: [] + } + usage: { + Row: { + action: Database["public"]["Enums"]["usage_action"] + collectivite_id: number | null + fonction: Database["public"]["Enums"]["usage_fonction"] + page: Database["public"]["Enums"]["visite_page"] | null + time: string + user_id: string | null + } + Insert: { + action: Database["public"]["Enums"]["usage_action"] + collectivite_id?: number | null + fonction: Database["public"]["Enums"]["usage_fonction"] + page?: Database["public"]["Enums"]["visite_page"] | null + time?: string + user_id?: string | null + } + Update: { + action?: Database["public"]["Enums"]["usage_action"] + collectivite_id?: number | null + fonction?: Database["public"]["Enums"]["usage_fonction"] + page?: Database["public"]["Enums"]["visite_page"] | null + time?: string + user_id?: string | null + } + Relationships: [] + } + utilisateur_support: { + Row: { + support: boolean + user_id: string + } + Insert: { + support?: boolean + user_id: string + } + Update: { + support?: boolean + user_id?: string + } + Relationships: [ + { + foreignKeyName: "utilisateur_support_user_id_fkey" + columns: ["user_id"] + isOneToOne: true + referencedRelation: "crm_personnes" + referencedColumns: ["user_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "utilisateur_support_user_id_fkey" + columns: ["user_id"] + isOneToOne: true + referencedRelation: "dcp" + referencedColumns: ["user_id"] + }, + ] + } + utilisateur_verifie: { + Row: { + user_id: string + verifie: boolean + } + Insert: { + user_id: string + verifie?: boolean + } + Update: { + user_id?: string + verifie?: boolean + } + Relationships: [ + { + foreignKeyName: "utilisateur_verifie_user_id_fkey" + columns: ["user_id"] + isOneToOne: true + referencedRelation: "crm_personnes" + referencedColumns: ["user_id"] + }, + { + foreignKeyName: "utilisateur_verifie_user_id_fkey" + columns: ["user_id"] + isOneToOne: true + referencedRelation: "dcp" + referencedColumns: ["user_id"] + }, + ] + } + visite: { + Row: { + collectivite_id: number | null + onglet: Database["public"]["Enums"]["visite_onglet"] | null + page: Database["public"]["Enums"]["visite_page"] + tag: Database["public"]["Enums"]["visite_tag"] | null + time: string + user_id: string | null + } + Insert: { + collectivite_id?: number | null + onglet?: Database["public"]["Enums"]["visite_onglet"] | null + page: Database["public"]["Enums"]["visite_page"] + tag?: Database["public"]["Enums"]["visite_tag"] | null + time?: string + user_id?: string | null + } + Update: { + collectivite_id?: number | null + onglet?: Database["public"]["Enums"]["visite_onglet"] | null + page?: Database["public"]["Enums"]["visite_page"] + tag?: Database["public"]["Enums"]["visite_tag"] | null + time?: string + user_id?: string | null + } + Relationships: [] + } + } + Views: { + action_audit_state: { + Row: { + action_id: string | null + audit_id: number | null + avis: string | null + collectivite_id: number | null + ordre_du_jour: boolean | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + state_id: number | null + statut: Database["public"]["Enums"]["audit_statut"] | null + } + Relationships: [ + { + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] + referencedColumns: ["id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_modified_by_fkey" - columns: ["modified_by"] + foreignKeyName: "audit_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, - ] - } - collectivite_card: { - Row: { - code_siren_insee: string | null - collectivite_id: number | null - completude_cae: number | null - completude_cae_intervalle: string | null - completude_eci: number | null - completude_eci_intervalle: string | null - completude_intervalles: string[] | null - completude_max: number | null - completude_min: number | null - departement_code: string | null - etoiles_all: number[] | null - etoiles_cae: number | null - etoiles_eci: number | null - fait_cae_intervalle: string | null - fait_eci_intervalle: string | null - fait_intervalles: string[] | null - nom: string | null - population: number | null - population_intervalle: string | null - region_code: string | null - score_fait_cae: number | null - score_fait_eci: number | null - score_fait_max: number | null - score_fait_min: number | null - score_fait_sum: number | null - score_programme_cae: number | null - score_programme_eci: number | null - score_programme_max: number | null - score_programme_sum: number | null - type_collectivite: - | Database["public"]["Enums"]["filterable_type_collectivite"] - | null - } - Relationships: [] - } - collectivite_carte_identite: { - Row: { - code_siren_insee: string | null - collectivite_id: number | null - departement_name: string | null - is_cot: boolean | null - nom: string | null - population_source: string | null - population_totale: number | null - region_name: string | null - type_collectivite: - | Database["public"]["Enums"]["type_collectivite"] - | null - } - Relationships: [] - } - collectivite_identite: { - Row: { - id: number | null - localisation: string[] | null - population: string[] | null - type: Database["public"]["Enums"]["type_collectivite"][] | null - } - Relationships: [] - } - collectivite_niveau_acces: { - Row: { - access_restreint: boolean | null - collectivite_id: number | null - est_auditeur: boolean | null - niveau_acces: Database["public"]["Enums"]["niveau_acces"] | null - nom: string | null - } - Relationships: [] - } - comparaison_scores_audit: { - Row: { - action_id: string | null - collectivite_id: number | null - courant: Database["public"]["CompositeTypes"]["tabular_score"] | null - pre_audit: - | Database["public"]["CompositeTypes"]["tabular_score"] - | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - } - Relationships: [] - } - confidentialite_cle_primaire_compose: { - Row: { - table_name: unknown | null - } - Relationships: [] - } - confidentialite_fonctions_a_tester: { - Row: { - element: unknown | null - id_element: unknown | null - } - Relationships: [] - } - confidentialite_fonctions_parametres: { - Row: { - colonne: unknown | null - element: unknown | null - type: unknown | null - } - Relationships: [] - } - confidentialite_tables_a_tester: { - Row: { - element: unknown | null - id_element: string | null - } - Relationships: [] - } - confidentialite_tables_colonnes: { - Row: { - colonne: unknown | null - element: unknown | null - type: unknown | null - } - Relationships: [] - } - confidentialite_types_enum: { - Row: { - enum_nom: string | null - type_nom: unknown | null - } - Relationships: [] - } - confidentialite_vues_a_tester: { - Row: { - c: boolean | null - d: boolean | null - element: unknown | null - id_element: string | null - u: boolean | null - } - Relationships: [] - } - confidentialite_vues_colonnes: { - Row: { - colonne: unknown | null - element: unknown | null - type: unknown | null - } - Relationships: [] - } - crm_collectivites: { - Row: { - code_siren_insee: string | null - collectivite_id: number | null - cot: boolean | null - departement_code: string | null - departement_name: string | null - key: string | null - lab_cae_annee: number | null - lab_cae_etoiles: number | null - lab_cae_programme: number | null - lab_cae_realise: number | null - lab_eci_annee: number | null - lab_eci_etoiles: number | null - lab_eci_programme: number | null - lab_eci_realise: number | null - nature_collectivite: string | null - nom: string | null - population_totale: number | null - region_code: string | null - region_name: string | null - type_collectivite: - | Database["public"]["Enums"]["type_collectivite"] - | null - } - Relationships: [] - } - crm_droits: { - Row: { - champ_intervention: string | null - collectivite_id: number | null - collectivite_key: string | null - details_fonction: string | null - fonction: Database["public"]["Enums"]["membre_fonction"] | null - key: string | null - niveau_acces: Database["public"]["Enums"]["niveau_acces"] | null - user_id: string | null - user_key: string | null - } - Relationships: [ { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "retool_score" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + action_children: { + Row: { + children: unknown[] | null + depth: number | null + id: string | null + } + Relationships: [] + } + action_definition_summary: { + Row: { + children: unknown[] | null + depth: number | null + description: string | null + have_contexte: boolean | null + have_exemples: boolean | null + have_perimetre_evaluation: boolean | null + have_preuve: boolean | null + have_questions: boolean | null + have_reduction_potentiel: boolean | null + have_ressources: boolean | null + id: string | null + identifiant: string | null + nom: string | null + phase: Database["public"]["Enums"]["action_categorie"] | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + type: Database["public"]["Enums"]["action_type"] | null + } + Relationships: [] + } + action_discussion_feed: { + Row: { + action_id: string | null + collectivite_id: number | null + commentaires: Json[] | null + created_at: string | null + created_by: string | null + id: number | null + modified_at: string | null + status: Database["public"]["Enums"]["action_discussion_statut"] | null + } + Relationships: [ { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_discussion_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + action_referentiel: { + Row: { + action_id: string | null + ascendants: unknown[] | null + depth: number | null + descendants: unknown[] | null + description: string | null + have_children: boolean | null + have_contexte: boolean | null + have_exemples: boolean | null + have_perimetre_evaluation: boolean | null + have_preuve: boolean | null + have_reduction_potentiel: boolean | null + have_ressources: boolean | null + identifiant: string | null + leaves: unknown[] | null + nom: string | null + phase: Database["public"]["Enums"]["action_categorie"] | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + type: Database["public"]["Enums"]["action_type"] | null + } + Relationships: [] + } + action_statuts: { + Row: { + action_id: string | null + ascendants: unknown[] | null + avancement: Database["public"]["Enums"]["avancement"] | null + avancement_descendants: + | Database["public"]["Enums"]["avancement"][] + | null + avancement_detaille: number[] | null + collectivite_id: number | null + concerne: boolean | null + depth: number | null + desactive: boolean | null + descendants: unknown[] | null + description: string | null + have_children: boolean | null + have_contexte: boolean | null + have_exemples: boolean | null + have_perimetre_evaluation: boolean | null + have_preuve: boolean | null + have_reduction_potentiel: boolean | null + have_ressources: boolean | null + identifiant: string | null + nom: string | null + non_concerne: boolean | null + phase: Database["public"]["Enums"]["action_categorie"] | null + points_max_personnalises: number | null + points_max_referentiel: number | null + points_programmes: number | null + points_realises: number | null + points_restants: number | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + renseigne: boolean | null + score_non_renseigne: number | null + score_pas_fait: number | null + score_programme: number | null + score_realise: number | null + score_realise_plus_programme: number | null + type: Database["public"]["Enums"]["action_type"] | null + } + Relationships: [] + } + action_title: { + Row: { + children: unknown[] | null + id: string | null + identifiant: string | null + nom: string | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + type: Database["public"]["Enums"]["action_type"] | null + } + Relationships: [] + } + active_collectivite: { + Row: { + collectivite_id: number | null + nom: string | null + } + Relationships: [] + } + audit: { + Row: { + clos: boolean | null + collectivite_id: number | null + date_cnl: string | null + date_debut: string | null + date_fin: string | null + demande_id: number | null + id: number | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + valide: boolean | null + valide_labellisation: boolean | null + } + Insert: { + clos?: boolean | null + collectivite_id?: number | null + date_cnl?: string | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + valide?: boolean | null + valide_labellisation?: boolean | null + } + Update: { + clos?: boolean | null + collectivite_id?: number | null + date_cnl?: string | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + valide?: boolean | null + valide_labellisation?: boolean | null + } + Relationships: [ { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - crm_indicateurs: { - Row: { - id: number | null - nb_prive: number | null - pourcentage_prive: number | null - titre: string | null - } - Relationships: [] - } - crm_labellisations: { - Row: { - annee: number | null - collectivite_key: string | null - etoiles: number | null - id: number | null - obtenue_le: string | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - score_programme: number | null - score_realise: number | null - } - Relationships: [] - } - crm_personnes: { - Row: { - email: string | null - key: string | null - nom: string | null - prenom: string | null - telephone: string | null - user_id: string | null - } - Insert: { - email?: never - key?: never - nom?: never - prenom?: never - telephone?: never - user_id?: string | null - } - Update: { - email?: never - key?: never - nom?: never - prenom?: never - telephone?: never - user_id?: string | null - } - Relationships: [ - { - foreignKeyName: "dcp_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - crm_plans: { - Row: { - nb_plan: number | null - nb_plan_90pc_fa_privees: number | null - type: string | null - } - Relationships: [] - } - crm_usages: { - Row: { - _5fiches_1pilotage: boolean | null - collectivite_id: number | null - completude_cae: number | null - completude_eci: number | null - fiches: number | null - fiches_action_referentiel: number | null - fiches_changement_statut: number | null - fiches_fiche_liee: number | null - fiches_indicateur: number | null - fiches_initiees: number | null - fiches_mod_1mois: number | null - fiches_mod_3mois: number | null - fiches_mod_6mois: number | null - fiches_non_vides: number | null - fiches_pai: number | null - fiches_pilotables: number | null - fiches_pilotage: number | null - indicateur_prive: number | null - indicateurs_perso: number | null - key: string | null - min1_indicateur_perso_prive: boolean | null - min1_indicateur_predef_prive: boolean | null - min1_indicateur_prive: boolean | null - pa_date_creation: string | null - pa_non_vides: number | null - pa_pilotables: number | null - pa_view_2mois: number | null - pa_view_6mois: number | null - pai: number | null - plans: number | null - pourcentage_fa_pilotable_privee: number | null - pourcentage_fa_privee: number | null - pourcentage_indicateur_predef_prives: number | null - premier_rattachement: string | null - resultats_indicateurs: number | null - resultats_indicateurs_perso: number | null - type_pa_non_vides: string | null - } - Relationships: [] - } - departement: { - Row: { - code: string | null - libelle: string | null - region_code: string | null - } - Insert: { - code?: string | null - libelle?: string | null - region_code?: string | null - } - Update: { - code?: string | null - libelle?: string | null - region_code?: string | null - } - Relationships: [ - { - foreignKeyName: "departement_region_code_fkey" - columns: ["region_code"] - isOneToOne: false - referencedRelation: "region" - referencedColumns: ["code"] - }, - { - foreignKeyName: "departement_region_code_fkey" - columns: ["region_code"] - isOneToOne: false - referencedRelation: "region" - referencedColumns: ["code"] - }, - ] - } - export_score_audit: { - Row: { - collectivite: string | null - cot: boolean | null - date_cloture_cae: string | null - date_cloture_eci: string | null - points_cae: number | null - points_eci: number | null - programme_cae: number | null - programme_eci: number | null - realise_cae: number | null - realise_eci: number | null - region: string | null - signataire: string | null - } - Relationships: [] - } - fiche_action_personne_pilote: { - Row: { - collectivite_id: number | null - nom: string | null - tag_id: number | null - user_id: string | null - } - Relationships: [] - } - fiche_action_personne_referente: { - Row: { - collectivite_id: number | null - nom: string | null - tag_id: number | null - user_id: string | null - } - Relationships: [] - } - fiche_resume: { - Row: { - amelioration_continue: boolean | null - collectivite_id: number | null - date_fin_provisoire: string | null - id: number | null - modified_at: string | null - niveau_priorite: - | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] - | null - pilotes: Database["public"]["CompositeTypes"]["personne"][] | null - plans: Database["public"]["Tables"]["axe"]["Row"][] | null - restreint: boolean | null - statut: Database["public"]["Enums"]["fiche_action_statuts"] | null - titre: string | null - } - Relationships: [ - { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "audit_demande_id_fkey" + columns: ["demande_id"] + isOneToOne: false + referencedRelation: "retool_audit" + referencedColumns: ["demande_id"] + }, + { + foreignKeyName: "audit_demande_id_fkey" + columns: ["demande_id"] + isOneToOne: false + referencedRelation: "retool_labellisation_demande" referencedColumns: ["id"] }, + ] + } + audit_en_cours: { + Row: { + collectivite_id: number | null + date_debut: string | null + date_fin: string | null + demande_id: number | null + id: number | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + valide: boolean | null + } + Insert: { + collectivite_id?: number | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + valide?: boolean | null + } + Update: { + collectivite_id?: number | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + valide?: boolean | null + } + Relationships: [ { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_demande_id_fkey" + columns: ["demande_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "retool_audit" + referencedColumns: ["demande_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_demande_id_fkey" + columns: ["demande_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "retool_labellisation_demande" + referencedColumns: ["id"] }, + ] + } + auditeurs: { + Row: { + audit_id: number | null + collectivite_id: number | null + noms: Json | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + } + Relationships: [] + } + audits: { + Row: { + audit: Database["labellisation"]["Tables"]["audit"]["Row"] | null + collectivite_id: number | null + demande: Database["labellisation"]["Tables"]["demande"]["Row"] | null + is_cot: boolean | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + } + Relationships: [] + } + axe_descendants: { + Row: { + axe_id: number | null + depth: number | null + descendants: number[] | null + parents: number[] | null + } + Relationships: [] + } + bibliotheque_annexe: { + Row: { + collectivite_id: number | null + commentaire: string | null + created_at: string | null + created_by: string | null + created_by_nom: string | null + fiche_id: number | null + fichier: Json | null + id: number | null + lien: Json | null + plan_ids: number[] | null + } + Relationships: [ { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, + ] + } + bibliotheque_fichier: { + Row: { + bucket_id: string | null + collectivite_id: number | null + confidentiel: boolean | null + file_id: string | null + filename: string | null + filesize: number | null + hash: string | null + id: number | null + } + Relationships: [ { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, - ] - } - fiches_action: { - Row: { - actions: - | Database["public"]["Tables"]["action_relation"]["Row"][] - | null - amelioration_continue: boolean | null - axes: Database["public"]["Tables"]["axe"]["Row"][] | null - budget_previsionnel: number | null - calendrier: string | null - cibles: Database["public"]["Enums"]["fiche_action_cibles"][] | null - collectivite_id: number | null - created_at: string | null - date_debut: string | null - date_fin_provisoire: string | null - description: string | null - fiches_liees: - | Database["public"]["Views"]["fiche_resume"]["Row"][] - | null - financements: string | null - financeurs: - | Database["public"]["CompositeTypes"]["financeur_montant"][] - | null - id: number | null - indicateurs: - | Database["public"]["Tables"]["indicateur_definition"]["Row"][] - | null - maj_termine: boolean | null - modified_at: string | null - modified_by: string | null - niveau_priorite: - | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] - | null - notes_complementaires: string | null - objectifs: string | null - partenaires: - | Database["public"]["Tables"]["partenaire_tag"]["Row"][] - | null - piliers_eci: - | Database["public"]["Enums"]["fiche_action_piliers_eci"][] - | null - pilotes: Database["public"]["CompositeTypes"]["personne"][] | null - referents: Database["public"]["CompositeTypes"]["personne"][] | null - ressources: string | null - restreint: boolean | null - resultats_attendus: - | Database["public"]["Tables"]["effet_attendu"]["Row"][] - | null - services: Database["public"]["Tables"]["service_tag"]["Row"][] | null - sous_thematiques: - | Database["public"]["Tables"]["sous_thematique"]["Row"][] - | null - statut: Database["public"]["Enums"]["fiche_action_statuts"] | null - structures: - | Database["public"]["Tables"]["structure_tag"]["Row"][] - | null - thematiques: - | Database["public"]["Tables"]["thematique"]["Row"][] - | null - titre: string | null - } - Relationships: [ { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_completude_compute" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + client_action_statut: { + Row: { + action_id: string | null + avancement: Database["public"]["Enums"]["avancement"] | null + collectivite_id: number | null + concerne: boolean | null + modified_by: string | null + } + Insert: { + action_id?: string | null + avancement?: Database["public"]["Enums"]["avancement"] | null + collectivite_id?: number | null + concerne?: boolean | null + modified_by?: string | null + } + Update: { + action_id?: string | null + avancement?: Database["public"]["Enums"]["avancement"] | null + collectivite_id?: number | null + concerne?: boolean | null + modified_by?: string | null + } + Relationships: [ { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_statut_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_modified_by_fkey" - columns: ["modified_by"] + foreignKeyName: "action_statut_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] }, ] } - fiches_liees_par_fiche: { - Row: { - fiche_id: number | null - fiche_liee_id: number | null - } - Relationships: [] - } - historique: { + collectivite_card: { Row: { - action_id: string | null - action_identifiant: string | null - action_ids: unknown[] | null - action_nom: string | null - avancement: Database["public"]["Enums"]["avancement"] | null - avancement_detaille: number[] | null + code_siren_insee: string | null collectivite_id: number | null - concerne: boolean | null - justification: string | null - modified_at: string | null - modified_by_id: string | null - modified_by_nom: string | null - precision: string | null - previous_avancement: Database["public"]["Enums"]["avancement"] | null - previous_avancement_detaille: number[] | null - previous_concerne: boolean | null - previous_justification: string | null - previous_modified_at: string | null - previous_modified_by_id: string | null - previous_precision: string | null - previous_reponse: Json | null - question_formulation: string | null - question_id: string | null - question_type: Database["public"]["Enums"]["question_type"] | null - reponse: Json | null - tache_identifiant: string | null - tache_nom: string | null - thematique_id: string | null - thematique_nom: string | null - type: string | null + completude_cae: number | null + completude_cae_intervalle: string | null + completude_eci: number | null + completude_eci_intervalle: string | null + completude_intervalles: string[] | null + completude_max: number | null + completude_min: number | null + departement_code: string | null + etoiles_all: number[] | null + etoiles_cae: number | null + etoiles_eci: number | null + fait_cae_intervalle: string | null + fait_eci_intervalle: string | null + fait_intervalles: string[] | null + nom: string | null + population: number | null + population_intervalle: string | null + region_code: string | null + score_fait_cae: number | null + score_fait_eci: number | null + score_fait_max: number | null + score_fait_min: number | null + score_fait_sum: number | null + score_programme_cae: number | null + score_programme_eci: number | null + score_programme_max: number | null + score_programme_sum: number | null + type_collectivite: + | Database["public"]["Enums"]["filterable_type_collectivite"] + | null } Relationships: [] } - historique_utilisateur: { + collectivite_carte_identite: { Row: { + code_siren_insee: string | null collectivite_id: number | null - modified_by_id: string | null - modified_by_nom: string | null + departement_name: string | null + is_cot: boolean | null + nom: string | null + population_source: string | null + population_totale: number | null + region_name: string | null + type_collectivite: + | Database["public"]["Enums"]["type_collectivite"] + | null } Relationships: [] } - indicateur_summary: { + collectivite_identite: { Row: { - categorie: string | null - collectivite_id: number | null - nombre: number | null - rempli: number | null + id: number | null + localisation: string[] | null + population: string[] | null + type: Database["public"]["Enums"]["type_collectivite"][] | null } Relationships: [] } - mes_collectivites: { + collectivite_niveau_acces: { Row: { access_restreint: boolean | null collectivite_id: number | null @@ -26419,2029 +15036,2222 @@ export type Database = { } Relationships: [] } - named_collectivite: { + comparaison_scores_audit: { Row: { + action_id: string | null collectivite_id: number | null - nom: string | null + courant: Database["public"]["CompositeTypes"]["tabular_score"] | null + pre_audit: + | Database["public"]["CompositeTypes"]["tabular_score"] + | null + referentiel: Database["public"]["Enums"]["referentiel"] | null } Relationships: [] } - ongoing_maintenance: { + confidentialite_cle_primaire_compose: { Row: { - begins_at: string | null - ends_at: string | null - now: string | null + table_name: unknown | null } Relationships: [] } - pg_all_foreign_keys: { + confidentialite_fonctions_a_tester: { Row: { - fk_columns: unknown[] | null - fk_constraint_name: unknown | null - fk_schema_name: unknown | null - fk_table_name: unknown | null - fk_table_oid: unknown | null - is_deferrable: boolean | null - is_deferred: boolean | null - match_type: string | null - on_delete: string | null - on_update: string | null - pk_columns: unknown[] | null - pk_constraint_name: unknown | null - pk_index_name: unknown | null - pk_schema_name: unknown | null - pk_table_name: unknown | null - pk_table_oid: unknown | null + element: unknown | null + id_element: unknown | null + } + Relationships: [] + } + confidentialite_fonctions_parametres: { + Row: { + colonne: unknown | null + element: unknown | null + type: unknown | null + } + Relationships: [] + } + confidentialite_tables_a_tester: { + Row: { + element: unknown | null + id_element: string | null + } + Relationships: [] + } + confidentialite_tables_colonnes: { + Row: { + colonne: unknown | null + element: unknown | null + type: unknown | null + } + Relationships: [] + } + confidentialite_types_enum: { + Row: { + enum_nom: string | null + type_nom: unknown | null + } + Relationships: [] + } + confidentialite_vues_a_tester: { + Row: { + c: boolean | null + d: boolean | null + element: unknown | null + id_element: string | null + u: boolean | null + } + Relationships: [] + } + confidentialite_vues_colonnes: { + Row: { + colonne: unknown | null + element: unknown | null + type: unknown | null + } + Relationships: [] + } + crm_collectivites: { + Row: { + code_siren_insee: string | null + collectivite_id: number | null + cot: boolean | null + departement_code: string | null + departement_name: string | null + key: string | null + lab_cae_annee: number | null + lab_cae_etoiles: number | null + lab_cae_programme: number | null + lab_cae_realise: number | null + lab_eci_annee: number | null + lab_eci_etoiles: number | null + lab_eci_programme: number | null + lab_eci_realise: number | null + nature_collectivite: string | null + nom: string | null + population_totale: number | null + region_code: string | null + region_name: string | null + type_collectivite: + | Database["public"]["Enums"]["type_collectivite"] + | null } Relationships: [] } - plan_action: { + crm_droits: { Row: { + champ_intervention: string | null collectivite_id: number | null - id: number | null - plan: Json | null - } - Insert: { - collectivite_id?: number | null - id?: number | null - plan?: never - } - Update: { - collectivite_id?: number | null - id?: number | null - plan?: never + collectivite_key: string | null + details_fonction: string | null + fonction: Database["public"]["Enums"]["membre_fonction"] | null + key: string | null + niveau_acces: Database["public"]["Enums"]["niveau_acces"] | null + user_id: string | null + user_key: string | null } Relationships: [ { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + crm_indicateurs: { + Row: { + id: number | null + nb_prive: number | null + pourcentage_prive: number | null + titre: string | null + } + Relationships: [] + } + crm_labellisations: { + Row: { + annee: number | null + collectivite_key: string | null + etoiles: number | null + id: number | null + obtenue_le: string | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + score_programme: number | null + score_realise: number | null + } + Relationships: [] + } + crm_personnes: { + Row: { + email: string | null + key: string | null + nom: string | null + prenom: string | null + telephone: string | null + user_id: string | null + } + Insert: { + email?: never + key?: never + nom?: never + prenom?: never + telephone?: never + user_id?: string | null + } + Update: { + email?: never + key?: never + nom?: never + prenom?: never + telephone?: never + user_id?: string | null + } + Relationships: [] + } + crm_plans: { + Row: { + nb_plan: number | null + nb_plan_90pc_fa_privees: number | null + type: string | null + } + Relationships: [] + } + crm_usages: { + Row: { + _5fiches_1pilotage: boolean | null + collectivite_id: number | null + completude_cae: number | null + completude_eci: number | null + fiches: number | null + fiches_action_referentiel: number | null + fiches_changement_statut: number | null + fiches_fiche_liee: number | null + fiches_indicateur: number | null + fiches_initiees: number | null + fiches_mod_1mois: number | null + fiches_mod_3mois: number | null + fiches_mod_6mois: number | null + fiches_non_vides: number | null + fiches_pai: number | null + fiches_pilotables: number | null + fiches_pilotage: number | null + indicateur_prive: number | null + indicateurs_perso: number | null + key: string | null + min1_indicateur_perso_prive: boolean | null + min1_indicateur_predef_prive: boolean | null + min1_indicateur_prive: boolean | null + pa_date_creation: string | null + pa_non_vides: number | null + pa_pilotables: number | null + pa_view_2mois: number | null + pa_view_6mois: number | null + pai: number | null + plans: number | null + pourcentage_fa_pilotable_privee: number | null + pourcentage_fa_privee: number | null + pourcentage_indicateur_predef_prives: number | null + premier_rattachement: string | null + resultats_indicateurs: number | null + resultats_indicateurs_perso: number | null + type_pa_non_vides: string | null + } + Relationships: [] + } + departement: { + Row: { + code: string | null + libelle: string | null + region_code: string | null + } + Insert: { + code?: string | null + libelle?: string | null + region_code?: string | null + } + Update: { + code?: string | null + libelle?: string | null + region_code?: string | null + } + Relationships: [ { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "departement_region_code_fkey" + columns: ["region_code"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "region" + referencedColumns: ["code"] }, + ] + } + export_score_audit: { + Row: { + collectivite: string | null + cot: boolean | null + date_cloture_cae: string | null + date_cloture_eci: string | null + points_cae: number | null + points_eci: number | null + programme_cae: number | null + programme_eci: number | null + realise_cae: number | null + realise_eci: number | null + region: string | null + signataire: string | null + } + Relationships: [] + } + fiche_action_personne_pilote: { + Row: { + collectivite_id: number | null + nom: string | null + tag_id: number | null + user_id: string | null + } + Relationships: [] + } + fiche_action_personne_referente: { + Row: { + collectivite_id: number | null + nom: string | null + tag_id: number | null + user_id: string | null + } + Relationships: [] + } + fiche_resume: { + Row: { + amelioration_continue: boolean | null + collectivite_id: number | null + date_fin_provisoire: string | null + id: number | null + modified_at: string | null + niveau_priorite: + | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] + | null + pilotes: Database["public"]["CompositeTypes"]["personne"][] | null + plans: Database["public"]["Tables"]["axe"]["Row"][] | null + restreint: boolean | null + statut: Database["public"]["Enums"]["fiche_action_statuts"] | null + titre: string | null + } + Relationships: [ { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, - ] - } - plan_action_chemin: { - Row: { - axe_id: number | null - chemin: Database["public"]["Tables"]["axe"]["Row"][] | null - collectivite_id: number | null - plan_id: number | null - } - Relationships: [] - } - plan_action_profondeur: { - Row: { - collectivite_id: number | null - id: number | null - plan: Json | null - } - Insert: { - collectivite_id?: number | null - id?: number | null - plan?: never - } - Update: { - collectivite_id?: number | null - id?: number | null - plan?: never - } - Relationships: [ { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_completude_compute" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + fiches_action: { + Row: { + actions: + | Database["public"]["Tables"]["action_relation"]["Row"][] + | null + amelioration_continue: boolean | null + axes: Database["public"]["Tables"]["axe"]["Row"][] | null + budget_previsionnel: number | null + calendrier: string | null + cibles: string[] | null + collectivite_id: number | null + created_at: string | null + date_debut: string | null + date_fin_provisoire: string | null + description: string | null + fiches_liees: + | Database["public"]["Views"]["fiche_resume"]["Row"][] + | null + financements: string | null + financeurs: + | Database["public"]["CompositeTypes"]["financeur_montant"][] + | null + id: number | null + indicateurs: + | Database["public"]["Tables"]["indicateur_definition"]["Row"][] + | null + instance_gouvernance: string | null + libres_tag: Database["public"]["Tables"]["libre_tag"]["Row"][] | null + maj_termine: boolean | null + modified_at: string | null + modified_by: string | null + niveau_priorite: + | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] + | null + notes_complementaires: string | null + objectifs: string | null + partenaires: + | Database["public"]["Tables"]["partenaire_tag"]["Row"][] + | null + participation_citoyenne: string | null + participation_citoyenne_type: string | null + piliers_eci: + | Database["public"]["Enums"]["fiche_action_piliers_eci"][] + | null + pilotes: Database["public"]["CompositeTypes"]["personne"][] | null + referents: Database["public"]["CompositeTypes"]["personne"][] | null + ressources: string | null + restreint: boolean | null + resultats_attendus: + | Database["public"]["Tables"]["effet_attendu"]["Row"][] + | null + services: Database["public"]["Tables"]["service_tag"]["Row"][] | null + sous_thematiques: + | Database["public"]["Tables"]["sous_thematique"]["Row"][] + | null + statut: Database["public"]["Enums"]["fiche_action_statuts"] | null + structures: + | Database["public"]["Tables"]["structure_tag"]["Row"][] + | null + temps_de_mise_en_oeuvre: Json | null + thematiques: + | Database["public"]["Tables"]["thematique"]["Row"][] + | null + titre: string | null + } + Relationships: [ { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, ] } - preuve: { + fiches_liees_par_fiche: { Row: { - action: Json | null - audit: Json | null - collectivite_id: number | null - commentaire: string | null - created_at: string | null - created_by: string | null - created_by_nom: string | null - demande: Json | null - fichier: Json | null - id: number | null - lien: Json | null - preuve_reglementaire: Json | null - preuve_type: Database["public"]["Enums"]["preuve_type"] | null - rapport: Json | null + fiche_id: number | null + fiche_liee_id: number | null } Relationships: [] } - question_display: { + historique: { Row: { + action_id: string | null + action_identifiant: string | null action_ids: unknown[] | null - choix: Json[] | null + action_nom: string | null + avancement: Database["public"]["Enums"]["avancement"] | null + avancement_detaille: number[] | null collectivite_id: number | null - description: string | null - formulation: string | null - id: string | null - localisation: string[] | null - ordonnancement: number | null - population: string[] | null - thematique_id: string | null - thematique_nom: string | null - type: Database["public"]["Enums"]["question_type"] | null - types_collectivites_concernees: - | Database["public"]["Enums"]["type_collectivite"][] - | null - } - Relationships: [ - { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "question_thematique" - referencedColumns: ["id"] - }, - { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["id"] - }, - { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "question_thematique_display" - referencedColumns: ["id"] - }, - ] + concerne: boolean | null + justification: string | null + modified_at: string | null + modified_by_id: string | null + modified_by_nom: string | null + precision: string | null + previous_avancement: Database["public"]["Enums"]["avancement"] | null + previous_avancement_detaille: number[] | null + previous_concerne: boolean | null + previous_justification: string | null + previous_modified_at: string | null + previous_modified_by_id: string | null + previous_precision: string | null + previous_reponse: Json | null + question_formulation: string | null + question_id: string | null + question_type: Database["public"]["Enums"]["question_type"] | null + reponse: Json | null + tache_identifiant: string | null + tache_nom: string | null + thematique_id: string | null + thematique_nom: string | null + type: string | null + } + Relationships: [] } - question_thematique_completude: { + historique_utilisateur: { Row: { collectivite_id: number | null - completude: - | Database["public"]["Enums"]["thematique_completude"] - | null - id: string | null - nom: string | null - referentiels: Database["public"]["Enums"]["referentiel"][] | null + modified_by_id: string | null + modified_by_nom: string | null } Relationships: [] } - question_thematique_display: { + indicateur_summary: { Row: { - id: string | null - nom: string | null - referentiels: Database["public"]["Enums"]["referentiel"][] | null + categorie: string | null + collectivite_id: number | null + nombre: number | null + rempli: number | null } Relationships: [] } - region: { + mes_collectivites: { Row: { - code: string | null - libelle: string | null - } - Insert: { - code?: string | null - libelle?: string | null - } - Update: { - code?: string | null - libelle?: string | null + access_restreint: boolean | null + collectivite_id: number | null + est_auditeur: boolean | null + niveau_acces: Database["public"]["Enums"]["niveau_acces"] | null + nom: string | null } Relationships: [] } - reponse_display: { + named_collectivite: { Row: { collectivite_id: number | null - justification: string | null - question_id: string | null - reponse: Json | null + nom: string | null } Relationships: [] } - retool_active_collectivite: { + ongoing_maintenance: { Row: { - collectivite_id: number | null - nom: string | null + begins_at: string | null + ends_at: string | null + now: string | null } Relationships: [] } - retool_audit: { + pg_all_foreign_keys: { + Row: { + fk_columns: unknown[] | null + fk_constraint_name: unknown | null + fk_schema_name: unknown | null + fk_table_name: unknown | null + fk_table_oid: unknown | null + is_deferrable: boolean | null + is_deferred: boolean | null + match_type: string | null + on_delete: string | null + on_update: string | null + pk_columns: unknown[] | null + pk_constraint_name: unknown | null + pk_index_name: unknown | null + pk_schema_name: unknown | null + pk_table_name: unknown | null + pk_table_oid: unknown | null + } + Relationships: [] + } + plan_action: { Row: { - audit_id: number | null - clos: boolean | null collectivite_id: number | null - date_attribution_auditeur: string | null - date_cnl: string | null - date_debut: string | null - date_demande: string | null - date_fin: string | null - demande_id: number | null - etoiles: Database["labellisation"]["Enums"]["etoile"] | null - nom: string | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - type_audit: string | null - valide_labellisation: boolean | null + id: number | null + plan: Json | null + } + Insert: { + collectivite_id?: number | null + id?: number | null + plan?: never + } + Update: { + collectivite_id?: number | null + id?: number | null + plan?: never } Relationships: [ { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "axe_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "axe_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "axe_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_completude_compute" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + plan_action_chemin: { + Row: { + axe_id: number | null + chemin: Database["public"]["Tables"]["axe"]["Row"][] | null + collectivite_id: number | null + plan_id: number | null + } + Relationships: [] + } + plan_action_profondeur: { + Row: { + collectivite_id: number | null + id: number | null + plan: Json | null + } + Insert: { + collectivite_id?: number | null + id?: number | null + plan?: never + } + Update: { + collectivite_id?: number | null + id?: number | null + plan?: never + } + Relationships: [ { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, ] } - retool_completude: { - Row: { - code_siren_insee: string | null - collectivite_id: number | null - completude_cae: number | null - completude_eci: number | null - departement_name: string | null - nom: string | null - population_totale: number | null - region_name: string | null - type_collectivite: - | Database["public"]["Enums"]["type_collectivite"] - | null - } - Relationships: [] - } - retool_completude_compute: { + preuve: { Row: { + action: Json | null + audit: Json | null collectivite_id: number | null - completude_cae: number | null - completude_eci: number | null - nom: string | null + commentaire: string | null + created_at: string | null + created_by: string | null + created_by_nom: string | null + demande: Json | null + fichier: Json | null + id: number | null + lien: Json | null + preuve_reglementaire: Json | null + preuve_type: Database["public"]["Enums"]["preuve_type"] | null + rapport: Json | null } Relationships: [] } - retool_labellisation: { + question_display: { Row: { - annee: number | null + action_ids: unknown[] | null + choix: Json[] | null collectivite_id: number | null - collectivite_nom: string | null - etoiles: number | null - id: number | null - obtenue_le: string | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - score_programme: number | null - score_realise: number | null + description: string | null + formulation: string | null + id: string | null + localisation: string[] | null + ordonnancement: number | null + population: string[] | null + thematique_id: string | null + thematique_nom: string | null + type: Database["public"]["Enums"]["question_type"] | null + types_collectivites_concernees: + | Database["public"]["Enums"]["type_collectivite"][] + | null } Relationships: [ { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "question_thematique" referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_thematique_completude" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_thematique_display" + referencedColumns: ["id"] }, + ] + } + question_thematique_completude: { + Row: { + collectivite_id: number | null + completude: + | Database["public"]["Enums"]["thematique_completude"] + | null + id: string | null + nom: string | null + referentiels: Database["public"]["Enums"]["referentiel"][] | null + } + Relationships: [] + } + question_thematique_display: { + Row: { + id: string | null + nom: string | null + referentiels: Database["public"]["Enums"]["referentiel"][] | null + } + Relationships: [] + } + region: { + Row: { + code: string | null + libelle: string | null + } + Insert: { + code?: string | null + libelle?: string | null + } + Update: { + code?: string | null + libelle?: string | null + } + Relationships: [] + } + reponse_display: { + Row: { + collectivite_id: number | null + justification: string | null + question_id: string | null + reponse: Json | null + } + Relationships: [] + } + retool_active_collectivite: { + Row: { + collectivite_id: number | null + nom: string | null + } + Relationships: [] + } + retool_audit: { + Row: { + audit_id: number | null + clos: boolean | null + collectivite_id: number | null + date_attribution_auditeur: string | null + date_cnl: string | null + date_debut: string | null + date_demande: string | null + date_fin: string | null + demande_id: number | null + etoiles: Database["labellisation"]["Enums"]["etoile"] | null + nom: string | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + type_audit: string | null + valide_labellisation: boolean | null + } + Relationships: [ { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + retool_completude: { + Row: { + code_siren_insee: string | null + collectivite_id: number | null + completude_cae: number | null + completude_eci: number | null + departement_name: string | null + nom: string | null + population_totale: number | null + region_name: string | null + type_collectivite: + | Database["public"]["Enums"]["type_collectivite"] + | null + } + Relationships: [] + } + retool_completude_compute: { + Row: { + collectivite_id: number | null + completude_cae: number | null + completude_eci: number | null + nom: string | null + } + Relationships: [] + } + retool_labellisation: { + Row: { + annee: number | null + collectivite_id: number | null + collectivite_nom: string | null + etoiles: number | null + id: number | null + obtenue_le: string | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + score_programme: number | null + score_realise: number | null + } + Relationships: [ { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - ] - } - retool_labellisation_demande: { - Row: { - collectivite_id: number | null - date: string | null - demandeur_email: string | null - demandeur_fonction: - | Database["public"]["Enums"]["membre_fonction"] - | null - demandeur_nom: string | null - demandeur_prenom: string | null - en_cours: boolean | null - envoyee_le: string | null - etoiles: Database["labellisation"]["Enums"]["etoile"] | null - id: number | null - modified_at: string | null - nom: string | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - sujet: Database["labellisation"]["Enums"]["sujet_demande"] | null - } - Relationships: [ - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + retool_labellisation_demande: { + Row: { + collectivite_id: number | null + date: string | null + demandeur_email: string | null + demandeur_fonction: + | Database["public"]["Enums"]["membre_fonction"] + | null + demandeur_nom: string | null + demandeur_prenom: string | null + en_cours: boolean | null + envoyee_le: string | null + etoiles: Database["labellisation"]["Enums"]["etoile"] | null + id: number | null + modified_at: string | null + nom: string | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + sujet: Database["labellisation"]["Enums"]["sujet_demande"] | null + } + Relationships: [ { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, ] @@ -28547,78 +17357,36 @@ export type Database = { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" @@ -28774,132 +17542,6 @@ export type Database = { referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, ] } site_labellisation: { @@ -29598,6 +18240,8 @@ export type Database = { preuve: string | null reduction_potentiel: string referentiel: Database["public"]["Enums"]["referentiel"] + referentiel_id: string + referentiel_version: string ressources: string }[] } @@ -29924,6 +18568,7 @@ export type Database = { modified_at: string modified_by: string | null nom: string | null + panier_id: string | null parent: number | null plan: number | null type: number | null @@ -32732,6 +21377,7 @@ export type Database = { | "action" | "sous-action" | "tache" + | "exemple" audit_statut: "non_audite" | "en_cours" | "audite" avancement: | "fait" @@ -32853,7 +21499,7 @@ export type Database = { | "audit" | "rapport" question_type: "choix" | "binaire" | "proportion" - referentiel: "eci" | "cae" + referentiel: "eci" | "cae" | "te" | "te-test" regle_type: "score" | "desactivation" | "reduction" role_name: "agent" | "referent" | "conseiller" | "auditeur" | "aucun" thematique_completude: "complete" | "a_completer" @@ -33110,3 +21756,18 @@ export type Enums< ? PublicSchema["Enums"][PublicEnumNameOrOptions] : never +export type CompositeTypes< + PublicCompositeTypeNameOrOptions extends + | keyof PublicSchema["CompositeTypes"] + | { schema: keyof Database }, + CompositeTypeName extends PublicCompositeTypeNameOrOptions extends { + schema: keyof Database + } + ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] + : never = never, +> = PublicCompositeTypeNameOrOptions extends { schema: keyof Database } + ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] + : PublicCompositeTypeNameOrOptions extends keyof PublicSchema["CompositeTypes"] + ? PublicSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] + : never + diff --git a/packages/api/src/plan-actions/domain/fiche-action.schema.ts b/packages/api/src/plan-actions/domain/fiche-action.schema.ts index ba51ef3973..bf8b812f54 100644 --- a/packages/api/src/plan-actions/domain/fiche-action.schema.ts +++ b/packages/api/src/plan-actions/domain/fiche-action.schema.ts @@ -140,6 +140,7 @@ export const ficheActionSchema = z.object({ actions: actionSchema.array().nullish(), financeurs: financeurSchema.array().nullish(), indicateurs: indicateurListItemSchema.array().nullish(), + libresTag: tagSchema.array().nullish(), }); export type FicheAction = z.infer; diff --git a/packages/api/src/shared/domain/tag.schema.ts b/packages/api/src/shared/domain/tag.schema.ts index b337623655..6ab9774df4 100644 --- a/packages/api/src/shared/domain/tag.schema.ts +++ b/packages/api/src/shared/domain/tag.schema.ts @@ -6,7 +6,8 @@ export type TypeTag = | 'partenaire' | 'categorie' | 'financeur' - | 'structure'; + | 'structure' + | 'libre'; export const tagSchema = z.object({ id: z.number(), diff --git a/supabase/functions/_shared/database.types.ts b/supabase/functions/_shared/database.types.ts index a4d2aee316..721665834f 100644 --- a/supabase/functions/_shared/database.types.ts +++ b/supabase/functions/_shared/database.types.ts @@ -44,27 +44,6 @@ export type Database = { statut?: Database["public"]["Enums"]["audit_statut"] } Relationships: [ - { - foreignKeyName: "action_audit_state_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_audit_state_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "action_audit_state" - referencedColumns: ["audit_id"] - }, - { - foreignKeyName: "action_audit_state_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] - }, { foreignKeyName: "action_audit_state_audit_id_fkey" columns: ["audit_id"] @@ -72,20 +51,6 @@ export type Database = { referencedRelation: "audit" referencedColumns: ["id"] }, - { - foreignKeyName: "action_audit_state_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "audit_en_cours" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_audit_state_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["audit_id"] - }, { foreignKeyName: "action_audit_state_collectivite_id_fkey" columns: ["collectivite_id"] @@ -93,15596 +58,3462 @@ export type Database = { referencedRelation: "action_snippet" referencedColumns: ["collectivite_id"] }, + ] + } + audit: { + Row: { + clos: boolean + collectivite_id: number + date_cnl: string | null + date_debut: string | null + date_fin: string | null + demande_id: number | null + id: number + referentiel: Database["public"]["Enums"]["referentiel"] + valide: boolean + valide_labellisation: boolean | null + } + Insert: { + clos?: boolean + collectivite_id: number + date_cnl?: string | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number + referentiel: Database["public"]["Enums"]["referentiel"] + valide?: boolean + valide_labellisation?: boolean | null + } + Update: { + clos?: boolean + collectivite_id?: number + date_cnl?: string | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number + referentiel?: Database["public"]["Enums"]["referentiel"] + valide?: boolean + valide_labellisation?: boolean | null + } + Relationships: [ { - foreignKeyName: "action_audit_state_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "action_snippet" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_demande_id_fkey" + columns: ["demande_id"] isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "demande" + referencedColumns: ["id"] }, + ] + } + bibliotheque_fichier: { + Row: { + collectivite_id: number | null + confidentiel: boolean + filename: string | null + hash: string | null + id: number + } + Insert: { + collectivite_id?: number | null + confidentiel?: boolean + filename?: string | null + hash?: string | null + id?: number + } + Update: { + collectivite_id?: number | null + confidentiel?: boolean + filename?: string | null + hash?: string | null + id?: number + } + Relationships: [ { - foreignKeyName: "action_audit_state_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "action_snippet" referencedColumns: ["collectivite_id"] }, + ] + } + demande: { + Row: { + collectivite_id: number + date: string + demandeur: string | null + en_cours: boolean + envoyee_le: string | null + etoiles: Database["labellisation"]["Enums"]["etoile"] | null + id: number + modified_at: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + sujet: Database["labellisation"]["Enums"]["sujet_demande"] | null + } + Insert: { + collectivite_id: number + date?: string + demandeur?: string | null + en_cours?: boolean + envoyee_le?: string | null + etoiles?: Database["labellisation"]["Enums"]["etoile"] | null + id?: number + modified_at?: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + sujet?: Database["labellisation"]["Enums"]["sujet_demande"] | null + } + Update: { + collectivite_id?: number + date?: string + demandeur?: string | null + en_cours?: boolean + envoyee_le?: string | null + etoiles?: Database["labellisation"]["Enums"]["etoile"] | null + id?: number + modified_at?: string | null + referentiel?: Database["public"]["Enums"]["referentiel"] + sujet?: Database["labellisation"]["Enums"]["sujet_demande"] | null + } + Relationships: [ { - foreignKeyName: "action_audit_state_collectivite_id_fkey" + foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "action_snippet" referencedColumns: ["collectivite_id"] }, + ] + } + etoile_meta: { + Row: { + etoile: Database["labellisation"]["Enums"]["etoile"] + long_label: string + min_realise_percentage: number + min_realise_score: number | null + prochaine_etoile: Database["labellisation"]["Enums"]["etoile"] | null + short_label: string + } + Insert: { + etoile: Database["labellisation"]["Enums"]["etoile"] + long_label: string + min_realise_percentage: number + min_realise_score?: number | null + prochaine_etoile?: Database["labellisation"]["Enums"]["etoile"] | null + short_label: string + } + Update: { + etoile?: Database["labellisation"]["Enums"]["etoile"] + long_label?: string + min_realise_percentage?: number + min_realise_score?: number | null + prochaine_etoile?: Database["labellisation"]["Enums"]["etoile"] | null + short_label?: string + } + Relationships: [] + } + preuve_base: { + Row: { + collectivite_id: number + commentaire: string + fichier_id: number | null + lien: Json | null + modified_at: string + modified_by: string + titre: string + url: string | null + } + Insert: { + collectivite_id: number + commentaire?: string + fichier_id?: number | null + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null + } + Update: { + collectivite_id?: number + commentaire?: string + fichier_id?: number | null + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null + } + Relationships: [ { - foreignKeyName: "action_audit_state_collectivite_id_fkey" + foreignKeyName: "preuve_base_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "action_snippet" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_base_fichier_id_fkey" + columns: ["fichier_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "bibliotheque_fichier" referencedColumns: ["id"] }, { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_base_fichier_id_fkey" + columns: ["fichier_id"] isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_audit_state_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - audit: { - Row: { - clos: boolean - collectivite_id: number - date_cnl: string | null - date_debut: string | null - date_fin: string | null - demande_id: number | null - id: number - referentiel: Database["public"]["Enums"]["referentiel"] - valide: boolean - valide_labellisation: boolean | null - } - Insert: { - clos?: boolean - collectivite_id: number - date_cnl?: string | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number - referentiel: Database["public"]["Enums"]["referentiel"] - valide?: boolean - valide_labellisation?: boolean | null - } - Update: { - clos?: boolean - collectivite_id?: number - date_cnl?: string | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number - referentiel?: Database["public"]["Enums"]["referentiel"] - valide?: boolean - valide_labellisation?: boolean | null - } - Relationships: [ - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "demande" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["demande_id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "retool_labellisation_demande" - referencedColumns: ["id"] - }, - ] - } - bibliotheque_fichier: { - Row: { - collectivite_id: number | null - confidentiel: boolean - filename: string | null - hash: string | null - id: number - } - Insert: { - collectivite_id?: number | null - confidentiel?: boolean - filename?: string | null - hash?: string | null - id?: number - } - Update: { - collectivite_id?: number | null - confidentiel?: boolean - filename?: string | null - hash?: string | null - id?: number - } - Relationships: [ - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - demande: { - Row: { - collectivite_id: number - date: string - demandeur: string | null - en_cours: boolean - envoyee_le: string | null - etoiles: Database["labellisation"]["Enums"]["etoile"] | null - id: number - modified_at: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - sujet: Database["labellisation"]["Enums"]["sujet_demande"] | null - } - Insert: { - collectivite_id: number - date?: string - demandeur?: string | null - en_cours?: boolean - envoyee_le?: string | null - etoiles?: Database["labellisation"]["Enums"]["etoile"] | null - id?: number - modified_at?: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - sujet?: Database["labellisation"]["Enums"]["sujet_demande"] | null - } - Update: { - collectivite_id?: number - date?: string - demandeur?: string | null - en_cours?: boolean - envoyee_le?: string | null - etoiles?: Database["labellisation"]["Enums"]["etoile"] | null - id?: number - modified_at?: string | null - referentiel?: Database["public"]["Enums"]["referentiel"] - sujet?: Database["labellisation"]["Enums"]["sujet_demande"] | null - } - Relationships: [ - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_demandeur_fkey" - columns: ["demandeur"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - etoile_meta: { - Row: { - etoile: Database["labellisation"]["Enums"]["etoile"] - long_label: string - min_realise_percentage: number - min_realise_score: number | null - prochaine_etoile: Database["labellisation"]["Enums"]["etoile"] | null - short_label: string - } - Insert: { - etoile: Database["labellisation"]["Enums"]["etoile"] - long_label: string - min_realise_percentage: number - min_realise_score?: number | null - prochaine_etoile?: Database["labellisation"]["Enums"]["etoile"] | null - short_label: string - } - Update: { - etoile?: Database["labellisation"]["Enums"]["etoile"] - long_label?: string - min_realise_percentage?: number - min_realise_score?: number | null - prochaine_etoile?: Database["labellisation"]["Enums"]["etoile"] | null - short_label?: string - } - Relationships: [] - } - preuve_base: { - Row: { - collectivite_id: number - commentaire: string - fichier_id: number | null - lien: Json | null - modified_at: string - modified_by: string - titre: string - url: string | null - } - Insert: { - collectivite_id: number - commentaire?: string - fichier_id?: number | null - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null - } - Update: { - collectivite_id?: number - commentaire?: string - fichier_id?: number | null - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null - } - Relationships: [ - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_base_fichier_id_fkey" - columns: ["fichier_id"] - isOneToOne: false - referencedRelation: "bibliotheque_fichier" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_base_fichier_id_fkey" - columns: ["fichier_id"] - isOneToOne: false - referencedRelation: "bibliotheque_fichier" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_base_fichier_id_fkey" - columns: ["fichier_id"] - isOneToOne: false - referencedRelation: "bibliotheque_fichier_snippet" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_base_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - } - Views: { - action_snippet: { - Row: { - action_id: string | null - collectivite_id: number | null - snippet: Json | null - } - Relationships: [] - } - bibliotheque_fichier_snippet: { - Row: { - id: number | null - snippet: Json | null - } - Relationships: [] - } - export_score_audit: { - Row: { - collectivite: string | null - cot: boolean | null - date_cloture_cae: string | null - date_cloture_eci: string | null - points_cae: number | null - points_eci: number | null - programme_cae: number | null - programme_eci: number | null - realise_cae: number | null - realise_eci: number | null - region: string | null - signataire: string | null - } - Relationships: [] - } - } - Functions: { - active_audit: { - Args: { - collectivite_id: number - referentiel: Database["public"]["Enums"]["referentiel"] - } - Returns: { - clos: boolean - collectivite_id: number - date_cnl: string | null - date_debut: string | null - date_fin: string | null - demande_id: number | null - id: number - referentiel: Database["public"]["Enums"]["referentiel"] - valide: boolean - valide_labellisation: boolean | null - } - } - audit_evaluation_payload: { - Args: { - audit: unknown - pre_audit: boolean - labellisation: boolean - } - Returns: Record - } - audit_personnalisation_payload: { - Args: { - audit_id: number - pre_audit: boolean - scores_table: string - } - Returns: Json - } - critere_action: { - Args: { - collectivite_id: number - } - Returns: { - referentiel: Database["public"]["Enums"]["referentiel"] - etoiles: Database["labellisation"]["Enums"]["etoile"] - action_id: unknown - formulation: string - score_realise: number - min_score_realise: number - score_programme: number - min_score_programme: number - atteint: boolean - prio: number - }[] - } - critere_fichier: { - Args: { - collectivite_id: number - } - Returns: { - referentiel: Database["public"]["Enums"]["referentiel"] - preuve_nombre: number - atteint: boolean - }[] - } - critere_score_global: { - Args: { - collectivite_id: number - } - Returns: { - referentiel: Database["public"]["Enums"]["referentiel"] - etoile_objectif: Database["labellisation"]["Enums"]["etoile"] - score_a_realiser: number - score_fait: number - atteint: boolean - }[] - } - current_audit: { - Args: { - col: number - ref: Database["public"]["Enums"]["referentiel"] - } - Returns: { - clos: boolean - collectivite_id: number - date_cnl: string | null - date_debut: string | null - date_fin: string | null - demande_id: number | null - id: number - referentiel: Database["public"]["Enums"]["referentiel"] - valide: boolean - valide_labellisation: boolean | null - } - } - etoiles: { - Args: { - collectivite_id: number - } - Returns: { - referentiel: Database["public"]["Enums"]["referentiel"] - etoile_labellise: Database["labellisation"]["Enums"]["etoile"] - prochaine_etoile_labellisation: Database["labellisation"]["Enums"]["etoile"] - etoile_score_possible: Database["labellisation"]["Enums"]["etoile"] - etoile_objectif: Database["labellisation"]["Enums"]["etoile"] - }[] - } - evaluate_audit_statuts: { - Args: { - audit_id: number - pre_audit: boolean - scores_table: string - } - Returns: number - } - json_action_statuts_at: { - Args: { - collectivite_id: number - referentiel: Database["public"]["Enums"]["referentiel"] - date_at: string - } - Returns: Json - } - json_reponses_at: { - Args: { - collectivite_id: number - date_at: string - } - Returns: Json - } - referentiel_score: { - Args: { - collectivite_id: number - } - Returns: { - referentiel: Database["public"]["Enums"]["referentiel"] - score_fait: number - score_programme: number - completude: number - complet: boolean - }[] - } - upsert_preuves_reglementaire: { - Args: { - preuves: Json - } - Returns: undefined - } - } - Enums: { - etoile: "1" | "2" | "3" | "4" | "5" - sujet_demande: "labellisation" | "labellisation_cot" | "cot" - } - CompositeTypes: { - [_ in never]: never - } - } - public: { - Tables: { - abstract_any_indicateur_value: { - Row: { - annee: number - modified_at: string - valeur: number | null - } - Insert: { - annee: number - modified_at?: string - valeur?: number | null - } - Update: { - annee?: number - modified_at?: string - valeur?: number | null - } - Relationships: [] - } - abstract_modified_at: { - Row: { - modified_at: string - } - Insert: { - modified_at?: string - } - Update: { - modified_at?: string - } - Relationships: [] - } - action_commentaire: { - Row: { - action_id: string - collectivite_id: number - commentaire: string - modified_at: string - modified_by: string - } - Insert: { - action_id: string - collectivite_id: number - commentaire: string - modified_at?: string - modified_by?: string - } - Update: { - action_id?: string - collectivite_id?: number - commentaire?: string - modified_at?: string - modified_by?: string - } - Relationships: [ - { - foreignKeyName: "action_commentaire_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_commentaire_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - action_computed_points: { - Row: { - action_id: string - modified_at: string - value: number - } - Insert: { - action_id: string - modified_at?: string - value: number - } - Update: { - action_id?: string - modified_at?: string - value?: number - } - Relationships: [ - { - foreignKeyName: "action_computed_points_action_id_fkey" - columns: ["action_id"] - isOneToOne: true - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - ] - } - action_definition: { - Row: { - action_id: string - categorie: Database["public"]["Enums"]["action_categorie"] | null - contexte: string - description: string - exemples: string - identifiant: string - modified_at: string - nom: string - perimetre_evaluation: string - points: number | null - pourcentage: number | null - preuve: string | null - reduction_potentiel: string - referentiel: Database["public"]["Enums"]["referentiel"] - ressources: string - } - Insert: { - action_id: string - categorie?: Database["public"]["Enums"]["action_categorie"] | null - contexte: string - description: string - exemples: string - identifiant: string - modified_at?: string - nom: string - perimetre_evaluation: string - points?: number | null - pourcentage?: number | null - preuve?: string | null - reduction_potentiel: string - referentiel: Database["public"]["Enums"]["referentiel"] - ressources: string - } - Update: { - action_id?: string - categorie?: Database["public"]["Enums"]["action_categorie"] | null - contexte?: string - description?: string - exemples?: string - identifiant?: string - modified_at?: string - nom?: string - perimetre_evaluation?: string - points?: number | null - pourcentage?: number | null - preuve?: string | null - reduction_potentiel?: string - referentiel?: Database["public"]["Enums"]["referentiel"] - ressources?: string - } - Relationships: [ - { - foreignKeyName: "action_definition_action_id_fkey" - columns: ["action_id"] - isOneToOne: true - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - ] - } - action_discussion: { - Row: { - action_id: string - collectivite_id: number - created_at: string - created_by: string - id: number - modified_at: string - status: Database["public"]["Enums"]["action_discussion_statut"] - } - Insert: { - action_id: string - collectivite_id: number - created_at?: string - created_by?: string - id?: number - modified_at?: string - status?: Database["public"]["Enums"]["action_discussion_statut"] - } - Update: { - action_id?: string - collectivite_id?: number - created_at?: string - created_by?: string - id?: number - modified_at?: string - status?: Database["public"]["Enums"]["action_discussion_statut"] - } - Relationships: [ - { - foreignKeyName: "action_discussion_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_created_by_fkey" - columns: ["created_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - action_discussion_commentaire: { - Row: { - created_at: string - created_by: string - discussion_id: number - id: number - message: string - } - Insert: { - created_at?: string - created_by?: string - discussion_id: number - id?: number - message: string - } - Update: { - created_at?: string - created_by?: string - discussion_id?: number - id?: number - message?: string - } - Relationships: [ - { - foreignKeyName: "action_discussion_commentaire_created_by_fkey" - columns: ["created_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_discussion_commentaire_discussion_id_fkey" - columns: ["discussion_id"] - isOneToOne: false - referencedRelation: "action_discussion" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_discussion_commentaire_discussion_id_fkey" - columns: ["discussion_id"] - isOneToOne: false - referencedRelation: "action_discussion_feed" - referencedColumns: ["id"] - }, - ] - } - action_impact: { - Row: { - action_continue: boolean - competences_communales: boolean - description: string - description_complementaire: string - fourchette_budgetaire: number - id: number - impact_tier: number - independamment_competences: boolean - nb_collectivite_en_cours: number - nb_collectivite_realise: number - ressources_externes: Json | null - rex: Json | null - subventions_mobilisables: Json | null - temps_de_mise_en_oeuvre: number - titre: string - typologie_id: number | null - } - Insert: { - action_continue?: boolean - competences_communales?: boolean - description: string - description_complementaire?: string - fourchette_budgetaire?: number - id?: number - impact_tier?: number - independamment_competences?: boolean - nb_collectivite_en_cours?: number - nb_collectivite_realise?: number - ressources_externes?: Json | null - rex?: Json | null - subventions_mobilisables?: Json | null - temps_de_mise_en_oeuvre?: number - titre: string - typologie_id?: number | null - } - Update: { - action_continue?: boolean - competences_communales?: boolean - description?: string - description_complementaire?: string - fourchette_budgetaire?: number - id?: number - impact_tier?: number - independamment_competences?: boolean - nb_collectivite_en_cours?: number - nb_collectivite_realise?: number - ressources_externes?: Json | null - rex?: Json | null - subventions_mobilisables?: Json | null - temps_de_mise_en_oeuvre?: number - titre?: string - typologie_id?: number | null - } - Relationships: [ - { - foreignKeyName: "action_impact_fourchette_budgetaire_fkey" - columns: ["fourchette_budgetaire"] - isOneToOne: false - referencedRelation: "action_impact_fourchette_budgetaire" - referencedColumns: ["niveau"] - }, - { - foreignKeyName: "action_impact_impact_tier_fkey" - columns: ["impact_tier"] - isOneToOne: false - referencedRelation: "action_impact_tier" - referencedColumns: ["niveau"] - }, - { - foreignKeyName: "action_impact_temps_de_mise_en_oeuvre_fkey" - columns: ["temps_de_mise_en_oeuvre"] - isOneToOne: false - referencedRelation: "action_impact_temps_de_mise_en_oeuvre" - referencedColumns: ["niveau"] - }, - { - foreignKeyName: "action_impact_typologie_id_fkey" - columns: ["typologie_id"] - isOneToOne: false - referencedRelation: "action_impact_typologie" - referencedColumns: ["id"] - }, - ] - } - action_impact_action: { - Row: { - action_id: string - action_impact_id: number - } - Insert: { - action_id: string - action_impact_id: number - } - Update: { - action_id?: string - action_impact_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_action_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_definition" - referencedColumns: ["action_id"] - }, - { - foreignKeyName: "action_impact_action_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - ] - } - action_impact_banatic_competence: { - Row: { - action_impact_id: number - competence_code: number - } - Insert: { - action_impact_id: number - competence_code: number - } - Update: { - action_impact_id?: number - competence_code?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_banatic_competence_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_banatic_competence_competence_code_fkey" - columns: ["competence_code"] - isOneToOne: false - referencedRelation: "banatic_competence" - referencedColumns: ["code"] - }, - ] - } - action_impact_categorie: { - Row: { - id: string - nom: string - } - Insert: { - id: string - nom: string - } - Update: { - id?: string - nom?: string - } - Relationships: [] - } - action_impact_categorie_fnv: { - Row: { - action_impact_id: number - categorie_fnv_id: number - } - Insert: { - action_impact_id: number - categorie_fnv_id: number - } - Update: { - action_impact_id?: number - categorie_fnv_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_categorie_fnv_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_categorie_fnv_categorie_fnv_id_fkey" - columns: ["categorie_fnv_id"] - isOneToOne: false - referencedRelation: "categorie_fnv" - referencedColumns: ["id"] - }, - ] - } - action_impact_complexite: { - Row: { - niveau: number - nom: string - } - Insert: { - niveau?: number - nom: string - } - Update: { - niveau?: number - nom?: string - } - Relationships: [] - } - action_impact_effet_attendu: { - Row: { - action_impact_id: number - effet_attendu_id: number - } - Insert: { - action_impact_id: number - effet_attendu_id: number - } - Update: { - action_impact_id?: number - effet_attendu_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_effet_attendu_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_effet_attendu_effet_attendu_id_fkey" - columns: ["effet_attendu_id"] - isOneToOne: false - referencedRelation: "effet_attendu" - referencedColumns: ["id"] - }, - ] - } - action_impact_fiche_action: { - Row: { - action_impact_id: number - fiche_id: number - } - Insert: { - action_impact_id: number - fiche_id: number - } - Update: { - action_impact_id?: number - fiche_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_fiche_action_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - action_impact_fourchette_budgetaire: { - Row: { - niveau: number - nom: string - } - Insert: { - niveau?: number - nom: string - } - Update: { - niveau?: number - nom?: string - } - Relationships: [] - } - action_impact_indicateur: { - Row: { - action_impact_id: number - indicateur_id: number - } - Insert: { - action_impact_id: number - indicateur_id: number - } - Update: { - action_impact_id?: number - indicateur_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_indicateur_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - action_impact_panier: { - Row: { - action_id: number - panier_id: string - } - Insert: { - action_id: number - panier_id: string - } - Update: { - action_id?: number - panier_id?: string - } - Relationships: [ - { - foreignKeyName: "action_impact_panier_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_panier_panier_id_fkey" - columns: ["panier_id"] - isOneToOne: false - referencedRelation: "panier" - referencedColumns: ["id"] - }, - ] - } - action_impact_partenaire: { - Row: { - action_impact_id: number - partenaire_id: number - } - Insert: { - action_impact_id: number - partenaire_id: number - } - Update: { - action_impact_id?: number - partenaire_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_partenaire_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_partenaire_partenaire_id_fkey" - columns: ["partenaire_id"] - isOneToOne: false - referencedRelation: "panier_partenaire" - referencedColumns: ["id"] - }, - ] - } - action_impact_sous_thematique: { - Row: { - action_impact_id: number - sous_thematique_id: number - } - Insert: { - action_impact_id: number - sous_thematique_id: number - } - Update: { - action_impact_id?: number - sous_thematique_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_sous_thematique_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_sous_thematique_sous_thematique_id_fkey" - columns: ["sous_thematique_id"] - isOneToOne: false - referencedRelation: "sous_thematique" - referencedColumns: ["id"] - }, - ] - } - action_impact_state: { - Row: { - action: Database["public"]["Tables"]["action_impact"]["Row"] | null - isinpanier: boolean | null - panier: Database["public"]["Tables"]["panier"]["Row"] | null - statut: - | Database["public"]["Tables"]["action_impact_statut"]["Row"] - | null - action_definition: unknown | null - action_impact_fourchette_budgetaire: unknown | null - action_impact_temps_de_mise_en_oeuvre: unknown | null - action_impact_thematique: unknown | null - action_impact_typologie: unknown | null - matches_competences: boolean | null - thematique: unknown | null - } - Insert: { - action?: Database["public"]["Tables"]["action_impact"]["Row"] | null - isinpanier?: boolean | null - panier?: Database["public"]["Tables"]["panier"]["Row"] | null - statut?: - | Database["public"]["Tables"]["action_impact_statut"]["Row"] - | null - } - Update: { - action?: Database["public"]["Tables"]["action_impact"]["Row"] | null - isinpanier?: boolean | null - panier?: Database["public"]["Tables"]["panier"]["Row"] | null - statut?: - | Database["public"]["Tables"]["action_impact_statut"]["Row"] - | null - } - Relationships: [] - } - action_impact_statut: { - Row: { - action_id: number - categorie_id: string - panier_id: string - } - Insert: { - action_id: number - categorie_id: string - panier_id: string - } - Update: { - action_id?: number - categorie_id?: string - panier_id?: string - } - Relationships: [ - { - foreignKeyName: "action_impact_statut_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_statut_categorie_id_fkey" - columns: ["categorie_id"] - isOneToOne: false - referencedRelation: "action_impact_categorie" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_statut_panier_id_fkey" - columns: ["panier_id"] - isOneToOne: false - referencedRelation: "panier" - referencedColumns: ["id"] - }, - ] - } - action_impact_temps_de_mise_en_oeuvre: { - Row: { - niveau: number - nom: string - } - Insert: { - niveau?: number - nom: string - } - Update: { - niveau?: number - nom?: string - } - Relationships: [] - } - action_impact_thematique: { - Row: { - action_impact_id: number - ordre: number - thematique_id: number - } - Insert: { - action_impact_id: number - ordre?: number - thematique_id: number - } - Update: { - action_impact_id?: number - ordre?: number - thematique_id?: number - } - Relationships: [ - { - foreignKeyName: "action_impact_thematique_action_impact_id_fkey" - columns: ["action_impact_id"] - isOneToOne: false - referencedRelation: "action_impact" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_impact_thematique_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "thematique" - referencedColumns: ["id"] - }, - ] - } - action_impact_tier: { - Row: { - niveau: number - nom: string - } - Insert: { - niveau?: number - nom: string - } - Update: { - niveau?: number - nom?: string - } - Relationships: [] - } - action_impact_typologie: { - Row: { - id: number - nom: string - } - Insert: { - id?: number - nom: string - } - Update: { - id?: number - nom?: string - } - Relationships: [] - } - action_relation: { - Row: { - id: string - parent: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - } - Insert: { - id: string - parent?: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - } - Update: { - id?: string - parent?: string | null - referentiel?: Database["public"]["Enums"]["referentiel"] - } - Relationships: [ - { - foreignKeyName: "action_relation_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - ] - } - action_statut: { - Row: { - action_id: string - avancement: Database["public"]["Enums"]["avancement"] - avancement_detaille: number[] | null - collectivite_id: number - concerne: boolean - modified_at: string - modified_by: string - } - Insert: { - action_id: string - avancement: Database["public"]["Enums"]["avancement"] - avancement_detaille?: number[] | null - collectivite_id: number - concerne: boolean - modified_at?: string - modified_by?: string - } - Update: { - action_id?: string - avancement?: Database["public"]["Enums"]["avancement"] - avancement_detaille?: number[] | null - collectivite_id?: number - concerne?: boolean - modified_at?: string - modified_by?: string - } - Relationships: [ - { - foreignKeyName: "action_statut_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_statut_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - annexe: { - Row: { - collectivite_id: number - commentaire: string - fiche_id: number - fichier_id: number | null - id: number - lien: Json | null - modified_at: string - modified_by: string - titre: string - url: string | null - } - Insert: { - collectivite_id: number - commentaire?: string - fiche_id: number - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null - } - Update: { - collectivite_id?: number - commentaire?: string - fiche_id?: number - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null - } - Relationships: [ - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - audit_auditeur: { - Row: { - audit_id: number - auditeur: string - created_at: string | null - } - Insert: { - audit_id: number - auditeur: string - created_at?: string | null - } - Update: { - audit_id?: number - auditeur?: string - created_at?: string | null - } - Relationships: [ - { - foreignKeyName: "audit_auditeur_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "action_audit_state" - referencedColumns: ["audit_id"] - }, - { - foreignKeyName: "audit_auditeur_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_auditeur_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_auditeur_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "audit_en_cours" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_auditeur_audit_id_fkey" - columns: ["audit_id"] - isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["audit_id"] - }, - { - foreignKeyName: "audit_auditeur_auditeur_fkey" - columns: ["auditeur"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - axe: { - Row: { - collectivite_id: number - created_at: string - id: number - modified_at: string - modified_by: string | null - nom: string | null - panier_id: string | null - parent: number | null - plan: number | null - type: number | null - axe_enfant: unknown | null - collectivite_card: unknown | null - plan_action_type: unknown | null - vide: boolean | null - } - Insert: { - collectivite_id: number - created_at?: string - id?: number - modified_at?: string - modified_by?: string | null - nom?: string | null - panier_id?: string | null - parent?: number | null - plan?: number | null - type?: number | null - } - Update: { - collectivite_id?: number - created_at?: string - id?: number - modified_at?: string - modified_by?: string | null - nom?: string | null - panier_id?: string | null - parent?: number | null - plan?: number | null - type?: number | null - } - Relationships: [ - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_panier_id_fkey" - columns: ["panier_id"] - isOneToOne: false - referencedRelation: "panier" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "axe" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "plan_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "plan_action_profondeur" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_plan_fkey" - columns: ["plan"] - isOneToOne: false - referencedRelation: "axe" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_plan_fkey" - columns: ["plan"] - isOneToOne: false - referencedRelation: "plan_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_plan_fkey" - columns: ["plan"] - isOneToOne: false - referencedRelation: "plan_action_profondeur" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_type_fkey" - columns: ["type"] - isOneToOne: false - referencedRelation: "plan_action_type" - referencedColumns: ["id"] - }, - ] - } - banatic_competence: { - Row: { - code: number - nom: string - } - Insert: { - code: number - nom: string - } - Update: { - code?: number - nom?: string - } - Relationships: [] - } - categorie_fnv: { - Row: { - id: number - nom: string - } - Insert: { - id?: number - nom: string - } - Update: { - id?: number - nom?: string - } - Relationships: [] - } - categorie_tag: { - Row: { - collectivite_id: number | null - created_at: string - created_by: string | null - groupement_id: number | null - id: number - nom: string - visible: boolean - } - Insert: { - collectivite_id?: number | null - created_at?: string - created_by?: string | null - groupement_id?: number | null - id?: number - nom: string - visible?: boolean - } - Update: { - collectivite_id?: number | null - created_at?: string - created_by?: string | null - groupement_id?: number | null - id?: number - nom?: string - visible?: boolean - } - Relationships: [ - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "categorie_tag_created_by_fkey" - columns: ["created_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - { - foreignKeyName: "categorie_tag_groupement_id_fkey" - columns: ["groupement_id"] - isOneToOne: false - referencedRelation: "groupement" - referencedColumns: ["id"] - }, - ] - } - client_scores: { - Row: { - collectivite_id: number - modified_at: string - payload_timestamp: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json - } - Insert: { - collectivite_id: number - modified_at: string - payload_timestamp?: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json - } - Update: { - collectivite_id?: number - modified_at?: string - payload_timestamp?: string | null - referentiel?: Database["public"]["Enums"]["referentiel"] - scores?: Json - } - Relationships: [ - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - client_scores_update: { - Row: { - collectivite_id: number - modified_at: string - referentiel: Database["public"]["Enums"]["referentiel"] - } - Insert: { - collectivite_id: number - modified_at: string - referentiel: Database["public"]["Enums"]["referentiel"] - } - Update: { - collectivite_id?: number - modified_at?: string - referentiel?: Database["public"]["Enums"]["referentiel"] - } - Relationships: [ - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "client_scores_update_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - collectivite: { - Row: { - access_restreint: boolean - created_at: string - id: number - modified_at: string - active: boolean | null - collectivite_thematique: unknown | null - collectivite_utilisateur: unknown | null - } - Insert: { - access_restreint?: boolean - created_at?: string - id?: number - modified_at?: string - } - Update: { - access_restreint?: boolean - created_at?: string - id?: number - modified_at?: string - } - Relationships: [] - } - collectivite_banatic_competence: { - Row: { - collectivite_id: number - competence_code: number - } - Insert: { - collectivite_id: number - competence_code: number - } - Update: { - collectivite_id?: number - competence_code?: number - } - Relationships: [ - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_banatic_competence_competence_code_fkey" - columns: ["competence_code"] - isOneToOne: false - referencedRelation: "banatic_competence" - referencedColumns: ["code"] - }, - ] - } - collectivite_bucket: { - Row: { - bucket_id: string - collectivite_id: number - } - Insert: { - bucket_id: string - collectivite_id: number - } - Update: { - bucket_id?: string - collectivite_id?: number - } - Relationships: [ - { - foreignKeyName: "collectivite_bucket_bucket_id_fkey" - columns: ["bucket_id"] - isOneToOne: false - referencedRelation: "buckets" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_bucket_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - collectivite_test: { - Row: { - collectivite_id: number | null - id: number - nom: string - } - Insert: { - collectivite_id?: number | null - id?: number - nom: string - } - Update: { - collectivite_id?: number | null - id?: number - nom?: string - } - Relationships: [ - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "collectivite_test_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - commune: { - Row: { - code: string - collectivite_id: number | null - id: number - nom: string - } - Insert: { - code: string - collectivite_id?: number | null - id?: number - nom: string - } - Update: { - code?: string - collectivite_id?: number | null - id?: number - nom?: string - } - Relationships: [ - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "commune_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - confidentialite_crud: { - Row: { - c: Database["public"]["Enums"]["confidentialite_option_crud"] - d: Database["public"]["Enums"]["confidentialite_option_crud"] - nom_element: string - profil: Database["public"]["Enums"]["confidentialite_profil"] - r: Database["public"]["Enums"]["confidentialite_option_crud"] - type_element: Database["public"]["Enums"]["confidentialite_type_element"] - u: Database["public"]["Enums"]["confidentialite_option_crud"] - } - Insert: { - c: Database["public"]["Enums"]["confidentialite_option_crud"] - d: Database["public"]["Enums"]["confidentialite_option_crud"] - nom_element: string - profil: Database["public"]["Enums"]["confidentialite_profil"] - r: Database["public"]["Enums"]["confidentialite_option_crud"] - type_element: Database["public"]["Enums"]["confidentialite_type_element"] - u: Database["public"]["Enums"]["confidentialite_option_crud"] - } - Update: { - c?: Database["public"]["Enums"]["confidentialite_option_crud"] - d?: Database["public"]["Enums"]["confidentialite_option_crud"] - nom_element?: string - profil?: Database["public"]["Enums"]["confidentialite_profil"] - r?: Database["public"]["Enums"]["confidentialite_option_crud"] - type_element?: Database["public"]["Enums"]["confidentialite_type_element"] - u?: Database["public"]["Enums"]["confidentialite_option_crud"] - } - Relationships: [] - } - cot: { - Row: { - actif: boolean - collectivite_id: number - signataire: number | null - } - Insert: { - actif: boolean - collectivite_id: number - signataire?: number | null - } - Update: { - actif?: boolean - collectivite_id?: number - signataire?: number | null - } - Relationships: [ - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "cot_signataire_fkey" - columns: ["signataire"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - dcp: { - Row: { - cgu_acceptees_le: string | null - created_at: string - deleted: boolean - email: string - limited: boolean - modified_at: string - nom: string - prenom: string - telephone: string | null - user_id: string - } - Insert: { - cgu_acceptees_le?: string | null - created_at?: string - deleted?: boolean - email: string - limited?: boolean - modified_at?: string - nom: string - prenom: string - telephone?: string | null - user_id: string - } - Update: { - cgu_acceptees_le?: string | null - created_at?: string - deleted?: boolean - email?: string - limited?: boolean - modified_at?: string - nom?: string - prenom?: string - telephone?: string | null - user_id?: string - } - Relationships: [ - { - foreignKeyName: "dcp_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - effet_attendu: { - Row: { - id: number - nom: string - notice: string | null - } - Insert: { - id?: number - nom: string - notice?: string | null - } - Update: { - id?: number - nom?: string - notice?: string | null - } - Relationships: [] - } - epci: { - Row: { - collectivite_id: number | null - id: number - nature: Database["public"]["Enums"]["nature"] - nom: string - siren: string - } - Insert: { - collectivite_id?: number | null - id?: number - nature: Database["public"]["Enums"]["nature"] - nom: string - siren: string - } - Update: { - collectivite_id?: number | null - id?: number - nature?: Database["public"]["Enums"]["nature"] - nom?: string - siren?: string - } - Relationships: [ - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "epci_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - fiche_action: { - Row: { - amelioration_continue: boolean | null - budget_previsionnel: number | null - calendrier: string | null - cibles: Database["public"]["Enums"]["fiche_action_cibles"][] | null - collectivite_id: number - created_at: string - date_debut: string | null - date_fin_provisoire: string | null - description: string | null - financements: string | null - id: number - maj_termine: boolean | null - modified_at: string - modified_by: string | null - niveau_priorite: - | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] - | null - notes_complementaires: string | null - objectifs: string | null - piliers_eci: - | Database["public"]["Enums"]["fiche_action_piliers_eci"][] - | null - ressources: string | null - restreint: boolean | null - resultats_attendus: - | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] - | null - statut: Database["public"]["Enums"]["fiche_action_statuts"] | null - titre: string | null - fiche_action_plan: unknown | null - } - Insert: { - amelioration_continue?: boolean | null - budget_previsionnel?: number | null - calendrier?: string | null - cibles?: Database["public"]["Enums"]["fiche_action_cibles"][] | null - collectivite_id: number - created_at?: string - date_debut?: string | null - date_fin_provisoire?: string | null - description?: string | null - financements?: string | null - id?: number - maj_termine?: boolean | null - modified_at?: string - modified_by?: string | null - niveau_priorite?: - | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] - | null - notes_complementaires?: string | null - objectifs?: string | null - piliers_eci?: - | Database["public"]["Enums"]["fiche_action_piliers_eci"][] - | null - ressources?: string | null - restreint?: boolean | null - resultats_attendus?: - | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] - | null - statut?: Database["public"]["Enums"]["fiche_action_statuts"] | null - titre?: string | null - } - Update: { - amelioration_continue?: boolean | null - budget_previsionnel?: number | null - calendrier?: string | null - cibles?: Database["public"]["Enums"]["fiche_action_cibles"][] | null - collectivite_id?: number - created_at?: string - date_debut?: string | null - date_fin_provisoire?: string | null - description?: string | null - financements?: string | null - id?: number - maj_termine?: boolean | null - modified_at?: string - modified_by?: string | null - niveau_priorite?: - | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] - | null - notes_complementaires?: string | null - objectifs?: string | null - piliers_eci?: - | Database["public"]["Enums"]["fiche_action_piliers_eci"][] - | null - ressources?: string | null - restreint?: boolean | null - resultats_attendus?: - | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] - | null - statut?: Database["public"]["Enums"]["fiche_action_statuts"] | null - titre?: string | null - } - Relationships: [ - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "fiche_action_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - fiche_action_action: { - Row: { - action_id: string - fiche_id: number - } - Insert: { - action_id: string - fiche_id: number - } - Update: { - action_id?: string - fiche_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_action_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_action_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - fiche_action_axe: { - Row: { - axe_id: number - fiche_id: number - } - Insert: { - axe_id: number - fiche_id: number - } - Update: { - axe_id?: number - fiche_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_axe_axe_id_fkey" - columns: ["axe_id"] - isOneToOne: false - referencedRelation: "axe" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_axe_id_fkey" - columns: ["axe_id"] - isOneToOne: false - referencedRelation: "plan_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_axe_id_fkey" - columns: ["axe_id"] - isOneToOne: false - referencedRelation: "plan_action_profondeur" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_axe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - fiche_action_effet_attendu: { - Row: { - effet_attendu_id: number - fiche_id: number - } - Insert: { - effet_attendu_id: number - fiche_id: number - } - Update: { - effet_attendu_id?: number - fiche_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_effet_attendu_effet_attendu_id_fkey" - columns: ["effet_attendu_id"] - isOneToOne: false - referencedRelation: "effet_attendu" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - fiche_action_financeur_tag: { - Row: { - fiche_id: number - financeur_tag_id: number - id: number - montant_ttc: number | null - } - Insert: { - fiche_id: number - financeur_tag_id: number - id?: number - montant_ttc?: number | null - } - Update: { - fiche_id?: number - financeur_tag_id?: number - id?: number - montant_ttc?: number | null - } - Relationships: [ - { - foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_financeur_tag_financeur_tag_id_fkey" - columns: ["financeur_tag_id"] - isOneToOne: false - referencedRelation: "financeur_tag" - referencedColumns: ["id"] - }, - ] - } - fiche_action_import_csv: { - Row: { - amelioration_continue: string | null - axe: string | null - budget: string | null - calendrier: string | null - cibles: string | null - collectivite_id: string | null - date_debut: string | null - date_fin: string | null - description: string | null - elu_referent: string | null - financements: string | null - financeur_deux: string | null - financeur_trois: string | null - financeur_un: string | null - montant_deux: string | null - montant_trois: string | null - montant_un: string | null - moyens: string | null - notes: string | null - num_action: string | null - objectifs: string | null - partenaires: string | null - personne_referente: string | null - plan_nom: string | null - priorite: string | null - resultats_attendus: string | null - service: string | null - sous_axe: string | null - sous_sous_axe: string | null - statut: string | null - structure_pilote: string | null - titre: string | null - } - Insert: { - amelioration_continue?: string | null - axe?: string | null - budget?: string | null - calendrier?: string | null - cibles?: string | null - collectivite_id?: string | null - date_debut?: string | null - date_fin?: string | null - description?: string | null - elu_referent?: string | null - financements?: string | null - financeur_deux?: string | null - financeur_trois?: string | null - financeur_un?: string | null - montant_deux?: string | null - montant_trois?: string | null - montant_un?: string | null - moyens?: string | null - notes?: string | null - num_action?: string | null - objectifs?: string | null - partenaires?: string | null - personne_referente?: string | null - plan_nom?: string | null - priorite?: string | null - resultats_attendus?: string | null - service?: string | null - sous_axe?: string | null - sous_sous_axe?: string | null - statut?: string | null - structure_pilote?: string | null - titre?: string | null - } - Update: { - amelioration_continue?: string | null - axe?: string | null - budget?: string | null - calendrier?: string | null - cibles?: string | null - collectivite_id?: string | null - date_debut?: string | null - date_fin?: string | null - description?: string | null - elu_referent?: string | null - financements?: string | null - financeur_deux?: string | null - financeur_trois?: string | null - financeur_un?: string | null - montant_deux?: string | null - montant_trois?: string | null - montant_un?: string | null - moyens?: string | null - notes?: string | null - num_action?: string | null - objectifs?: string | null - partenaires?: string | null - personne_referente?: string | null - plan_nom?: string | null - priorite?: string | null - resultats_attendus?: string | null - service?: string | null - sous_axe?: string | null - sous_sous_axe?: string | null - statut?: string | null - structure_pilote?: string | null - titre?: string | null - } - Relationships: [] - } - fiche_action_indicateur: { - Row: { - fiche_id: number - indicateur_id: number - } - Insert: { - fiche_id: number - indicateur_id: number - } - Update: { - fiche_id?: number - indicateur_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_indicateur_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - fiche_action_lien: { - Row: { - fiche_deux: number - fiche_une: number - } - Insert: { - fiche_deux: number - fiche_une: number - } - Update: { - fiche_deux?: number - fiche_une?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_lien_fiche_deux_fkey" - columns: ["fiche_deux"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_deux_fkey" - columns: ["fiche_deux"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_deux_fkey" - columns: ["fiche_deux"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_deux_fkey" - columns: ["fiche_deux"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_deux_fkey" - columns: ["fiche_deux"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_une_fkey" - columns: ["fiche_une"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_une_fkey" - columns: ["fiche_une"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_une_fkey" - columns: ["fiche_une"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_une_fkey" - columns: ["fiche_une"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_lien_fiche_une_fkey" - columns: ["fiche_une"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - fiche_action_partenaire_tag: { - Row: { - fiche_id: number - partenaire_tag_id: number - } - Insert: { - fiche_id: number - partenaire_tag_id: number - } - Update: { - fiche_id?: number - partenaire_tag_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_partenaire_tag_partenaire_tag_id_fkey" - columns: ["partenaire_tag_id"] - isOneToOne: false - referencedRelation: "partenaire_tag" - referencedColumns: ["id"] - }, - ] - } - fiche_action_pilote: { - Row: { - fiche_id: number - tag_id: number | null - user_id: string | null - } - Insert: { - fiche_id: number - tag_id?: number | null - user_id?: string | null - } - Update: { - fiche_id?: number - tag_id?: number | null - user_id?: string | null - } - Relationships: [ - { - foreignKeyName: "fiche_action_pilote_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_tag_id_fkey" - columns: ["tag_id"] - isOneToOne: false - referencedRelation: "personne_tag" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_pilote_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["user_id"] - }, - { - foreignKeyName: "fiche_action_pilote_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "crm_personnes" - referencedColumns: ["user_id"] - }, - { - foreignKeyName: "fiche_action_pilote_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "dcp" - referencedColumns: ["user_id"] - }, - { - foreignKeyName: "fiche_action_pilote_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "dcp_display" - referencedColumns: ["user_id"] - }, - ] - } - fiche_action_referent: { - Row: { - fiche_id: number - tag_id: number | null - user_id: string | null - } - Insert: { - fiche_id: number - tag_id?: number | null - user_id?: string | null - } - Update: { - fiche_id?: number - tag_id?: number | null - user_id?: string | null - } - Relationships: [ - { - foreignKeyName: "fiche_action_referent_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_tag_id_fkey" - columns: ["tag_id"] - isOneToOne: false - referencedRelation: "personne_tag" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_referent_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - fiche_action_service_tag: { - Row: { - fiche_id: number - service_tag_id: number - } - Insert: { - fiche_id: number - service_tag_id: number - } - Update: { - fiche_id?: number - service_tag_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_service_tag_service_tag_id_fkey" - columns: ["service_tag_id"] - isOneToOne: false - referencedRelation: "service_tag" - referencedColumns: ["id"] - }, - ] - } - fiche_action_sous_thematique: { - Row: { - fiche_id: number - thematique_id: number - } - Insert: { - fiche_id: number - thematique_id: number - } - Update: { - fiche_id?: number - thematique_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_sous_thematique_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "sous_thematique" - referencedColumns: ["id"] - }, - ] - } - fiche_action_structure_tag: { - Row: { - fiche_id: number - structure_tag_id: number - } - Insert: { - fiche_id: number - structure_tag_id: number - } - Update: { - fiche_id?: number - structure_tag_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_structure_tag_structure_tag_id_fkey" - columns: ["structure_tag_id"] - isOneToOne: false - referencedRelation: "structure_tag" - referencedColumns: ["id"] - }, - ] - } - fiche_action_thematique: { - Row: { - fiche_id: number - thematique_id: number - } - Insert: { - fiche_id: number - thematique_id: number - } - Update: { - fiche_id?: number - thematique_id?: number - } - Relationships: [ - { - foreignKeyName: "fiche_action_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "fiche_action_thematique_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] - }, - ] - } - filtre_intervalle: { - Row: { - id: string - intervalle: unknown - libelle: string - type: Database["public"]["Enums"]["collectivite_filtre_type"] - } - Insert: { - id: string - intervalle: unknown - libelle: string - type: Database["public"]["Enums"]["collectivite_filtre_type"] - } - Update: { - id?: string - intervalle?: unknown - libelle?: string - type?: Database["public"]["Enums"]["collectivite_filtre_type"] - } - Relationships: [] - } - financeur_tag: { - Row: { - collectivite_id: number - id: number - nom: string - } - Insert: { - collectivite_id: number - id?: number - nom: string - } - Update: { - collectivite_id?: number - id?: number - nom?: string - } - Relationships: [ - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "financeur_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - groupement: { - Row: { - id: number - nom: string - } - Insert: { - id?: number - nom: string - } - Update: { - id?: number - nom?: string - } - Relationships: [] - } - groupement_collectivite: { - Row: { - collectivite_id: number - groupement_id: number - } - Insert: { - collectivite_id: number - groupement_id: number - } - Update: { - collectivite_id?: number - groupement_id?: number - } - Relationships: [ - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "groupement_collectivite_groupement_id_fkey" - columns: ["groupement_id"] - isOneToOne: false - referencedRelation: "groupement" - referencedColumns: ["id"] - }, - ] - } - indicateur_action: { - Row: { - action_id: string - indicateur_id: number - } - Insert: { - action_id: string - indicateur_id: number - } - Update: { - action_id?: string - indicateur_id?: number - } - Relationships: [ - { - foreignKeyName: "indicateur_action_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_action_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_action_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_action_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - indicateur_artificialisation: { - Row: { - activite: number - collectivite_id: number - ferroviaire: number - habitat: number - inconnue: number - mixte: number - routiere: number - total: number - } - Insert: { - activite: number - collectivite_id: number - ferroviaire: number - habitat: number - inconnue: number - mixte: number - routiere: number - total: number - } - Update: { - activite?: number - collectivite_id?: number - ferroviaire?: number - habitat?: number - inconnue?: number - mixte?: number - routiere?: number - total?: number - } - Relationships: [ - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - ] - } - indicateur_categorie_tag: { - Row: { - categorie_tag_id: number - indicateur_id: number - } - Insert: { - categorie_tag_id: number - indicateur_id: number - } - Update: { - categorie_tag_id?: number - indicateur_id?: number - } - Relationships: [ - { - foreignKeyName: "indicateur_categorie_tag_categorie_tag_id_fkey" - columns: ["categorie_tag_id"] - isOneToOne: false - referencedRelation: "categorie_tag" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_categorie_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_categorie_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_categorie_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - indicateur_collectivite: { - Row: { - collectivite_id: number - commentaire: string | null - confidentiel: boolean - favoris: boolean - indicateur_id: number - } - Insert: { - collectivite_id: number - commentaire?: string | null - confidentiel?: boolean - favoris?: boolean - indicateur_id: number - } - Update: { - collectivite_id?: number - commentaire?: string | null - confidentiel?: boolean - favoris?: boolean - indicateur_id?: number - } - Relationships: [ - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_collectivite_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_collectivite_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_collectivite_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - indicateur_definition: { - Row: { - borne_max: number | null - borne_min: number | null - collectivite_id: number | null - created_at: string - created_by: string | null - description: string | null - groupement_id: number | null - id: number - identifiant_referentiel: string | null - modified_at: string - modified_by: string | null - participation_score: boolean - sans_valeur_utilisateur: boolean - titre: string - titre_long: string | null - unite: string - valeur_calcule: string | null - indicateur_enfants: unknown | null - indicateur_parents: unknown | null - } - Insert: { - borne_max?: number | null - borne_min?: number | null - collectivite_id?: number | null - created_at?: string - created_by?: string | null - description?: string | null - groupement_id?: number | null - id?: number - identifiant_referentiel?: string | null - modified_at?: string - modified_by?: string | null - participation_score?: boolean - sans_valeur_utilisateur?: boolean - titre: string - titre_long?: string | null - unite: string - valeur_calcule?: string | null - } - Update: { - borne_max?: number | null - borne_min?: number | null - collectivite_id?: number | null - created_at?: string - created_by?: string | null - description?: string | null - groupement_id?: number | null - id?: number - identifiant_referentiel?: string | null - modified_at?: string - modified_by?: string | null - participation_score?: boolean - sans_valeur_utilisateur?: boolean - titre?: string - titre_long?: string | null - unite?: string - valeur_calcule?: string | null - } - Relationships: [ - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_definition_created_by_fkey" - columns: ["created_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_definition_groupement_id_fkey" - columns: ["groupement_id"] - isOneToOne: false - referencedRelation: "groupement" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_definition_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - indicateur_groupe: { - Row: { - enfant: number - parent: number - } - Insert: { - enfant: number - parent: number - } - Update: { - enfant?: number - parent?: number - } - Relationships: [ - { - foreignKeyName: "indicateur_groupe_enfant_fkey" - columns: ["enfant"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_groupe_enfant_fkey" - columns: ["enfant"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_groupe_enfant_fkey" - columns: ["enfant"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_groupe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_groupe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_groupe_parent_fkey" - columns: ["parent"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - ] - } - indicateur_pilote: { - Row: { - collectivite_id: number - id: number - indicateur_id: number - tag_id: number | null - user_id: string | null - indicateur_pilote_user: unknown | null - } - Insert: { - collectivite_id: number - id?: number - indicateur_id: number - tag_id?: number | null - user_id?: string | null - } - Update: { - collectivite_id?: number - id?: number - indicateur_id?: number - tag_id?: number | null - user_id?: string | null - } - Relationships: [ - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_pilote_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_tag_id_fkey" - columns: ["tag_id"] - isOneToOne: false - referencedRelation: "personne_tag" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_pilote_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] + referencedRelation: "bibliotheque_fichier_snippet" + referencedColumns: ["id"] }, ] } - indicateur_service_tag: { + } + Views: { + action_snippet: { + Row: { + action_id: string | null + collectivite_id: number | null + snippet: Json | null + } + Relationships: [] + } + bibliotheque_fichier_snippet: { + Row: { + id: number | null + snippet: Json | null + } + Relationships: [] + } + export_score_audit: { + Row: { + collectivite: string | null + cot: boolean | null + date_cloture_cae: string | null + date_cloture_eci: string | null + points_cae: number | null + points_eci: number | null + programme_cae: number | null + programme_eci: number | null + realise_cae: number | null + realise_eci: number | null + region: string | null + signataire: string | null + } + Relationships: [] + } + } + Functions: { + active_audit: { + Args: { + collectivite_id: number + referentiel: Database["public"]["Enums"]["referentiel"] + } + Returns: { + clos: boolean + collectivite_id: number + date_cnl: string | null + date_debut: string | null + date_fin: string | null + demande_id: number | null + id: number + referentiel: Database["public"]["Enums"]["referentiel"] + valide: boolean + valide_labellisation: boolean | null + } + } + audit_evaluation_payload: { + Args: { + audit: unknown + pre_audit: boolean + labellisation: boolean + } + Returns: Record + } + audit_personnalisation_payload: { + Args: { + audit_id: number + pre_audit: boolean + scores_table: string + } + Returns: Json + } + critere_action: { + Args: { + collectivite_id: number + } + Returns: { + referentiel: Database["public"]["Enums"]["referentiel"] + etoiles: Database["labellisation"]["Enums"]["etoile"] + action_id: unknown + formulation: string + score_realise: number + min_score_realise: number + score_programme: number + min_score_programme: number + atteint: boolean + prio: number + }[] + } + critere_fichier: { + Args: { + collectivite_id: number + } + Returns: { + referentiel: Database["public"]["Enums"]["referentiel"] + preuve_nombre: number + atteint: boolean + }[] + } + critere_score_global: { + Args: { + collectivite_id: number + } + Returns: { + referentiel: Database["public"]["Enums"]["referentiel"] + etoile_objectif: Database["labellisation"]["Enums"]["etoile"] + score_a_realiser: number + score_fait: number + atteint: boolean + }[] + } + current_audit: { + Args: { + col: number + ref: Database["public"]["Enums"]["referentiel"] + } + Returns: { + clos: boolean + collectivite_id: number + date_cnl: string | null + date_debut: string | null + date_fin: string | null + demande_id: number | null + id: number + referentiel: Database["public"]["Enums"]["referentiel"] + valide: boolean + valide_labellisation: boolean | null + } + } + etoiles: { + Args: { + collectivite_id: number + } + Returns: { + referentiel: Database["public"]["Enums"]["referentiel"] + etoile_labellise: Database["labellisation"]["Enums"]["etoile"] + prochaine_etoile_labellisation: Database["labellisation"]["Enums"]["etoile"] + etoile_score_possible: Database["labellisation"]["Enums"]["etoile"] + etoile_objectif: Database["labellisation"]["Enums"]["etoile"] + }[] + } + evaluate_audit_statuts: { + Args: { + audit_id: number + pre_audit: boolean + scores_table: string + } + Returns: number + } + json_action_statuts_at: { + Args: { + collectivite_id: number + referentiel: Database["public"]["Enums"]["referentiel"] + date_at: string + } + Returns: Json + } + json_reponses_at: { + Args: { + collectivite_id: number + date_at: string + } + Returns: Json + } + referentiel_score: { + Args: { + collectivite_id: number + } + Returns: { + referentiel: Database["public"]["Enums"]["referentiel"] + score_fait: number + score_programme: number + completude: number + complet: boolean + }[] + } + upsert_preuves_reglementaire: { + Args: { + preuves: Json + } + Returns: undefined + } + } + Enums: { + etoile: "1" | "2" | "3" | "4" | "5" + sujet_demande: "labellisation" | "labellisation_cot" | "cot" + } + CompositeTypes: { + [_ in never]: never + } + } + public: { + Tables: { + abstract_any_indicateur_value: { + Row: { + annee: number + modified_at: string + valeur: number | null + } + Insert: { + annee: number + modified_at?: string + valeur?: number | null + } + Update: { + annee?: number + modified_at?: string + valeur?: number | null + } + Relationships: [] + } + abstract_modified_at: { + Row: { + modified_at: string + } + Insert: { + modified_at?: string + } + Update: { + modified_at?: string + } + Relationships: [] + } + action_commentaire: { Row: { + action_id: string collectivite_id: number - indicateur_id: number - service_tag_id: number + commentaire: string + modified_at: string + modified_by: string } Insert: { + action_id: string collectivite_id: number - indicateur_id: number - service_tag_id: number + commentaire: string + modified_at?: string + modified_by?: string } Update: { + action_id?: string collectivite_id?: number - indicateur_id?: number - service_tag_id?: number + commentaire?: string + modified_at?: string + modified_by?: string } Relationships: [ { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_commentaire_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" + foreignKeyName: "action_commentaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "indicateur_service_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_service_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_service_tag_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_service_tag_service_tag_id_fkey" - columns: ["service_tag_id"] - isOneToOne: false - referencedRelation: "service_tag" - referencedColumns: ["id"] - }, ] } - indicateur_source: { - Row: { - id: string - libelle: string - ordre_affichage: number | null - } - Insert: { - id: string - libelle: string - ordre_affichage?: number | null - } - Update: { - id?: string - libelle?: string - ordre_affichage?: number | null - } - Relationships: [] - } - indicateur_source_metadonnee: { + action_computed_points: { Row: { - date_version: string - diffuseur: string | null - id: number - limites: string | null - methodologie: string | null - nom_donnees: string | null - producteur: string | null - source_id: string + action_id: string + modified_at: string + value: number } Insert: { - date_version: string - diffuseur?: string | null - id?: number - limites?: string | null - methodologie?: string | null - nom_donnees?: string | null - producteur?: string | null - source_id: string + action_id: string + modified_at?: string + value: number } Update: { - date_version?: string - diffuseur?: string | null - id?: number - limites?: string | null - methodologie?: string | null - nom_donnees?: string | null - producteur?: string | null - source_id?: string + action_id?: string + modified_at?: string + value?: number } Relationships: [ { - foreignKeyName: "indicateur_source_metadonnee_source_id_fkey" - columns: ["source_id"] - isOneToOne: false - referencedRelation: "indicateur_source" + foreignKeyName: "action_computed_points_action_id_fkey" + columns: ["action_id"] + isOneToOne: true + referencedRelation: "action_relation" referencedColumns: ["id"] }, ] } - indicateur_sous_thematique: { + action_definition: { Row: { - indicateur_id: number - sous_thematique_id: number + action_id: string + categorie: Database["public"]["Enums"]["action_categorie"] | null + contexte: string + description: string + exemples: string + identifiant: string + modified_at: string + nom: string + perimetre_evaluation: string + points: number | null + pourcentage: number | null + preuve: string | null + reduction_potentiel: string + referentiel: Database["public"]["Enums"]["referentiel"] + referentiel_id: string + referentiel_version: string + ressources: string } Insert: { - indicateur_id: number - sous_thematique_id: number + action_id: string + categorie?: Database["public"]["Enums"]["action_categorie"] | null + contexte: string + description: string + exemples: string + identifiant: string + modified_at?: string + nom: string + perimetre_evaluation: string + points?: number | null + pourcentage?: number | null + preuve?: string | null + reduction_potentiel: string + referentiel: Database["public"]["Enums"]["referentiel"] + referentiel_id: string + referentiel_version: string + ressources: string } Update: { - indicateur_id?: number - sous_thematique_id?: number + action_id?: string + categorie?: Database["public"]["Enums"]["action_categorie"] | null + contexte?: string + description?: string + exemples?: string + identifiant?: string + modified_at?: string + nom?: string + perimetre_evaluation?: string + points?: number | null + pourcentage?: number | null + preuve?: string | null + reduction_potentiel?: string + referentiel?: Database["public"]["Enums"]["referentiel"] + referentiel_id?: string + referentiel_version?: string + ressources?: string } Relationships: [ { - foreignKeyName: "indicateur_sous_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_sous_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_sous_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "indicateur_definition" + foreignKeyName: "action_definition_action_id_fkey" + columns: ["action_id"] + isOneToOne: true + referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_sous_thematique_sous_thematique_id_fkey" - columns: ["sous_thematique_id"] + foreignKeyName: "referentiel_id_fkey" + columns: ["referentiel_id"] isOneToOne: false - referencedRelation: "sous_thematique" + referencedRelation: "referentiel_definition" referencedColumns: ["id"] }, ] } - indicateur_thematique: { + action_definition_tag: { Row: { - indicateur_id: number - thematique_id: number + action_id: string + referentiel_id: string + tag_ref: string } Insert: { - indicateur_id: number - thematique_id: number + action_id: string + referentiel_id: string + tag_ref: string } Update: { - indicateur_id?: number - thematique_id?: number + action_id?: string + referentiel_id?: string + tag_ref?: string } Relationships: [ { - foreignKeyName: "indicateur_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] - isOneToOne: false - referencedRelation: "crm_indicateurs" - referencedColumns: ["id"] - }, - { - foreignKeyName: "indicateur_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] + foreignKeyName: "action_definition_tag_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "crm_indicateurs" + referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_thematique_indicateur_id_fkey" - columns: ["indicateur_id"] + foreignKeyName: "action_definition_tag_referentiel_id_fkey" + columns: ["referentiel_id"] isOneToOne: false - referencedRelation: "indicateur_definition" + referencedRelation: "referentiel_definition" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_thematique_thematique_id_fkey" - columns: ["thematique_id"] + foreignKeyName: "action_definition_tag_tag_ref_fkey" + columns: ["tag_ref"] isOneToOne: false - referencedRelation: "thematique" - referencedColumns: ["id"] + referencedRelation: "referentiel_tag" + referencedColumns: ["ref"] }, ] } - indicateur_valeur: { + action_discussion: { Row: { + action_id: string collectivite_id: number created_at: string - created_by: string | null - date_valeur: string - estimation: number | null + created_by: string id: number - indicateur_id: number - metadonnee_id: number | null modified_at: string - modified_by: string | null - objectif: number | null - objectif_commentaire: string | null - resultat: number | null - resultat_commentaire: string | null + status: Database["public"]["Enums"]["action_discussion_statut"] } Insert: { + action_id: string collectivite_id: number created_at?: string - created_by?: string | null - date_valeur: string - estimation?: number | null + created_by?: string id?: number - indicateur_id: number - metadonnee_id?: number | null modified_at?: string - modified_by?: string | null - objectif?: number | null - objectif_commentaire?: string | null - resultat?: number | null - resultat_commentaire?: string | null + status?: Database["public"]["Enums"]["action_discussion_statut"] } Update: { + action_id?: string collectivite_id?: number created_at?: string - created_by?: string | null - date_valeur?: string - estimation?: number | null + created_by?: string id?: number - indicateur_id?: number - metadonnee_id?: number | null modified_at?: string - modified_by?: string | null - objectif?: number | null - objectif_commentaire?: string | null - resultat?: number | null - resultat_commentaire?: string | null + status?: Database["public"]["Enums"]["action_discussion_statut"] } Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_discussion_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "action_discussion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + action_discussion_commentaire: { + Row: { + created_at: string + created_by: string + discussion_id: number + id: number + message: string + } + Insert: { + created_at?: string + created_by?: string + discussion_id: number + id?: number + message: string + } + Update: { + created_at?: string + created_by?: string + discussion_id?: number + id?: number + message?: string + } + Relationships: [ + { + foreignKeyName: "action_discussion_commentaire_discussion_id_fkey" + columns: ["discussion_id"] + isOneToOne: false + referencedRelation: "action_discussion" + referencedColumns: ["id"] + }, + { + foreignKeyName: "action_discussion_commentaire_discussion_id_fkey" + columns: ["discussion_id"] + isOneToOne: false + referencedRelation: "action_discussion_feed" + referencedColumns: ["id"] + }, + ] + } + action_impact: { + Row: { + action_continue: boolean + competences_communales: boolean + description: string + description_complementaire: string + fourchette_budgetaire: number + id: number + impact_tier: number + independamment_competences: boolean + nb_collectivite_en_cours: number + nb_collectivite_realise: number + ressources_externes: Json | null + rex: Json | null + subventions_mobilisables: Json | null + temps_de_mise_en_oeuvre: number + titre: string + typologie_id: number | null + } + Insert: { + action_continue?: boolean + competences_communales?: boolean + description: string + description_complementaire?: string + fourchette_budgetaire?: number + id?: number + impact_tier?: number + independamment_competences?: boolean + nb_collectivite_en_cours?: number + nb_collectivite_realise?: number + ressources_externes?: Json | null + rex?: Json | null + subventions_mobilisables?: Json | null + temps_de_mise_en_oeuvre?: number + titre: string + typologie_id?: number | null + } + Update: { + action_continue?: boolean + competences_communales?: boolean + description?: string + description_complementaire?: string + fourchette_budgetaire?: number + id?: number + impact_tier?: number + independamment_competences?: boolean + nb_collectivite_en_cours?: number + nb_collectivite_realise?: number + ressources_externes?: Json | null + rex?: Json | null + subventions_mobilisables?: Json | null + temps_de_mise_en_oeuvre?: number + titre?: string + typologie_id?: number | null + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_fourchette_budgetaire_fkey" + columns: ["fourchette_budgetaire"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact_fourchette_budgetaire" + referencedColumns: ["niveau"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_impact_tier_fkey" + columns: ["impact_tier"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact_tier" + referencedColumns: ["niveau"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_temps_de_mise_en_oeuvre_fkey" + columns: ["temps_de_mise_en_oeuvre"] isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact_temps_de_mise_en_oeuvre" + referencedColumns: ["niveau"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_typologie_id_fkey" + columns: ["typologie_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact_typologie" + referencedColumns: ["id"] }, + ] + } + action_impact_action: { + Row: { + action_id: string + action_impact_id: number + } + Insert: { + action_id: string + action_impact_id: number + } + Update: { + action_id?: string + action_impact_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_action_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_definition" + referencedColumns: ["action_id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_action_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, + ] + } + action_impact_banatic_competence: { + Row: { + action_impact_id: number + competence_code: number + } + Insert: { + action_impact_id: number + competence_code: number + } + Update: { + action_impact_id?: number + competence_code?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_banatic_competence_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_banatic_competence_competence_code_fkey" + columns: ["competence_code"] isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] + referencedRelation: "banatic_competence" + referencedColumns: ["code"] }, + ] + } + action_impact_categorie: { + Row: { + id: string + nom: string + } + Insert: { + id: string + nom: string + } + Update: { + id?: string + nom?: string + } + Relationships: [] + } + action_impact_categorie_fnv: { + Row: { + action_impact_id: number + categorie_fnv_id: number + } + Insert: { + action_impact_id: number + categorie_fnv_id: number + } + Update: { + action_impact_id?: number + categorie_fnv_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_categorie_fnv_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_categorie_fnv_categorie_fnv_id_fkey" + columns: ["categorie_fnv_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] + referencedRelation: "categorie_fnv" + referencedColumns: ["id"] }, + ] + } + action_impact_complexite: { + Row: { + niveau: number + nom: string + } + Insert: { + niveau?: number + nom: string + } + Update: { + niveau?: number + nom?: string + } + Relationships: [] + } + action_impact_effet_attendu: { + Row: { + action_impact_id: number + effet_attendu_id: number + } + Insert: { + action_impact_id: number + effet_attendu_id: number + } + Update: { + action_impact_id?: number + effet_attendu_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_effet_attendu_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_effet_attendu_effet_attendu_id_fkey" + columns: ["effet_attendu_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "effet_attendu" + referencedColumns: ["id"] }, + ] + } + action_impact_fiche_action: { + Row: { + action_impact_id: number + fiche_id: number + } + Insert: { + action_impact_id: number + fiche_id: number + } + Update: { + action_impact_id?: number + fiche_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_fiche_action_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_fiche_action_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, + ] + } + action_impact_fourchette_budgetaire: { + Row: { + niveau: number + nom: string + } + Insert: { + niveau?: number + nom: string + } + Update: { + niveau?: number + nom?: string + } + Relationships: [] + } + action_impact_indicateur: { + Row: { + action_impact_id: number + indicateur_id: number + } + Insert: { + action_impact_id: number + indicateur_id: number + } + Update: { + action_impact_id?: number + indicateur_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_indicateur_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_indicateur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_indicateur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, + ] + } + action_impact_panier: { + Row: { + action_id: number + panier_id: string + } + Insert: { + action_id: number + panier_id: string + } + Update: { + action_id?: number + panier_id?: string + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_panier_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_panier_panier_id_fkey" + columns: ["panier_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "panier" + referencedColumns: ["id"] }, + ] + } + action_impact_partenaire: { + Row: { + action_impact_id: number + partenaire_id: number + } + Insert: { + action_impact_id: number + partenaire_id: number + } + Update: { + action_impact_id?: number + partenaire_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_partenaire_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_partenaire_partenaire_id_fkey" + columns: ["partenaire_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "panier_partenaire" + referencedColumns: ["id"] }, + ] + } + action_impact_sous_thematique: { + Row: { + action_impact_id: number + sous_thematique_id: number + } + Insert: { + action_impact_id: number + sous_thematique_id: number + } + Update: { + action_impact_id?: number + sous_thematique_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_impact_sous_thematique_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_impact" + referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_created_by_fkey" - columns: ["created_by"] + foreignKeyName: "action_impact_sous_thematique_sous_thematique_id_fkey" + columns: ["sous_thematique_id"] isOneToOne: false - referencedRelation: "users" + referencedRelation: "sous_thematique" referencedColumns: ["id"] }, + ] + } + action_impact_state: { + Row: { + action: Database["public"]["Tables"]["action_impact"]["Row"] | null + isinpanier: boolean | null + panier: Database["public"]["Tables"]["panier"]["Row"] | null + statut: + | Database["public"]["Tables"]["action_impact_statut"]["Row"] + | null + action_definition: unknown | null + action_impact_fourchette_budgetaire: unknown | null + action_impact_temps_de_mise_en_oeuvre: unknown | null + action_impact_thematique: unknown | null + action_impact_typologie: unknown | null + matches_competences: boolean | null + thematique: unknown | null + } + Insert: { + action?: Database["public"]["Tables"]["action_impact"]["Row"] | null + isinpanier?: boolean | null + panier?: Database["public"]["Tables"]["panier"]["Row"] | null + statut?: + | Database["public"]["Tables"]["action_impact_statut"]["Row"] + | null + } + Update: { + action?: Database["public"]["Tables"]["action_impact"]["Row"] | null + isinpanier?: boolean | null + panier?: Database["public"]["Tables"]["panier"]["Row"] | null + statut?: + | Database["public"]["Tables"]["action_impact_statut"]["Row"] + | null + } + Relationships: [] + } + action_impact_statut: { + Row: { + action_id: number + categorie_id: string + panier_id: string + } + Insert: { + action_id: number + categorie_id: string + panier_id: string + } + Update: { + action_id?: number + categorie_id?: string + panier_id?: string + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_indicateur_id_fkey" - columns: ["indicateur_id"] + foreignKeyName: "action_impact_statut_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "crm_indicateurs" + referencedRelation: "action_impact" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_indicateur_id_fkey" - columns: ["indicateur_id"] + foreignKeyName: "action_impact_statut_categorie_id_fkey" + columns: ["categorie_id"] isOneToOne: false - referencedRelation: "crm_indicateurs" + referencedRelation: "action_impact_categorie" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_indicateur_id_fkey" - columns: ["indicateur_id"] + foreignKeyName: "action_impact_statut_panier_id_fkey" + columns: ["panier_id"] isOneToOne: false - referencedRelation: "indicateur_definition" + referencedRelation: "panier" referencedColumns: ["id"] }, + ] + } + action_impact_temps_de_mise_en_oeuvre: { + Row: { + niveau: number + nom: string + } + Insert: { + niveau?: number + nom: string + } + Update: { + niveau?: number + nom?: string + } + Relationships: [] + } + action_impact_thematique: { + Row: { + action_impact_id: number + ordre: number + thematique_id: number + } + Insert: { + action_impact_id: number + ordre?: number + thematique_id: number + } + Update: { + action_impact_id?: number + ordre?: number + thematique_id?: number + } + Relationships: [ { - foreignKeyName: "indicateur_valeur_metadonnee_id_fkey" - columns: ["metadonnee_id"] + foreignKeyName: "action_impact_thematique_action_impact_id_fkey" + columns: ["action_impact_id"] isOneToOne: false - referencedRelation: "indicateur_source_metadonnee" + referencedRelation: "action_impact" referencedColumns: ["id"] }, { - foreignKeyName: "indicateur_valeur_modified_by_fkey" - columns: ["modified_by"] + foreignKeyName: "action_impact_thematique_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "users" + referencedRelation: "thematique" referencedColumns: ["id"] }, ] } - indicateurs_json: { + action_impact_tier: { + Row: { + niveau: number + nom: string + } + Insert: { + niveau?: number + nom: string + } + Update: { + niveau?: number + nom?: string + } + Relationships: [] + } + action_impact_typologie: { Row: { - created_at: string - indicateurs: Json + id: number + nom: string } Insert: { - created_at?: string - indicateurs: Json + id?: number + nom: string } Update: { - created_at?: string - indicateurs?: Json + id?: number + nom?: string } Relationships: [] } - justification: { + action_origine: { Row: { - collectivite_id: number - modified_at: string - modified_by: string - question_id: string - texte: string + action_id: string + origine_action_id: string + origine_referentiel_id: string + ponderation: number + referentiel_id: string } Insert: { - collectivite_id: number - modified_at: string - modified_by?: string - question_id: string - texte: string + action_id: string + origine_action_id: string + origine_referentiel_id: string + ponderation?: number + referentiel_id: string } Update: { - collectivite_id?: number - modified_at?: string - modified_by?: string - question_id?: string - texte?: string + action_id?: string + origine_action_id?: string + origine_referentiel_id?: string + ponderation?: number + referentiel_id?: string } Relationships: [ { - foreignKeyName: "justification_modified_by_fkey" - columns: ["modified_by"] + foreignKeyName: "action_origine_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "users" + referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "justification_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "action_origine_origine_action_id_fkey" + columns: ["origine_action_id"] isOneToOne: false - referencedRelation: "question" + referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "justification_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "action_origine_origine_referentiel_id_fkey" + columns: ["origine_referentiel_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "referentiel_definition" referencedColumns: ["id"] }, { - foreignKeyName: "justification_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "action_origine_referentiel_id_fkey" + columns: ["referentiel_id"] isOneToOne: false - referencedRelation: "report_question" + referencedRelation: "referentiel_definition" referencedColumns: ["id"] }, ] } - justification_ajustement: { + action_relation: { + Row: { + id: string + parent: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + } + Insert: { + id: string + parent?: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + } + Update: { + id?: string + parent?: string | null + referentiel?: Database["public"]["Enums"]["referentiel"] + } + Relationships: [ + { + foreignKeyName: "action_relation_parent_fkey" + columns: ["parent"] + isOneToOne: false + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + ] + } + action_statut: { Row: { action_id: string + avancement: Database["public"]["Enums"]["avancement"] + avancement_detaille: number[] | null collectivite_id: number + concerne: boolean modified_at: string modified_by: string - texte: string } Insert: { action_id: string + avancement: Database["public"]["Enums"]["avancement"] + avancement_detaille?: number[] | null collectivite_id: number - modified_at: string + concerne: boolean + modified_at?: string modified_by?: string - texte: string } Update: { action_id?: string + avancement?: Database["public"]["Enums"]["avancement"] + avancement_detaille?: number[] | null collectivite_id?: number + concerne?: boolean modified_at?: string modified_by?: string - texte?: string } Relationships: [ { - foreignKeyName: "justification_ajustement_action_id_fkey" + foreignKeyName: "action_statut_action_id_fkey" columns: ["action_id"] isOneToOne: false referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "justification_ajustement_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "justification_ajustement_modified_by_fkey" - columns: ["modified_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, ] } - labellisation: { + annexe: { Row: { - annee: number | null - collectivite_id: number | null - etoiles: number + collectivite_id: number + commentaire: string + fiche_id: number + fichier_id: number | null id: number - obtenue_le: string - referentiel: Database["public"]["Enums"]["referentiel"] - score_programme: number | null - score_realise: number | null + lien: Json | null + modified_at: string + modified_by: string + titre: string + url: string | null } Insert: { - annee?: number | null - collectivite_id?: number | null - etoiles: number + collectivite_id: number + commentaire?: string + fiche_id: number + fichier_id?: number | null id?: number - obtenue_le: string - referentiel: Database["public"]["Enums"]["referentiel"] - score_programme?: number | null - score_realise?: number | null + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Update: { - annee?: number | null - collectivite_id?: number | null - etoiles?: number + collectivite_id?: number + commentaire?: string + fiche_id?: number + fichier_id?: number | null id?: number - obtenue_le?: string - referentiel?: Database["public"]["Enums"]["referentiel"] - score_programme?: number | null - score_realise?: number | null + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Relationships: [ { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "fiche_action" referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_identite" + referencedRelation: "fiches_action" referencedColumns: ["id"] }, + ] + } + audit_auditeur: { + Row: { + audit_id: number + auditeur: string + created_at: string | null + } + Insert: { + audit_id: number + auditeur: string + created_at?: string | null + } + Update: { + audit_id?: number + auditeur?: string + created_at?: string | null + } + Relationships: [ { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_auditeur_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_audit_state" + referencedColumns: ["audit_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_auditeur_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_auditeur_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit_en_cours" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_auditeur_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "retool_audit" + referencedColumns: ["audit_id"] }, + ] + } + axe: { + Row: { + collectivite_id: number + created_at: string + id: number + modified_at: string + modified_by: string | null + nom: string | null + panier_id: string | null + parent: number | null + plan: number | null + type: number | null + axe_enfant: unknown | null + collectivite_card: unknown | null + plan_action_type: unknown | null + vide: boolean | null + } + Insert: { + collectivite_id: number + created_at?: string + id?: number + modified_at?: string + modified_by?: string | null + nom?: string | null + panier_id?: string | null + parent?: number | null + plan?: number | null + type?: number | null + } + Update: { + collectivite_id?: number + created_at?: string + id?: number + modified_at?: string + modified_by?: string | null + nom?: string | null + panier_id?: string | null + parent?: number | null + plan?: number | null + type?: number | null + } + Relationships: [ { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_panier_id_fkey" + columns: ["panier_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "panier" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_parent_fkey" + columns: ["parent"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "axe" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_parent_fkey" + columns: ["parent"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "plan_action" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_parent_fkey" + columns: ["parent"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "plan_action_profondeur" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_plan_fkey" + columns: ["plan"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "axe" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_plan_fkey" + columns: ["plan"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "plan_action" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "axe_plan_fkey" + columns: ["plan"] isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "plan_action_profondeur" + referencedColumns: ["id"] }, - ] - } - labellisation_action_critere: { - Row: { - action_id: string - etoile: Database["labellisation"]["Enums"]["etoile"] - formulation: string - min_programme_percentage: number | null - min_programme_score: number | null - min_realise_percentage: number | null - min_realise_score: number | null - prio: number - referentiel: Database["public"]["Enums"]["referentiel"] - } - Insert: { - action_id: string - etoile: Database["labellisation"]["Enums"]["etoile"] - formulation: string - min_programme_percentage?: number | null - min_programme_score?: number | null - min_realise_percentage?: number | null - min_realise_score?: number | null - prio: number - referentiel: Database["public"]["Enums"]["referentiel"] - } - Update: { - action_id?: string - etoile?: Database["labellisation"]["Enums"]["etoile"] - formulation?: string - min_programme_percentage?: number | null - min_programme_score?: number | null - min_realise_percentage?: number | null - min_realise_score?: number | null - prio?: number - referentiel?: Database["public"]["Enums"]["referentiel"] - } - Relationships: [ { - foreignKeyName: "labellisation_action_critere_action_id_fkey" - columns: ["action_id"] + foreignKeyName: "axe_type_fkey" + columns: ["type"] isOneToOne: false - referencedRelation: "action_relation" + referencedRelation: "plan_action_type" referencedColumns: ["id"] }, ] } - labellisation_calendrier: { - Row: { - information: string - referentiel: Database["public"]["Enums"]["referentiel"] - } - Insert: { - information: string - referentiel: Database["public"]["Enums"]["referentiel"] - } - Update: { - information?: string - referentiel?: Database["public"]["Enums"]["referentiel"] - } - Relationships: [] - } - labellisation_fichier_critere: { + banatic_competence: { Row: { - description: string - etoile: Database["labellisation"]["Enums"]["etoile"] - referentiel: Database["public"]["Enums"]["referentiel"] + code: number + nom: string } Insert: { - description: string - etoile: Database["labellisation"]["Enums"]["etoile"] - referentiel: Database["public"]["Enums"]["referentiel"] + code: number + nom: string } Update: { - description?: string - etoile?: Database["labellisation"]["Enums"]["etoile"] - referentiel?: Database["public"]["Enums"]["referentiel"] + code?: number + nom?: string } Relationships: [] } - maintenance: { + categorie_fnv: { Row: { - begins_at: string - ends_at: string id: number + nom: string } Insert: { - begins_at: string - ends_at: string id?: number + nom: string } Update: { - begins_at?: string - ends_at?: string id?: number + nom?: string } Relationships: [] } - panier: { + categorie_tag: { Row: { collectivite_id: number | null - collectivite_preset: number | null - created_at: string - created_by: string | null - id: string - latest_update: string - private: boolean | null - action_impact_state: unknown | null + created_at: string + created_by: string | null + groupement_id: number | null + id: number + nom: string + visible: boolean } Insert: { collectivite_id?: number | null - collectivite_preset?: number | null created_at?: string created_by?: string | null - id?: string - latest_update?: string - private?: boolean | null + groupement_id?: number | null + id?: number + nom: string + visible?: boolean } Update: { collectivite_id?: number | null - collectivite_preset?: number | null created_at?: string created_by?: string | null - id?: string - latest_update?: string - private?: boolean | null + groupement_id?: number | null + id?: number + nom?: string + visible?: boolean } Relationships: [ { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_id_fkey" + foreignKeyName: "categorie_tag_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "categorie_tag_groupement_id_fkey" + columns: ["groupement_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "groupement" + referencedColumns: ["id"] }, + ] + } + client_scores: { + Row: { + collectivite_id: number + modified_at: string + payload_timestamp: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json + } + Insert: { + collectivite_id: number + modified_at: string + payload_timestamp?: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json + } + Update: { + collectivite_id?: number + modified_at?: string + payload_timestamp?: string | null + referentiel?: Database["public"]["Enums"]["referentiel"] + scores?: Json + } + Relationships: [ { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + client_scores_update: { + Row: { + collectivite_id: number + modified_at: string + referentiel: Database["public"]["Enums"]["referentiel"] + } + Insert: { + collectivite_id: number + modified_at: string + referentiel: Database["public"]["Enums"]["referentiel"] + } + Update: { + collectivite_id?: number + modified_at?: string + referentiel?: Database["public"]["Enums"]["referentiel"] + } + Relationships: [ { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "panier_collectivite_preset_fkey" - columns: ["collectivite_preset"] + foreignKeyName: "client_scores_update_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "panier_created_by_fkey" - columns: ["created_by"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, ] } - panier_partenaire: { + collectivite: { Row: { + access_restreint: boolean + created_at: string id: number - nom: string | null + modified_at: string + active: boolean | null + collectivite_thematique: unknown | null + collectivite_utilisateur: unknown | null } Insert: { + access_restreint?: boolean + created_at?: string id?: number - nom?: string | null + modified_at?: string } Update: { + access_restreint?: boolean + created_at?: string id?: number - nom?: string | null + modified_at?: string } Relationships: [] } - partenaire_tag: { + collectivite_banatic_competence: { Row: { collectivite_id: number - id: number - nom: string + competence_code: number } Insert: { collectivite_id: number - id?: number - nom: string + competence_code: number } Update: { collectivite_id?: number - id?: number - nom?: string + competence_code?: number } Relationships: [ { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "stats_active_real_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_banatic_competence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_banatic_competence_competence_code_fkey" + columns: ["competence_code"] + isOneToOne: false + referencedRelation: "banatic_competence" + referencedColumns: ["code"] + }, + ] + } + collectivite_bucket: { + Row: { + bucket_id: string + collectivite_id: number + } + Insert: { + bucket_id: string + collectivite_id: number + } + Update: { + bucket_id?: string + collectivite_id?: number + } + Relationships: [ + { + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "partenaire_tag_collectivite_id_fkey" + foreignKeyName: "collectivite_bucket_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" @@ -15690,6014 +3521,6743 @@ export type Database = { }, ] } - personnalisation: { + collectivite_test: { Row: { - action_id: string - description: string - titre: string + collectivite_id: number | null + id: number + nom: string } Insert: { - action_id: string - description: string - titre: string + collectivite_id?: number | null + id?: number + nom: string } Update: { - action_id?: string - description?: string - titre?: string + collectivite_id?: number | null + id?: number + nom?: string } Relationships: [ { - foreignKeyName: "personnalisation_action_id_fkey" - columns: ["action_id"] - isOneToOne: true - referencedRelation: "action_relation" - referencedColumns: ["id"] + foreignKeyName: "collectivite_test_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] }, - ] - } - personnalisation_consequence: { - Row: { - collectivite_id: number - consequences: Json - modified_at: string - payload_timestamp: string | null - } - Insert: { - collectivite_id: number - consequences: Json - modified_at?: string - payload_timestamp?: string | null - } - Update: { - collectivite_id?: number - consequences?: Json - modified_at?: string - payload_timestamp?: string | null - } - Relationships: [ { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_snippet" + isOneToOne: false + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "action_statuts" + isOneToOne: false + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "active_collectivite" + isOneToOne: false + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "audits" + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "carte_collectivite_active" + isOneToOne: false + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" + isOneToOne: false + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite" + isOneToOne: false + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_action_statut" + isOneToOne: false + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_card" + isOneToOne: false + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_carte_identite" + isOneToOne: false + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + isOneToOne: false + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_test_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_test_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "question_thematique_completude" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_test_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "retool_active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "collectivite_test_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "retool_completude" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_labellisation" + isOneToOne: false + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" + isOneToOne: false + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_niveau_acces" + isOneToOne: false + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" + isOneToOne: false + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_plan_action" + isOneToOne: false + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_referentiel" + isOneToOne: false + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivite_utilisateur" + isOneToOne: false + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "collectivites_crm" + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "comparaison_scores_audit" + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "collectivite_test_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_collectivites" + isOneToOne: false + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + commune: { + Row: { + code: string + collectivite_id: number | null + id: number + nom: string + } + Insert: { + code: string + collectivite_id?: number | null + id?: number + nom: string + } + Update: { + code?: string + collectivite_id?: number | null + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" + isOneToOne: false + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "crm_usages" + isOneToOne: false + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "engagement_collectivite" + isOneToOne: false + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "late_collectivite" + isOneToOne: false + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "locales_pourcentage_completude" + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "named_collectivite" + isOneToOne: false + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "question_thematique_completude" + isOneToOne: false + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "rattachement" + isOneToOne: false + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_indicateur_resultat" + isOneToOne: false + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_binaire" + isOneToOne: false + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_choix" + isOneToOne: false + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_reponse_proportion" + isOneToOne: false + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "report_scores" + isOneToOne: false + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: true - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + foreignKeyName: "commune_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: true + isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, ] } - personnalisation_regle: { - Row: { - action_id: string - description: string - formule: string - modified_at: string - type: Database["public"]["Enums"]["regle_type"] - } - Insert: { - action_id: string - description: string - formule: string - modified_at?: string - type: Database["public"]["Enums"]["regle_type"] - } - Update: { - action_id?: string - description?: string - formule?: string - modified_at?: string - type?: Database["public"]["Enums"]["regle_type"] - } - Relationships: [ - { - foreignKeyName: "personnalisation_regle_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "personnalisation" - referencedColumns: ["action_id"] - }, - ] - } - personnalisations_json: { + confidentialite_crud: { Row: { - created_at: string - questions: Json - regles: Json + c: Database["public"]["Enums"]["confidentialite_option_crud"] + d: Database["public"]["Enums"]["confidentialite_option_crud"] + nom_element: string + profil: Database["public"]["Enums"]["confidentialite_profil"] + r: Database["public"]["Enums"]["confidentialite_option_crud"] + type_element: Database["public"]["Enums"]["confidentialite_type_element"] + u: Database["public"]["Enums"]["confidentialite_option_crud"] } Insert: { - created_at?: string - questions: Json - regles: Json + c: Database["public"]["Enums"]["confidentialite_option_crud"] + d: Database["public"]["Enums"]["confidentialite_option_crud"] + nom_element: string + profil: Database["public"]["Enums"]["confidentialite_profil"] + r: Database["public"]["Enums"]["confidentialite_option_crud"] + type_element: Database["public"]["Enums"]["confidentialite_type_element"] + u: Database["public"]["Enums"]["confidentialite_option_crud"] } Update: { - created_at?: string - questions?: Json - regles?: Json + c?: Database["public"]["Enums"]["confidentialite_option_crud"] + d?: Database["public"]["Enums"]["confidentialite_option_crud"] + nom_element?: string + profil?: Database["public"]["Enums"]["confidentialite_profil"] + r?: Database["public"]["Enums"]["confidentialite_option_crud"] + type_element?: Database["public"]["Enums"]["confidentialite_type_element"] + u?: Database["public"]["Enums"]["confidentialite_option_crud"] } Relationships: [] } - personne_tag: { + cot: { Row: { + actif: boolean collectivite_id: number - id: number - nom: string + signataire: number | null } Insert: { + actif: boolean collectivite_id: number - id?: number - nom: string + signataire?: number | null } Update: { + actif?: boolean collectivite_id?: number - id?: number - nom?: string + signataire?: number | null } Relationships: [ { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" + isOneToOne: true + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "cot_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" + isOneToOne: true + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "cot_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" + isOneToOne: true + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" + isOneToOne: true + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" + isOneToOne: true + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" + isOneToOne: true + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + isOneToOne: true + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" + isOneToOne: true + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" + isOneToOne: true + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + isOneToOne: true + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" + isOneToOne: true + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" + isOneToOne: true + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" + isOneToOne: true + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" + isOneToOne: true + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" + isOneToOne: true + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" + isOneToOne: true + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_collectivites" + isOneToOne: true + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" + isOneToOne: true + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" + isOneToOne: true + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" + isOneToOne: true + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" + foreignKeyName: "cot_collectivite_id_fkey" columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] + isOneToOne: false + referencedRelation: "crm_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "personne_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "cot_signataire_fkey" + columns: ["signataire"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, ] } - plan_action_type: { + dcp: { Row: { - categorie: string - detail: string | null - id: number - type: string + cgu_acceptees_le: string | null + created_at: string + deleted: boolean + email: string + limited: boolean + modified_at: string + nom: string + prenom: string + telephone: string | null + user_id: string } Insert: { - categorie: string - detail?: string | null - id?: number - type: string + cgu_acceptees_le?: string | null + created_at?: string + deleted?: boolean + email: string + limited?: boolean + modified_at?: string + nom: string + prenom: string + telephone?: string | null + user_id: string } Update: { - categorie?: string - detail?: string | null - id?: number - type?: string + cgu_acceptees_le?: string | null + created_at?: string + deleted?: boolean + email?: string + limited?: boolean + modified_at?: string + nom?: string + prenom?: string + telephone?: string | null + user_id?: string } - Relationships: [ - { - foreignKeyName: "plan_action_type_categorie_fkey" - columns: ["categorie"] - isOneToOne: false - referencedRelation: "plan_action_type_categorie" - referencedColumns: ["categorie"] - }, - ] + Relationships: [] } - plan_action_type_categorie: { + effet_attendu: { Row: { - categorie: string + id: number + nom: string + notice: string | null } Insert: { - categorie: string + id?: number + nom: string + notice?: string | null } Update: { - categorie?: string + id?: number + nom?: string + notice?: string | null } Relationships: [] } - post_audit_scores: { + epci: { Row: { - audit_id: number - collectivite_id: number - modified_at: string - payload_timestamp: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json + collectivite_id: number | null + id: number + nature: Database["public"]["Enums"]["nature"] + nom: string + siren: string } Insert: { - audit_id: number - collectivite_id: number - modified_at: string - payload_timestamp?: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json + collectivite_id?: number | null + id?: number + nature: Database["public"]["Enums"]["nature"] + nom: string + siren: string } Update: { - audit_id?: number - collectivite_id?: number - modified_at?: string - payload_timestamp?: string | null - referentiel?: Database["public"]["Enums"]["referentiel"] - scores?: Json + collectivite_id?: number | null + id?: number + nature?: Database["public"]["Enums"]["nature"] + nom?: string + siren?: string } Relationships: [ { - foreignKeyName: "post_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_niveau_acces" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "comparaison_scores_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "crm_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "crm_usages" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_audit_state" - referencedColumns: ["audit_id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "post_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "post_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] + referencedRelation: "question_thematique_completude" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "post_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit_en_cours" - referencedColumns: ["id"] + referencedRelation: "retool_active_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "post_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["audit_id"] + referencedRelation: "retool_completude" + referencedColumns: ["collectivite_id"] }, - ] - } - pre_audit_scores: { - Row: { - audit_id: number - collectivite_id: number - modified_at: string - payload_timestamp: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json - } - Insert: { - audit_id: number - collectivite_id: number - modified_at: string - payload_timestamp?: string | null - referentiel: Database["public"]["Enums"]["referentiel"] - scores: Json - } - Update: { - audit_id?: number - collectivite_id?: number - modified_at?: string - payload_timestamp?: string | null - referentiel?: Database["public"]["Enums"]["referentiel"] - scores?: Json - } - Relationships: [ { - foreignKeyName: "pre_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_audit_state" - referencedColumns: ["audit_id"] + referencedRelation: "retool_completude_compute" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "pre_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_hebdo" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "pre_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_premier_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "pre_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit_en_cours" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "pre_audit_scores_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["audit_id"] + referencedRelation: "retool_score" + referencedColumns: ["collectivite_id"] }, - ] - } - preuve_action: { - Row: { - action_id: string - preuve_id: string - } - Insert: { - action_id: string - preuve_id: string - } - Update: { - action_id?: string - preuve_id?: string - } - Relationships: [ { - foreignKeyName: "preuve_action_action_id_fkey" - columns: ["action_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] + referencedRelation: "site_labellisation" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_action_preuve_id_fkey" - columns: ["preuve_id"] + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "preuve_reglementaire_definition" - referencedColumns: ["id"] + referencedRelation: "stats_active_real_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "epci_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] }, ] } - preuve_audit: { + fiche_action: { Row: { - audit_id: number + amelioration_continue: boolean | null + budget_previsionnel: number | null + calendrier: string | null + cibles: string[] | null collectivite_id: number - commentaire: string - fichier_id: number | null + created_at: string + date_debut: string | null + date_fin_provisoire: string | null + description: string | null + financements: string | null id: number - lien: Json | null + instance_gouvernance: string | null + maj_termine: boolean | null modified_at: string - modified_by: string - titre: string - url: string | null + modified_by: string | null + niveau_priorite: + | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] + | null + notes_complementaires: string | null + objectifs: string | null + participation_citoyenne: string | null + participation_citoyenne_type: string | null + piliers_eci: + | Database["public"]["Enums"]["fiche_action_piliers_eci"][] + | null + ressources: string | null + restreint: boolean | null + resultats_attendus: + | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] + | null + statut: Database["public"]["Enums"]["fiche_action_statuts"] | null + temps_de_mise_en_oeuvre_id: number | null + titre: string | null + fiche_action_plan: unknown | null } Insert: { - audit_id: number + amelioration_continue?: boolean | null + budget_previsionnel?: number | null + calendrier?: string | null + cibles?: string[] | null collectivite_id: number - commentaire?: string - fichier_id?: number | null + created_at?: string + date_debut?: string | null + date_fin_provisoire?: string | null + description?: string | null + financements?: string | null id?: number - lien?: Json | null + instance_gouvernance?: string | null + maj_termine?: boolean | null modified_at?: string - modified_by?: string - titre?: string - url?: string | null + modified_by?: string | null + niveau_priorite?: + | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] + | null + notes_complementaires?: string | null + objectifs?: string | null + participation_citoyenne?: string | null + participation_citoyenne_type?: string | null + piliers_eci?: + | Database["public"]["Enums"]["fiche_action_piliers_eci"][] + | null + ressources?: string | null + restreint?: boolean | null + resultats_attendus?: + | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] + | null + statut?: Database["public"]["Enums"]["fiche_action_statuts"] | null + temps_de_mise_en_oeuvre_id?: number | null + titre?: string | null } Update: { - audit_id?: number + amelioration_continue?: boolean | null + budget_previsionnel?: number | null + calendrier?: string | null + cibles?: string[] | null collectivite_id?: number - commentaire?: string - fichier_id?: number | null + created_at?: string + date_debut?: string | null + date_fin_provisoire?: string | null + description?: string | null + financements?: string | null id?: number - lien?: Json | null + instance_gouvernance?: string | null + maj_termine?: boolean | null modified_at?: string - modified_by?: string - titre?: string - url?: string | null + modified_by?: string | null + niveau_priorite?: + | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] + | null + notes_complementaires?: string | null + objectifs?: string | null + participation_citoyenne?: string | null + participation_citoyenne_type?: string | null + piliers_eci?: + | Database["public"]["Enums"]["fiche_action_piliers_eci"][] + | null + ressources?: string | null + restreint?: boolean | null + resultats_attendus?: + | Database["public"]["Enums"]["fiche_action_resultats_attendus"][] + | null + statut?: Database["public"]["Enums"]["fiche_action_statuts"] | null + temps_de_mise_en_oeuvre_id?: number | null + titre?: string | null } Relationships: [ { - foreignKeyName: "preuve_audit_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_audit_state" - referencedColumns: ["audit_id"] + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_audit_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" - referencedColumns: ["id"] + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_audit_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit" + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_audit_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audit_en_cours" + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_audit_audit_id_fkey" - columns: ["audit_id"] + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["audit_id"] + referencedRelation: "collectivite_niveau_acces" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "retool_active_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "site_labellisation" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_temps_de_mise_en_oeuvre_id_fkey" + columns: ["temps_de_mise_en_oeuvre_id"] + isOneToOne: false + referencedRelation: "action_impact_temps_de_mise_en_oeuvre" + referencedColumns: ["niveau"] + }, + ] + } + fiche_action_action: { + Row: { + action_id: string + fiche_id: number + } + Insert: { + action_id: string + fiche_id: number + } + Update: { + action_id?: string + fiche_id?: number + } + Relationships: [ + { + foreignKeyName: "fiche_action_action_action_id_fkey" + columns: ["action_id"] + isOneToOne: false + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_action_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiche_action" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_action_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiche_resume" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_action_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiches_action" + referencedColumns: ["id"] + }, + ] + } + fiche_action_axe: { + Row: { + axe_id: number + fiche_id: number + } + Insert: { + axe_id: number + fiche_id: number + } + Update: { + axe_id?: number + fiche_id?: number + } + Relationships: [ + { + foreignKeyName: "fiche_action_axe_axe_id_fkey" + columns: ["axe_id"] + isOneToOne: false + referencedRelation: "axe" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_axe_axe_id_fkey" + columns: ["axe_id"] + isOneToOne: false + referencedRelation: "plan_action" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_axe_axe_id_fkey" + columns: ["axe_id"] + isOneToOne: false + referencedRelation: "plan_action_profondeur" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_axe_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiche_action" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_axe_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiche_resume" + referencedColumns: ["id"] + }, + { + foreignKeyName: "fiche_action_axe_fiche_id_fkey" + columns: ["fiche_id"] + isOneToOne: false + referencedRelation: "fiches_action" + referencedColumns: ["id"] + }, + ] + } + fiche_action_effet_attendu: { + Row: { + effet_attendu_id: number + fiche_id: number + } + Insert: { + effet_attendu_id: number + fiche_id: number + } + Update: { + effet_attendu_id?: number + fiche_id?: number + } + Relationships: [ + { + foreignKeyName: "fiche_action_effet_attendu_effet_attendu_id_fkey" + columns: ["effet_attendu_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] + referencedRelation: "effet_attendu" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_effet_attendu_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, + ] + } + fiche_action_financeur_tag: { + Row: { + fiche_id: number + financeur_tag_id: number + id: number + montant_ttc: number | null + } + Insert: { + fiche_id: number + financeur_tag_id: number + id?: number + montant_ttc?: number | null + } + Update: { + fiche_id?: number + financeur_tag_id?: number + id?: number + montant_ttc?: number | null + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_financeur_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_financeur_tag_financeur_tag_id_fkey" + columns: ["financeur_tag_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "financeur_tag" + referencedColumns: ["id"] }, + ] + } + fiche_action_import_csv: { + Row: { + amelioration_continue: string | null + axe: string | null + budget: string | null + calendrier: string | null + cibles: string | null + collectivite_id: string | null + date_debut: string | null + date_fin: string | null + description: string | null + elu_referent: string | null + financements: string | null + financeur_deux: string | null + financeur_trois: string | null + financeur_un: string | null + montant_deux: string | null + montant_trois: string | null + montant_un: string | null + moyens: string | null + notes: string | null + num_action: string | null + objectifs: string | null + partenaires: string | null + personne_referente: string | null + plan_nom: string | null + priorite: string | null + resultats_attendus: string | null + service: string | null + sous_axe: string | null + sous_sous_axe: string | null + statut: string | null + structure_pilote: string | null + titre: string | null + } + Insert: { + amelioration_continue?: string | null + axe?: string | null + budget?: string | null + calendrier?: string | null + cibles?: string | null + collectivite_id?: string | null + date_debut?: string | null + date_fin?: string | null + description?: string | null + elu_referent?: string | null + financements?: string | null + financeur_deux?: string | null + financeur_trois?: string | null + financeur_un?: string | null + montant_deux?: string | null + montant_trois?: string | null + montant_un?: string | null + moyens?: string | null + notes?: string | null + num_action?: string | null + objectifs?: string | null + partenaires?: string | null + personne_referente?: string | null + plan_nom?: string | null + priorite?: string | null + resultats_attendus?: string | null + service?: string | null + sous_axe?: string | null + sous_sous_axe?: string | null + statut?: string | null + structure_pilote?: string | null + titre?: string | null + } + Update: { + amelioration_continue?: string | null + axe?: string | null + budget?: string | null + calendrier?: string | null + cibles?: string | null + collectivite_id?: string | null + date_debut?: string | null + date_fin?: string | null + description?: string | null + elu_referent?: string | null + financements?: string | null + financeur_deux?: string | null + financeur_trois?: string | null + financeur_un?: string | null + montant_deux?: string | null + montant_trois?: string | null + montant_un?: string | null + moyens?: string | null + notes?: string | null + num_action?: string | null + objectifs?: string | null + partenaires?: string | null + personne_referente?: string | null + plan_nom?: string | null + priorite?: string | null + resultats_attendus?: string | null + service?: string | null + sous_axe?: string | null + sous_sous_axe?: string | null + statut?: string | null + structure_pilote?: string | null + titre?: string | null + } + Relationships: [] + } + fiche_action_indicateur: { + Row: { + fiche_id: number + indicateur_id: number + } + Insert: { + fiche_id: number + indicateur_id: number + } + Update: { + fiche_id?: number + indicateur_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_indicateur_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_indicateur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_indicateur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, + ] + } + fiche_action_libre_tag: { + Row: { + created_at: string + created_by: string | null + fiche_id: number + libre_tag_id: number + } + Insert: { + created_at?: string + created_by?: string | null + fiche_id: number + libre_tag_id: number + } + Update: { + created_at?: string + created_by?: string | null + fiche_id?: number + libre_tag_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_libre_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_libre_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_libre_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_libre_tag_libre_tag_id_fkey" + columns: ["libre_tag_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] + referencedRelation: "libre_tag" + referencedColumns: ["id"] }, + ] + } + fiche_action_lien: { + Row: { + fiche_deux: number + fiche_une: number + } + Insert: { + fiche_deux: number + fiche_une: number + } + Update: { + fiche_deux?: number + fiche_une?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_deux_fkey" + columns: ["fiche_deux"] isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_deux_fkey" + columns: ["fiche_deux"] isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_deux_fkey" + columns: ["fiche_deux"] isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_une_fkey" + columns: ["fiche_une"] isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_une_fkey" + columns: ["fiche_une"] isOneToOne: false - referencedRelation: "retool_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_lien_fiche_une_fkey" + columns: ["fiche_une"] isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, + ] + } + fiche_action_partenaire_tag: { + Row: { + fiche_id: number + partenaire_tag_id: number + } + Insert: { + fiche_id: number + partenaire_tag_id: number + } + Update: { + fiche_id?: number + partenaire_tag_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_partenaire_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_partenaire_tag_partenaire_tag_id_fkey" + columns: ["partenaire_tag_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "partenaire_tag" + referencedColumns: ["id"] }, + ] + } + fiche_action_pilote: { + Row: { + fiche_id: number + tag_id: number | null + user_id: string | null + } + Insert: { + fiche_id: number + tag_id?: number | null + user_id?: string | null + } + Update: { + fiche_id?: number + tag_id?: number | null + user_id?: string | null + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_tag_id_fkey" + columns: ["tag_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "personne_tag" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_personnes" + referencedColumns: ["user_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_pilote_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "dcp" + referencedColumns: ["user_id"] }, ] } - preuve_complementaire: { + fiche_action_referent: { Row: { - action_id: string - collectivite_id: number - commentaire: string - fichier_id: number | null - id: number - lien: Json | null - modified_at: string - modified_by: string - titre: string - url: string | null + fiche_id: number + tag_id: number | null + user_id: string | null } Insert: { - action_id: string - collectivite_id: number - commentaire?: string - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + fiche_id: number + tag_id?: number | null + user_id?: string | null } Update: { - action_id?: string - collectivite_id?: number - commentaire?: string - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + fiche_id?: number + tag_id?: number | null + user_id?: string | null } Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_tag_id_fkey" + columns: ["tag_id"] isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] + referencedRelation: "personne_tag" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_personnes" + referencedColumns: ["user_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_referent_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "dcp" + referencedColumns: ["user_id"] }, + ] + } + fiche_action_service_tag: { + Row: { + fiche_id: number + service_tag_id: number + } + Insert: { + fiche_id: number + service_tag_id: number + } + Update: { + fiche_id?: number + service_tag_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "fiche_action" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_service_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_service_tag_service_tag_id_fkey" + columns: ["service_tag_id"] isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] + referencedRelation: "service_tag" + referencedColumns: ["id"] }, + ] + } + fiche_action_sous_thematique: { + Row: { + fiche_id: number + thematique_id: number + } + Insert: { + fiche_id: number + thematique_id: number + } + Update: { + fiche_id?: number + thematique_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_identite" + referencedRelation: "fiche_resume" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_sous_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_sous_thematique_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "sous_thematique" + referencedColumns: ["id"] }, + ] + } + fiche_action_structure_tag: { + Row: { + fiche_id: number + structure_tag_id: number + } + Insert: { + fiche_id: number + structure_tag_id: number + } + Update: { + fiche_id?: number + structure_tag_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_structure_tag_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_structure_tag_structure_tag_id_fkey" + columns: ["structure_tag_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] + referencedRelation: "structure_tag" + referencedColumns: ["id"] }, + ] + } + fiche_action_thematique: { + Row: { + fiche_id: number + thematique_id: number + } + Insert: { + fiche_id: number + thematique_id: number + } + Update: { + fiche_id?: number + thematique_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_thematique_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "fiche_action_thematique_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "thematique" + referencedColumns: ["id"] }, + ] + } + filtre_intervalle: { + Row: { + id: string + intervalle: unknown + libelle: string + type: Database["public"]["Enums"]["collectivite_filtre_type"] + } + Insert: { + id: string + intervalle: unknown + libelle: string + type: Database["public"]["Enums"]["collectivite_filtre_type"] + } + Update: { + id?: string + intervalle?: unknown + libelle?: string + type?: Database["public"]["Enums"]["collectivite_filtre_type"] + } + Relationships: [] + } + financeur_tag: { + Row: { + collectivite_id: number + id: number + nom: string + } + Insert: { + collectivite_id: number + id?: number + nom: string + } + Update: { + collectivite_id?: number + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "financeur_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "preuve_complementaire_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, ] } - preuve_labellisation: { + groupement: { Row: { - collectivite_id: number - commentaire: string - demande_id: number - fichier_id: number | null id: number - lien: Json | null - modified_at: string - modified_by: string - titre: string - url: string | null + nom: string } Insert: { - collectivite_id: number - commentaire?: string - demande_id: number - fichier_id?: number | null id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + nom: string } Update: { - collectivite_id?: number - commentaire?: string - demande_id?: number - fichier_id?: number | null id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + nom?: string + } + Relationships: [] + } + groupement_collectivite: { + Row: { + collectivite_id: number + groupement_id: number + } + Insert: { + collectivite_id: number + groupement_id: number + } + Update: { + collectivite_id?: number + groupement_id?: number } Relationships: [ { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "groupement_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_labellisation_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "groupement_collectivite_groupement_id_fkey" + columns: ["groupement_id"] isOneToOne: false - referencedRelation: "demande" + referencedRelation: "groupement" + referencedColumns: ["id"] + }, + ] + } + indicateur_action: { + Row: { + action_id: string + indicateur_id: number + } + Insert: { + action_id: string + indicateur_id: number + } + Update: { + action_id?: string + indicateur_id?: number + } + Relationships: [ + { + foreignKeyName: "indicateur_action_action_id_fkey" + columns: ["action_id"] + isOneToOne: false + referencedRelation: "action_relation" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_labellisation_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "indicateur_action_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["demande_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_labellisation_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "indicateur_action_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "retool_labellisation_demande" + referencedRelation: "indicateur_definition" referencedColumns: ["id"] }, ] } - preuve_rapport: { + indicateur_artificialisation: { Row: { + activite: number collectivite_id: number - commentaire: string - date: string - fichier_id: number | null - id: number - lien: Json | null - modified_at: string - modified_by: string - titre: string - url: string | null + ferroviaire: number + habitat: number + inconnue: number + mixte: number + routiere: number + total: number } Insert: { + activite: number collectivite_id: number - commentaire?: string - date: string - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + ferroviaire: number + habitat: number + inconnue: number + mixte: number + routiere: number + total: number } Update: { + activite?: number collectivite_id?: number - commentaire?: string - date?: string - fichier_id?: number | null - id?: number - lien?: Json | null - modified_at?: string - modified_by?: string - titre?: string - url?: string | null + ferroviaire?: number + habitat?: number + inconnue?: number + mixte?: number + routiere?: number + total?: number } Relationships: [ { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" + isOneToOne: true + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" + isOneToOne: true + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" + isOneToOne: true + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" + isOneToOne: true + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" + isOneToOne: true + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + isOneToOne: true + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" + isOneToOne: true + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" + isOneToOne: true + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" + isOneToOne: true + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" + isOneToOne: true + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + isOneToOne: true + referencedRelation: "retool_plan_action_hebdo" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" + isOneToOne: true + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" + isOneToOne: true + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + isOneToOne: true + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" + isOneToOne: true + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" + isOneToOne: true + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" + isOneToOne: true + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" + isOneToOne: true + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_artificialisation_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" + isOneToOne: true + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + indicateur_categorie_tag: { + Row: { + categorie_tag_id: number + indicateur_id: number + } + Insert: { + categorie_tag_id: number + indicateur_id: number + } + Update: { + categorie_tag_id?: number + indicateur_id?: number + } + Relationships: [ + { + foreignKeyName: "indicateur_categorie_tag_categorie_tag_id_fkey" + columns: ["categorie_tag_id"] + isOneToOne: false + referencedRelation: "categorie_tag" + referencedColumns: ["id"] + }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_categorie_tag_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_categorie_tag_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, + ] + } + indicateur_collectivite: { + Row: { + collectivite_id: number + commentaire: string | null + confidentiel: boolean + favoris: boolean + indicateur_id: number + } + Insert: { + collectivite_id: number + commentaire?: string | null + confidentiel?: boolean + favoris?: boolean + indicateur_id: number + } + Update: { + collectivite_id?: number + commentaire?: string | null + confidentiel?: boolean + favoris?: boolean + indicateur_id?: number + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_collectivite_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + { + foreignKeyName: "indicateur_collectivite_indicateur_id_fkey" + columns: ["indicateur_id"] + isOneToOne: false + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_collectivite_indicateur_id_fkey" + columns: ["indicateur_id"] + isOneToOne: false + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] + }, ] } - preuve_reglementaire: { + indicateur_definition: { Row: { - collectivite_id: number - commentaire: string - fichier_id: number | null + borne_max: number | null + borne_min: number | null + collectivite_id: number | null + created_at: string + created_by: string | null + description: string | null + groupement_id: number | null id: number - lien: Json | null + identifiant_referentiel: string | null modified_at: string - modified_by: string - preuve_id: string + modified_by: string | null + participation_score: boolean + sans_valeur_utilisateur: boolean titre: string - url: string | null + titre_long: string | null + unite: string + valeur_calcule: string | null + indicateur_enfants: unknown | null + indicateur_parents: unknown | null } Insert: { - collectivite_id: number - commentaire?: string - fichier_id?: number | null + borne_max?: number | null + borne_min?: number | null + collectivite_id?: number | null + created_at?: string + created_by?: string | null + description?: string | null + groupement_id?: number | null id?: number - lien?: Json | null + identifiant_referentiel?: string | null modified_at?: string - modified_by?: string - preuve_id: string - titre?: string - url?: string | null + modified_by?: string | null + participation_score?: boolean + sans_valeur_utilisateur?: boolean + titre: string + titre_long?: string | null + unite: string + valeur_calcule?: string | null } Update: { - collectivite_id?: number - commentaire?: string - fichier_id?: number | null + borne_max?: number | null + borne_min?: number | null + collectivite_id?: number | null + created_at?: string + created_by?: string | null + description?: string | null + groupement_id?: number | null id?: number - lien?: Json | null + identifiant_referentiel?: string | null modified_at?: string - modified_by?: string - preuve_id?: string + modified_by?: string | null + participation_score?: boolean + sans_valeur_utilisateur?: boolean titre?: string - url?: string | null + titre_long?: string | null + unite?: string + valeur_calcule?: string | null } Relationships: [ { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_definition_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_score" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "site_labellisation" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_definition_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "indicateur_definition_groupement_id_fkey" + columns: ["groupement_id"] + isOneToOne: false + referencedRelation: "groupement" + referencedColumns: ["id"] + }, + ] + } + indicateur_groupe: { + Row: { + enfant: number + parent: number + } + Insert: { + enfant: number + parent: number + } + Update: { + enfant?: number + parent?: number + } + Relationships: [ + { + foreignKeyName: "indicateur_groupe_enfant_fkey" + columns: ["enfant"] + isOneToOne: false + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_groupe_enfant_fkey" + columns: ["enfant"] + isOneToOne: false + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_groupe_parent_fkey" + columns: ["parent"] + isOneToOne: false + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_groupe_parent_fkey" + columns: ["parent"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, + ] + } + indicateur_pilote: { + Row: { + collectivite_id: number + id: number + indicateur_id: number + tag_id: number | null + user_id: string | null + indicateur_pilote_user: unknown | null + } + Insert: { + collectivite_id: number + id?: number + indicateur_id: number + tag_id?: number | null + user_id?: string | null + } + Update: { + collectivite_id?: number + id?: number + indicateur_id?: number + tag_id?: number | null + user_id?: string | null + } + Relationships: [ { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_collectivite_id" + foreignKeyName: "indicateur_pilote_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "preuve_reglementaire_preuve_id_fkey" - columns: ["preuve_id"] + foreignKeyName: "indicateur_pilote_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "preuve_reglementaire_definition" + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_pilote_indicateur_id_fkey" + columns: ["indicateur_id"] + isOneToOne: false + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_pilote_tag_id_fkey" + columns: ["tag_id"] + isOneToOne: false + referencedRelation: "personne_tag" referencedColumns: ["id"] }, ] } - preuve_reglementaire_definition: { - Row: { - description: string - id: string - nom: string - } - Insert: { - description: string - id: string - nom: string - } - Update: { - description?: string - id?: string - nom?: string - } - Relationships: [] - } - preuve_reglementaire_json: { - Row: { - created_at: string - preuves: Json - } - Insert: { - created_at?: string - preuves: Json - } - Update: { - created_at?: string - preuves?: Json - } - Relationships: [] - } - private_collectivite_membre: { + indicateur_service_tag: { Row: { - champ_intervention: - | Database["public"]["Enums"]["referentiel"][] - | null collectivite_id: number - created_at: string - details_fonction: string | null - est_referent: boolean | null - fonction: Database["public"]["Enums"]["membre_fonction"] | null - modified_at: string - user_id: string + indicateur_id: number + service_tag_id: number } Insert: { - champ_intervention?: - | Database["public"]["Enums"]["referentiel"][] - | null collectivite_id: number - created_at?: string - details_fonction?: string | null - est_referent?: boolean | null - fonction?: Database["public"]["Enums"]["membre_fonction"] | null - modified_at?: string - user_id: string + indicateur_id: number + service_tag_id: number } Update: { - champ_intervention?: - | Database["public"]["Enums"]["referentiel"][] - | null collectivite_id?: number - created_at?: string - details_fonction?: string | null - est_referent?: boolean | null - fonction?: Database["public"]["Enums"]["membre_fonction"] | null - modified_at?: string - user_id?: string + indicateur_id?: number + service_tag_id?: number } Relationships: [ { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "comparaison_scores_audit" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_service_tag_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_service_tag_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_service_tag_service_tag_id_fkey" + columns: ["service_tag_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "service_tag" + referencedColumns: ["id"] + }, + ] + } + indicateur_source: { + Row: { + id: string + libelle: string + ordre_affichage: number | null + } + Insert: { + id: string + libelle: string + ordre_affichage?: number | null + } + Update: { + id?: string + libelle?: string + ordre_affichage?: number | null + } + Relationships: [] + } + indicateur_source_metadonnee: { + Row: { + date_version: string + diffuseur: string | null + id: number + limites: string | null + methodologie: string | null + nom_donnees: string | null + producteur: string | null + source_id: string + } + Insert: { + date_version: string + diffuseur?: string | null + id?: number + limites?: string | null + methodologie?: string | null + nom_donnees?: string | null + producteur?: string | null + source_id: string + } + Update: { + date_version?: string + diffuseur?: string | null + id?: number + limites?: string | null + methodologie?: string | null + nom_donnees?: string | null + producteur?: string | null + source_id?: string + } + Relationships: [ + { + foreignKeyName: "indicateur_source_metadonnee_source_id_fkey" + columns: ["source_id"] + isOneToOne: false + referencedRelation: "indicateur_source" + referencedColumns: ["id"] }, + ] + } + indicateur_sous_thematique: { + Row: { + indicateur_id: number + sous_thematique_id: number + } + Insert: { + indicateur_id: number + sous_thematique_id: number + } + Update: { + indicateur_id?: number + sous_thematique_id?: number + } + Relationships: [ { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_sous_thematique_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_sous_thematique_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_sous_thematique_sous_thematique_id_fkey" + columns: ["sous_thematique_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] + referencedRelation: "sous_thematique" + referencedColumns: ["id"] }, + ] + } + indicateur_thematique: { + Row: { + indicateur_id: number + thematique_id: number + } + Insert: { + indicateur_id: number + thematique_id: number + } + Update: { + indicateur_id?: number + thematique_id?: number + } + Relationships: [ { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_thematique_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_thematique_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] + }, + { + foreignKeyName: "indicateur_thematique_thematique_id_fkey" + columns: ["thematique_id"] + isOneToOne: false + referencedRelation: "thematique" + referencedColumns: ["id"] }, + ] + } + indicateur_valeur: { + Row: { + collectivite_id: number + created_at: string + created_by: string | null + date_valeur: string + estimation: number | null + id: number + indicateur_id: number + metadonnee_id: number | null + modified_at: string + modified_by: string | null + objectif: number | null + objectif_commentaire: string | null + resultat: number | null + resultat_commentaire: string | null + } + Insert: { + collectivite_id: number + created_at?: string + created_by?: string | null + date_valeur: string + estimation?: number | null + id?: number + indicateur_id: number + metadonnee_id?: number | null + modified_at?: string + modified_by?: string | null + objectif?: number | null + objectif_commentaire?: string | null + resultat?: number | null + resultat_commentaire?: string | null + } + Update: { + collectivite_id?: number + created_at?: string + created_by?: string | null + date_valeur?: string + estimation?: number | null + id?: number + indicateur_id?: number + metadonnee_id?: number | null + modified_at?: string + modified_by?: string | null + objectif?: number | null + objectif_commentaire?: string | null + resultat?: number | null + resultat_commentaire?: string | null + } + Relationships: [ { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_collectivite_membre_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - private_utilisateur_droit: { - Row: { - active: boolean - collectivite_id: number - created_at: string - id: number - invitation_id: string | null - modified_at: string - niveau_acces: Database["public"]["Enums"]["niveau_acces"] - user_id: string - } - Insert: { - active: boolean - collectivite_id: number - created_at?: string - id?: number - invitation_id?: string | null - modified_at?: string - niveau_acces?: Database["public"]["Enums"]["niveau_acces"] - user_id: string - } - Update: { - active?: boolean - collectivite_id?: number - created_at?: string - id?: number - invitation_id?: string | null - modified_at?: string - niveau_acces?: Database["public"]["Enums"]["niveau_acces"] - user_id?: string - } - Relationships: [ - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "indicateur_valeur_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_valeur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_indicateurs" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_valeur_indicateur_id_fkey" + columns: ["indicateur_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_definition" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "indicateur_valeur_metadonnee_id_fkey" + columns: ["metadonnee_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] + referencedRelation: "indicateur_source_metadonnee" + referencedColumns: ["id"] }, + ] + } + indicateurs_json: { + Row: { + created_at: string + indicateurs: Json + } + Insert: { + created_at?: string + indicateurs: Json + } + Update: { + created_at?: string + indicateurs?: Json + } + Relationships: [] + } + justification: { + Row: { + collectivite_id: number + modified_at: string + modified_by: string + question_id: string + texte: string + } + Insert: { + collectivite_id: number + modified_at: string + modified_by?: string + question_id: string + texte: string + } + Update: { + collectivite_id?: number + modified_at?: string + modified_by?: string + question_id?: string + texte?: string + } + Relationships: [ { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "justification_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "question" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "justification_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_display" + referencedColumns: ["id"] }, + ] + } + justification_ajustement: { + Row: { + action_id: string + collectivite_id: number + modified_at: string + modified_by: string + texte: string + } + Insert: { + action_id: string + collectivite_id: number + modified_at: string + modified_by?: string + texte: string + } + Update: { + action_id?: string + collectivite_id?: number + modified_at?: string + modified_by?: string + texte?: string + } + Relationships: [ { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "justification_ajustement_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "crm_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "justification_ajustement_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "private_utilisateur_droit_invitation_id_fkey" - columns: ["invitation_id"] - isOneToOne: false - referencedRelation: "invitation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "private_utilisateur_droit_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, ] } - question: { + labellisation: { Row: { - description: string - formulation: string - id: string - ordonnancement: number | null - thematique_id: string | null - type: Database["public"]["Enums"]["question_type"] - types_collectivites_concernees: - | Database["public"]["Enums"]["type_collectivite"][] - | null + annee: number | null + collectivite_id: number | null + etoiles: number + id: number + obtenue_le: string + referentiel: Database["public"]["Enums"]["referentiel"] + score_programme: number | null + score_realise: number | null } Insert: { - description: string - formulation: string - id: string - ordonnancement?: number | null - thematique_id?: string | null - type: Database["public"]["Enums"]["question_type"] - types_collectivites_concernees?: - | Database["public"]["Enums"]["type_collectivite"][] - | null + annee?: number | null + collectivite_id?: number | null + etoiles: number + id?: number + obtenue_le: string + referentiel: Database["public"]["Enums"]["referentiel"] + score_programme?: number | null + score_realise?: number | null } Update: { - description?: string - formulation?: string - id?: string - ordonnancement?: number | null - thematique_id?: string | null - type?: Database["public"]["Enums"]["question_type"] - types_collectivites_concernees?: - | Database["public"]["Enums"]["type_collectivite"][] - | null + annee?: number | null + collectivite_id?: number | null + etoiles?: number + id?: number + obtenue_le?: string + referentiel?: Database["public"]["Enums"]["referentiel"] + score_programme?: number | null + score_realise?: number | null } Relationships: [ { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "question_thematique" - referencedColumns: ["id"] - }, - { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["id"] + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_display" - referencedColumns: ["id"] + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] }, - ] - } - question_action: { - Row: { - action_id: string - question_id: string - } - Insert: { - action_id: string - question_id: string - } - Update: { - action_id?: string - question_id?: string - } - Relationships: [ { - foreignKeyName: "question_action_action_id_fkey" - columns: ["action_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "question_action_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question" - referencedColumns: ["id"] + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "question_action_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "question_action_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_question" - referencedColumns: ["id"] - }, - ] - } - question_choix: { - Row: { - formulation: string | null - id: string - ordonnancement: number | null - question_id: string | null - } - Insert: { - formulation?: string | null - id: string - ordonnancement?: number | null - question_id?: string | null - } - Update: { - formulation?: string | null - id?: string - ordonnancement?: number | null - question_id?: string | null - } - Relationships: [ + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] + }, { - foreignKeyName: "question_choix_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question" - referencedColumns: ["id"] + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "question_choix_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "question_choix_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_question" - referencedColumns: ["id"] + referencedRelation: "collectivite_niveau_acces" + referencedColumns: ["collectivite_id"] }, - ] - } - question_thematique: { - Row: { - id: string - nom: string | null - } - Insert: { - id: string - nom?: string | null - } - Update: { - id?: string - nom?: string | null - } - Relationships: [] - } - referentiel_json: { - Row: { - children: Json - created_at: string - definitions: Json - } - Insert: { - children: Json - created_at?: string - definitions: Json - } - Update: { - children?: Json - created_at?: string - definitions?: Json - } - Relationships: [] - } - reponse_binaire: { - Row: { - collectivite_id: number - modified_at: string - question_id: string - reponse: boolean | null - } - Insert: { - collectivite_id: number - modified_at?: string - question_id: string - reponse?: boolean | null - } - Update: { - collectivite_id?: number - modified_at?: string - question_id?: string - reponse?: boolean | null - } - Relationships: [ { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "retool_active_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "labellisation_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + labellisation_action_critere: { + Row: { + action_id: string + etoile: Database["labellisation"]["Enums"]["etoile"] + formulation: string + min_programme_percentage: number | null + min_programme_score: number | null + min_realise_percentage: number | null + min_realise_score: number | null + prio: number + referentiel: Database["public"]["Enums"]["referentiel"] + } + Insert: { + action_id: string + etoile: Database["labellisation"]["Enums"]["etoile"] + formulation: string + min_programme_percentage?: number | null + min_programme_score?: number | null + min_realise_percentage?: number | null + min_realise_score?: number | null + prio: number + referentiel: Database["public"]["Enums"]["referentiel"] + } + Update: { + action_id?: string + etoile?: Database["labellisation"]["Enums"]["etoile"] + formulation?: string + min_programme_percentage?: number | null + min_programme_score?: number | null + min_realise_percentage?: number | null + min_realise_score?: number | null + prio?: number + referentiel?: Database["public"]["Enums"]["referentiel"] + } + Relationships: [ + { + foreignKeyName: "labellisation_action_critere_action_id_fkey" + columns: ["action_id"] + isOneToOne: false + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + ] + } + labellisation_calendrier: { + Row: { + information: string + referentiel: Database["public"]["Enums"]["referentiel"] + } + Insert: { + information: string + referentiel: Database["public"]["Enums"]["referentiel"] + } + Update: { + information?: string + referentiel?: Database["public"]["Enums"]["referentiel"] + } + Relationships: [] + } + labellisation_fichier_critere: { + Row: { + description: string + etoile: Database["labellisation"]["Enums"]["etoile"] + referentiel: Database["public"]["Enums"]["referentiel"] + } + Insert: { + description: string + etoile: Database["labellisation"]["Enums"]["etoile"] + referentiel: Database["public"]["Enums"]["referentiel"] + } + Update: { + description?: string + etoile?: Database["labellisation"]["Enums"]["etoile"] + referentiel?: Database["public"]["Enums"]["referentiel"] + } + Relationships: [] + } + libre_tag: { + Row: { + collectivite_id: number | null + created_at: string + created_by: string | null + id: number + nom: string + } + Insert: { + collectivite_id?: number | null + created_at?: string + created_by?: string | null + id?: number + nom: string + } + Update: { + collectivite_id?: number | null + created_at?: string + created_by?: string | null + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_binaire_collectivite_id_fkey" + foreignKeyName: "libre_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "reponse_binaire_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "question" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_binaire_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_binaire_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "report_question" - referencedColumns: ["id"] - }, ] } - reponse_choix: { + maintenance: { Row: { - collectivite_id: number - modified_at: string - question_id: string - reponse: string | null + begins_at: string + ends_at: string + id: number } Insert: { - collectivite_id: number - modified_at?: string - question_id: string - reponse?: string | null + begins_at: string + ends_at: string + id?: number } Update: { - collectivite_id?: number - modified_at?: string - question_id?: string - reponse?: string | null + begins_at?: string + ends_at?: string + id?: number + } + Relationships: [] + } + panier: { + Row: { + collectivite_id: number | null + collectivite_preset: number | null + created_at: string + created_by: string | null + id: string + latest_update: string + private: boolean | null + action_impact_state: unknown | null + } + Insert: { + collectivite_id?: number | null + collectivite_preset?: number | null + created_at?: string + created_by?: string | null + id?: string + latest_update?: string + private?: boolean | null + } + Update: { + collectivite_id?: number | null + collectivite_preset?: number | null + created_at?: string + created_by?: string | null + id?: string + latest_update?: string + private?: boolean | null } Relationships: [ { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" + isOneToOne: true + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" + isOneToOne: true + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" + isOneToOne: true + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false + isOneToOne: true referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" + isOneToOne: true + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" + isOneToOne: true + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" + isOneToOne: true + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + isOneToOne: true + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + isOneToOne: true + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "named_collectivite" + isOneToOne: true + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_display" + isOneToOne: true + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" + isOneToOne: true + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" + isOneToOne: true + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" + isOneToOne: true + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" + isOneToOne: true + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" + isOneToOne: true + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" + isOneToOne: true + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" + isOneToOne: true + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" + foreignKeyName: "panier_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_active_collectivite" + isOneToOne: true + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "retool_score" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "question" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_choix_question_id_fkey" - columns: ["question_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false referencedRelation: "question_display" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_choix_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "report_question" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_choix_reponse_fkey" - columns: ["reponse"] - isOneToOne: false - referencedRelation: "question_choix" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_choix_reponse_fkey" - columns: ["reponse"] - isOneToOne: false - referencedRelation: "report_choix" - referencedColumns: ["id"] + referencedColumns: ["collectivite_id"] }, - ] - } - reponse_proportion: { - Row: { - collectivite_id: number - modified_at: string - question_id: string - reponse: number | null - } - Insert: { - collectivite_id: number - modified_at?: string - question_id: string - reponse?: number | null - } - Update: { - collectivite_id?: number - modified_at?: string - question_id?: string - reponse?: number | null - } - Relationships: [ { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "panier_collectivite_preset_fkey" + columns: ["collectivite_preset"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + panier_partenaire: { + Row: { + id: number + nom: string | null + } + Insert: { + id?: number + nom?: string | null + } + Update: { + id?: number + nom?: string | null + } + Relationships: [] + } + partenaire_tag: { + Row: { + collectivite_id: number + id: number + nom: string + } + Insert: { + collectivite_id: number + id?: number + nom: string + } + Update: { + collectivite_id?: number + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "partenaire_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + personnalisation: { + Row: { + action_id: string + description: string + titre: string + } + Insert: { + action_id: string + description: string + titre: string + } + Update: { + action_id?: string + description?: string + titre?: string + } + Relationships: [ { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_action_id_fkey" + columns: ["action_id"] + isOneToOne: true + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + ] + } + personnalisation_consequence: { + Row: { + collectivite_id: number + consequences: Json + modified_at: string + payload_timestamp: string | null + } + Insert: { + collectivite_id: number + consequences: Json + modified_at?: string + payload_timestamp?: string | null + } + Update: { + collectivite_id?: number + consequences?: Json + modified_at?: string + payload_timestamp?: string | null + } + Relationships: [ + { + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + isOneToOne: true + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + isOneToOne: true + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + isOneToOne: true + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_usage" + isOneToOne: true + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "site_labellisation" + isOneToOne: true + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + isOneToOne: true + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + isOneToOne: true + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "suivi_audit" + isOneToOne: true + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "question" - referencedColumns: ["id"] - }, - { - foreignKeyName: "reponse_proportion_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["id"] + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "crm_collectivites" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "reponse_proportion_question_id_fkey" - columns: ["question_id"] - isOneToOne: false - referencedRelation: "report_question" - referencedColumns: ["id"] + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: true + referencedRelation: "crm_usages" + referencedColumns: ["collectivite_id"] }, - ] - } - service_tag: { - Row: { - collectivite_id: number - id: number - nom: string - } - Insert: { - collectivite_id: number - id?: number - nom: string - } - Update: { - collectivite_id?: number - id?: number - nom?: string - } - Relationships: [ { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" + isOneToOne: true + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" + isOneToOne: true + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" + isOneToOne: true + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" + isOneToOne: true + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" + isOneToOne: true + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" + isOneToOne: true + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + isOneToOne: true + referencedRelation: "retool_plan_action_hebdo" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" + isOneToOne: true + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" + isOneToOne: true + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" + isOneToOne: true + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" + isOneToOne: true + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + isOneToOne: true + referencedRelation: "stats_active_real_collectivites" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" + isOneToOne: true + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" + isOneToOne: true + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personnalisation_consequence_collectivite_id_fkey" columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + isOneToOne: true + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + personnalisation_regle: { + Row: { + action_id: string + description: string + formule: string + modified_at: string + type: Database["public"]["Enums"]["regle_type"] + } + Insert: { + action_id: string + description: string + formule: string + modified_at?: string + type: Database["public"]["Enums"]["regle_type"] + } + Update: { + action_id?: string + description?: string + formule?: string + modified_at?: string + type?: Database["public"]["Enums"]["regle_type"] + } + Relationships: [ { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "personnalisation_regle_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "personnalisation" + referencedColumns: ["action_id"] }, + ] + } + personnalisations_json: { + Row: { + created_at: string + questions: Json + regles: Json + } + Insert: { + created_at?: string + questions: Json + regles: Json + } + Update: { + created_at?: string + questions?: Json + regles?: Json + } + Relationships: [] + } + personne_tag: { + Row: { + collectivite_id: number + id: number + nom: string + } + Insert: { + collectivite_id: number + id?: number + nom: string + } + Update: { + collectivite_id?: number + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" + foreignKeyName: "personne_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + plan_action_type: { + Row: { + categorie: string + detail: string | null + id: number + type: string + } + Insert: { + categorie: string + detail?: string | null + id?: number + type: string + } + Update: { + categorie?: string + detail?: string | null + id?: number + type?: string + } + Relationships: [ { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "plan_action_type_categorie_fkey" + columns: ["categorie"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "plan_action_type_categorie" + referencedColumns: ["categorie"] }, + ] + } + plan_action_type_categorie: { + Row: { + categorie: string + } + Insert: { + categorie: string + } + Update: { + categorie?: string + } + Relationships: [] + } + post_audit_scores: { + Row: { + audit_id: number + collectivite_id: number + modified_at: string + payload_timestamp: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json + } + Insert: { + audit_id: number + collectivite_id: number + modified_at: string + payload_timestamp?: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json + } + Update: { + audit_id?: number + collectivite_id?: number + modified_at?: string + payload_timestamp?: string | null + referentiel?: Database["public"]["Enums"]["referentiel"] + scores?: Json + } + Relationships: [ { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "post_audit_scores_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_audit_state" + referencedColumns: ["audit_id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "post_audit_scores_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit" + referencedColumns: ["id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "post_audit_scores_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit_en_cours" + referencedColumns: ["id"] }, { - foreignKeyName: "service_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "post_audit_scores_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "suivi_audit" - referencedColumns: ["collectivite_id"] + referencedRelation: "retool_audit" + referencedColumns: ["audit_id"] }, ] } - site_contact: { + pre_audit_scores: { Row: { - email: string - formulaire: Json + audit_id: number + collectivite_id: number modified_at: string + payload_timestamp: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json } Insert: { - email: string - formulaire: Json - modified_at?: string + audit_id: number + collectivite_id: number + modified_at: string + payload_timestamp?: string | null + referentiel: Database["public"]["Enums"]["referentiel"] + scores: Json } Update: { - email?: string - formulaire?: Json + audit_id?: number + collectivite_id?: number modified_at?: string + payload_timestamp?: string | null + referentiel?: Database["public"]["Enums"]["referentiel"] + scores?: Json } - Relationships: [] + Relationships: [ + { + foreignKeyName: "pre_audit_scores_audit_id_fkey" + columns: ["audit_id"] + isOneToOne: false + referencedRelation: "action_audit_state" + referencedColumns: ["audit_id"] + }, + { + foreignKeyName: "pre_audit_scores_audit_id_fkey" + columns: ["audit_id"] + isOneToOne: false + referencedRelation: "audit" + referencedColumns: ["id"] + }, + { + foreignKeyName: "pre_audit_scores_audit_id_fkey" + columns: ["audit_id"] + isOneToOne: false + referencedRelation: "audit_en_cours" + referencedColumns: ["id"] + }, + { + foreignKeyName: "pre_audit_scores_audit_id_fkey" + columns: ["audit_id"] + isOneToOne: false + referencedRelation: "retool_audit" + referencedColumns: ["audit_id"] + }, + ] } - sous_thematique: { + preuve_action: { Row: { - id: number - sous_thematique: string - thematique_id: number + action_id: string + preuve_id: string } Insert: { - id?: number - sous_thematique: string - thematique_id: number + action_id: string + preuve_id: string } Update: { - id?: number - sous_thematique?: string - thematique_id?: number + action_id?: string + preuve_id?: string } Relationships: [ { - foreignKeyName: "sous_thematique_thematique_id_fkey" - columns: ["thematique_id"] + foreignKeyName: "preuve_action_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "thematique" + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + { + foreignKeyName: "preuve_action_preuve_id_fkey" + columns: ["preuve_id"] + isOneToOne: false + referencedRelation: "preuve_reglementaire_definition" referencedColumns: ["id"] }, ] } - structure_tag: { + preuve_audit: { Row: { + audit_id: number collectivite_id: number + commentaire: string + fichier_id: number | null id: number - nom: string + lien: Json | null + modified_at: string + modified_by: string + titre: string + url: string | null } Insert: { + audit_id: number collectivite_id: number + commentaire?: string + fichier_id?: number | null id?: number - nom: string + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Update: { + audit_id?: number collectivite_id?: number + commentaire?: string + fichier_id?: number | null id?: number - nom?: string + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Relationships: [ { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_audit_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_audit_state" + referencedColumns: ["audit_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_audit_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit" + referencedColumns: ["id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_audit_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "audit_en_cours" + referencedColumns: ["id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "preuve_audit_audit_id_fkey" + columns: ["audit_id"] isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] + referencedRelation: "retool_audit" + referencedColumns: ["audit_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "structure_tag_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" @@ -21705,4711 +10265,4768 @@ export type Database = { }, ] } - tableau_de_bord_module: { + preuve_complementaire: { Row: { + action_id: string collectivite_id: number - created_at: string - id: string + commentaire: string + fichier_id: number | null + id: number + lien: Json | null modified_at: string - options: Json - slug: string + modified_by: string titre: string - type: string - user_id: string | null + url: string | null } Insert: { + action_id: string collectivite_id: number - created_at?: string - id?: string + commentaire?: string + fichier_id?: number | null + id?: number + lien?: Json | null modified_at?: string - options: Json - slug: string - titre: string - type: string - user_id?: string | null + modified_by?: string + titre?: string + url?: string | null } Update: { + action_id?: string collectivite_id?: number - created_at?: string - id?: string + commentaire?: string + fichier_id?: number | null + id?: number + lien?: Json | null modified_at?: string - options?: Json - slug?: string + modified_by?: string titre?: string - type?: string - user_id?: string | null + url?: string | null } Relationships: [ { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_complementaire_action_id_fkey" + columns: ["action_id"] + isOneToOne: false + referencedRelation: "action_relation" + referencedColumns: ["id"] + }, + ] + } + preuve_labellisation: { + Row: { + collectivite_id: number + commentaire: string + demande_id: number + fichier_id: number | null + id: number + lien: Json | null + modified_at: string + modified_by: string + titre: string + url: string | null + } + Insert: { + collectivite_id: number + commentaire?: string + demande_id: number + fichier_id?: number | null + id?: number + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null + } + Update: { + collectivite_id?: number + commentaire?: string + demande_id?: number + fichier_id?: number | null + id?: number + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null + } + Relationships: [ + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "tableau_de_bord_module_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["user_id"] - }, - { - foreignKeyName: "tableau_de_bord_module_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "crm_personnes" - referencedColumns: ["user_id"] - }, - { - foreignKeyName: "tableau_de_bord_module_user_id_fkey" - columns: ["user_id"] + foreignKeyName: "preuve_labellisation_demande_id_fkey" + columns: ["demande_id"] isOneToOne: false - referencedRelation: "dcp" - referencedColumns: ["user_id"] + referencedRelation: "retool_audit" + referencedColumns: ["demande_id"] }, { - foreignKeyName: "tableau_de_bord_module_user_id_fkey" - columns: ["user_id"] + foreignKeyName: "preuve_labellisation_demande_id_fkey" + columns: ["demande_id"] isOneToOne: false - referencedRelation: "dcp_display" - referencedColumns: ["user_id"] + referencedRelation: "retool_labellisation_demande" + referencedColumns: ["id"] }, ] } - thematique: { + preuve_rapport: { Row: { + collectivite_id: number + commentaire: string + date: string + fichier_id: number | null id: number - md_id: string | null - nom: string + lien: Json | null + modified_at: string + modified_by: string + titre: string + url: string | null } Insert: { + collectivite_id: number + commentaire?: string + date: string + fichier_id?: number | null id?: number - md_id?: string | null - nom: string + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Update: { + collectivite_id?: number + commentaire?: string + date?: string + fichier_id?: number | null id?: number - md_id?: string | null - nom?: string - } - Relationships: [] - } - type_tabular_score: { - Row: { - action_id: string | null - avancement: Database["public"]["Enums"]["avancement"] | null - concerne: boolean | null - desactive: boolean | null - points_max_personnalises: number | null - points_max_referentiel: number | null - points_programmes: number | null - points_realises: number | null - points_restants: number | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - score_non_renseigne: number | null - score_pas_fait: number | null - score_programme: number | null - score_realise: number | null - score_realise_plus_programme: number | null - } - Insert: { - action_id?: string | null - avancement?: Database["public"]["Enums"]["avancement"] | null - concerne?: boolean | null - desactive?: boolean | null - points_max_personnalises?: number | null - points_max_referentiel?: number | null - points_programmes?: number | null - points_realises?: number | null - points_restants?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - score_non_renseigne?: number | null - score_pas_fait?: number | null - score_programme?: number | null - score_realise?: number | null - score_realise_plus_programme?: number | null - } - Update: { - action_id?: string | null - avancement?: Database["public"]["Enums"]["avancement"] | null - concerne?: boolean | null - desactive?: boolean | null - points_max_personnalises?: number | null - points_max_referentiel?: number | null - points_programmes?: number | null - points_realises?: number | null - points_restants?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - score_non_renseigne?: number | null - score_pas_fait?: number | null - score_programme?: number | null - score_realise?: number | null - score_realise_plus_programme?: number | null - } - Relationships: [] - } - usage: { - Row: { - action: Database["public"]["Enums"]["usage_action"] - collectivite_id: number | null - fonction: Database["public"]["Enums"]["usage_fonction"] - page: Database["public"]["Enums"]["visite_page"] | null - time: string - user_id: string | null - } - Insert: { - action: Database["public"]["Enums"]["usage_action"] - collectivite_id?: number | null - fonction: Database["public"]["Enums"]["usage_fonction"] - page?: Database["public"]["Enums"]["visite_page"] | null - time?: string - user_id?: string | null - } - Update: { - action?: Database["public"]["Enums"]["usage_action"] - collectivite_id?: number | null - fonction?: Database["public"]["Enums"]["usage_fonction"] - page?: Database["public"]["Enums"]["visite_page"] | null - time?: string - user_id?: string | null - } - Relationships: [] - } - utilisateur_support: { - Row: { - support: boolean - user_id: string - } - Insert: { - support?: boolean - user_id: string - } - Update: { - support?: boolean - user_id?: string + lien?: Json | null + modified_at?: string + modified_by?: string + titre?: string + url?: string | null } Relationships: [ { - foreignKeyName: "utilisateur_support_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "utilisateur_support_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "crm_personnes" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_carte_identite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "utilisateur_support_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "dcp" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "utilisateur_support_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "dcp_display" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_niveau_acces" + referencedColumns: ["collectivite_id"] }, - ] - } - utilisateur_verifie: { - Row: { - user_id: string - verifie: boolean - } - Insert: { - user_id: string - verifie?: boolean - } - Update: { - user_id?: string - verifie?: boolean - } - Relationships: [ { - foreignKeyName: "utilisateur_verifie_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "comparaison_scores_audit" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "utilisateur_verifie_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "crm_personnes" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "crm_collectivites" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "utilisateur_verifie_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "dcp" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "crm_usages" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "utilisateur_verifie_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "dcp_display" - referencedColumns: ["user_id"] + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, - ] - } - visite: { - Row: { - collectivite_id: number | null - onglet: Database["public"]["Enums"]["visite_onglet"] | null - page: Database["public"]["Enums"]["visite_page"] - tag: Database["public"]["Enums"]["visite_tag"] | null - time: string - user_id: string | null - } - Insert: { - collectivite_id?: number | null - onglet?: Database["public"]["Enums"]["visite_onglet"] | null - page: Database["public"]["Enums"]["visite_page"] - tag?: Database["public"]["Enums"]["visite_tag"] | null - time?: string - user_id?: string | null - } - Update: { - collectivite_id?: number | null - onglet?: Database["public"]["Enums"]["visite_onglet"] | null - page?: Database["public"]["Enums"]["visite_page"] - tag?: Database["public"]["Enums"]["visite_tag"] | null - time?: string - user_id?: string | null - } - Relationships: [] - } - } - Views: { - action_audit_state: { - Row: { - action_id: string | null - audit_id: number | null - avis: string | null - collectivite_id: number | null - ordre_du_jour: boolean | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - state_id: number | null - statut: Database["public"]["Enums"]["audit_statut"] | null - } - Relationships: [ { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "retool_score" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "site_labellisation" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_active_real_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] + }, + ] + } + preuve_reglementaire: { + Row: { + collectivite_id: number + commentaire: string + fichier_id: number | null + id: number + lien: Json | null + modified_at: string + modified_by: string + preuve_id: string + titre: string + url: string | null + } + Insert: { + collectivite_id: number + commentaire?: string + fichier_id?: number | null + id?: number + lien?: Json | null + modified_at?: string + modified_by?: string + preuve_id: string + titre?: string + url?: string | null + } + Update: { + collectivite_id?: number + commentaire?: string + fichier_id?: number | null + id?: number + lien?: Json | null + modified_at?: string + modified_by?: string + preuve_id?: string + titre?: string + url?: string | null + } + Relationships: [ + { + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_collectivite_id" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "preuve_reglementaire_preuve_id_fkey" + columns: ["preuve_id"] + isOneToOne: false + referencedRelation: "preuve_reglementaire_definition" + referencedColumns: ["id"] + }, + ] + } + preuve_reglementaire_definition: { + Row: { + description: string + id: string + nom: string + } + Insert: { + description: string + id: string + nom: string + } + Update: { + description?: string + id?: string + nom?: string + } + Relationships: [] + } + preuve_reglementaire_json: { + Row: { + created_at: string + preuves: Json + } + Insert: { + created_at?: string + preuves: Json + } + Update: { + created_at?: string + preuves?: Json + } + Relationships: [] + } + private_collectivite_membre: { + Row: { + champ_intervention: + | Database["public"]["Enums"]["referentiel"][] + | null + collectivite_id: number + created_at: string + details_fonction: string | null + est_referent: boolean | null + fonction: Database["public"]["Enums"]["membre_fonction"] | null + modified_at: string + user_id: string + } + Insert: { + champ_intervention?: + | Database["public"]["Enums"]["referentiel"][] + | null + collectivite_id: number + created_at?: string + details_fonction?: string | null + est_referent?: boolean | null + fonction?: Database["public"]["Enums"]["membre_fonction"] | null + modified_at?: string + user_id: string + } + Update: { + champ_intervention?: + | Database["public"]["Enums"]["referentiel"][] + | null + collectivite_id?: number + created_at?: string + details_fonction?: string | null + est_referent?: boolean | null + fonction?: Database["public"]["Enums"]["membre_fonction"] | null + modified_at?: string + user_id?: string + } + Relationships: [ + { + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, - ] - } - action_children: { - Row: { - children: unknown[] | null - depth: number | null - id: string | null - } - Relationships: [] - } - action_definition_summary: { - Row: { - children: unknown[] | null - depth: number | null - description: string | null - have_contexte: boolean | null - have_exemples: boolean | null - have_perimetre_evaluation: boolean | null - have_preuve: boolean | null - have_questions: boolean | null - have_reduction_potentiel: boolean | null - have_ressources: boolean | null - id: string | null - identifiant: string | null - nom: string | null - phase: Database["public"]["Enums"]["action_categorie"] | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - type: Database["public"]["Enums"]["action_type"] | null - } - Relationships: [] - } - action_discussion_feed: { - Row: { - action_id: string | null - collectivite_id: number | null - commentaires: Json[] | null - created_at: string | null - created_by: string | null - id: number | null - modified_at: string | null - status: Database["public"]["Enums"]["action_discussion_statut"] | null - } - Relationships: [ { - foreignKeyName: "action_discussion_action_id_fkey" - columns: ["action_id"] + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_premier_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_collectivite_membre_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + private_utilisateur_droit: { + Row: { + active: boolean + collectivite_id: number + created_at: string + id: number + invitation_id: string | null + modified_at: string + niveau_acces: Database["public"]["Enums"]["niveau_acces"] + user_id: string + } + Insert: { + active: boolean + collectivite_id: number + created_at?: string + id?: number + invitation_id?: string | null + modified_at?: string + niveau_acces?: Database["public"]["Enums"]["niveau_acces"] + user_id: string + } + Update: { + active?: boolean + collectivite_id?: number + created_at?: string + id?: number + invitation_id?: string | null + modified_at?: string + niveau_acces?: Database["public"]["Enums"]["niveau_acces"] + user_id?: string + } + Relationships: [ { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + question: { + Row: { + description: string + formulation: string + id: string + ordonnancement: number | null + thematique_id: string | null + type: Database["public"]["Enums"]["question_type"] + types_collectivites_concernees: + | Database["public"]["Enums"]["type_collectivite"][] + | null + } + Insert: { + description: string + formulation: string + id: string + ordonnancement?: number | null + thematique_id?: string | null + type: Database["public"]["Enums"]["question_type"] + types_collectivites_concernees?: + | Database["public"]["Enums"]["type_collectivite"][] + | null + } + Update: { + description?: string + formulation?: string + id?: string + ordonnancement?: number | null + thematique_id?: string | null + type?: Database["public"]["Enums"]["question_type"] + types_collectivites_concernees?: + | Database["public"]["Enums"]["type_collectivite"][] + | null + } + Relationships: [ { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_thematique" + referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_thematique_completude" + referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_thematique_display" + referencedColumns: ["id"] }, + ] + } + question_action: { + Row: { + action_id: string + question_id: string + } + Insert: { + action_id: string + question_id: string + } + Update: { + action_id?: string + question_id?: string + } + Relationships: [ { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_action_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_action_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] + referencedRelation: "question" + referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_action_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_display" + referencedColumns: ["id"] }, + ] + } + question_choix: { + Row: { + formulation: string | null + id: string + ordonnancement: number | null + question_id: string | null + } + Insert: { + formulation?: string | null + id: string + ordonnancement?: number | null + question_id?: string | null + } + Update: { + formulation?: string | null + id?: string + ordonnancement?: number | null + question_id?: string | null + } + Relationships: [ { - foreignKeyName: "action_discussion_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_choix_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] + referencedRelation: "question" + referencedColumns: ["id"] }, { - foreignKeyName: "action_discussion_created_by_fkey" - columns: ["created_by"] + foreignKeyName: "question_choix_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "users" + referencedRelation: "question_display" referencedColumns: ["id"] }, ] } - action_referentiel: { + question_thematique: { Row: { - action_id: string | null - ascendants: unknown[] | null - depth: number | null - descendants: unknown[] | null - description: string | null - have_children: boolean | null - have_contexte: boolean | null - have_exemples: boolean | null - have_perimetre_evaluation: boolean | null - have_preuve: boolean | null - have_reduction_potentiel: boolean | null - have_ressources: boolean | null - identifiant: string | null - leaves: unknown[] | null + id: string nom: string | null - phase: Database["public"]["Enums"]["action_categorie"] | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - type: Database["public"]["Enums"]["action_type"] | null + } + Insert: { + id: string + nom?: string | null + } + Update: { + id?: string + nom?: string | null } Relationships: [] } - action_statuts: { + referentiel_definition: { Row: { - action_id: string | null - ascendants: unknown[] | null - avancement: Database["public"]["Enums"]["avancement"] | null - avancement_descendants: - | Database["public"]["Enums"]["avancement"][] - | null - avancement_detaille: number[] | null - collectivite_id: number | null - concerne: boolean | null - depth: number | null - desactive: boolean | null - descendants: unknown[] | null - description: string | null - have_children: boolean | null - have_contexte: boolean | null - have_exemples: boolean | null - have_perimetre_evaluation: boolean | null - have_preuve: boolean | null - have_reduction_potentiel: boolean | null - have_ressources: boolean | null - identifiant: string | null - nom: string | null - non_concerne: boolean | null - phase: Database["public"]["Enums"]["action_categorie"] | null - points_max_personnalises: number | null - points_max_referentiel: number | null - points_programmes: number | null - points_realises: number | null - points_restants: number | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - renseigne: boolean | null - score_non_renseigne: number | null - score_pas_fait: number | null - score_programme: number | null - score_realise: number | null - score_realise_plus_programme: number | null - type: Database["public"]["Enums"]["action_type"] | null + created_at: string + hierarchie: Database["public"]["Enums"]["action_type"][] + id: string + modified_at: string + nom: string + version: string + } + Insert: { + created_at?: string + hierarchie: Database["public"]["Enums"]["action_type"][] + id: string + modified_at?: string + nom: string + version?: string + } + Update: { + created_at?: string + hierarchie?: Database["public"]["Enums"]["action_type"][] + id?: string + modified_at?: string + nom?: string + version?: string } Relationships: [] } - action_title: { + referentiel_json: { Row: { - children: unknown[] | null - id: string | null - identifiant: string | null - nom: string | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - type: Database["public"]["Enums"]["action_type"] | null + children: Json + created_at: string + definitions: Json + } + Insert: { + children: Json + created_at?: string + definitions: Json + } + Update: { + children?: Json + created_at?: string + definitions?: Json } Relationships: [] } - active_collectivite: { + referentiel_tag: { Row: { - collectivite_id: number | null - nom: string | null + nom: string + ref: string + type: string + } + Insert: { + nom: string + ref: string + type: string + } + Update: { + nom?: string + ref?: string + type?: string } Relationships: [] } - audit: { + reponse_binaire: { Row: { - clos: boolean | null - collectivite_id: number | null - date_cnl: string | null - date_debut: string | null - date_fin: string | null - demande_id: number | null - id: number | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - valide: boolean | null - valide_labellisation: boolean | null + collectivite_id: number + modified_at: string + question_id: string + reponse: boolean | null } Insert: { - clos?: boolean | null - collectivite_id?: number | null - date_cnl?: string | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - valide?: boolean | null - valide_labellisation?: boolean | null + collectivite_id: number + modified_at?: string + question_id: string + reponse?: boolean | null } Update: { - clos?: boolean | null - collectivite_id?: number | null - date_cnl?: string | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - valide?: boolean | null - valide_labellisation?: boolean | null + collectivite_id?: number + modified_at?: string + question_id?: string + reponse?: boolean | null } - Relationships: [ - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, + Relationships: [ { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_binaire_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "demande" - referencedColumns: ["id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["demande_id"] - }, - { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] - isOneToOne: false - referencedRelation: "retool_labellisation_demande" - referencedColumns: ["id"] - }, - ] - } - audit_en_cours: { - Row: { - collectivite_id: number | null - date_debut: string | null - date_fin: string | null - demande_id: number | null - id: number | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - valide: boolean | null - } - Insert: { - collectivite_id?: number | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - valide?: boolean | null - } - Update: { - collectivite_id?: number | null - date_debut?: string | null - date_fin?: string | null - demande_id?: number | null - id?: number | null - referentiel?: Database["public"]["Enums"]["referentiel"] | null - valide?: boolean | null - } - Relationships: [ - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "reponse_binaire_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "question" referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "audit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "reponse_binaire_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_display" + referencedColumns: ["id"] }, + ] + } + reponse_choix: { + Row: { + collectivite_id: number + modified_at: string + question_id: string + reponse: string | null + } + Insert: { + collectivite_id: number + modified_at?: string + question_id: string + reponse?: string | null + } + Update: { + collectivite_id?: number + modified_at?: string + question_id?: string + reponse?: string | null + } + Relationships: [ { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_choix_question_id_fkey" + columns: ["question_id"] + isOneToOne: false + referencedRelation: "question" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_choix_question_id_fkey" + columns: ["question_id"] + isOneToOne: false + referencedRelation: "question_display" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_choix_reponse_fkey" + columns: ["reponse"] + isOneToOne: false + referencedRelation: "question_choix" + referencedColumns: ["id"] + }, + ] + } + reponse_proportion: { + Row: { + collectivite_id: number + modified_at: string + question_id: string + reponse: number | null + } + Insert: { + collectivite_id: number + modified_at?: string + question_id: string + reponse?: number | null + } + Update: { + collectivite_id?: number + modified_at?: string + question_id?: string + reponse?: number | null + } + Relationships: [ + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "comparaison_scores_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "crm_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "reponse_proportion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "demande" - referencedColumns: ["id"] + referencedRelation: "retool_score" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_audit" - referencedColumns: ["demande_id"] + referencedRelation: "site_labellisation" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_active_real_collectivites" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_carte_collectivite_active" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "stats_locales_engagement_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "reponse_proportion_question_id_fkey" + columns: ["question_id"] + isOneToOne: false + referencedRelation: "question" + referencedColumns: ["id"] }, { - foreignKeyName: "audit_demande_id_fkey" - columns: ["demande_id"] + foreignKeyName: "reponse_proportion_question_id_fkey" + columns: ["question_id"] isOneToOne: false - referencedRelation: "retool_labellisation_demande" + referencedRelation: "question_display" referencedColumns: ["id"] }, ] } - auditeurs: { - Row: { - audit_id: number | null - collectivite_id: number | null - noms: Json | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - } - Relationships: [] - } - audits: { + service_tag: { Row: { - audit: Database["labellisation"]["Tables"]["audit"]["Row"] | null - collectivite_id: number | null - demande: Database["labellisation"]["Tables"]["demande"]["Row"] | null - is_cot: boolean | null - referentiel: Database["public"]["Enums"]["referentiel"] | null + collectivite_id: number + id: number + nom: string } - Relationships: [] - } - axe_descendants: { - Row: { - axe_id: number | null - depth: number | null - descendants: number[] | null - parents: number[] | null + Insert: { + collectivite_id: number + id?: number + nom: string } - Relationships: [] - } - bibliotheque_annexe: { - Row: { - collectivite_id: number | null - commentaire: string | null - created_at: string | null - created_by: string | null - created_by_nom: string | null - fiche_id: number | null - fichier: Json | null - id: number | null - lien: Json | null - plan_ids: number[] | null + Update: { + collectivite_id?: number + id?: number + nom?: string } Relationships: [ { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] - isOneToOne: false - referencedRelation: "fiche_action" - referencedColumns: ["id"] - }, - { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] + foreignKeyName: "service_tag_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] + foreignKeyName: "service_tag_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] + foreignKeyName: "service_tag_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "fiche_resume" - referencedColumns: ["id"] + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "annexe_fiche_id_fkey" - columns: ["fiche_id"] + foreignKeyName: "service_tag_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "fiches_action" - referencedColumns: ["id"] + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] }, - ] - } - bibliotheque_fichier: { - Row: { - bucket_id: string | null - collectivite_id: number | null - confidentiel: boolean | null - file_id: string | null - filename: string | null - filesize: number | null - hash: string | null - id: number | null - } - Relationships: [ { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_completude_compute" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "service_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + site_contact: { + Row: { + email: string + formulaire: Json + modified_at: string + } + Insert: { + email: string + formulaire: Json + modified_at?: string + } + Update: { + email?: string + formulaire?: Json + modified_at?: string + } + Relationships: [] + } + sous_thematique: { + Row: { + id: number + sous_thematique: string + thematique_id: number + } + Insert: { + id?: number + sous_thematique: string + thematique_id: number + } + Update: { + id?: number + sous_thematique?: string + thematique_id?: number + } + Relationships: [ + { + foreignKeyName: "sous_thematique_thematique_id_fkey" + columns: ["thematique_id"] + isOneToOne: false + referencedRelation: "thematique" + referencedColumns: ["id"] + }, + ] + } + structure_tag: { + Row: { + collectivite_id: number + id: number + nom: string + } + Insert: { + collectivite_id: number + id?: number + nom: string + } + Update: { + collectivite_id?: number + id?: number + nom?: string + } + Relationships: [ { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" + foreignKeyName: "structure_tag_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "objects_bucketId_fkey" - columns: ["bucket_id"] - isOneToOne: false - referencedRelation: "buckets" - referencedColumns: ["id"] - }, ] } - client_action_statut: { + tableau_de_bord_module: { Row: { - action_id: string | null - avancement: Database["public"]["Enums"]["avancement"] | null - collectivite_id: number | null - concerne: boolean | null - modified_by: string | null + collectivite_id: number + created_at: string + id: string + modified_at: string + options: Json + slug: string + titre: string + type: string + user_id: string | null } Insert: { - action_id?: string | null - avancement?: Database["public"]["Enums"]["avancement"] | null - collectivite_id?: number | null - concerne?: boolean | null - modified_by?: string | null + collectivite_id: number + created_at?: string + id?: string + modified_at?: string + options: Json + slug: string + titre: string + type: string + user_id?: string | null } Update: { - action_id?: string | null - avancement?: Database["public"]["Enums"]["avancement"] | null - collectivite_id?: number | null - concerne?: boolean | null - modified_by?: string | null + collectivite_id?: number + created_at?: string + id?: string + modified_at?: string + options?: Json + slug?: string + titre?: string + type?: string + user_id?: string | null } Relationships: [ { - foreignKeyName: "action_statut_action_id_fkey" - columns: ["action_id"] - isOneToOne: false - referencedRelation: "action_relation" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "named_collectivite" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "tableau_de_bord_module_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "tableau_de_bord_module_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "crm_personnes" + referencedColumns: ["user_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "tableau_de_bord_module_user_id_fkey" + columns: ["user_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" - referencedColumns: ["collectivite_id"] + referencedRelation: "dcp" + referencedColumns: ["user_id"] + }, + ] + } + thematique: { + Row: { + id: number + md_id: string | null + nom: string + } + Insert: { + id?: number + md_id?: string | null + nom: string + } + Update: { + id?: number + md_id?: string | null + nom?: string + } + Relationships: [] + } + type_tabular_score: { + Row: { + action_id: string | null + avancement: Database["public"]["Enums"]["avancement"] | null + concerne: boolean | null + desactive: boolean | null + points_max_personnalises: number | null + points_max_referentiel: number | null + points_programmes: number | null + points_realises: number | null + points_restants: number | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + score_non_renseigne: number | null + score_pas_fait: number | null + score_programme: number | null + score_realise: number | null + score_realise_plus_programme: number | null + } + Insert: { + action_id?: string | null + avancement?: Database["public"]["Enums"]["avancement"] | null + concerne?: boolean | null + desactive?: boolean | null + points_max_personnalises?: number | null + points_max_referentiel?: number | null + points_programmes?: number | null + points_realises?: number | null + points_restants?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + score_non_renseigne?: number | null + score_pas_fait?: number | null + score_programme?: number | null + score_realise?: number | null + score_realise_plus_programme?: number | null + } + Update: { + action_id?: string | null + avancement?: Database["public"]["Enums"]["avancement"] | null + concerne?: boolean | null + desactive?: boolean | null + points_max_personnalises?: number | null + points_max_referentiel?: number | null + points_programmes?: number | null + points_realises?: number | null + points_restants?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + score_non_renseigne?: number | null + score_pas_fait?: number | null + score_programme?: number | null + score_realise?: number | null + score_realise_plus_programme?: number | null + } + Relationships: [] + } + usage: { + Row: { + action: Database["public"]["Enums"]["usage_action"] + collectivite_id: number | null + fonction: Database["public"]["Enums"]["usage_fonction"] + page: Database["public"]["Enums"]["visite_page"] | null + time: string + user_id: string | null + } + Insert: { + action: Database["public"]["Enums"]["usage_action"] + collectivite_id?: number | null + fonction: Database["public"]["Enums"]["usage_fonction"] + page?: Database["public"]["Enums"]["visite_page"] | null + time?: string + user_id?: string | null + } + Update: { + action?: Database["public"]["Enums"]["usage_action"] + collectivite_id?: number | null + fonction?: Database["public"]["Enums"]["usage_fonction"] + page?: Database["public"]["Enums"]["visite_page"] | null + time?: string + user_id?: string | null + } + Relationships: [] + } + utilisateur_support: { + Row: { + support: boolean + user_id: string + } + Insert: { + support?: boolean + user_id: string + } + Update: { + support?: boolean + user_id?: string + } + Relationships: [ + { + foreignKeyName: "utilisateur_support_user_id_fkey" + columns: ["user_id"] + isOneToOne: true + referencedRelation: "crm_personnes" + referencedColumns: ["user_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "utilisateur_support_user_id_fkey" + columns: ["user_id"] + isOneToOne: true + referencedRelation: "dcp" + referencedColumns: ["user_id"] + }, + ] + } + utilisateur_verifie: { + Row: { + user_id: string + verifie: boolean + } + Insert: { + user_id: string + verifie?: boolean + } + Update: { + user_id?: string + verifie?: boolean + } + Relationships: [ + { + foreignKeyName: "utilisateur_verifie_user_id_fkey" + columns: ["user_id"] + isOneToOne: true + referencedRelation: "crm_personnes" + referencedColumns: ["user_id"] + }, + { + foreignKeyName: "utilisateur_verifie_user_id_fkey" + columns: ["user_id"] + isOneToOne: true + referencedRelation: "dcp" + referencedColumns: ["user_id"] + }, + ] + } + visite: { + Row: { + collectivite_id: number | null + onglet: Database["public"]["Enums"]["visite_onglet"] | null + page: Database["public"]["Enums"]["visite_page"] + tag: Database["public"]["Enums"]["visite_tag"] | null + time: string + user_id: string | null + } + Insert: { + collectivite_id?: number | null + onglet?: Database["public"]["Enums"]["visite_onglet"] | null + page: Database["public"]["Enums"]["visite_page"] + tag?: Database["public"]["Enums"]["visite_tag"] | null + time?: string + user_id?: string | null + } + Update: { + collectivite_id?: number | null + onglet?: Database["public"]["Enums"]["visite_onglet"] | null + page?: Database["public"]["Enums"]["visite_page"] + tag?: Database["public"]["Enums"]["visite_tag"] | null + time?: string + user_id?: string | null + } + Relationships: [] + } + } + Views: { + action_audit_state: { + Row: { + action_id: string | null + audit_id: number | null + avis: string | null + collectivite_id: number | null + ordre_du_jour: boolean | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + state_id: number | null + statut: Database["public"]["Enums"]["audit_statut"] | null + } + Relationships: [ + { + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] + referencedColumns: ["id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "action_statut_modified_by_fkey" - columns: ["modified_by"] + foreignKeyName: "audit_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] + referencedRelation: "retool_plan_action_usage" + referencedColumns: ["collectivite_id"] }, - ] - } - collectivite_card: { - Row: { - code_siren_insee: string | null - collectivite_id: number | null - completude_cae: number | null - completude_cae_intervalle: string | null - completude_eci: number | null - completude_eci_intervalle: string | null - completude_intervalles: string[] | null - completude_max: number | null - completude_min: number | null - departement_code: string | null - etoiles_all: number[] | null - etoiles_cae: number | null - etoiles_eci: number | null - fait_cae_intervalle: string | null - fait_eci_intervalle: string | null - fait_intervalles: string[] | null - nom: string | null - population: number | null - population_intervalle: string | null - region_code: string | null - score_fait_cae: number | null - score_fait_eci: number | null - score_fait_max: number | null - score_fait_min: number | null - score_fait_sum: number | null - score_programme_cae: number | null - score_programme_eci: number | null - score_programme_max: number | null - score_programme_sum: number | null - type_collectivite: - | Database["public"]["Enums"]["filterable_type_collectivite"] - | null - } - Relationships: [] - } - collectivite_carte_identite: { - Row: { - code_siren_insee: string | null - collectivite_id: number | null - departement_name: string | null - is_cot: boolean | null - nom: string | null - population_source: string | null - population_totale: number | null - region_name: string | null - type_collectivite: - | Database["public"]["Enums"]["type_collectivite"] - | null - } - Relationships: [] - } - collectivite_identite: { - Row: { - id: number | null - localisation: string[] | null - population: string[] | null - type: Database["public"]["Enums"]["type_collectivite"][] | null - } - Relationships: [] - } - collectivite_niveau_acces: { - Row: { - access_restreint: boolean | null - collectivite_id: number | null - est_auditeur: boolean | null - niveau_acces: Database["public"]["Enums"]["niveau_acces"] | null - nom: string | null - } - Relationships: [] - } - comparaison_scores_audit: { - Row: { - action_id: string | null - collectivite_id: number | null - courant: Database["public"]["CompositeTypes"]["tabular_score"] | null - pre_audit: - | Database["public"]["CompositeTypes"]["tabular_score"] - | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - } - Relationships: [] - } - confidentialite_cle_primaire_compose: { - Row: { - table_name: unknown | null - } - Relationships: [] - } - confidentialite_fonctions_a_tester: { - Row: { - element: unknown | null - id_element: unknown | null - } - Relationships: [] - } - confidentialite_fonctions_parametres: { - Row: { - colonne: unknown | null - element: unknown | null - type: unknown | null - } - Relationships: [] - } - confidentialite_tables_a_tester: { - Row: { - element: unknown | null - id_element: string | null - } - Relationships: [] - } - confidentialite_tables_colonnes: { - Row: { - colonne: unknown | null - element: unknown | null - type: unknown | null - } - Relationships: [] - } - confidentialite_types_enum: { - Row: { - enum_nom: string | null - type_nom: unknown | null - } - Relationships: [] - } - confidentialite_vues_a_tester: { - Row: { - c: boolean | null - d: boolean | null - element: unknown | null - id_element: string | null - u: boolean | null - } - Relationships: [] - } - confidentialite_vues_colonnes: { - Row: { - colonne: unknown | null - element: unknown | null - type: unknown | null - } - Relationships: [] - } - crm_collectivites: { - Row: { - code_siren_insee: string | null - collectivite_id: number | null - cot: boolean | null - departement_code: string | null - departement_name: string | null - key: string | null - lab_cae_annee: number | null - lab_cae_etoiles: number | null - lab_cae_programme: number | null - lab_cae_realise: number | null - lab_eci_annee: number | null - lab_eci_etoiles: number | null - lab_eci_programme: number | null - lab_eci_realise: number | null - nature_collectivite: string | null - nom: string | null - population_totale: number | null - region_code: string | null - region_name: string | null - type_collectivite: - | Database["public"]["Enums"]["type_collectivite"] - | null - } - Relationships: [] - } - crm_droits: { - Row: { - champ_intervention: string | null - collectivite_id: number | null - collectivite_key: string | null - details_fonction: string | null - fonction: Database["public"]["Enums"]["membre_fonction"] | null - key: string | null - niveau_acces: Database["public"]["Enums"]["niveau_acces"] | null - user_id: string | null - user_key: string | null - } - Relationships: [ { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "retool_score" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + action_children: { + Row: { + children: unknown[] | null + depth: number | null + id: string | null + } + Relationships: [] + } + action_definition_summary: { + Row: { + children: unknown[] | null + depth: number | null + description: string | null + have_contexte: boolean | null + have_exemples: boolean | null + have_perimetre_evaluation: boolean | null + have_preuve: boolean | null + have_questions: boolean | null + have_reduction_potentiel: boolean | null + have_ressources: boolean | null + id: string | null + identifiant: string | null + nom: string | null + phase: Database["public"]["Enums"]["action_categorie"] | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + type: Database["public"]["Enums"]["action_type"] | null + } + Relationships: [] + } + action_discussion_feed: { + Row: { + action_id: string | null + collectivite_id: number | null + commentaires: Json[] | null + created_at: string | null + created_by: string | null + id: number | null + modified_at: string | null + status: Database["public"]["Enums"]["action_discussion_statut"] | null + } + Relationships: [ { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_discussion_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "action_discussion_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + action_referentiel: { + Row: { + action_id: string | null + ascendants: unknown[] | null + depth: number | null + descendants: unknown[] | null + description: string | null + have_children: boolean | null + have_contexte: boolean | null + have_exemples: boolean | null + have_perimetre_evaluation: boolean | null + have_preuve: boolean | null + have_reduction_potentiel: boolean | null + have_ressources: boolean | null + identifiant: string | null + leaves: unknown[] | null + nom: string | null + phase: Database["public"]["Enums"]["action_categorie"] | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + type: Database["public"]["Enums"]["action_type"] | null + } + Relationships: [] + } + action_statuts: { + Row: { + action_id: string | null + ascendants: unknown[] | null + avancement: Database["public"]["Enums"]["avancement"] | null + avancement_descendants: + | Database["public"]["Enums"]["avancement"][] + | null + avancement_detaille: number[] | null + collectivite_id: number | null + concerne: boolean | null + depth: number | null + desactive: boolean | null + descendants: unknown[] | null + description: string | null + have_children: boolean | null + have_contexte: boolean | null + have_exemples: boolean | null + have_perimetre_evaluation: boolean | null + have_preuve: boolean | null + have_reduction_potentiel: boolean | null + have_ressources: boolean | null + identifiant: string | null + nom: string | null + non_concerne: boolean | null + phase: Database["public"]["Enums"]["action_categorie"] | null + points_max_personnalises: number | null + points_max_referentiel: number | null + points_programmes: number | null + points_realises: number | null + points_restants: number | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + renseigne: boolean | null + score_non_renseigne: number | null + score_pas_fait: number | null + score_programme: number | null + score_realise: number | null + score_realise_plus_programme: number | null + type: Database["public"]["Enums"]["action_type"] | null + } + Relationships: [] + } + action_title: { + Row: { + children: unknown[] | null + id: string | null + identifiant: string | null + nom: string | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + type: Database["public"]["Enums"]["action_type"] | null + } + Relationships: [] + } + active_collectivite: { + Row: { + collectivite_id: number | null + nom: string | null + } + Relationships: [] + } + audit: { + Row: { + clos: boolean | null + collectivite_id: number | null + date_cnl: string | null + date_debut: string | null + date_fin: string | null + demande_id: number | null + id: number | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + valide: boolean | null + valide_labellisation: boolean | null + } + Insert: { + clos?: boolean | null + collectivite_id?: number | null + date_cnl?: string | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + valide?: boolean | null + valide_labellisation?: boolean | null + } + Update: { + clos?: boolean | null + collectivite_id?: number | null + date_cnl?: string | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + valide?: boolean | null + valide_labellisation?: boolean | null + } + Relationships: [ { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "private_utilisateur_droit_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - crm_indicateurs: { - Row: { - id: number | null - nb_prive: number | null - pourcentage_prive: number | null - titre: string | null - } - Relationships: [] - } - crm_labellisations: { - Row: { - annee: number | null - collectivite_key: string | null - etoiles: number | null - id: number | null - obtenue_le: string | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - score_programme: number | null - score_realise: number | null - } - Relationships: [] - } - crm_personnes: { - Row: { - email: string | null - key: string | null - nom: string | null - prenom: string | null - telephone: string | null - user_id: string | null - } - Insert: { - email?: never - key?: never - nom?: never - prenom?: never - telephone?: never - user_id?: string | null - } - Update: { - email?: never - key?: never - nom?: never - prenom?: never - telephone?: never - user_id?: string | null - } - Relationships: [ - { - foreignKeyName: "dcp_user_id_fkey" - columns: ["user_id"] - isOneToOne: true - referencedRelation: "users" - referencedColumns: ["id"] - }, - ] - } - crm_plans: { - Row: { - nb_plan: number | null - nb_plan_90pc_fa_privees: number | null - type: string | null - } - Relationships: [] - } - crm_usages: { - Row: { - _5fiches_1pilotage: boolean | null - collectivite_id: number | null - completude_cae: number | null - completude_eci: number | null - fiches: number | null - fiches_action_referentiel: number | null - fiches_changement_statut: number | null - fiches_fiche_liee: number | null - fiches_indicateur: number | null - fiches_initiees: number | null - fiches_mod_1mois: number | null - fiches_mod_3mois: number | null - fiches_mod_6mois: number | null - fiches_non_vides: number | null - fiches_pai: number | null - fiches_pilotables: number | null - fiches_pilotage: number | null - indicateur_prive: number | null - indicateurs_perso: number | null - key: string | null - min1_indicateur_perso_prive: boolean | null - min1_indicateur_predef_prive: boolean | null - min1_indicateur_prive: boolean | null - pa_date_creation: string | null - pa_non_vides: number | null - pa_pilotables: number | null - pa_view_2mois: number | null - pa_view_6mois: number | null - pai: number | null - plans: number | null - pourcentage_fa_pilotable_privee: number | null - pourcentage_fa_privee: number | null - pourcentage_indicateur_predef_prives: number | null - premier_rattachement: string | null - resultats_indicateurs: number | null - resultats_indicateurs_perso: number | null - type_pa_non_vides: string | null - } - Relationships: [] - } - departement: { - Row: { - code: string | null - libelle: string | null - region_code: string | null - } - Insert: { - code?: string | null - libelle?: string | null - region_code?: string | null - } - Update: { - code?: string | null - libelle?: string | null - region_code?: string | null - } - Relationships: [ - { - foreignKeyName: "departement_region_code_fkey" - columns: ["region_code"] - isOneToOne: false - referencedRelation: "region" - referencedColumns: ["code"] - }, - { - foreignKeyName: "departement_region_code_fkey" - columns: ["region_code"] - isOneToOne: false - referencedRelation: "region" - referencedColumns: ["code"] - }, - ] - } - export_score_audit: { - Row: { - collectivite: string | null - cot: boolean | null - date_cloture_cae: string | null - date_cloture_eci: string | null - points_cae: number | null - points_eci: number | null - programme_cae: number | null - programme_eci: number | null - realise_cae: number | null - realise_eci: number | null - region: string | null - signataire: string | null - } - Relationships: [] - } - fiche_action_personne_pilote: { - Row: { - collectivite_id: number | null - nom: string | null - tag_id: number | null - user_id: string | null - } - Relationships: [] - } - fiche_action_personne_referente: { - Row: { - collectivite_id: number | null - nom: string | null - tag_id: number | null - user_id: string | null - } - Relationships: [] - } - fiche_resume: { - Row: { - amelioration_continue: boolean | null - collectivite_id: number | null - date_fin_provisoire: string | null - id: number | null - modified_at: string | null - niveau_priorite: - | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] - | null - pilotes: Database["public"]["CompositeTypes"]["personne"][] | null - plans: Database["public"]["Tables"]["axe"]["Row"][] | null - restreint: boolean | null - statut: Database["public"]["Enums"]["fiche_action_statuts"] | null - titre: string | null - } - Relationships: [ - { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] + referencedRelation: "question_display" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "audit_demande_id_fkey" + columns: ["demande_id"] + isOneToOne: false + referencedRelation: "retool_audit" + referencedColumns: ["demande_id"] + }, + { + foreignKeyName: "audit_demande_id_fkey" + columns: ["demande_id"] + isOneToOne: false + referencedRelation: "retool_labellisation_demande" referencedColumns: ["id"] }, + ] + } + audit_en_cours: { + Row: { + collectivite_id: number | null + date_debut: string | null + date_fin: string | null + demande_id: number | null + id: number | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + valide: boolean | null + } + Insert: { + collectivite_id?: number | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + valide?: boolean | null + } + Update: { + collectivite_id?: number | null + date_debut?: string | null + date_fin?: string | null + demande_id?: number | null + id?: number | null + referentiel?: Database["public"]["Enums"]["referentiel"] | null + valide?: boolean | null + } + Relationships: [ { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_demande_id_fkey" + columns: ["demande_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "retool_audit" + referencedColumns: ["demande_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "audit_demande_id_fkey" + columns: ["demande_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "retool_labellisation_demande" + referencedColumns: ["id"] }, + ] + } + auditeurs: { + Row: { + audit_id: number | null + collectivite_id: number | null + noms: Json | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + } + Relationships: [] + } + audits: { + Row: { + audit: Database["labellisation"]["Tables"]["audit"]["Row"] | null + collectivite_id: number | null + demande: Database["labellisation"]["Tables"]["demande"]["Row"] | null + is_cot: boolean | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + } + Relationships: [] + } + axe_descendants: { + Row: { + axe_id: number | null + depth: number | null + descendants: number[] | null + parents: number[] | null + } + Relationships: [] + } + bibliotheque_annexe: { + Row: { + collectivite_id: number | null + commentaire: string | null + created_at: string | null + created_by: string | null + created_by_nom: string | null + fiche_id: number | null + fichier: Json | null + id: number | null + lien: Json | null + plan_ids: number[] | null + } + Relationships: [ { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_action" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiche_resume" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "annexe_fiche_id_fkey" + columns: ["fiche_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "fiches_action" + referencedColumns: ["id"] }, + ] + } + bibliotheque_fichier: { + Row: { + bucket_id: string | null + collectivite_id: number | null + confidentiel: boolean | null + file_id: string | null + filename: string | null + filesize: number | null + hash: string | null + id: number | null + } + Relationships: [ { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, - ] - } - fiches_action: { - Row: { - actions: - | Database["public"]["Tables"]["action_relation"]["Row"][] - | null - amelioration_continue: boolean | null - axes: Database["public"]["Tables"]["axe"]["Row"][] | null - budget_previsionnel: number | null - calendrier: string | null - cibles: Database["public"]["Enums"]["fiche_action_cibles"][] | null - collectivite_id: number | null - created_at: string | null - date_debut: string | null - date_fin_provisoire: string | null - description: string | null - fiches_liees: - | Database["public"]["Views"]["fiche_resume"]["Row"][] - | null - financements: string | null - financeurs: - | Database["public"]["CompositeTypes"]["financeur_montant"][] - | null - id: number | null - indicateurs: - | Database["public"]["Tables"]["indicateur_definition"]["Row"][] - | null - maj_termine: boolean | null - modified_at: string | null - modified_by: string | null - niveau_priorite: - | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] - | null - notes_complementaires: string | null - objectifs: string | null - partenaires: - | Database["public"]["Tables"]["partenaire_tag"]["Row"][] - | null - piliers_eci: - | Database["public"]["Enums"]["fiche_action_piliers_eci"][] - | null - pilotes: Database["public"]["CompositeTypes"]["personne"][] | null - referents: Database["public"]["CompositeTypes"]["personne"][] | null - ressources: string | null - restreint: boolean | null - resultats_attendus: - | Database["public"]["Tables"]["effet_attendu"]["Row"][] - | null - services: Database["public"]["Tables"]["service_tag"]["Row"][] | null - sous_thematiques: - | Database["public"]["Tables"]["sous_thematique"]["Row"][] - | null - statut: Database["public"]["Enums"]["fiche_action_statuts"] | null - structures: - | Database["public"]["Tables"]["structure_tag"]["Row"][] - | null - thematiques: - | Database["public"]["Tables"]["thematique"]["Row"][] - | null - titre: string | null - } - Relationships: [ { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_completude_compute" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "bibliotheque_fichier_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + client_action_statut: { + Row: { + action_id: string | null + avancement: Database["public"]["Enums"]["avancement"] | null + collectivite_id: number | null + concerne: boolean | null + modified_by: string | null + } + Insert: { + action_id?: string | null + avancement?: Database["public"]["Enums"]["avancement"] | null + collectivite_id?: number | null + concerne?: boolean | null + modified_by?: string | null + } + Update: { + action_id?: string | null + avancement?: Database["public"]["Enums"]["avancement"] | null + collectivite_id?: number | null + concerne?: boolean | null + modified_by?: string | null + } + Relationships: [ { - foreignKeyName: "fiche_action_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "action_statut_action_id_fkey" + columns: ["action_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" - referencedColumns: ["collectivite_id"] + referencedRelation: "action_relation" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_collectivite_id_fkey" + foreignKeyName: "action_statut_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "fiche_action_modified_by_fkey" - columns: ["modified_by"] + foreignKeyName: "action_statut_collectivite_id_fkey" + columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] + referencedRelation: "suivi_audit" + referencedColumns: ["collectivite_id"] }, ] } - fiches_liees_par_fiche: { - Row: { - fiche_id: number | null - fiche_liee_id: number | null - } - Relationships: [] - } - historique: { + collectivite_card: { Row: { - action_id: string | null - action_identifiant: string | null - action_ids: unknown[] | null - action_nom: string | null - avancement: Database["public"]["Enums"]["avancement"] | null - avancement_detaille: number[] | null + code_siren_insee: string | null collectivite_id: number | null - concerne: boolean | null - justification: string | null - modified_at: string | null - modified_by_id: string | null - modified_by_nom: string | null - precision: string | null - previous_avancement: Database["public"]["Enums"]["avancement"] | null - previous_avancement_detaille: number[] | null - previous_concerne: boolean | null - previous_justification: string | null - previous_modified_at: string | null - previous_modified_by_id: string | null - previous_precision: string | null - previous_reponse: Json | null - question_formulation: string | null - question_id: string | null - question_type: Database["public"]["Enums"]["question_type"] | null - reponse: Json | null - tache_identifiant: string | null - tache_nom: string | null - thematique_id: string | null - thematique_nom: string | null - type: string | null + completude_cae: number | null + completude_cae_intervalle: string | null + completude_eci: number | null + completude_eci_intervalle: string | null + completude_intervalles: string[] | null + completude_max: number | null + completude_min: number | null + departement_code: string | null + etoiles_all: number[] | null + etoiles_cae: number | null + etoiles_eci: number | null + fait_cae_intervalle: string | null + fait_eci_intervalle: string | null + fait_intervalles: string[] | null + nom: string | null + population: number | null + population_intervalle: string | null + region_code: string | null + score_fait_cae: number | null + score_fait_eci: number | null + score_fait_max: number | null + score_fait_min: number | null + score_fait_sum: number | null + score_programme_cae: number | null + score_programme_eci: number | null + score_programme_max: number | null + score_programme_sum: number | null + type_collectivite: + | Database["public"]["Enums"]["filterable_type_collectivite"] + | null } Relationships: [] } - historique_utilisateur: { + collectivite_carte_identite: { Row: { + code_siren_insee: string | null collectivite_id: number | null - modified_by_id: string | null - modified_by_nom: string | null + departement_name: string | null + is_cot: boolean | null + nom: string | null + population_source: string | null + population_totale: number | null + region_name: string | null + type_collectivite: + | Database["public"]["Enums"]["type_collectivite"] + | null } Relationships: [] } - indicateur_summary: { + collectivite_identite: { Row: { - categorie: string | null - collectivite_id: number | null - nombre: number | null - rempli: number | null + id: number | null + localisation: string[] | null + population: string[] | null + type: Database["public"]["Enums"]["type_collectivite"][] | null } Relationships: [] } - mes_collectivites: { + collectivite_niveau_acces: { Row: { access_restreint: boolean | null collectivite_id: number | null @@ -26419,2029 +15036,2222 @@ export type Database = { } Relationships: [] } - named_collectivite: { + comparaison_scores_audit: { Row: { + action_id: string | null collectivite_id: number | null - nom: string | null + courant: Database["public"]["CompositeTypes"]["tabular_score"] | null + pre_audit: + | Database["public"]["CompositeTypes"]["tabular_score"] + | null + referentiel: Database["public"]["Enums"]["referentiel"] | null } Relationships: [] } - ongoing_maintenance: { + confidentialite_cle_primaire_compose: { Row: { - begins_at: string | null - ends_at: string | null - now: string | null + table_name: unknown | null } Relationships: [] } - pg_all_foreign_keys: { + confidentialite_fonctions_a_tester: { Row: { - fk_columns: unknown[] | null - fk_constraint_name: unknown | null - fk_schema_name: unknown | null - fk_table_name: unknown | null - fk_table_oid: unknown | null - is_deferrable: boolean | null - is_deferred: boolean | null - match_type: string | null - on_delete: string | null - on_update: string | null - pk_columns: unknown[] | null - pk_constraint_name: unknown | null - pk_index_name: unknown | null - pk_schema_name: unknown | null - pk_table_name: unknown | null - pk_table_oid: unknown | null + element: unknown | null + id_element: unknown | null + } + Relationships: [] + } + confidentialite_fonctions_parametres: { + Row: { + colonne: unknown | null + element: unknown | null + type: unknown | null + } + Relationships: [] + } + confidentialite_tables_a_tester: { + Row: { + element: unknown | null + id_element: string | null + } + Relationships: [] + } + confidentialite_tables_colonnes: { + Row: { + colonne: unknown | null + element: unknown | null + type: unknown | null + } + Relationships: [] + } + confidentialite_types_enum: { + Row: { + enum_nom: string | null + type_nom: unknown | null + } + Relationships: [] + } + confidentialite_vues_a_tester: { + Row: { + c: boolean | null + d: boolean | null + element: unknown | null + id_element: string | null + u: boolean | null + } + Relationships: [] + } + confidentialite_vues_colonnes: { + Row: { + colonne: unknown | null + element: unknown | null + type: unknown | null + } + Relationships: [] + } + crm_collectivites: { + Row: { + code_siren_insee: string | null + collectivite_id: number | null + cot: boolean | null + departement_code: string | null + departement_name: string | null + key: string | null + lab_cae_annee: number | null + lab_cae_etoiles: number | null + lab_cae_programme: number | null + lab_cae_realise: number | null + lab_eci_annee: number | null + lab_eci_etoiles: number | null + lab_eci_programme: number | null + lab_eci_realise: number | null + nature_collectivite: string | null + nom: string | null + population_totale: number | null + region_code: string | null + region_name: string | null + type_collectivite: + | Database["public"]["Enums"]["type_collectivite"] + | null } Relationships: [] } - plan_action: { + crm_droits: { Row: { + champ_intervention: string | null collectivite_id: number | null - id: number | null - plan: Json | null - } - Insert: { - collectivite_id?: number | null - id?: number | null - plan?: never - } - Update: { - collectivite_id?: number | null - id?: number | null - plan?: never + collectivite_key: string | null + details_fonction: string | null + fonction: Database["public"]["Enums"]["membre_fonction"] | null + key: string | null + niveau_acces: Database["public"]["Enums"]["niveau_acces"] | null + user_id: string | null + user_key: string | null } Relationships: [ { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + crm_indicateurs: { + Row: { + id: number | null + nb_prive: number | null + pourcentage_prive: number | null + titre: string | null + } + Relationships: [] + } + crm_labellisations: { + Row: { + annee: number | null + collectivite_key: string | null + etoiles: number | null + id: number | null + obtenue_le: string | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + score_programme: number | null + score_realise: number | null + } + Relationships: [] + } + crm_personnes: { + Row: { + email: string | null + key: string | null + nom: string | null + prenom: string | null + telephone: string | null + user_id: string | null + } + Insert: { + email?: never + key?: never + nom?: never + prenom?: never + telephone?: never + user_id?: string | null + } + Update: { + email?: never + key?: never + nom?: never + prenom?: never + telephone?: never + user_id?: string | null + } + Relationships: [] + } + crm_plans: { + Row: { + nb_plan: number | null + nb_plan_90pc_fa_privees: number | null + type: string | null + } + Relationships: [] + } + crm_usages: { + Row: { + _5fiches_1pilotage: boolean | null + collectivite_id: number | null + completude_cae: number | null + completude_eci: number | null + fiches: number | null + fiches_action_referentiel: number | null + fiches_changement_statut: number | null + fiches_fiche_liee: number | null + fiches_indicateur: number | null + fiches_initiees: number | null + fiches_mod_1mois: number | null + fiches_mod_3mois: number | null + fiches_mod_6mois: number | null + fiches_non_vides: number | null + fiches_pai: number | null + fiches_pilotables: number | null + fiches_pilotage: number | null + indicateur_prive: number | null + indicateurs_perso: number | null + key: string | null + min1_indicateur_perso_prive: boolean | null + min1_indicateur_predef_prive: boolean | null + min1_indicateur_prive: boolean | null + pa_date_creation: string | null + pa_non_vides: number | null + pa_pilotables: number | null + pa_view_2mois: number | null + pa_view_6mois: number | null + pai: number | null + plans: number | null + pourcentage_fa_pilotable_privee: number | null + pourcentage_fa_privee: number | null + pourcentage_indicateur_predef_prives: number | null + premier_rattachement: string | null + resultats_indicateurs: number | null + resultats_indicateurs_perso: number | null + type_pa_non_vides: string | null + } + Relationships: [] + } + departement: { + Row: { + code: string | null + libelle: string | null + region_code: string | null + } + Insert: { + code?: string | null + libelle?: string | null + region_code?: string | null + } + Update: { + code?: string | null + libelle?: string | null + region_code?: string | null + } + Relationships: [ { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "axe_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "departement_region_code_fkey" + columns: ["region_code"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] + referencedRelation: "region" + referencedColumns: ["code"] }, + ] + } + export_score_audit: { + Row: { + collectivite: string | null + cot: boolean | null + date_cloture_cae: string | null + date_cloture_eci: string | null + points_cae: number | null + points_eci: number | null + programme_cae: number | null + programme_eci: number | null + realise_cae: number | null + realise_eci: number | null + region: string | null + signataire: string | null + } + Relationships: [] + } + fiche_action_personne_pilote: { + Row: { + collectivite_id: number | null + nom: string | null + tag_id: number | null + user_id: string | null + } + Relationships: [] + } + fiche_action_personne_referente: { + Row: { + collectivite_id: number | null + nom: string | null + tag_id: number | null + user_id: string | null + } + Relationships: [] + } + fiche_resume: { + Row: { + amelioration_continue: boolean | null + collectivite_id: number | null + date_fin_provisoire: string | null + id: number | null + modified_at: string | null + niveau_priorite: + | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] + | null + pilotes: Database["public"]["CompositeTypes"]["personne"][] | null + plans: Database["public"]["Tables"]["axe"]["Row"][] | null + restreint: boolean | null + statut: Database["public"]["Enums"]["fiche_action_statuts"] | null + titre: string | null + } + Relationships: [ { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, - ] - } - plan_action_chemin: { - Row: { - axe_id: number | null - chemin: Database["public"]["Tables"]["axe"]["Row"][] | null - collectivite_id: number | null - plan_id: number | null - } - Relationships: [] - } - plan_action_profondeur: { - Row: { - collectivite_id: number | null - id: number | null - plan: Json | null - } - Insert: { - collectivite_id?: number | null - id?: number | null - plan?: never - } - Update: { - collectivite_id?: number | null - id?: number | null - plan?: never - } - Relationships: [ { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_completude_compute" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + fiches_action: { + Row: { + actions: + | Database["public"]["Tables"]["action_relation"]["Row"][] + | null + amelioration_continue: boolean | null + axes: Database["public"]["Tables"]["axe"]["Row"][] | null + budget_previsionnel: number | null + calendrier: string | null + cibles: string[] | null + collectivite_id: number | null + created_at: string | null + date_debut: string | null + date_fin_provisoire: string | null + description: string | null + fiches_liees: + | Database["public"]["Views"]["fiche_resume"]["Row"][] + | null + financements: string | null + financeurs: + | Database["public"]["CompositeTypes"]["financeur_montant"][] + | null + id: number | null + indicateurs: + | Database["public"]["Tables"]["indicateur_definition"]["Row"][] + | null + instance_gouvernance: string | null + libres_tag: Database["public"]["Tables"]["libre_tag"]["Row"][] | null + maj_termine: boolean | null + modified_at: string | null + modified_by: string | null + niveau_priorite: + | Database["public"]["Enums"]["fiche_action_niveaux_priorite"] + | null + notes_complementaires: string | null + objectifs: string | null + partenaires: + | Database["public"]["Tables"]["partenaire_tag"]["Row"][] + | null + participation_citoyenne: string | null + participation_citoyenne_type: string | null + piliers_eci: + | Database["public"]["Enums"]["fiche_action_piliers_eci"][] + | null + pilotes: Database["public"]["CompositeTypes"]["personne"][] | null + referents: Database["public"]["CompositeTypes"]["personne"][] | null + ressources: string | null + restreint: boolean | null + resultats_attendus: + | Database["public"]["Tables"]["effet_attendu"]["Row"][] + | null + services: Database["public"]["Tables"]["service_tag"]["Row"][] | null + sous_thematiques: + | Database["public"]["Tables"]["sous_thematique"]["Row"][] + | null + statut: Database["public"]["Enums"]["fiche_action_statuts"] | null + structures: + | Database["public"]["Tables"]["structure_tag"]["Row"][] + | null + temps_de_mise_en_oeuvre: Json | null + thematiques: + | Database["public"]["Tables"]["thematique"]["Row"][] + | null + titre: string | null + } + Relationships: [ { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "axe_collectivite_id_fkey" + foreignKeyName: "fiche_action_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, ] } - preuve: { + fiches_liees_par_fiche: { Row: { - action: Json | null - audit: Json | null - collectivite_id: number | null - commentaire: string | null - created_at: string | null - created_by: string | null - created_by_nom: string | null - demande: Json | null - fichier: Json | null - id: number | null - lien: Json | null - preuve_reglementaire: Json | null - preuve_type: Database["public"]["Enums"]["preuve_type"] | null - rapport: Json | null + fiche_id: number | null + fiche_liee_id: number | null } Relationships: [] } - question_display: { + historique: { Row: { + action_id: string | null + action_identifiant: string | null action_ids: unknown[] | null - choix: Json[] | null + action_nom: string | null + avancement: Database["public"]["Enums"]["avancement"] | null + avancement_detaille: number[] | null collectivite_id: number | null - description: string | null - formulation: string | null - id: string | null - localisation: string[] | null - ordonnancement: number | null - population: string[] | null - thematique_id: string | null - thematique_nom: string | null - type: Database["public"]["Enums"]["question_type"] | null - types_collectivites_concernees: - | Database["public"]["Enums"]["type_collectivite"][] - | null - } - Relationships: [ - { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "question_thematique" - referencedColumns: ["id"] - }, - { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "question_thematique_completude" - referencedColumns: ["id"] - }, - { - foreignKeyName: "question_thematique_id_fkey" - columns: ["thematique_id"] - isOneToOne: false - referencedRelation: "question_thematique_display" - referencedColumns: ["id"] - }, - ] + concerne: boolean | null + justification: string | null + modified_at: string | null + modified_by_id: string | null + modified_by_nom: string | null + precision: string | null + previous_avancement: Database["public"]["Enums"]["avancement"] | null + previous_avancement_detaille: number[] | null + previous_concerne: boolean | null + previous_justification: string | null + previous_modified_at: string | null + previous_modified_by_id: string | null + previous_precision: string | null + previous_reponse: Json | null + question_formulation: string | null + question_id: string | null + question_type: Database["public"]["Enums"]["question_type"] | null + reponse: Json | null + tache_identifiant: string | null + tache_nom: string | null + thematique_id: string | null + thematique_nom: string | null + type: string | null + } + Relationships: [] } - question_thematique_completude: { + historique_utilisateur: { Row: { collectivite_id: number | null - completude: - | Database["public"]["Enums"]["thematique_completude"] - | null - id: string | null - nom: string | null - referentiels: Database["public"]["Enums"]["referentiel"][] | null + modified_by_id: string | null + modified_by_nom: string | null } Relationships: [] } - question_thematique_display: { + indicateur_summary: { Row: { - id: string | null - nom: string | null - referentiels: Database["public"]["Enums"]["referentiel"][] | null + categorie: string | null + collectivite_id: number | null + nombre: number | null + rempli: number | null } Relationships: [] } - region: { + mes_collectivites: { Row: { - code: string | null - libelle: string | null - } - Insert: { - code?: string | null - libelle?: string | null - } - Update: { - code?: string | null - libelle?: string | null + access_restreint: boolean | null + collectivite_id: number | null + est_auditeur: boolean | null + niveau_acces: Database["public"]["Enums"]["niveau_acces"] | null + nom: string | null } Relationships: [] } - reponse_display: { + named_collectivite: { Row: { collectivite_id: number | null - justification: string | null - question_id: string | null - reponse: Json | null + nom: string | null } Relationships: [] } - retool_active_collectivite: { + ongoing_maintenance: { Row: { - collectivite_id: number | null - nom: string | null + begins_at: string | null + ends_at: string | null + now: string | null } Relationships: [] } - retool_audit: { + pg_all_foreign_keys: { + Row: { + fk_columns: unknown[] | null + fk_constraint_name: unknown | null + fk_schema_name: unknown | null + fk_table_name: unknown | null + fk_table_oid: unknown | null + is_deferrable: boolean | null + is_deferred: boolean | null + match_type: string | null + on_delete: string | null + on_update: string | null + pk_columns: unknown[] | null + pk_constraint_name: unknown | null + pk_index_name: unknown | null + pk_schema_name: unknown | null + pk_table_name: unknown | null + pk_table_oid: unknown | null + } + Relationships: [] + } + plan_action: { Row: { - audit_id: number | null - clos: boolean | null collectivite_id: number | null - date_attribution_auditeur: string | null - date_cnl: string | null - date_debut: string | null - date_demande: string | null - date_fin: string | null - demande_id: number | null - etoiles: Database["labellisation"]["Enums"]["etoile"] | null - nom: string | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - type_audit: string | null - valide_labellisation: boolean | null + id: number | null + plan: Json | null + } + Insert: { + collectivite_id?: number | null + id?: number | null + plan?: never + } + Update: { + collectivite_id?: number | null + id?: number | null + plan?: never } Relationships: [ { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "action_statuts" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "axe_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "active_collectivite" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "axe_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "auditeurs" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "axe_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "audits" + referencedColumns: ["collectivite_id"] + }, + { + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite" referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_membre_crm" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_card" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_carte_identite" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] + referencedRelation: "retool_completude_compute" + referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_niveau_acces" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "comparaison_scores_audit" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + plan_action_chemin: { + Row: { + axe_id: number | null + chemin: Database["public"]["Tables"]["axe"]["Row"][] | null + collectivite_id: number | null + plan_id: number | null + } + Relationships: [] + } + plan_action_profondeur: { + Row: { + collectivite_id: number | null + id: number | null + plan: Json | null + } + Insert: { + collectivite_id?: number | null + id?: number | null + plan?: never + } + Update: { + collectivite_id?: number | null + id?: number | null + plan?: never + } + Relationships: [ { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "audit_collectivite_id_fkey" + foreignKeyName: "axe_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, ] } - retool_completude: { - Row: { - code_siren_insee: string | null - collectivite_id: number | null - completude_cae: number | null - completude_eci: number | null - departement_name: string | null - nom: string | null - population_totale: number | null - region_name: string | null - type_collectivite: - | Database["public"]["Enums"]["type_collectivite"] - | null - } - Relationships: [] - } - retool_completude_compute: { + preuve: { Row: { + action: Json | null + audit: Json | null collectivite_id: number | null - completude_cae: number | null - completude_eci: number | null - nom: string | null + commentaire: string | null + created_at: string | null + created_by: string | null + created_by_nom: string | null + demande: Json | null + fichier: Json | null + id: number | null + lien: Json | null + preuve_reglementaire: Json | null + preuve_type: Database["public"]["Enums"]["preuve_type"] | null + rapport: Json | null } Relationships: [] } - retool_labellisation: { + question_display: { Row: { - annee: number | null + action_ids: unknown[] | null + choix: Json[] | null collectivite_id: number | null - collectivite_nom: string | null - etoiles: number | null - id: number | null - obtenue_le: string | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - score_programme: number | null - score_realise: number | null + description: string | null + formulation: string | null + id: string | null + localisation: string[] | null + ordonnancement: number | null + population: string[] | null + thematique_id: string | null + thematique_nom: string | null + type: Database["public"]["Enums"]["question_type"] | null + types_collectivites_concernees: + | Database["public"]["Enums"]["type_collectivite"][] + | null } Relationships: [ { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "question_thematique" referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_thematique_completude" + referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" - columns: ["collectivite_id"] + foreignKeyName: "question_thematique_id_fkey" + columns: ["thematique_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" - referencedColumns: ["collectivite_id"] + referencedRelation: "question_thematique_display" + referencedColumns: ["id"] }, + ] + } + question_thematique_completude: { + Row: { + collectivite_id: number | null + completude: + | Database["public"]["Enums"]["thematique_completude"] + | null + id: string | null + nom: string | null + referentiels: Database["public"]["Enums"]["referentiel"][] | null + } + Relationships: [] + } + question_thematique_display: { + Row: { + id: string | null + nom: string | null + referentiels: Database["public"]["Enums"]["referentiel"][] | null + } + Relationships: [] + } + region: { + Row: { + code: string | null + libelle: string | null + } + Insert: { + code?: string | null + libelle?: string | null + } + Update: { + code?: string | null + libelle?: string | null + } + Relationships: [] + } + reponse_display: { + Row: { + collectivite_id: number | null + justification: string | null + question_id: string | null + reponse: Json | null + } + Relationships: [] + } + retool_active_collectivite: { + Row: { + collectivite_id: number | null + nom: string | null + } + Relationships: [] + } + retool_audit: { + Row: { + audit_id: number | null + clos: boolean | null + collectivite_id: number | null + date_attribution_auditeur: string | null + date_cnl: string | null + date_debut: string | null + date_demande: string | null + date_fin: string | null + demande_id: number | null + etoiles: Database["labellisation"]["Enums"]["etoile"] | null + nom: string | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + type_audit: string | null + valide_labellisation: boolean | null + } + Relationships: [ { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" + columns: ["collectivite_id"] + isOneToOne: false + referencedRelation: "collectivite" + referencedColumns: ["id"] + }, + { + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_identite" referencedColumns: ["id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "labellisation_collectivite_id_fkey" + foreignKeyName: "audit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + retool_completude: { + Row: { + code_siren_insee: string | null + collectivite_id: number | null + completude_cae: number | null + completude_eci: number | null + departement_name: string | null + nom: string | null + population_totale: number | null + region_name: string | null + type_collectivite: + | Database["public"]["Enums"]["type_collectivite"] + | null + } + Relationships: [] + } + retool_completude_compute: { + Row: { + collectivite_id: number | null + completude_cae: number | null + completude_eci: number | null + nom: string | null + } + Relationships: [] + } + retool_labellisation: { + Row: { + annee: number | null + collectivite_id: number | null + collectivite_nom: string | null + etoiles: number | null + id: number | null + obtenue_le: string | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + score_programme: number | null + score_realise: number | null + } + Relationships: [ { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - ] - } - retool_labellisation_demande: { - Row: { - collectivite_id: number | null - date: string | null - demandeur_email: string | null - demandeur_fonction: - | Database["public"]["Enums"]["membre_fonction"] - | null - demandeur_nom: string | null - demandeur_prenom: string | null - en_cours: boolean | null - envoyee_le: string | null - etoiles: Database["labellisation"]["Enums"]["etoile"] | null - id: number | null - modified_at: string | null - nom: string | null - referentiel: Database["public"]["Enums"]["referentiel"] | null - sujet: Database["labellisation"]["Enums"]["sujet_demande"] | null - } - Relationships: [ - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "late_collectivite" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_snippet" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_statuts" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "active_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "auditeurs" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_card" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_carte_identite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_identite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_niveau_acces" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "comparaison_scores_audit" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_collectivites" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "named_collectivite" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_display" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "question_thematique_completude" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_active_collectivite" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { - foreignKeyName: "demande_collectivite_id_fkey" + foreignKeyName: "labellisation_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, + ] + } + retool_labellisation_demande: { + Row: { + collectivite_id: number | null + date: string | null + demandeur_email: string | null + demandeur_fonction: + | Database["public"]["Enums"]["membre_fonction"] + | null + demandeur_nom: string | null + demandeur_prenom: string | null + en_cours: boolean | null + envoyee_le: string | null + etoiles: Database["labellisation"]["Enums"]["etoile"] | null + id: number | null + modified_at: string | null + nom: string | null + referentiel: Database["public"]["Enums"]["referentiel"] | null + sujet: Database["labellisation"]["Enums"]["sujet_demande"] | null + } + Relationships: [ { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_completude_compute" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_hebdo" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_plan_action_usage" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "retool_score" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "site_labellisation" + referencedRelation: "collectivite_card" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_active_real_collectivites" + referencedRelation: "collectivite_carte_identite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_carte_collectivite_active" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite_identite" + referencedColumns: ["id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "stats_locales_engagement_collectivite" + referencedRelation: "collectivite_niveau_acces" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "suivi_audit" + referencedRelation: "comparaison_scores_audit" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "carte_collectivite_active" + referencedRelation: "crm_collectivites" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" + referencedRelation: "crm_usages" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_action_statut" + referencedRelation: "named_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_labellisation" + referencedRelation: "question_display" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_plan_action" + referencedRelation: "question_thematique_completude" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_referentiel" + referencedRelation: "retool_active_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite_utilisateur" + referencedRelation: "retool_completude" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "crm_usages" + referencedRelation: "retool_completude_compute" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "engagement_collectivite" + referencedRelation: "retool_plan_action_hebdo" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_engagement_collectivite" + referencedRelation: "retool_plan_action_premier_usage" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "locales_pourcentage_completude" + referencedRelation: "retool_plan_action_usage" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "rattachement" + referencedRelation: "retool_score" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_indicateur_resultat" + referencedRelation: "site_labellisation" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_binaire" + referencedRelation: "stats_active_real_collectivites" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_choix" + referencedRelation: "stats_carte_collectivite_active" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_reponse_proportion" + referencedRelation: "stats_locales_engagement_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "demande_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "report_scores" + referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, ] @@ -28547,78 +17357,36 @@ export type Database = { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_membre_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivites_crm" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "late_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "action_snippet" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "retool_plan_action_premier_usage" + referencedRelation: "action_statuts" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "action_statuts" + referencedRelation: "active_collectivite" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "active_collectivite" + referencedRelation: "auditeurs" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "auditeurs" + referencedRelation: "audits" referencedColumns: ["collectivite_id"] }, { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" columns: ["collectivite_id"] isOneToOne: false - referencedRelation: "audits" - referencedColumns: ["collectivite_id"] + referencedRelation: "collectivite" + referencedColumns: ["id"] }, { foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" @@ -28774,132 +17542,6 @@ export type Database = { referencedRelation: "suivi_audit" referencedColumns: ["collectivite_id"] }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "carte_collectivite_active" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_action_statut" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_labellisation" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_plan_action" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_referentiel" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "collectivite_utilisateur" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "crm_usages" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_engagement_collectivite" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "locales_pourcentage_completude" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "rattachement" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_indicateur_resultat" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_binaire" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_choix" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_reponse_proportion" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_collectivite_id_fkey" - columns: ["collectivite_id"] - isOneToOne: false - referencedRelation: "report_scores" - referencedColumns: ["collectivite_id"] - }, - { - foreignKeyName: "private_utilisateur_droit_user_id_fkey" - columns: ["user_id"] - isOneToOne: false - referencedRelation: "users" - referencedColumns: ["id"] - }, ] } site_labellisation: { @@ -29598,6 +18240,8 @@ export type Database = { preuve: string | null reduction_potentiel: string referentiel: Database["public"]["Enums"]["referentiel"] + referentiel_id: string + referentiel_version: string ressources: string }[] } @@ -29924,6 +18568,7 @@ export type Database = { modified_at: string modified_by: string | null nom: string | null + panier_id: string | null parent: number | null plan: number | null type: number | null @@ -32732,6 +21377,7 @@ export type Database = { | "action" | "sous-action" | "tache" + | "exemple" audit_statut: "non_audite" | "en_cours" | "audite" avancement: | "fait" @@ -32853,7 +21499,7 @@ export type Database = { | "audit" | "rapport" question_type: "choix" | "binaire" | "proportion" - referentiel: "eci" | "cae" + referentiel: "eci" | "cae" | "te" | "te-test" regle_type: "score" | "desactivation" | "reduction" role_name: "agent" | "referent" | "conseiller" | "auditeur" | "aucun" thematique_completude: "complete" | "a_completer" @@ -33110,3 +21756,18 @@ export type Enums< ? PublicSchema["Enums"][PublicEnumNameOrOptions] : never +export type CompositeTypes< + PublicCompositeTypeNameOrOptions extends + | keyof PublicSchema["CompositeTypes"] + | { schema: keyof Database }, + CompositeTypeName extends PublicCompositeTypeNameOrOptions extends { + schema: keyof Database + } + ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] + : never = never, +> = PublicCompositeTypeNameOrOptions extends { schema: keyof Database } + ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] + : PublicCompositeTypeNameOrOptions extends keyof PublicSchema["CompositeTypes"] + ? PublicSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] + : never + From f7ab0b372a0580a95dc315934bc451b69bd5af63 Mon Sep 17 00:00:00 2001 From: Elisabeth Fainstein <139369258+elisfainstein@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:58:23 +0100 Subject: [PATCH 02/21] fix: add libres tag to update --- .../models/update-fiche-action.request.ts | 107 ++++++++++-------- .../services/fiches-action-update.service.ts | 18 ++- .../src/taxonomie/models/libre-tag.table.ts | 3 + 3 files changed, 77 insertions(+), 51 deletions(-) diff --git a/backend/src/fiches/models/update-fiche-action.request.ts b/backend/src/fiches/models/update-fiche-action.request.ts index 4edf4efa10..d94d3447bd 100644 --- a/backend/src/fiches/models/update-fiche-action.request.ts +++ b/backend/src/fiches/models/update-fiche-action.request.ts @@ -3,6 +3,7 @@ import { indicateurDefinitionSchema } from '../../indicateurs/models/indicateur- import { actionRelationSchema } from '../../referentiels/models/action-relation.table'; import { effetAttenduSchema } from '../../taxonomie/models/effet-attendu.table'; import { financeurTagSchema } from '../../taxonomie/models/financeur-tag.table'; +import { libreTagSchema } from '../../taxonomie/models/libre-tag.table'; import { partenaireTagSchema } from '../../taxonomie/models/partenaire-tag.table'; import { serviceTagSchema } from '../../taxonomie/models/service-tag.table'; import { sousThematiqueSchema } from '../../taxonomie/models/sous-thematique.table'; @@ -31,58 +32,64 @@ const financeurWithMontantSchema = z.object({ montantTtc: z.number().nullish(), }); -export const updateFicheActionRequestSchema = updateFicheActionSchema.extend({ - // We're overriding piliersEci and cibles because, - // for some unknown reason (a bug with zod/drizzle ?), extend() looses enum's array - piliersEci: z - .preprocess( - (val) => (typeof val === 'string' ? val.replace(/'/g, '’') : val), - z.nativeEnum(piliersEciEnumType) - ) - .array() - .nullish(), - cibles: z.nativeEnum(FicheActionCiblesEnumType).array().nullish(), - // Overriding because numeric and timestamp types are not properly converted otherwise (a bug with zod/drizzle ?) - budgetPrevisionnel: z - .union([z.string(), z.number()]) - .transform((val) => val.toString()) - .refine((val) => !isNaN(Number(val)), { - message: "Expected 'budgetPrevisionnel' to be a numeric string", - }) - .nullish(), - dateDebut: z - .string() - .nullable() - .refine((val) => val === null || !isNaN(Date.parse(val)), { - message: "Invalid date format for 'dateDebut'", - }) - .nullish(), +export const updateFicheActionRequestSchema = updateFicheActionSchema + .extend({ + // We're overriding piliersEci and cibles because, + // for some unknown reason (a bug with zod/drizzle ?), extend() looses enum's array + piliersEci: z + .preprocess( + (val) => (typeof val === 'string' ? val.replace(/'/g, '’') : val), + z.nativeEnum(piliersEciEnumType) + ) + .array() + .nullish(), + cibles: z.nativeEnum(FicheActionCiblesEnumType).array().nullish(), + // Overriding because numeric and timestamp types are not properly converted otherwise (a bug with zod/drizzle ?) + budgetPrevisionnel: z + .union([z.string(), z.number()]) + .transform((val) => val.toString()) + .refine((val) => !isNaN(Number(val)), { + message: "Expected 'budgetPrevisionnel' to be a numeric string", + }) + .nullish(), + dateDebut: z + .string() + .nullable() + .refine((val) => val === null || !isNaN(Date.parse(val)), { + message: "Invalid date format for 'dateDebut'", + }) + .nullish(), - tempsDeMiseEnOeuvre: z - .union([ - z.number(), - z.object({ - id: z.number(), - nom: z.string(), - }), - ]) - .transform((val) => (typeof val === 'number' ? val : val.id)) - .nullish(), + tempsDeMiseEnOeuvre: z + .union([ + z.number(), + z.object({ + id: z.number(), + nom: z.string(), + }), + ]) + .transform((val) => (typeof val === 'number' ? val : val.id)) + .nullish(), - axes: axeSchema.pick({ id: true }).array().nullish(), - thematiques: thematiqueSchema.pick({ id: true }).array().nullish(), - sousThematiques: sousThematiqueSchema.pick({ id: true }).array().nullish(), - partenaires: partenaireTagSchema.pick({ id: true }).array().nullish(), - structures: structureTagSchema.pick({ id: true }).array().nullish(), - pilotes: personneSchema.array().nullish(), - referents: personneSchema.array().nullish(), - actions: actionRelationSchema.pick({ id: true }).array().nullish(), - indicateurs: indicateurDefinitionSchema.pick({ id: true }).array().nullish(), - services: serviceTagSchema.pick({ id: true }).array().nullish(), - financeurs: z.array(financeurWithMontantSchema).nullish(), - fichesLiees: ficheActionSchema.pick({ id: true }).array().nullish(), - resultatsAttendus: effetAttenduSchema.pick({ id: true }).array().nullish(), -}); + axes: axeSchema.pick({ id: true }).array().nullish(), + thematiques: thematiqueSchema.pick({ id: true }).array().nullish(), + sousThematiques: sousThematiqueSchema.pick({ id: true }).array().nullish(), + partenaires: partenaireTagSchema.pick({ id: true }).array().nullish(), + structures: structureTagSchema.pick({ id: true }).array().nullish(), + pilotes: personneSchema.array().nullish(), + referents: personneSchema.array().nullish(), + actions: actionRelationSchema.pick({ id: true }).array().nullish(), + indicateurs: indicateurDefinitionSchema + .pick({ id: true }) + .array() + .nullish(), + services: serviceTagSchema.pick({ id: true }).array().nullish(), + financeurs: z.array(financeurWithMontantSchema).nullish(), + fichesLiees: ficheActionSchema.pick({ id: true }).array().nullish(), + resultatsAttendus: effetAttenduSchema.pick({ id: true }).array().nullish(), + libres: libreTagSchema.pick({ id: true }).array().nullish(), + }) + .refine((schema) => Object.keys(schema).length > 0, 'Body cannot be empty'); export type UpdateFicheActionRequestType = z.infer< typeof updateFicheActionRequestSchema diff --git a/backend/src/fiches/services/fiches-action-update.service.ts b/backend/src/fiches/services/fiches-action-update.service.ts index 374ff5dde4..158590c68e 100644 --- a/backend/src/fiches/services/fiches-action-update.service.ts +++ b/backend/src/fiches/services/fiches-action-update.service.ts @@ -38,6 +38,7 @@ import { } from '../models/fiche-action.table'; import { UpdateFicheActionRequestType } from '../models/update-fiche-action.request'; import FicheService from './fiche.service'; +import { ficheActionLibreTagTable } from '../models/fiche-action-libre-tag.table'; type TxType = PgTransaction< PostgresJsQueryResultHKT, @@ -98,6 +99,7 @@ export default class FichesActionUpdateService { financeurs, fichesLiees, resultatsAttendus, + libres, ...unsafeFicheAction } = body; @@ -128,6 +130,7 @@ export default class FichesActionUpdateService { let updatedFinanceurs; let updatedFichesLiees; let updatedResultatsAttendus; + let updatedLibres; /** * Updates fiche action properties @@ -318,6 +321,18 @@ export default class FichesActionUpdateService { ); } + if (libres && libres.length > 0) { + updatedLibres = await this.updateRelations( + ficheActionId, + libres, + tx, + ficheActionLibreTagTable, + ['id'], + ficheActionLibreTagTable.ficheId, + [ficheActionLibreTagTable.libreTagId] + ); + } + return { ...(updatedFicheAction?.[0] || {}), axes: updatedAxes, @@ -332,7 +347,8 @@ export default class FichesActionUpdateService { services: updatedServices, financeurs: updatedFinanceurs, fichesLiees: updatedFichesLiees, - resultatAttendu: updatedResultatsAttendus, + resultatsAttendus: updatedResultatsAttendus, + libres: updatedLibres, }; }); } diff --git a/backend/src/taxonomie/models/libre-tag.table.ts b/backend/src/taxonomie/models/libre-tag.table.ts index fed97f45fa..97e8f8830b 100644 --- a/backend/src/taxonomie/models/libre-tag.table.ts +++ b/backend/src/taxonomie/models/libre-tag.table.ts @@ -1,6 +1,7 @@ import { sql } from 'drizzle-orm'; import { pgTable, timestamp, uniqueIndex, uuid } from 'drizzle-orm/pg-core'; import { tagTableBase } from './tag.table-base'; +import { createSelectSchema } from 'drizzle-zod'; export const libreTagTable = pgTable( 'libre_tag', @@ -20,3 +21,5 @@ export const libreTagTable = pgTable( }; } ); + +export const libreTagSchema = createSelectSchema(libreTagTable); From 9fab0dfc37beeabd3924670e97b769734ce1d4b4 Mon Sep 17 00:00:00 2001 From: Elisabeth Fainstein <139369258+elisfainstein@users.noreply.github.com> Date: Thu, 21 Nov 2024 17:14:51 +0100 Subject: [PATCH 03/21] test: adapt to libre tag, probably temporary delete strategy --- .../fiches/fiche-action-update.e2e-spec.ts | 60 ++++++++++++++----- .../fiche-action-relations.fixture.ts | 6 +- 2 files changed, 51 insertions(+), 15 deletions(-) diff --git a/backend/test/fiches/fiche-action-update.e2e-spec.ts b/backend/test/fiches/fiche-action-update.e2e-spec.ts index 751fd8c4ba..8b4e5e6599 100644 --- a/backend/test/fiches/fiche-action-update.e2e-spec.ts +++ b/backend/test/fiches/fiche-action-update.e2e-spec.ts @@ -4,8 +4,16 @@ import { default as request } from 'supertest'; import { describe, expect, it } from 'vitest'; import DatabaseService from '../../src/common/services/database.service'; import { UpdateFicheActionRequestClass } from '../../src/fiches/controllers/fiches-action.controller'; -import { ficheActionActionTable } from '../../src/fiches/models/fiche-action-action.table'; +import { + FicheActionCiblesEnumType, + piliersEciEnumType, + FicheActionStatutsEnumType, + ficheActionTable, +} from '../../src/fiches/models/fiche-action.table'; +import { ficheActionFixture } from './fixtures/fiche-action.fixture'; import { ficheActionAxeTable } from '../../src/fiches/models/fiche-action-axe.table'; +import { ficheActionThematiqueTable } from '../../src/fiches/models/fiche-action-thematique.table'; +import { ficheActionActionTable } from '../../src/fiches/models/fiche-action-action.table'; import { ficheActionEffetAttenduTable } from '../../src/fiches/models/fiche-action-effet-attendu.table'; import { ficheActionFinanceurTagTable } from '../../src/fiches/models/fiche-action-financeur-tag.table'; import { ficheActionIndicateurTable } from '../../src/fiches/models/fiche-action-indicateur.table'; @@ -16,14 +24,8 @@ import { ficheActionReferentTable } from '../../src/fiches/models/fiche-action-r import { ficheActionServiceTagTable } from '../../src/fiches/models/fiche-action-service.table'; import { ficheActionSousThematiqueTable } from '../../src/fiches/models/fiche-action-sous-thematique.table'; import { ficheActionStructureTagTable } from '../../src/fiches/models/fiche-action-structure-tag.table'; -import { ficheActionThematiqueTable } from '../../src/fiches/models/fiche-action-thematique.table'; -import { - FicheActionCiblesEnumType, - FicheActionStatutsEnumType, - ficheActionTable, - piliersEciEnumType, -} from '../../src/fiches/models/fiche-action.table'; import { getAuthToken } from '../auth/auth-utils'; +import { ficheActionLibreTagTable } from '../../src/fiches/models/fiche-action-libre-tag.table'; import { getTestApp } from '../common/app-utils'; import { UpdateFicheActionRequestType } from './../../src/fiches/models/update-fiche-action.request'; import { @@ -35,13 +37,13 @@ import { partenairesFixture, pilotesFixture, referentsFixture, - resultatAttenduFixture, + resultatsAttendusFixture, servicesFixture, sousThematiquesFixture, structuresFixture, thematiquesFixture, + libresFixture, } from './fixtures/fiche-action-relations.fixture'; -import { ficheActionFixture } from './fixtures/fiche-action.fixture'; const collectiviteId = 1; const ficheActionId = 9999; @@ -57,6 +59,11 @@ describe('FichesActionUpdateService', () => { databaseService = app.get(DatabaseService); + // There's no delete cascade on ficheActionLibreTagTable, so we have to delete manually + await databaseService.db + .delete(ficheActionLibreTagTable) + .where(eq(ficheActionLibreTagTable.ficheId, ficheActionId)); + await databaseService.db .delete(ficheActionTable) .where(eq(ficheActionTable.id, ficheActionId)); @@ -69,6 +76,11 @@ describe('FichesActionUpdateService', () => { }); afterAll(async () => { + // There's no delete cascade on ficheActionLibreTagTable, so we have to delete manually + await databaseService.db + .delete(ficheActionLibreTagTable) + .where(eq(ficheActionLibreTagTable.ficheId, ficheActionId)); + await databaseService.db .delete(ficheActionTable) .where(eq(ficheActionTable.id, ficheActionId)); @@ -465,7 +477,7 @@ describe('FichesActionUpdateService', () => { ]); }); - it('should update the fichesLiees relations in the database', async () => { + it('should update the fiches liees relations in the database', async () => { const data: UpdateFicheActionRequestClass = { fichesLiees: [{ id: 1 }, { id: 2 }], }; @@ -480,7 +492,7 @@ describe('FichesActionUpdateService', () => { ]); }); - it('should update the resultatAttendu relations in the database', async () => { + it('should update the resultats attendus relations in the database', async () => { const data: UpdateFicheActionRequestClass = { resultatsAttendus: [ { @@ -496,11 +508,26 @@ describe('FichesActionUpdateService', () => { const body = response.body; - expect(body.resultatAttendu).toStrictEqual([ + expect(body.resultatsAttendus).toStrictEqual([ { ficheId: ficheActionId, effetAttenduId: 21 }, { ficheId: ficheActionId, effetAttenduId: 22 }, ]); }); + + it('should update the libres tag relations in the database', async () => { + const data: UpdateFicheActionRequestClass = { + libres: [{ id: 1 }, { id: 2 }], + }; + + const response = await putRequest(data); + + const body = response.body; + + expect(body.libres).toStrictEqual([ + { ficheId: ficheActionId, libreTagId: 1 }, + { ficheId: ficheActionId, libreTagId: 2 }, + ]); + }); }); describe('Access Rights', () => { @@ -645,7 +672,12 @@ describe('FichesActionUpdateService', () => { await databaseService.db.insert(ficheActionEffetAttenduTable).values({ ficheId, - effetAttenduId: resultatAttenduFixture.id, + effetAttenduId: resultatsAttendusFixture.id, + }); + + await databaseService.db.insert(ficheActionLibreTagTable).values({ + ficheId, + libreTagId: libresFixture.id, }); } diff --git a/backend/test/fiches/fixtures/fiche-action-relations.fixture.ts b/backend/test/fiches/fixtures/fiche-action-relations.fixture.ts index a217c0d187..08702ecae4 100644 --- a/backend/test/fiches/fixtures/fiche-action-relations.fixture.ts +++ b/backend/test/fiches/fixtures/fiche-action-relations.fixture.ts @@ -53,6 +53,10 @@ export const fichesLieesFixture = { id: 1, }; -export const resultatAttenduFixture = { +export const resultatsAttendusFixture = { id: 4, }; + +export const libresFixture = { + id: 1, +}; From a0c790178fcc8e041fc822787ab3e1a419ed5d81 Mon Sep 17 00:00:00 2001 From: Marine Heckler Date: Fri, 22 Nov 2024 15:13:15 +0100 Subject: [PATCH 04/21] =?UTF-8?q?Corrige=20des=20probl=C3=A8mes=20de=20typ?= =?UTF-8?q?age?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FicheActionDescription/ModaleDescription.tsx | 2 +- .../TagsSuiviPersoDropdown.tsx | 5 +++-- .../src/plan-actions/domain/fiche-action.schema.ts | 10 +++++++++- packages/api/src/typeUtils.ts | 14 +++++++++----- 4 files changed, 22 insertions(+), 9 deletions(-) diff --git a/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/FicheAction/FicheActionDescription/ModaleDescription.tsx b/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/FicheAction/FicheActionDescription/ModaleDescription.tsx index 2a52b6b28d..d57a951654 100644 --- a/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/FicheAction/FicheActionDescription/ModaleDescription.tsx +++ b/app.territoiresentransitions.react/src/app/pages/collectivite/PlansActions/FicheAction/FicheActionDescription/ModaleDescription.tsx @@ -99,7 +99,7 @@ const ModaleDescription = ({ fiche, updateFiche }: ModaleDescriptionProps) => { {/* Dropdown tags personnalisés */} t.id)} + values={editedFiche.libresTag?.map((t) => t.id!)} onChange={({ libresTag }) => setEditedFiche((prevState) => ({ ...prevState, libresTag })) } diff --git a/app.territoiresentransitions.react/src/ui/dropdownLists/TagsSuiviPersoDropdown/TagsSuiviPersoDropdown.tsx b/app.territoiresentransitions.react/src/ui/dropdownLists/TagsSuiviPersoDropdown/TagsSuiviPersoDropdown.tsx index 6113a7d846..a50fdea9cd 100644 --- a/app.territoiresentransitions.react/src/ui/dropdownLists/TagsSuiviPersoDropdown/TagsSuiviPersoDropdown.tsx +++ b/app.territoiresentransitions.react/src/ui/dropdownLists/TagsSuiviPersoDropdown/TagsSuiviPersoDropdown.tsx @@ -2,6 +2,7 @@ import { Tag } from '@tet/api/shared/domain'; import { SelectMultipleProps } from '@tet/ui'; import SelectTags from '../tags/SelectTags'; import { useTagsSuiviPersoListe } from './useTagsSuiviPersoListe'; +import { LibreTag } from '@tet/api/typeUtils'; type TagsSuiviPersoDropdownProps = Omit< SelectMultipleProps, @@ -12,8 +13,8 @@ type TagsSuiviPersoDropdownProps = Omit< libresTag, selectedLibreTag, }: { - libresTag: Tag[]; - selectedLibreTag: Tag; + libresTag: LibreTag[]; + selectedLibreTag: LibreTag; }) => void; }; diff --git a/packages/api/src/plan-actions/domain/fiche-action.schema.ts b/packages/api/src/plan-actions/domain/fiche-action.schema.ts index bf8b812f54..833d2174e0 100644 --- a/packages/api/src/plan-actions/domain/fiche-action.schema.ts +++ b/packages/api/src/plan-actions/domain/fiche-action.schema.ts @@ -87,6 +87,14 @@ const auteur = z.object({ email: z.string(), }); +const libreTagSchema = z.object({ + id: z.number().nullish(), + nom: z.string(), + collectivitedId: z.number().nullish(), + createdAt: z.date().nullish(), + createdBy: z.string().nullish(), +}); + export const ficheActionSchema = z.object({ id: z.number(), collectiviteId: z.number(), @@ -140,7 +148,7 @@ export const ficheActionSchema = z.object({ actions: actionSchema.array().nullish(), financeurs: financeurSchema.array().nullish(), indicateurs: indicateurListItemSchema.array().nullish(), - libresTag: tagSchema.array().nullish(), + libresTag: libreTagSchema.array().nullish(), }); export type FicheAction = z.infer; diff --git a/packages/api/src/typeUtils.ts b/packages/api/src/typeUtils.ts index d3459e6ad4..cbe65e2db3 100644 --- a/packages/api/src/typeUtils.ts +++ b/packages/api/src/typeUtils.ts @@ -26,15 +26,19 @@ export type CompositeTypes< export type CollectiviteTag = Database['public']['Tables']['partenaire_tag']['Insert']; +export type LibreTag = Database['public']['Tables']['libre_tag']['Insert']; + // la liste des tables correspondant au schéma CollectiviteTag // utilise le "key remapping" et les types conditionnels // Ref: https://www.typescriptlang.org/docs/handbook/2/mapped-types.html#key-remapping-via-as // https://www.typescriptlang.org/docs/handbook/2/conditional-types.html -export type TableTag = keyof { - [K in TableName as TablesInsert extends CollectiviteTag - ? K - : never]: unknown; -}; +export type TableTag = + | keyof { + [K in TableName as TablesInsert extends CollectiviteTag + ? K + : never]: unknown; + } + | 'libre_tag'; /** Génère, à partir d'un type, un nouveau type dont tous les champs sont non From 9631909159c7f7cb6e5ec8803d8f5c4708cb2436 Mon Sep 17 00:00:00 2001 From: Elisabeth Fainstein <139369258+elisfainstein@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:25:19 +0100 Subject: [PATCH 05/21] fix: add forgotten columns --- .../fiches/models/fiche-action-libre-tag.table.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/backend/src/fiches/models/fiche-action-libre-tag.table.ts b/backend/src/fiches/models/fiche-action-libre-tag.table.ts index f0b718a485..11d1041ae8 100644 --- a/backend/src/fiches/models/fiche-action-libre-tag.table.ts +++ b/backend/src/fiches/models/fiche-action-libre-tag.table.ts @@ -1,12 +1,23 @@ -import { integer, pgTable, primaryKey } from 'drizzle-orm/pg-core'; import { libreTagTable } from '../../taxonomie/models/libre-tag.table'; +import { + integer, + pgTable, + primaryKey, + timestamp, + uuid, +} from 'drizzle-orm/pg-core'; import { ficheActionTable } from './fiche-action.table'; +import { sql } from 'drizzle-orm'; export const ficheActionLibreTagTable = pgTable( 'fiche_action_libre_tag', { ficheId: integer('fiche_id').references(() => ficheActionTable.id), libreTagId: integer('libre_tag_id').references(() => libreTagTable.id), + createdAt: timestamp('created_at', { withTimezone: true }) + .notNull() + .defaultNow(), + createdBy: uuid('created_by').default(sql`auth.uid()`), }, (table) => { return { From b2a891266a463519cb4190fd33446044eac22c2f Mon Sep 17 00:00:00 2001 From: Elisabeth Fainstein <139369258+elisfainstein@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:28:02 +0100 Subject: [PATCH 06/21] feature: add libres tag creation to update service --- .../models/update-fiche-action.request.ts | 15 +- .../services/fiches-action-update.service.ts | 86 +++++- .../fiches/fiche-action-update.e2e-spec.ts | 273 +++++++++++------- 3 files changed, 253 insertions(+), 121 deletions(-) diff --git a/backend/src/fiches/models/update-fiche-action.request.ts b/backend/src/fiches/models/update-fiche-action.request.ts index d94d3447bd..3872ff640a 100644 --- a/backend/src/fiches/models/update-fiche-action.request.ts +++ b/backend/src/fiches/models/update-fiche-action.request.ts @@ -87,7 +87,20 @@ export const updateFicheActionRequestSchema = updateFicheActionSchema financeurs: z.array(financeurWithMontantSchema).nullish(), fichesLiees: ficheActionSchema.pick({ id: true }).array().nullish(), resultatsAttendus: effetAttenduSchema.pick({ id: true }).array().nullish(), - libres: libreTagSchema.pick({ id: true }).array().nullish(), + libresTag: z + .array( + z + .object({ + id: z.number().optional(), + nom: z.string().min(1).optional(), + createdBy: z.string().uuid().optional(), + }) + .refine( + (data) => data.id !== undefined || data.nom !== undefined, + 'Either id or nom must be provided' + ) + ) + .nullish(), }) .refine((schema) => Object.keys(schema).length > 0, 'Body cannot be empty'); diff --git a/backend/src/fiches/services/fiches-action-update.service.ts b/backend/src/fiches/services/fiches-action-update.service.ts index 158590c68e..8e103b22e3 100644 --- a/backend/src/fiches/services/fiches-action-update.service.ts +++ b/backend/src/fiches/services/fiches-action-update.service.ts @@ -39,6 +39,7 @@ import { import { UpdateFicheActionRequestType } from '../models/update-fiche-action.request'; import FicheService from './fiche.service'; import { ficheActionLibreTagTable } from '../models/fiche-action-libre-tag.table'; +import { libreTagTable } from '../../taxonomie/models/libre-tag.table'; type TxType = PgTransaction< PostgresJsQueryResultHKT, @@ -99,7 +100,7 @@ export default class FichesActionUpdateService { financeurs, fichesLiees, resultatsAttendus, - libres, + libresTag, ...unsafeFicheAction } = body; @@ -130,7 +131,7 @@ export default class FichesActionUpdateService { let updatedFinanceurs; let updatedFichesLiees; let updatedResultatsAttendus; - let updatedLibres; + let updatedLibresTag; /** * Updates fiche action properties @@ -321,15 +322,41 @@ export default class FichesActionUpdateService { ); } - if (libres && libres.length > 0) { - updatedLibres = await this.updateRelations( + if (libresTag && libresTag.length > 0) { + const { collectiviteId } = await this.getCollectiviteIdForFiche( + tx, + ficheActionId + ); + + // Create a map of name -> id for new tags + + const tagMap = await this.createOrGetLibreTag( + tx, + libresTag, + collectiviteId + ); + + const libresTagWithResolvedIds = libresTag + .map((tag) => ({ + id: tag.id ?? tagMap.get(tag.nom ?? ''), + createdBy: tag.createdBy, + })) + .filter( + (tag): tag is { id: number; createdBy: string } => + tag.id !== undefined + ); + + updatedLibresTag = await this.updateRelations( ficheActionId, - libres, + libresTagWithResolvedIds, tx, ficheActionLibreTagTable, - ['id'], + ['id', 'createdBy'], ficheActionLibreTagTable.ficheId, - [ficheActionLibreTagTable.libreTagId] + [ + ficheActionLibreTagTable.libreTagId, + ficheActionLibreTagTable.createdBy, + ] ); } @@ -348,7 +375,7 @@ export default class FichesActionUpdateService { financeurs: updatedFinanceurs, fichesLiees: updatedFichesLiees, resultatsAttendus: updatedResultatsAttendus, - libres: updatedLibres, + libresTag: updatedLibresTag, }; }); } @@ -445,6 +472,49 @@ export default class FichesActionUpdateService { })); } + private async getCollectiviteIdForFiche(tx: TxType, ficheActionId: number) { + return await tx + .select({ collectiviteId: ficheActionTable.collectiviteId }) + .from(ficheActionTable) + .where(eq(ficheActionTable.id, ficheActionId)) + .then((rows: { collectiviteId: number }[]) => rows[0]); + } + + private async createOrGetLibreTag( + tx: TxType, + libresTag: { id?: number; nom?: string }[], + collectiviteId: number + ): Promise> { + const tagMap = new Map(); + + for (const tag of libresTag) { + if (!tag.id && tag.nom) { + const existingTag = await this.findExistingLibreTagByName(tx, tag.nom); + if (existingTag) { + tagMap.set(tag.nom, existingTag.id); + } else { + const [newTag] = await tx + .insert(libreTagTable) + .values({ + nom: tag.nom, + collectiviteId: collectiviteId, + }) + .returning(); + tagMap.set(tag.nom, newTag.id); + } + } + } + return tagMap; + } + + private async findExistingLibreTagByName(tx: TxType, nom: string) { + return tx + .select() + .from(libreTagTable) + .where(eq(libreTagTable.nom, nom)) + .then((rows: { id: number; nom: string }[]) => rows[0]); + } + /** Insère ou met à jour des notes de suivi */ async upsertNotes( ficheId: number, diff --git a/backend/test/fiches/fiche-action-update.e2e-spec.ts b/backend/test/fiches/fiche-action-update.e2e-spec.ts index 8b4e5e6599..c84c3dca58 100644 --- a/backend/test/fiches/fiche-action-update.e2e-spec.ts +++ b/backend/test/fiches/fiche-action-update.e2e-spec.ts @@ -44,6 +44,7 @@ import { thematiquesFixture, libresFixture, } from './fixtures/fiche-action-relations.fixture'; +import { libreTagTable } from '../../src/taxonomie/models/libre-tag.table'; const collectiviteId = 1; const ficheActionId = 9999; @@ -59,7 +60,7 @@ describe('FichesActionUpdateService', () => { databaseService = app.get(DatabaseService); - // There's no delete cascade on ficheActionLibreTagTable, so we have to delete manually + // Temp: there's no delete cascade on ficheActionLibreTagTable, so we have to delete manually await databaseService.db .delete(ficheActionLibreTagTable) .where(eq(ficheActionLibreTagTable.ficheId, ficheActionId)); @@ -76,7 +77,7 @@ describe('FichesActionUpdateService', () => { }); afterAll(async () => { - // There's no delete cascade on ficheActionLibreTagTable, so we have to delete manually + // Temp: there's no delete cascade on ficheActionLibreTagTable, so we have to delete manually await databaseService.db .delete(ficheActionLibreTagTable) .where(eq(ficheActionLibreTagTable.ficheId, ficheActionId)); @@ -260,19 +261,16 @@ describe('FichesActionUpdateService', () => { }; const response = await putRequest(data); - const body = response.body; - expect(body.axes).toStrictEqual([ - { - ficheId: ficheActionId, - axeId: 1, - }, - { - ficheId: ficheActionId, - axeId: 2, - }, - ]); + expect(body.axes).toContainEqual({ + ficheId: ficheActionId, + axeId: 1, + }); + expect(body.axes).toContainEqual({ + ficheId: ficheActionId, + axeId: 2, + }); }); it('should update the thematiques relations in the database', async () => { @@ -281,19 +279,16 @@ describe('FichesActionUpdateService', () => { }; const response = await putRequest(data); - const body = response.body; - expect(body.thematiques).toStrictEqual([ - { - ficheId: ficheActionId, - thematiqueId: 1, - }, - { - ficheId: ficheActionId, - thematiqueId: 2, - }, - ]); + expect(body.thematiques).toContainEqual({ + ficheId: ficheActionId, + thematiqueId: 1, + }); + expect(body.thematiques).toContainEqual({ + ficheId: ficheActionId, + thematiqueId: 2, + }); }); it('should update the sousThematiques relations in the database', async () => { @@ -302,19 +297,16 @@ describe('FichesActionUpdateService', () => { }; const response = await putRequest(data); - const body = response.body; - expect(body.sousThematiques).toStrictEqual([ - { - ficheId: ficheActionId, - thematiqueId: 3, - }, - { - ficheId: ficheActionId, - thematiqueId: 4, - }, - ]); + expect(body.sousThematiques).toContainEqual({ + ficheId: ficheActionId, + thematiqueId: 3, + }); + expect(body.sousThematiques).toContainEqual({ + ficheId: ficheActionId, + thematiqueId: 4, + }); }); it('should update the partenaires relations in the database', async () => { @@ -355,19 +347,16 @@ describe('FichesActionUpdateService', () => { }; const response = await putRequest(data); - const body = response.body; - expect(body.structures).toStrictEqual([ - { - ficheId: ficheActionId, - structureTagId: 1, - }, - { - ficheId: ficheActionId, - structureTagId: 2, - }, - ]); + expect(body.structures).toContainEqual({ + ficheId: ficheActionId, + structureTagId: 1, + }); + expect(body.structures).toContainEqual({ + ficheId: ficheActionId, + structureTagId: 2, + }); }); it('should update the pilotes relations in the database', async () => { @@ -385,51 +374,49 @@ describe('FichesActionUpdateService', () => { }; const response = await putRequest(data); - const body = response.body; - expect(body.pilotes).toStrictEqual([ - { - ficheId: ficheActionId, - tagId: 1, - userId: '3f407fc6-3634-45ff-a988-301e9088096a', - }, - { - ficheId: ficheActionId, - tagId: 9, - userId: '4ecc7d3a-7484-4a1c-8ac8-930cdacd2561', - }, - ]); + expect(body.pilotes).toContainEqual({ + ficheId: ficheActionId, + tagId: 1, + userId: '3f407fc6-3634-45ff-a988-301e9088096a', + }); + expect(body.pilotes).toContainEqual({ + ficheId: ficheActionId, + tagId: 9, + userId: '4ecc7d3a-7484-4a1c-8ac8-930cdacd2561', + }); }); it('should update the financeurs relations in the database', async () => { const data: UpdateFicheActionRequestClass = { financeurs: [ { - financeurTag: { - id: 1, - }, + financeurTag: { id: 1 }, montantTtc: 999, }, { - financeurTag: { - id: 2, - }, + financeurTag: { id: 2 }, montantTtc: 666, }, ], }; const response = await putRequest(data); - const body = response.body; - expect(body.financeurs[0].ficheId).toEqual(ficheActionId); - expect(body.financeurs[0].financeurTagId).toEqual(1); - expect(body.financeurs[0].montantTtc).toEqual(999); - expect(body.financeurs[1].ficheId).toEqual(ficheActionId); - expect(body.financeurs[1].financeurTagId).toEqual(2); - expect(body.financeurs[1].montantTtc).toEqual(666); + expect(body.financeurs).toContainEqual( + expect.objectContaining({ + financeurTagId: 1, + montantTtc: 999, + }) + ); + expect(body.financeurs).toContainEqual( + expect.objectContaining({ + financeurTagId: 2, + montantTtc: 666, + }) + ); }); it('should update the actions relations in the database', async () => { @@ -438,28 +425,34 @@ describe('FichesActionUpdateService', () => { }; const response = await putRequest(data); - const body = response.body; - expect(body.actions).toStrictEqual([ - { ficheId: ficheActionId, actionId: 'cae_1.1.1' }, - { ficheId: ficheActionId, actionId: 'cae_1.1.2' }, - ]); + expect(body.actions).toContainEqual({ + ficheId: ficheActionId, + actionId: 'cae_1.1.1', + }); + expect(body.actions).toContainEqual({ + ficheId: ficheActionId, + actionId: 'cae_1.1.2', + }); }); it('should update the indicateurs relations in the database', async () => { const data: UpdateFicheActionRequestClass = { - indicateurs: [{ id: 13 }, { id: 14 }], + indicateurs: [{ id: 1 }, { id: 2 }], }; const response = await putRequest(data); - const body = response.body; - expect(body.indicateurs).toStrictEqual([ - { ficheId: ficheActionId, indicateurId: 13 }, - { ficheId: ficheActionId, indicateurId: 14 }, - ]); + expect(body.indicateurs).toContainEqual({ + ficheId: ficheActionId, + indicateurId: 1, + }); + expect(body.indicateurs).toContainEqual({ + ficheId: ficheActionId, + indicateurId: 2, + }); }); it('should update the services relations in the database', async () => { @@ -468,13 +461,16 @@ describe('FichesActionUpdateService', () => { }; const response = await putRequest(data); - const body = response.body; - expect(body.services).toStrictEqual([ - { ficheId: ficheActionId, serviceTagId: 1 }, - { ficheId: ficheActionId, serviceTagId: 2 }, - ]); + expect(body.services).toContainEqual({ + ficheId: ficheActionId, + serviceTagId: 1, + }); + expect(body.services).toContainEqual({ + ficheId: ficheActionId, + serviceTagId: 2, + }); }); it('should update the fiches liees relations in the database', async () => { @@ -483,50 +479,103 @@ describe('FichesActionUpdateService', () => { }; const response = await putRequest(data); - const body = response.body; - expect(body.fichesLiees).toStrictEqual([ - { ficheUne: ficheActionId, ficheDeux: 1 }, - { ficheUne: ficheActionId, ficheDeux: 2 }, - ]); + expect(body.fichesLiees).toContainEqual({ + ficheUne: ficheActionId, + ficheDeux: 1, + }); + expect(body.fichesLiees).toContainEqual({ + ficheUne: ficheActionId, + ficheDeux: 2, + }); }); it('should update the resultats attendus relations in the database', async () => { const data: UpdateFicheActionRequestClass = { - resultatsAttendus: [ - { - id: 21, - }, - { - id: 22, - }, - ], + resultatsAttendus: [{ id: 21 }, { id: 22 }], }; const response = await putRequest(data); - const body = response.body; - expect(body.resultatsAttendus).toStrictEqual([ - { ficheId: ficheActionId, effetAttenduId: 21 }, - { ficheId: ficheActionId, effetAttenduId: 22 }, - ]); + expect(body.resultatsAttendus).toContainEqual({ + ficheId: ficheActionId, + effetAttenduId: 21, + }); + expect(body.resultatsAttendus).toContainEqual({ + ficheId: ficheActionId, + effetAttenduId: 22, + }); }); - it('should update the libres tag relations in the database', async () => { + it('should update libre tag relations in the database when an existing tag is added', async () => { const data: UpdateFicheActionRequestClass = { - libres: [{ id: 1 }, { id: 2 }], + libresTag: [ + { id: 1, createdBy: '3f407fc6-3634-45ff-a988-301e9088096a' }, + { id: 2, createdBy: '3f407fc6-3634-45ff-a988-301e9088096a' }, + ], }; const response = await putRequest(data); + const body = response.body; + + expect(body.libresTag).toContainEqual( + expect.objectContaining({ + ficheId: ficheActionId, + libreTagId: 1, + createdBy: '3f407fc6-3634-45ff-a988-301e9088096a', + }) + ); + expect(body.libresTag).toContainEqual( + expect.objectContaining({ + ficheId: ficheActionId, + libreTagId: 2, + createdBy: '3f407fc6-3634-45ff-a988-301e9088096a', + }) + ); + }); + + it('should create and link new libre tags to fiche action', async () => { + const nom = 'My new tag'; + + const data: UpdateFicheActionRequestClass = { + libresTag: [ + { + nom: nom, + createdBy: '3f407fc6-3634-45ff-a988-301e9088096a', + }, + ], + }; + const response = await putRequest(data); const body = response.body; - expect(body.libres).toStrictEqual([ - { ficheId: ficheActionId, libreTagId: 1 }, - { ficheId: ficheActionId, libreTagId: 2 }, - ]); + const newLibreTag = await databaseService.db + .select() + .from(libreTagTable) + .where(eq(libreTagTable.nom, nom)) + .then((rows) => rows[0]); + + expect(newLibreTag.collectiviteId).toBe(collectiviteId); + expect(body.libresTag).toContainEqual( + expect.objectContaining({ + ficheId: ficheActionId, + libreTagId: newLibreTag.id, + createdBy: '3f407fc6-3634-45ff-a988-301e9088096a', + }) + ); + + onTestFinished(async () => { + // Temp: there's no delete cascade on ficheActionLibreTagTable, so we have to delete manually + await databaseService.db + .delete(ficheActionLibreTagTable) + .where(eq(ficheActionLibreTagTable.ficheId, ficheActionId)); + + await databaseService.db + .delete(libreTagTable) + .where(eq(libreTagTable.nom, nom)); + }); }); }); From 38bdfb9d3b6c1a56fa58f892115b0bc4d3caf1db Mon Sep 17 00:00:00 2001 From: Elisabeth Fainstein <139369258+elisfainstein@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:08:57 +0100 Subject: [PATCH 07/21] feat: add user uuid directly from auth on libres tag update --- .../services/fiches-action-update.service.ts | 46 +++++++++++-------- .../fiches/fiche-action-update.e2e-spec.ts | 9 +--- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/backend/src/fiches/services/fiches-action-update.service.ts b/backend/src/fiches/services/fiches-action-update.service.ts index 8e103b22e3..6e1936e502 100644 --- a/backend/src/fiches/services/fiches-action-update.service.ts +++ b/backend/src/fiches/services/fiches-action-update.service.ts @@ -329,7 +329,6 @@ export default class FichesActionUpdateService { ); // Create a map of name -> id for new tags - const tagMap = await this.createOrGetLibreTag( tx, libresTag, @@ -339,25 +338,29 @@ export default class FichesActionUpdateService { const libresTagWithResolvedIds = libresTag .map((tag) => ({ id: tag.id ?? tagMap.get(tag.nom ?? ''), - createdBy: tag.createdBy, })) - .filter( - (tag): tag is { id: number; createdBy: string } => - tag.id !== undefined - ); + .filter((tag): tag is { id: number } => tag.id !== undefined); - updatedLibresTag = await this.updateRelations( - ficheActionId, - libresTagWithResolvedIds, - tx, - ficheActionLibreTagTable, - ['id', 'createdBy'], - ficheActionLibreTagTable.ficheId, - [ - ficheActionLibreTagTable.libreTagId, - ficheActionLibreTagTable.createdBy, - ] - ); + // Delete existing relations + await tx + .delete(ficheActionLibreTagTable) + .where(eq(ficheActionLibreTagTable.ficheId, ficheActionId)); + + // Insert new relations if any exist + if (libresTagWithResolvedIds.length > 0) { + updatedLibresTag = await tx + .insert(ficheActionLibreTagTable) + .values( + libresTagWithResolvedIds.map((relation) => ({ + ficheId: ficheActionId, + libreTagId: relation.id, + createdBy: tokenInfo.id, + })) + ) + .returning(); + } else { + updatedLibresTag = []; + } } return { @@ -480,6 +483,13 @@ export default class FichesActionUpdateService { .then((rows: { collectiviteId: number }[]) => rows[0]); } + /** + * Create or get libre tags + * @param tx - current database transaction + * @param libresTag - array of libre tags to create or get + * @param collectiviteId - id of the collectivite + * @returns a map of name -> id for the newly created or existing libre tags + */ private async createOrGetLibreTag( tx: TxType, libresTag: { id?: number; nom?: string }[], diff --git a/backend/test/fiches/fiche-action-update.e2e-spec.ts b/backend/test/fiches/fiche-action-update.e2e-spec.ts index c84c3dca58..45f6cdfc34 100644 --- a/backend/test/fiches/fiche-action-update.e2e-spec.ts +++ b/backend/test/fiches/fiche-action-update.e2e-spec.ts @@ -511,10 +511,7 @@ describe('FichesActionUpdateService', () => { it('should update libre tag relations in the database when an existing tag is added', async () => { const data: UpdateFicheActionRequestClass = { - libresTag: [ - { id: 1, createdBy: '3f407fc6-3634-45ff-a988-301e9088096a' }, - { id: 2, createdBy: '3f407fc6-3634-45ff-a988-301e9088096a' }, - ], + libresTag: [{ id: 1 }, { id: 2 }], }; const response = await putRequest(data); @@ -524,14 +521,12 @@ describe('FichesActionUpdateService', () => { expect.objectContaining({ ficheId: ficheActionId, libreTagId: 1, - createdBy: '3f407fc6-3634-45ff-a988-301e9088096a', }) ); expect(body.libresTag).toContainEqual( expect.objectContaining({ ficheId: ficheActionId, libreTagId: 2, - createdBy: '3f407fc6-3634-45ff-a988-301e9088096a', }) ); }); @@ -543,7 +538,6 @@ describe('FichesActionUpdateService', () => { libresTag: [ { nom: nom, - createdBy: '3f407fc6-3634-45ff-a988-301e9088096a', }, ], }; @@ -562,7 +556,6 @@ describe('FichesActionUpdateService', () => { expect.objectContaining({ ficheId: ficheActionId, libreTagId: newLibreTag.id, - createdBy: '3f407fc6-3634-45ff-a988-301e9088096a', }) ); From 55249257d93d77bc9246c3c45efae9e884c26ddc Mon Sep 17 00:00:00 2001 From: Elisabeth Fainstein <139369258+elisfainstein@users.noreply.github.com> Date: Tue, 26 Nov 2024 10:01:44 +0100 Subject: [PATCH 08/21] refactor: add example comments + refactor into more expressive functions --- .../services/fiches-action-update.service.ts | 53 ++++++++++++++----- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/backend/src/fiches/services/fiches-action-update.service.ts b/backend/src/fiches/services/fiches-action-update.service.ts index 6e1936e502..0385fa639a 100644 --- a/backend/src/fiches/services/fiches-action-update.service.ts +++ b/backend/src/fiches/services/fiches-action-update.service.ts @@ -328,25 +328,35 @@ export default class FichesActionUpdateService { ficheActionId ); - // Create a map of name -> id for new tags - const tagMap = await this.createOrGetLibreTag( + // Example of tagMap: + // tagMap = new Map([ + // ['Mobility', 1], + // ['Transport', 2], + // ['Bicycle', 3] + // ]); + const tagMap = await this.getOrCreateLibreTag( tx, libresTag, collectiviteId ); - const libresTagWithResolvedIds = libresTag - .map((tag) => ({ - id: tag.id ?? tagMap.get(tag.nom ?? ''), - })) - .filter((tag): tag is { id: number } => tag.id !== undefined); + // Example of libresTagWithResolvedIds: + // libresTagWithResolvedIds = [ + // { id: 1 }, + // { id: 2 }, + // { id: 3 } + // ] + const libresTagWithResolvedIds = this.resolveLibreTagIds( + libresTag, + tagMap + ); // Delete existing relations await tx .delete(ficheActionLibreTagTable) .where(eq(ficheActionLibreTagTable.ficheId, ficheActionId)); - // Insert new relations if any exist + // Insert new relations if (libresTagWithResolvedIds.length > 0) { updatedLibresTag = await tx .insert(ficheActionLibreTagTable) @@ -490,7 +500,7 @@ export default class FichesActionUpdateService { * @param collectiviteId - id of the collectivite * @returns a map of name -> id for the newly created or existing libre tags */ - private async createOrGetLibreTag( + private async getOrCreateLibreTag( tx: TxType, libresTag: { id?: number; nom?: string }[], collectiviteId: number @@ -498,25 +508,40 @@ export default class FichesActionUpdateService { const tagMap = new Map(); for (const tag of libresTag) { - if (!tag.id && tag.nom) { - const existingTag = await this.findExistingLibreTagByName(tx, tag.nom); + if (this.isNewTag(tag)) { + const existingTag = await this.findExistingLibreTagByName(tx, tag.nom!); if (existingTag) { - tagMap.set(tag.nom, existingTag.id); + tagMap.set(tag.nom!, existingTag.id); } else { const [newTag] = await tx .insert(libreTagTable) .values({ - nom: tag.nom, + nom: tag.nom!, collectiviteId: collectiviteId, }) .returning(); - tagMap.set(tag.nom, newTag.id); + tagMap.set(tag.nom!, newTag.id); } } } return tagMap; } + private isNewTag(tag: { id?: number; nom?: string }) { + return !tag.id && tag.nom; + } + + private resolveLibreTagIds( + libresTag: { id?: number; nom?: string }[], + tagMap: Map + ): { id: number }[] { + return libresTag + .map((tag) => ({ + id: tag.id ?? tagMap.get(tag.nom ?? ''), + })) + .filter((tag): tag is { id: number } => tag.id !== undefined); + } + private async findExistingLibreTagByName(tx: TxType, nom: string) { return tx .select() From cedce62c1cdbe0f6d80be13183ea642ee637737f Mon Sep 17 00:00:00 2001 From: Marc Rutkowski Date: Thu, 21 Nov 2024 11:25:29 +0100 Subject: [PATCH 09/21] Ajoute le bouton Exporter dans les pages Indicateur --- .../lists/indicateurs-list/indicateurs-list.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app.territoiresentransitions.react/src/app/pages/collectivite/Indicateurs/lists/indicateurs-list/indicateurs-list.tsx b/app.territoiresentransitions.react/src/app/pages/collectivite/Indicateurs/lists/indicateurs-list/indicateurs-list.tsx index 376e7485e2..6e24859d11 100644 --- a/app.territoiresentransitions.react/src/app/pages/collectivite/Indicateurs/lists/indicateurs-list/indicateurs-list.tsx +++ b/app.territoiresentransitions.react/src/app/pages/collectivite/Indicateurs/lists/indicateurs-list/indicateurs-list.tsx @@ -190,6 +190,17 @@ const IndicateursListe = ({ {`indicateur`} {countTotal > 1 ? 's' : ''} + {/** Export */} + {!!currentDefs?.length && !isLoading && ( +