-- === categories_tarifs === *************************** 1. row *************************** Table: categories_tarifs Create Table: CREATE TABLE `categories_tarifs` ( `id` int(11) NOT NULL AUTO_INCREMENT, `categorie_id` int(11) NOT NULL COMMENT 'ID de la cat??gorie (table categories)', `tarif_id` int(11) NOT NULL COMMENT 'ID du tarif (table tarifs_restauration)', `date_debut` date DEFAULT NULL COMMENT 'Date de d??but d''application (NULL = toujours)', `date_fin` date DEFAULT NULL COMMENT 'Date de fin d''application (NULL = toujours)', `actif` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Association active', `date_creation` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `idx_categorie` (`categorie_id`), KEY `idx_tarif` (`tarif_id`) ) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Association cat??gories de pr??sences - tarifs' -- === charges_fixes_mensuelles === *************************** 1. row *************************** Table: charges_fixes_mensuelles Create Table: CREATE TABLE `charges_fixes_mensuelles` ( `id` int(11) NOT NULL AUTO_INCREMENT, `annee` int(4) NOT NULL COMMENT 'Ann??e (ex: 2025)', `mois` int(2) NOT NULL COMMENT 'Mois (1-12)', `type_charge` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Type: salaires, electricite, eau_gaz, loyer, maintenance, diverses', `montant` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT 'Montant en euros', `date_creation` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `date_modification` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `idx_periode` (`annee`,`mois`), KEY `idx_type` (`type_charge`) ) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Charges fixes mensuelles avec historique' -- === configuration_restaurant === *************************** 1. row *************************** Table: configuration_restaurant Create Table: CREATE TABLE `configuration_restaurant` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nom_etablissement` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `type_etablissement` enum('ecole','ehpad','restaurant','autre') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ecole', `jours_ouverture` json NOT NULL COMMENT 'Liste des jours ouverture: ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]', `periodes_fermeture` json DEFAULT NULL COMMENT 'P├®riodes de fermeture: [{"debut":"2024-12-20","fin":"2025-01-06","libelle":"Vacances de No├½l"}]', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `services` json DEFAULT NULL COMMENT 'Services propos├®s : d├®jeuner, d├«ner', `objectifs_kpi` json DEFAULT NULL COMMENT 'Objectifs KPI personnalis├®s (food_cost_max, marge_repas_min, cout_repas_max, taux_service_min)', `budget_par_defaut` decimal(5,2) DEFAULT '4.00' COMMENT 'Budget par defaut par repas en euros', `effectif_par_defaut` int(11) DEFAULT '80' COMMENT 'Effectif par defaut (nombre de convives)', `ponderations_scores` text COLLATE utf8mb4_unicode_ci COMMENT 'JSON des ponderations cout/nutrition/variete', `categories_repas` text COLLATE utf8mb4_unicode_ci COMMENT 'JSON des categories de plats (entree, plat, etc.)', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci -- === configuration_ventes_auto === *************************** 1. row *************************** Table: configuration_ventes_auto Create Table: CREATE TABLE `configuration_ventes_auto` ( `id` int(11) NOT NULL AUTO_INCREMENT, `auto_generation_active` tinyint(1) DEFAULT '1' COMMENT 'Activation g??n??ration automatique', `heure_generation` time DEFAULT '14:30:00' COMMENT 'Heure g??n??ration automatique (apr??s service)', `tarif_defaut_cm2` decimal(5,2) DEFAULT '3.50' COMMENT 'Tarif par d??faut CM2 (fallback)', `tarif_defaut_ce2cm1` decimal(5,2) DEFAULT '3.20' COMMENT 'Tarif par d??faut CE2-CM1 (fallback)', `tarif_defaut_personnel` decimal(5,2) DEFAULT '4.00' COMMENT 'Tarif par d??faut personnel (fallback)', `inclure_personnel_auto` tinyint(1) DEFAULT '0' COMMENT 'Inclure automatiquement le personnel dans calcul', `nb_personnel_defaut` int(11) DEFAULT '0' COMMENT 'Nombre personnel par d??faut si inclus', `notification_email` tinyint(1) DEFAULT '1' COMMENT 'Envoyer notification email apr??s g??n??ration', `email_notification` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Email destinataire notifications', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `notes` text COLLATE utf8mb4_unicode_ci COMMENT 'Notes configuration', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Configuration automatisation ventes depuis pr??sences' -- === contacts_parents === *************************** 1. row *************************** Table: contacts_parents Create Table: CREATE TABLE `contacts_parents` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nom_parent` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Nom du parent (facultatif)', `prenom_parent` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Pr??nom du parent (facultatif)', `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Email du parent', `eleve_nom` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Nom de l''??l??ve pour r??f??rence', `actif` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1=actif, 0=d??sabonn??', `date_ajout` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `date_modification` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, `notes` text COLLATE utf8mb4_unicode_ci COMMENT 'Notes libres (ex: parent 1, parent 2, divorce, etc.)', PRIMARY KEY (`id`), KEY `idx_email` (`email`), KEY `idx_actif` (`actif`) ) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Contacts des parents d''??l??ves pour envoi des menus' -- === emails_logs === *************************** 1. row *************************** Table: emails_logs Create Table: CREATE TABLE `emails_logs` ( `id` int(11) NOT NULL AUTO_INCREMENT, `semaine_id` int(11) NOT NULL COMMENT 'ID de la semaine de menu envoy??e', `type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'menu_parents' COMMENT 'Type d''email (menu_parents, autre...)', `destinataires_total` int(11) NOT NULL DEFAULT '0' COMMENT 'Nombre total de destinataires', `envoyes_succes` int(11) NOT NULL DEFAULT '0' COMMENT 'Nombre d''envois r??ussis', `envoyes_echec` int(11) NOT NULL DEFAULT '0' COMMENT 'Nombre d''??checs', `date_envoi` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `utilisateur_id` int(11) DEFAULT NULL COMMENT 'ID de l''utilisateur qui a lanc?? l''envoi', `details_echecs` text COLLATE utf8mb4_unicode_ci COMMENT 'JSON des emails en ??chec avec raisons', PRIMARY KEY (`id`), KEY `idx_semaine` (`semaine_id`), KEY `idx_date` (`date_envoi`) ) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Historique des envois d''emails' -- === haccp_documents === *************************** 1. row *************************** Table: haccp_documents Create Table: CREATE TABLE `haccp_documents` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nom_fichier` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `nom_original` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `categorie` enum('distribution','temperatures','refroidissement','nettoyage','tracabilite','autres','production','reception') COLLATE utf8mb4_unicode_ci NOT NULL, `chemin_fichier` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL, `date_creation` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `taille_fichier` int(11) DEFAULT '0', `type` enum('uploaded','filled') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'uploaded', `template_type` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `form_data` json DEFAULT NULL, `mois` tinyint(2) DEFAULT NULL, `annee` smallint(4) DEFAULT NULL, `status` enum('draft','finalized') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'draft', `modified_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci -- === haccp_equipements === *************************** 1. row *************************** Table: haccp_equipements Create Table: CREATE TABLE `haccp_equipements` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nom` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `type` enum('refrigerateur','congelateur','four','plaque_chauffante','lave_vaisselle','autre') COLLATE utf8mb4_unicode_ci NOT NULL, `zone` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, `temperature_min` decimal(5,2) DEFAULT NULL, `temperature_max` decimal(5,2) DEFAULT NULL, `actif` tinyint(1) DEFAULT '1', `date_creation` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `date_modification` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci -- === haccp_exports_history === *************************** 1. row *************************** Table: haccp_exports_history Create Table: CREATE TABLE `haccp_exports_history` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Identifiant unique de l''export', `user_id` int(11) NOT NULL COMMENT 'ID de l''utilisateur ayant g├®n├®r├® l''export', `export_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Nom du fichier g├®n├®r├®', `export_type` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT 'pdf_selectif' COMMENT 'Type d''export (pdf_selectif, etc.)', `criteria` json NOT NULL COMMENT 'Crit├¿res utilis├®s : p├®riode, cat├®gories, ├®quipements', `document_ids` json NOT NULL COMMENT 'Liste des IDs des documents inclus dans l''export', `file_path` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Chemin du fichier g├®n├®r├® (pour nettoyage automatique)', `file_size` int(11) DEFAULT '0' COMMENT 'Taille du fichier en octets', `generation_time` decimal(5,2) DEFAULT '0.00' COMMENT 'Temps de g├®n├®ration en secondes', `download_count` int(11) DEFAULT '0' COMMENT 'Nombre de t├®l├®chargements', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date/heure de cr├®ation', PRIMARY KEY (`id`), KEY `idx_user_date` (`user_id`,`created_at`) COMMENT 'Index pour historique par utilisateur', KEY `idx_export_type` (`export_type`) COMMENT 'Index pour filtrage par type d''export', KEY `idx_created_at` (`created_at`) COMMENT 'Index pour nettoyage automatique des anciens exports' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Historique des exports PDF s├®lectifs HACCP' -- === historique_stocks === *************************** 1. row *************************** Table: historique_stocks Create Table: CREATE TABLE `historique_stocks` ( `id` int(11) NOT NULL AUTO_INCREMENT, `stock_id` int(11) NOT NULL, `date_mouvement` datetime NOT NULL, `quantite_avant` decimal(10,3) NOT NULL, `quantite_apres` decimal(10,3) NOT NULL, `type_mouvement` enum('entr├®e','sortie') COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `mois_operation` varchar(7) COLLATE utf8mb4_unicode_ci GENERATED ALWAYS AS (date_format(`date_mouvement`,'%Y-%m')) STORED, PRIMARY KEY (`id`), KEY `idx_date_mouvement` (`date_mouvement`), KEY `idx_stock_id` (`stock_id`) ) ENGINE=InnoDB AUTO_INCREMENT=1391 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci -- === menu_contraintes_allergenes === *************************** 1. row *************************** Table: menu_contraintes_allergenes Create Table: CREATE TABLE `menu_contraintes_allergenes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `menu_jour_id` int(11) NOT NULL COMMENT 'ID de menus_jours concern├®', `allergene` enum('gluten','crustaces','oeufs','poisson','arachides','soja','lactose','fruits_coque','celeri','moutarde','sesame','sulfites','lupin','mollusques') COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `unique_contrainte` (`menu_jour_id`,`allergene`), KEY `idx_menu_jour_id` (`menu_jour_id`), KEY `idx_allergene` (`allergene`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Contraintes allerg├¿nes par jour de menu - 14 allerg├¿nes majeurs UE - Supporte 7j/7 et d├®j+d├«ner' -- === mercuriales_imports === *************************** 1. row *************************** Table: mercuriales_imports Create Table: CREATE TABLE `mercuriales_imports` ( `id` int(11) NOT NULL AUTO_INCREMENT, `fournisseur_id` int(11) NOT NULL, `nom_fichier` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `nombre_lignes` int(11) DEFAULT '0', `nombre_importes` int(11) DEFAULT '0', `nombre_erreurs` int(11) DEFAULT '0', `statut` enum('en_cours','termine','erreur') COLLATE utf8mb4_unicode_ci DEFAULT 'en_cours', `details_erreurs` text COLLATE utf8mb4_unicode_ci, `date_import` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `importe_par` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), KEY `idx_fournisseur` (`fournisseur_id`), KEY `idx_date` (`date_import`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Historique des imports de mercuriales' -- === objectifs_dechets === *************************** 1. row *************************** Table: objectifs_dechets Create Table: CREATE TABLE `objectifs_dechets` ( `id` int(11) NOT NULL AUTO_INCREMENT, `type_etablissement` enum('ecole','ehpad','autre') COLLATE utf8mb4_unicode_ci NOT NULL, `categorie_id` int(11) DEFAULT NULL, `objectif_par_convive` decimal(10,2) DEFAULT '0.00' COMMENT 'Objectif en grammes/convive', `seuil_alerte` decimal(10,2) DEFAULT '0.00' COMMENT 'Seuil d''alerte en grammes/convive', `seuil_critique` decimal(10,2) DEFAULT '0.00' COMMENT 'Seuil critique en grammes/convive', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `unique_objectif` (`type_etablissement`,`categorie_id`), KEY `categorie_id` (`categorie_id`) ) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci -- === parametres_emails === *************************** 1. row *************************** Table: parametres_emails Create Table: CREATE TABLE `parametres_emails` ( `id` int(11) NOT NULL AUTO_INCREMENT, `cle` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Cl?? du param??tre', `valeur` text COLLATE utf8mb4_unicode_ci COMMENT 'Valeur du param??tre', `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Description du param??tre', PRIMARY KEY (`id`), UNIQUE KEY `unique_cle` (`cle`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Param??tres de configuration pour l''envoi d''emails' -- === plan_alimentaire_categories === *************************** 1. row *************************** Table: plan_alimentaire_categories Create Table: CREATE TABLE `plan_alimentaire_categories` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nom` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `description` text COLLATE utf8mb4_unicode_ci, `minimum` int(11) DEFAULT '0', `maximum` int(11) DEFAULT NULL, `groupe` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `ordre` int(11) NOT NULL DEFAULT '0', `actif` tinyint(1) NOT NULL DEFAULT '1', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `idx_nom` (`nom`), KEY `idx_groupe_ordre` (`groupe`,`ordre`), KEY `idx_actif` (`actif`) ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci -- === plan_alimentaire_mots_cles === *************************** 1. row *************************** Table: plan_alimentaire_mots_cles Create Table: CREATE TABLE `plan_alimentaire_mots_cles` ( `id` int(11) NOT NULL AUTO_INCREMENT, `categorie_id` int(11) NOT NULL, `mot_cle` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `type_plat` enum('tous','entree','plat','accompagnement','laitage','dessert') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'tous', `actif` tinyint(1) NOT NULL DEFAULT '1', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `idx_categorie` (`categorie_id`), KEY `idx_mot_cle` (`mot_cle`), KEY `idx_actif` (`actif`) ) ENGINE=InnoDB AUTO_INCREMENT=157 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci -- === stocks_valorises_mensuels === *************************** 1. row *************************** Table: stocks_valorises_mensuels Create Table: CREATE TABLE `stocks_valorises_mensuels` ( `id` int(11) NOT NULL AUTO_INCREMENT, `stock_id` int(11) NOT NULL COMMENT 'R├®f├®rence au stock dans la table stocks', `annee` int(11) NOT NULL COMMENT 'Ann├®e de la valorisation', `mois` int(11) NOT NULL COMMENT 'Mois de la valorisation (1-12)', `produit` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Nom du produit', `quantite` decimal(10,3) NOT NULL DEFAULT '0.000' COMMENT 'Quantit├® en stock', `prix_unitaire` decimal(10,3) NOT NULL DEFAULT '0.000' COMMENT 'Prix unitaire TTC au moment de la valorisation', `prix_unitaire_ht` decimal(10,3) NOT NULL DEFAULT '0.000' COMMENT 'Prix unitaire HT au moment de la valorisation', `valeur_stock_ttc` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT 'Valeur totale TTC (quantit├® ├ù prix TTC)', `valeur_stock_ht` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT 'Valeur totale HT (quantit├® ├ù prix HT)', `unite` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'kg' COMMENT 'Unit├® de mesure', `taux_tva` decimal(5,2) NOT NULL DEFAULT '5.50' COMMENT 'Taux de TVA appliqu├® (%)', `categorie` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Cat├®gorie du produit', `seuil_alerte` int(11) DEFAULT '0' COMMENT 'Seuil d''alerte du stock', `date_valorisation` datetime NOT NULL COMMENT 'Date et heure de la valorisation', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `unique_stock_mois` (`stock_id`,`annee`,`mois`) COMMENT 'Un stock ne peut avoir qu''une valorisation par mois', KEY `idx_annee_mois` (`annee`,`mois`) COMMENT 'Index pour recherche rapide par p├®riode', KEY `idx_stock` (`stock_id`) COMMENT 'Index pour recherche par stock' ) ENGINE=InnoDB AUTO_INCREMENT=3880 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Stocke les valorisations d├®taill├®es mensuelles des stocks avec prix historiques' -- === stock_alerts_log === *************************** 1. row *************************** Table: stock_alerts_log Create Table: CREATE TABLE `stock_alerts_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `stock_id` int(11) NOT NULL, `produit` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `quantite` decimal(10,3) NOT NULL, `seuil_alerte` decimal(10,3) NOT NULL, `alerte_envoyee_at` datetime NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `idx_stock_id` (`stock_id`), KEY `idx_alerte_date` (`alerte_envoyee_at`), CONSTRAINT `stock_alerts_log_ibfk_1` FOREIGN KEY (`stock_id`) REFERENCES `stocks` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=379 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Historique des alertes stocks envoy├®es par email' -- === tarifs_restauration === *************************** 1. row *************************** Table: tarifs_restauration Create Table: CREATE TABLE `tarifs_restauration` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nom` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Nom du tarif (ex: CM2, CE2-CM1, Personnel)', `description` text COLLATE utf8mb4_unicode_ci COMMENT 'Description optionnelle', `montant` decimal(10,3) NOT NULL COMMENT 'Montant du tarif en euros', `type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'eleve' COMMENT 'Type de tarif (ex: eleve, personnel, offert, etc.)', `service` enum('dejeuner','diner','petit_dejeuner','gouter') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'dejeuner', `actif` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Tarif actif ou d??sactiv??', `ordre_affichage` int(11) NOT NULL DEFAULT '0' COMMENT 'Ordre d''affichage dans les listes', `date_creation` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `date_modification` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `unique_tarif_service` (`nom`,`service`), KEY `idx_tarifs_service` (`service`), KEY `idx_type` (`type`) ) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Tarifs de restauration flexibles'