{ "tables": { "utilisateurs": { "columns": [ {"name": "id_utilisateur", "type": "SERIAL", "constraints": ["PRIMARY KEY"]}, {"name": "login", "type": "TEXT", "constraints": ["UNIQUE", "NOT NULL"]}, {"name": "mot_de_passe", "type": "TEXT", "constraints": ["NOT NULL"]}, {"name": "nom", "type": "TEXT", "constraints": []}, {"name": "objectifs_nutritionnels", "type": "TEXT", "constraints": []}, {"name": "poids", "type": "INTEGER", "constraints": []}, {"name": "Taille", "type": "INTEGER", "constraints": []}, {"name": "activite_physique", "type": "TEXT", "constraints": []}, {"name": "objectif_calorique", "type": "TEXT", "constraints": []}, {"name": "regime_particulier", "type": "TEXT", "constraints": []}, {"name": "email", "type": "TEXT", "constraints": []}, {"name": "date_creation", "type": "TIMESTAMP", "constraints": ["DEFAULT CURRENT_TIMESTAMP"]}, {"name": "date_derniere_connexion", "type": "TIMESTAMP", "constraints": []} ] }, "recettes": { "columns": [ {"name": "id_recette", "type": "SERIAL", "constraints": ["PRIMARY KEY"]}, {"name": "titre", "type": "TEXT", "constraints": ["NOT NULL"]}, {"name": "infos", "type": "TEXT", "constraints": []}, {"name": "ingredients", "type": "TEXT", "constraints": ["NOT NULL"]}, {"name": "instructions", "type": "TEXT", "constraints": ["NOT NULL"]}, {"name": "temps_preparation", "type": "TEXT", "constraints": []}, {"name": "infos_regime", "type": "TEXT", "constraints": []}, {"name": "valeurs_100g", "type": "TEXT", "constraints": []}, {"name": "valeurs_portion", "type": "TEXT", "constraints": []}, {"name": "all_infos", "type": "TEXT", "constraints": []}, {"name": "cleaned_infos", "type": "TEXT", "constraints": []}, {"name": "cluster2", "type": "INTEGER", "constraints": []} ] }, "historique_repas": { "columns": [ {"name": "id_historique", "type": "SERIAL", "constraints": ["PRIMARY KEY"]}, {"name": "id_utilisateur", "type": "INTEGER", "constraints": ["NOT NULL", "REFERENCES utilisateurs(id_utilisateur)"]}, {"name": "id_recette", "type": "INTEGER", "constraints": ["NOT NULL", "REFERENCES recettes(id_recette)"]}, {"name": "date_heure", "type": "TIMESTAMP", "constraints": ["DEFAULT CURRENT_TIMESTAMP"]}, {"name": "quantite", "type": "INTEGER", "constraints": []} ] }, "conversations": { "columns": [ {"name": "id_conversation", "type": "SERIAL", "constraints": ["PRIMARY KEY"]}, {"name": "id_utilisateur", "type": "INTEGER", "constraints": ["NOT NULL", "REFERENCES utilisateurs(id_utilisateur)"]}, {"name": "title", "type": "TEXT", "constraints": ["NOT NULL"]}, {"name": "created_at", "type": "TIMESTAMP", "constraints": ["NOT NULL"]} ] }, "messages": { "columns": [ {"name": "id_message", "type": "SERIAL", "constraints": ["PRIMARY KEY"]}, {"name": "id_conversation", "type": "INTEGER", "constraints": ["NOT NULL", "REFERENCES conversations(id_conversation)"]}, {"name": "role", "type": "TEXT", "constraints": ["NOT NULL"]}, {"name": "content", "type": "TEXT", "constraints": ["NOT NULL"]}, {"name": "timestamp", "type": "TIMESTAMP", "constraints": ["DEFAULT CURRENT_TIMESTAMP"]}, {"name": "temps_traitement", "type": "REAL", "constraints": []}, {"name": "contexte", "type": "TEXT", "constraints": []}, {"name": "total_cout", "type": "REAL", "constraints": []}, {"name": "impact_eco", "type": "REAL", "constraints": []} ] }, "liste_courses": { "columns": [ {"name": "id_liste", "type": "SERIAL", "constraints": ["PRIMARY KEY"]}, {"name": "id_utilisateur", "type": "INTEGER", "constraints": ["NOT NULL", "REFERENCES utilisateurs(id_utilisateur)"]}, {"name": "ingredients", "type": "TEXT", "constraints": ["NOT NULL"]}, {"name": "date_creation", "type": "TIMESTAMP", "constraints": ["DEFAULT CURRENT_TIMESTAMP"]}, {"name": "status", "type": "TEXT", "constraints": []} ] }, "suggestions_repas": { "columns": [ {"name": "id_suggestion", "type": "SERIAL", "constraints": ["PRIMARY KEY"]}, {"name": "id_utilisateur", "type": "INTEGER", "constraints": ["NOT NULL", "REFERENCES utilisateurs(id_utilisateur)"]}, {"name": "repas_suggestion", "type": "TEXT", "constraints": ["NOT NULL"]}, {"name": "date_heure", "type": "TIMESTAMP", "constraints": ["DEFAULT CURRENT_TIMESTAMP"]}, {"name": "motif_suggestion", "type": "TEXT", "constraints": []} ] } } }