-- phpMyAdmin SQL Dump
-- version 5.2.2
-- https://www.phpmyadmin.net/
--
-- Hôte : mykollufab.mysql.db
-- Généré le : sam. 30 mai 2026 à 13:58
-- Version du serveur : 8.4.8-8
-- Version de PHP : 8.1.33

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Base de données : `mykollufab`
--

-- --------------------------------------------------------

--
-- Structure de la table `ateliers`
--

CREATE TABLE `ateliers` (
  `id` int NOT NULL,
  `nom` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telephone` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `adresse` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `est_mko_interne` tinyint(1) NOT NULL DEFAULT '0',
  `actif` tinyint(1) NOT NULL DEFAULT '1',
  `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `contact_id` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `ateliers`
--

INSERT INTO `ateliers` (`id`, `nom`, `email`, `telephone`, `adresse`, `est_mko_interne`, `actif`, `notes`, `contact_id`, `created_at`) VALUES
(1, 'MyKollectOr (Julien Carpentier)', 'julien@mykollector.com', NULL, NULL, 1, 1, 'Atelier interne MKO — toujours affiché en premier', NULL, '2026-05-09 08:27:16');

-- --------------------------------------------------------

--
-- Structure de la table `chat_conversations`
--

CREATE TABLE `chat_conversations` (
  `id` int NOT NULL,
  `titre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact_id` int DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `chat_messages`
--

CREATE TABLE `chat_messages` (
  `id` int NOT NULL,
  `conversation_id` int NOT NULL,
  `user_id` int NOT NULL,
  `message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` enum('message','mko_reply') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'message',
  `reactions` json DEFAULT NULL,
  `piece_jointe` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `lu_par` json DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `chat_participants`
--

CREATE TABLE `chat_participants` (
  `id` int NOT NULL,
  `conversation_id` int NOT NULL,
  `user_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `chat_wizz`
--

CREATE TABLE `chat_wizz` (
  `id` int NOT NULL,
  `conversation_id` int NOT NULL,
  `contact_id` int NOT NULL,
  `user_id` int NOT NULL,
  `message_context` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `repondu` tinyint(1) NOT NULL DEFAULT '0',
  `repondu_at` datetime DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `chronos`
--

CREATE TABLE `chronos` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `produit_id` int NOT NULL,
  `duree_secondes` int DEFAULT NULL,
  `source` enum('qr','strava','manuel') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'qr',
  `statut` enum('en_cours','valide','invalide','annule') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'en_cours',
  `date_debut` datetime DEFAULT NULL,
  `date_fin` datetime DEFAULT NULL,
  `strava_activity_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `score_detection` decimal(4,3) DEFAULT NULL,
  `auto_valide` tinyint(1) NOT NULL DEFAULT '0',
  `ajustement_secondes` int NOT NULL DEFAULT '0',
  `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `chronos`
--

INSERT INTO `chronos` (`id`, `user_id`, `produit_id`, `duree_secondes`, `source`, `statut`, `date_debut`, `date_fin`, `strava_activity_id`, `score_detection`, `auto_valide`, `ajustement_secondes`, `notes`, `created_at`) VALUES
(5, 8, 4, 1400, 'manuel', 'valide', '2026-05-21 00:00:00', NULL, NULL, NULL, 0, 0, NULL, '2026-05-20 12:53:51'),
(6, 19, 4, 97, 'manuel', 'valide', '2026-05-23 00:00:00', NULL, NULL, NULL, 0, 0, NULL, '2026-05-20 13:37:22'),
(7, 19, 4, 97, 'manuel', 'valide', '2026-05-23 00:00:00', NULL, NULL, NULL, 0, 0, NULL, '2026-05-20 13:39:58'),
(8, 8, 1, NULL, 'qr', 'en_cours', '2026-05-21 07:41:39', NULL, NULL, NULL, 0, 0, NULL, '2026-05-21 05:41:39'),
(11, 8, 13, NULL, 'qr', 'en_cours', '2026-05-26 12:16:01', NULL, NULL, NULL, 0, 0, NULL, '2026-05-26 10:16:01'),
(12, 8, 13, 68, 'qr', 'valide', '2026-05-28 17:09:13', '2026-05-28 15:10:36', NULL, NULL, 0, 0, NULL, '2026-05-28 15:09:13');

-- --------------------------------------------------------

--
-- Structure de la table `classements`
--

CREATE TABLE `classements` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `produit_id` int NOT NULL,
  `chrono_id` int NOT NULL,
  `duree_secondes` int NOT NULL,
  `date_realisation` datetime NOT NULL,
  `source` enum('qr','strava','manuel') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'qr',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `classements`
--

INSERT INTO `classements` (`id`, `user_id`, `produit_id`, `chrono_id`, `duree_secondes`, `date_realisation`, `source`, `created_at`) VALUES
(2, 8, 13, 12, 68, '2026-05-28 17:09:13', 'qr', '2026-05-28 15:10:36');

-- --------------------------------------------------------

--
-- Structure de la table `commandes`
--

CREATE TABLE `commandes` (
  `id` int NOT NULL,
  `presta_order_id` int NOT NULL,
  `presta_order_ref` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `produit_id` int NOT NULL,
  `chrono_id` int DEFAULT NULL,
  `atelier_id` int DEFAULT NULL,
  `statut` enum('importee','en_attente_validation','validee','en_lot','en_gravure','grave','expedie','livre','sav') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'importee',
  `type_commande` enum('medaille_complete','gravure_seule','b2b_vierge','gratuit_event','test_interne') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'medaille_complete',
  `is_b2b` tinyint(1) NOT NULL DEFAULT '0',
  `is_test` tinyint(1) NOT NULL DEFAULT '0',
  `b2b_client_nom` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `b2b_quantite` int NOT NULL DEFAULT '1',
  `texte_gravure` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `validation_sportif` tinyint(1) NOT NULL DEFAULT '0',
  `date_validation` datetime DEFAULT NULL,
  `numero_suivi` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `transporteur` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date_expedition` datetime DEFAULT NULL,
  `presta_synced` tinyint(1) NOT NULL DEFAULT '0',
  `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `commande_fichier_gravure`
--

CREATE TABLE `commande_fichier_gravure` (
  `id` int NOT NULL,
  `commande_id` int NOT NULL,
  `fichier_gravure_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `commande_lot`
--

CREATE TABLE `commande_lot` (
  `id` int NOT NULL,
  `commande_id` int NOT NULL,
  `lot_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `commande_session`
--

CREATE TABLE `commande_session` (
  `id` int NOT NULL,
  `commande_id` int NOT NULL,
  `chrono_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `defauts`
--

CREATE TABLE `defauts` (
  `id` int NOT NULL,
  `commande_id` int NOT NULL,
  `type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `dropbox_config`
--

CREATE TABLE `dropbox_config` (
  `id` int NOT NULL,
  `access_token` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `dossier` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '/MKO-Backups/',
  `dernier_backup` datetime DEFAULT NULL,
  `dernier_statut` enum('ok','erreur') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dernier_message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `etiquettes_pdf`
--

CREATE TABLE `etiquettes_pdf` (
  `id` int NOT NULL,
  `commande_id` int NOT NULL,
  `fichier` varchar(255) NOT NULL,
  `statut` enum('ok','erreur') DEFAULT 'ok',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Structure de la table `export_destinations`
--

CREATE TABLE `export_destinations` (
  `id` int NOT NULL,
  `nom` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` enum('ftp','sftp','s3','local') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'local',
  `config` json NOT NULL,
  `actif` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `fabricants`
--

CREATE TABLE `fabricants` (
  `id` int NOT NULL,
  `produit_id` int NOT NULL,
  `atelier_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `favoris`
--

CREATE TABLE `favoris` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `produit_id` int NOT NULL,
  `source` enum('mko','prestashop') DEFAULT 'mko',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Structure de la table `fichiers_gravure`
--

CREATE TABLE `fichiers_gravure` (
  `id` int NOT NULL,
  `lot_id` int NOT NULL,
  `nom_fichier` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `chemin` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `statut` enum('genere','erreur') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'genere',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `logs_audit`
--

CREATE TABLE `logs_audit` (
  `id` int NOT NULL,
  `user_id` int DEFAULT NULL,
  `action` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `entite` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `entite_id` int DEFAULT NULL,
  `details` json DEFAULT NULL,
  `ip` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `logs_audit`
--

INSERT INTO `logs_audit` (`id`, `user_id`, `action`, `entite`, `entite_id`, `details`, `ip`, `created_at`) VALUES
(1, 8, 'chrono_delete_sportif', 'chrono', 1, '{\"produit_id\": 1, \"duree_secondes\": 7200}', '109.69.110.152', '2026-05-18 06:33:47'),
(2, 8, 'chrono_delete_sportif', 'chrono', 2, '{\"produit_id\": 1, \"duree_secondes\": 7200}', '109.69.110.152', '2026-05-18 06:52:20'),
(3, 11, 'compte_supprime_rgpd', 'user', 11, NULL, '109.69.110.152', '2026-05-18 08:53:45'),
(4, 8, 'chrono_update_sportif', 'chrono', 3, '{\"notes\": null, \"duree_secondes\": 18000}', '185.199.101.13', '2026-05-18 21:51:57'),
(5, 8, 'chrono_delete_sportif', 'chrono', 3, '{\"produit_id\": 2, \"duree_secondes\": 18000}', '2a01:e0a:90e:6c20:e026:88f:e7af:a926', '2026-05-19 18:01:45'),
(6, 8, 'chrono_start_offset', 'chrono', NULL, '{\"produit_id\": 1, \"ecart_secondes\": 25}', '176.223.173.50', '2026-05-21 05:41:39'),
(7, 8, 'chrono_delete_sportif', 'chrono', 9, '{\"produit_id\": 11, \"duree_secondes\": 720}', '91.205.106.139', '2026-05-22 14:47:44'),
(8, 8, 'chrono_delete_sportif', 'chrono', 10, '{\"produit_id\": 11, \"duree_secondes\": 720}', '91.205.106.139', '2026-05-22 14:47:46'),
(9, 8, 'chrono_delete_sportif', 'chrono', 4, '{\"produit_id\": 2, \"duree_secondes\": 14400}', '91.205.106.139', '2026-05-22 14:47:48'),
(10, 8, 'chrono_start_offset', 'chrono', NULL, '{\"produit_id\": 13, \"ecart_secondes\": 27}', '185.199.101.2', '2026-05-26 10:16:01');

-- --------------------------------------------------------

--
-- Structure de la table `lots`
--

CREATE TABLE `lots` (
  `id` int NOT NULL,
  `produit_id` int NOT NULL,
  `atelier_id` int NOT NULL,
  `statut` enum('en_attente_generation','generation_en_cours','genere','en_gravure','grave','expedie') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'en_attente_generation',
  `nb_commandes` int NOT NULL DEFAULT '0',
  `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `notifications`
--

CREATE TABLE `notifications` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `titre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `lien` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `lu` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `prestashop_config`
--

CREATE TABLE `prestashop_config` (
  `id` int NOT NULL,
  `url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `client_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `client_secret` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `access_token` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `token_expires` int DEFAULT NULL,
  `derniere_synchro` datetime DEFAULT NULL,
  `circuit_failure_count` int DEFAULT '0',
  `circuit_last_failure` datetime DEFAULT NULL,
  `circuit_pause_until` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `prestashop_config`
--

INSERT INTO `prestashop_config` (`id`, `url`, `client_id`, `client_secret`, `access_token`, `token_expires`, `derniere_synchro`, `circuit_failure_count`, `circuit_last_failure`, `circuit_pause_until`) VALUES
(1, 'https://shop.mykollector.com/admin025', 'MyKollectOrFab025', 'c618ba42622cab8753f9200ef8b21601', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJNeUtvbGxlY3RPckZhYjAyNSIsImp0aSI6ImZkYmRiYTNmNzc5YmFkZGJlZjA2MTRjYjgxMDY3NzViNTAwMGY4NDNmNjAxMWViYjc5NTQ0NjdhNzVmODY3NWJiN2E2MDM3N2RiODY3ZGJiIiwiaWF0IjoxNzc5ODg2Nzk4LjE4MjcxNCwibmJmIjoxNzc5ODg2Nzk4LjE4MjcxNywiZXhwIjoxNzc5ODkwMzk4LjE2MDc0LCJzdWIiOiIiLCJzY29wZXMiOlsiaXNfYXV0aGVudGljYXRlZCJdfQ.Ij252aZ2f_r99hsMqUbR1PTH_xbRVou4x6ilk361AyPhL4s8HQXURnA0aDs79EqcSh3mi3ZAI9SmGZHfngpr6JyVToT5iypiZpx-nv4mcHWhpXdwP_c4ngUP2s1jMIjzCNq-LDtnLW0iODkye7MdTjsXz0HYa_u8lanxhc-eljCcVHyt3sgcviGlur3A12B4YFuaDAYtF1XaiMCwvTk7lENTgHxnk7vIkf23WPQHdDTRP003yliRFS3kz54cU6keHtlLdvMjheWi175wjBVqXEkiuzVSPG7RcyRY5I2z5PrEn-vHBp4cZysTZNaXQSFpj6P9r7stnyAgYMjPI37_ZA', 1779890338, NULL, 0, '2026-05-22 15:56:09', NULL);

-- --------------------------------------------------------

--
-- Structure de la table `produits`
--

CREATE TABLE `produits` (
  `id` int NOT NULL,
  `slug` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nom` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `nom_ligne1` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nom_ligne2` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `categorie` enum('cyclisme','trail','course_pied','rando','autre') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'cyclisme',
  `discipline` enum('col','cyclisme_route','trail','course_pied','rando') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'col',
  `altitude` int DEFAULT NULL,
  `distance_km` decimal(6,2) DEFAULT NULL,
  `denivele` int DEFAULT NULL,
  `pente_moyenne` decimal(4,1) DEFAULT NULL,
  `pente_max` decimal(4,1) DEFAULT NULL,
  `periode_ouverture` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `difficulte` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `badge` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sous_titre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `region` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `lieu_depart` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `duree_estimee` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `points_interet` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `conseils_pratiques` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `actif` tinyint(1) NOT NULL DEFAULT '1',
  `statut` enum('actif','developpement','inactif') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'actif',
  `message_desactivation` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sommet_lat` decimal(10,7) DEFAULT NULL,
  `sommet_lng` decimal(10,7) DEFAULT NULL,
  `depart_lat` decimal(10,7) DEFAULT NULL,
  `depart_lng` decimal(10,7) DEFAULT NULL,
  `rayon_km` decimal(5,3) NOT NULL DEFAULT '0.200',
  `strava_keywords` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `shop_synced` tinyint(1) NOT NULL DEFAULT '0',
  `presta_product_id` int DEFAULT NULL,
  `lien_boutique` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `image_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `url_www` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `gpx_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `qr_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fabricant_contact_id` int DEFAULT NULL,
  `graveur_contact_id` int DEFAULT NULL,
  `fabricant_nom_cache` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `graveur_nom_cache` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `stock_medailles` int DEFAULT '0',
  `stock_seuil_alerte` int DEFAULT '20',
  `vitesse_max_kmh` int DEFAULT NULL,
  `temps_minimum_s` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `produits`
--

INSERT INTO `produits` (`id`, `slug`, `nom`, `nom_ligne1`, `nom_ligne2`, `categorie`, `discipline`, `altitude`, `distance_km`, `denivele`, `pente_moyenne`, `pente_max`, `periode_ouverture`, `difficulte`, `badge`, `sous_titre`, `region`, `lieu_depart`, `duree_estimee`, `description`, `points_interet`, `conseils_pratiques`, `actif`, `statut`, `message_desactivation`, `sommet_lat`, `sommet_lng`, `depart_lat`, `depart_lng`, `rayon_km`, `strava_keywords`, `shop_synced`, `presta_product_id`, `lien_boutique`, `image_url`, `url_www`, `gpx_url`, `qr_url`, `fabricant_contact_id`, `graveur_contact_id`, `fabricant_nom_cache`, `graveur_nom_cache`, `created_at`, `updated_at`, `stock_medailles`, `stock_seuil_alerte`, `vitesse_max_kmh`, `temps_minimum_s`) VALUES
(1, 'izoard', 'Col de l\'Izoard', 'Col de', 'l\'Izoard', 'cyclisme', 'col', 2364, 14.20, 1034, 7.3, 12.0, 'Juin – Octobre', 'Hors Catégorie', 'Hors Catégorie', 'Arvieux → Sommet', 'Hautes-Alpes · Queyras', 'Arvieux', '1h30 – 3h', NULL, '[\"\\\"La Casse D\\u00e9serte\\\"\",\"Stele Coppi & Bobet,\",\"Vue sur les Ecrins\"]', NULL, 1, 'actif', NULL, 44.8200238, 6.7350376, 44.7477317, 6.7720827, 0.200, NULL, 1, NULL, 'https://shop.mykollector.com/12-medaille-col-de-l-izoard.html', 'https://fab.mykollector.com/images/parcours/izoard.jpg', 'https://www.mykollector.com/parcours/izoard', 'https://fab.mykollector.com/gpx/izoard.gpx', 'https://chrono.mykollector.com/go.html?p=izoard', NULL, NULL, NULL, NULL, '2026-05-09 08:27:16', '2026-05-27 12:56:28', 0, 20, NULL, NULL),
(2, 'ventoux', 'Mont Ventoux', 'Mont', 'Ventoux', 'cyclisme', 'col', 1901, 21.00, 1591, 7.6, 11.0, 'Avril – Novembre', 'Hors Catégorie', 'Hors Catégorie', 'Bédoin → Sommet', 'Provence-Alpes', 'Bédoin', '2h – 4h', NULL, '[\"Chalet Reynard\",\"Sommet 1909m\",\"Observatoire m\\u00e9t\\u00e9o\",\"Vue sur la Provence\",\"St\\u00e8le Tom Simpson\"]', NULL, 1, 'actif', NULL, 44.1735398, 5.2770498, 44.1243401, 5.1832200, 0.200, NULL, 0, 13, 'https://shop.mykollector.com/13-medaille-mont-ventoux.html', 'https://fab.mykollector.com/images/parcours/montventoux.jpg', 'https://www.mykollector.com/parcours/ventoux', 'https://fab.mykollector.com/gpx/ventoux.gpx', 'https://chrono.mykollector.com/go.html?p=ventoux', NULL, NULL, NULL, NULL, '2026-05-09 08:27:16', '2026-05-27 12:57:26', 0, 20, NULL, NULL),
(3, 'alpe-huez', 'Alpe d\'Huez', 'Alpe', 'd\'Huez', 'cyclisme', 'col', 1850, 13.60, 1128, 8.3, 10.5, 'Toute l\'année', 'Hors Catégorie', 'Hors Catégorie', 'Le Bourg-d\'Oisans → Sommet', 'Isère · Oisans', 'Le Bourg-d\'Oisans', '1h – 2h30', NULL, '[\"21 virages num\\u00e9rot\\u00e9s\",\"Nom des champions grav\\u00e9s\",\"Village de l\'Alpe d\'Huez\",\"Lac du Verney\"]', NULL, 1, 'actif', NULL, 45.0958099, 6.0704100, 45.0642699, 6.0390799, 0.200, NULL, 0, NULL, NULL, 'https://fab.mykollector.com/images/parcours/alpedhuez.jpg', 'https://www.mykollector.com/parcours/alpe-huez', 'https://fab.mykollector.com/gpx/alpe-huez.gpx', 'https://chrono.mykollector.com/go.html?p=alpe-huez', NULL, NULL, NULL, NULL, '2026-05-09 08:27:16', '2026-05-27 12:58:14', 0, 20, NULL, NULL),
(4, 'montgueux', 'La rampe de Montgueux', 'La rampe', 'de Montgueux', 'cyclisme', 'col', 253, 2.00, 102, 5.1, NULL, NULL, 'Non communiqué', 'Cyclisme · Non communiqué', 'La montée de l\'escargot', NULL, NULL, NULL, NULL, NULL, NULL, 1, 'actif', NULL, 48.3003300, 3.9649800, 48.2962900, 3.9797900, 0.200, '[\"rampe\"]', 1, NULL, NULL, 'http://fab.mykollector.com/images/parcours/rampe_1200x800.jpg', 'https://www.mykollector.com/parcours/montgueux-rampe.html', 'https://fab.mykollector.com/gpx/montgueux.gpx', 'https://chrono.mykollector.com/go.html?p=montgueux', NULL, NULL, NULL, NULL, '2026-05-20 12:06:09', '2026-05-28 09:23:43', 0, 20, NULL, NULL),
(11, 'escargot', 'Montée de l\'escargot', 'Montée de', 'l\'escargot', 'cyclisme', 'col', 248, 2.40, 90, 3.8, NULL, NULL, 'Hors Catégorie', 'Cyclisme · Hors Catégorie', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 'actif', NULL, 48.3061700, 3.9653200, 48.3146700, 3.9770100, 0.200, NULL, 0, 11, NULL, 'http://fab.mykollector.com/images/parcours/escargot_1200x800.jpg', 'https://www.mykollector.com/parcours/montgueux-escargot.html', 'https://fab.mykollector.com/gpx/escargot.gpx', 'https://chrono.mykollector.com/go.html?p=escargot', NULL, NULL, NULL, NULL, '2026-05-21 18:12:27', '2026-05-28 09:23:54', 0, 20, NULL, NULL),
(13, 'test', 'Test: Plage Géraudot', 'Test: Plage', 'Géraudot', 'course_pied', 'course_pied', 141, 0.30, 5, 1.7, NULL, NULL, NULL, 'Test 01', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 'actif', NULL, 48.3007970, 4.3370130, 48.3023300, 4.3340840, 0.200, NULL, 0, 1, 'https://shop.mykollector.com/1-medaille-mykollector.html', 'https://fab.mykollector.com/images/parcours/g_raudot-plage_1200x800.jpg', NULL, 'https://fab.mykollector.com/gpx/test.gpx', 'https://chrono.mykollector.com/go.html?p=test', NULL, NULL, NULL, NULL, '2026-05-23 05:54:40', '2026-05-30 05:27:57', 0, 20, NULL, NULL),
(14, 'col-du-galibier', 'Col du Galibier', 'Col du', 'Galibier', 'cyclisme', 'col', 2625, 34.90, 2471, NULL, NULL, NULL, 'Hors Catégorie', 'Cyclisme · Hors Catégorie', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 'inactif', NULL, 45.0639600, 6.4079500, 45.2155700, 6.4749600, 0.200, NULL, 0, NULL, NULL, NULL, NULL, NULL, 'https://chrono.mykollector.com/go.html?p=col-du-galibier', NULL, NULL, NULL, NULL, '2026-05-23 05:56:06', '2026-05-28 06:20:28', 0, 20, NULL, NULL);

-- --------------------------------------------------------

--
-- Structure de la table `ps_import_queue`
--

CREATE TABLE `ps_import_queue` (
  `id` int NOT NULL,
  `presta_order_id` int NOT NULL,
  `tentatives` int NOT NULL DEFAULT '0',
  `derniere_tentative` datetime DEFAULT NULL,
  `prochaine_tentative` datetime DEFAULT NULL,
  `locked_at` datetime DEFAULT NULL,
  `statut` enum('en_attente','en_cours','echec_permanent') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'en_attente',
  `erreur` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `rapports`
--

CREATE TABLE `rapports` (
  `id` int NOT NULL,
  `lot_id` int NOT NULL,
  `statut` enum('succes','erreur') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'succes',
  `details` json DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `rate_limits`
--

CREATE TABLE `rate_limits` (
  `id` int NOT NULL,
  `ip` varchar(45) NOT NULL,
  `endpoint` varchar(200) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Structure de la table `relances_log`
--

CREATE TABLE `relances_log` (
  `id` int NOT NULL,
  `chrono_id` int DEFAULT NULL,
  `commande_id` int DEFAULT NULL,
  `type_relance` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `sent_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `relance_seuils`
--

CREATE TABLE `relance_seuils` (
  `id` int NOT NULL,
  `produit_id` int DEFAULT NULL,
  `type_relance` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `delai_jours` int NOT NULL,
  `actif` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `relance_seuils`
--

INSERT INTO `relance_seuils` (`id`, `produit_id`, `type_relance`, `delai_jours`, `actif`) VALUES
(1, NULL, 'chrono_non_converti_j7', 7, 1),
(2, NULL, 'chrono_non_converti_j30', 30, 1),
(3, NULL, 'chrono_non_converti_j60', 60, 1),
(4, NULL, 'validation_gravure_j3', 3, 1),
(5, NULL, 'auto_validation_gravure', 7, 1);

-- --------------------------------------------------------

--
-- Structure de la table `sav_tickets`
--

CREATE TABLE `sav_tickets` (
  `id` int NOT NULL,
  `commande_id` int NOT NULL,
  `user_id` int DEFAULT NULL,
  `type` enum('rejet_fab','defaut','reclamation','autre') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'autre',
  `statut` enum('ouvert','en_cours','resolu','ferme') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ouvert',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `resolution` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `segment_tracking_config`
--

CREATE TABLE `segment_tracking_config` (
  `produit_id` int NOT NULL,
  `wake_distance_m` int NOT NULL DEFAULT '2000',
  `high_accuracy_start_distance_m` int NOT NULL DEFAULT '300',
  `pulse_high_accuracy_duration_s` int NOT NULL DEFAULT '10',
  `pulse_low_accuracy_duration_s` int NOT NULL DEFAULT '45',
  `finish_high_accuracy_distance_m` int NOT NULL DEFAULT '400',
  `cooldown_distance_m` int NOT NULL DEFAULT '150',
  `cooldown_time_s` int NOT NULL DEFAULT '40',
  `strava_dedup_window_minutes` int NOT NULL DEFAULT '120'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `segment_tracking_config`
--

INSERT INTO `segment_tracking_config` (`produit_id`, `wake_distance_m`, `high_accuracy_start_distance_m`, `pulse_high_accuracy_duration_s`, `pulse_low_accuracy_duration_s`, `finish_high_accuracy_distance_m`, `cooldown_distance_m`, `cooldown_time_s`, `strava_dedup_window_minutes`) VALUES
(1, 2000, 300, 10, 45, 400, 150, 40, 120),
(2, 2000, 300, 10, 45, 400, 150, 40, 120),
(3, 2000, 300, 10, 45, 400, 150, 40, 120),
(4, 2000, 300, 10, 45, 400, 150, 40, 120),
(11, 2000, 300, 10, 45, 400, 150, 40, 120),
(13, 2000, 300, 10, 45, 400, 150, 40, 120),
(14, 2000, 300, 10, 45, 400, 150, 40, 120);

-- --------------------------------------------------------

--
-- Structure de la table `sessions`
--

CREATE TABLE `sessions` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `refresh_token` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `expires_at` datetime NOT NULL,
  `ip` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `refresh_token`, `expires_at`, `ip`, `user_agent`, `created_at`) VALUES
(71, 8, 'a0689320-a2dc-460b-91e1-060f430a1bc8', '2026-06-17 00:08:20', '', '', '2026-05-17 22:07:55'),
(73, 8, 'cceffb38-225c-4770-9da6-eb56ed9e1009', '2026-06-17 00:08:38', '', '', '2026-05-17 22:08:13'),
(75, 8, '58c2d10f-b407-41e7-86aa-7aea088d958b', '2026-06-17 00:11:13', '', '', '2026-05-17 22:10:48'),
(77, 8, '448f0976-f8fb-4df0-9791-4f36aa8efa99', '2026-06-17 00:26:29', '', '', '2026-05-17 22:26:03'),
(79, 8, 'c69562c8-dfde-49ac-8a4e-f34de77c89d8', '2026-06-17 00:31:03', '', '', '2026-05-17 22:30:38'),
(81, 8, '73fc1c93-d4bb-4463-9213-ced11f061af1', '2026-06-17 00:31:40', '', '', '2026-05-17 22:31:14'),
(83, 8, '9b193dde-e467-4293-8c74-5545f0c30ec2', '2026-06-17 00:39:19', '', '', '2026-05-17 22:38:54'),
(85, 8, 'ce304e57-5d78-46d6-aef6-8ae55d2ca4a7', '2026-06-17 00:40:10', '', '', '2026-05-17 22:39:45'),
(89, 8, '8be6c872-569d-4705-9e55-834f03047ea6', '2026-06-17 02:05:43', '', '', '2026-05-18 00:05:18'),
(91, 8, 'b3da3ea5-5f56-4b4e-b1f7-3d9869c6a8f2', '2026-06-17 02:05:51', '', '', '2026-05-18 00:05:26'),
(93, 8, '2b1929ee-b870-4854-bbaa-fd9f8da2bd60', '2026-06-17 02:06:51', '', '', '2026-05-18 00:06:25'),
(95, 8, 'b23bf7c7-c45a-49b5-b66b-12c1b1678d51', '2026-06-17 02:08:23', '', '', '2026-05-18 00:07:58'),
(97, 8, 'ebad3deb-c912-41fa-8fc8-2287ce554e1c', '2026-06-17 02:09:51', '', '', '2026-05-18 00:09:26'),
(99, 8, '4979cb4b-f130-4f86-80f1-83d99ff781ec', '2026-06-17 02:13:04', '', '', '2026-05-18 00:12:39'),
(100, 8, '03583733-5c88-46d2-8938-7a290aca0266', '2026-06-17 02:18:46', '45.88.190.81', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-18 00:18:21'),
(101, 8, '2adcb7bf-e808-442a-9f0f-722074a2c553', '2026-06-17 02:24:30', '45.88.190.81', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-18 00:24:04'),
(105, 8, 'b52ec6a4-5c91-4616-8fc0-e59c67e5de24', '2026-06-17 09:27:35', '2a0d:e487:22cf:58d5:d4fa:39e5:ec4:9c03', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-18 07:27:09'),
(106, 8, 'd4e31c17-e5d8-40e8-94c3-ae34f58a1815', '2026-06-17 09:43:38', '109.69.110.152', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-18 07:43:13'),
(110, 8, '381df7aa-0a6a-4a3a-8529-5cd1d79d4008', '2026-06-17 11:50:58', '109.69.110.152', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-18 09:50:33'),
(111, 8, 'e27b4874-aefc-465e-9752-105bea23ea0b', '2026-06-17 12:00:07', '109.69.110.152', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-18 09:59:42'),
(112, 8, 'a91b4ddd-c5b5-49fa-85dd-a2723fe29ff4', '2026-06-17 12:06:34', '109.69.110.152', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-18 10:06:08'),
(113, 8, 'b7ccfee5-7345-402e-abf8-b61cd2338d6f', '2026-06-17 12:09:35', '109.69.110.152', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-18 10:09:09'),
(114, 8, '4a22e083-e3cc-473f-b578-853d8ee38282', '2026-06-17 12:09:55', '109.69.110.152', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-18 10:09:29'),
(115, 8, '1e3f7dde-7c8b-4930-b95f-096b7c640025', '2026-06-17 12:12:11', '109.69.110.152', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-18 10:11:45'),
(116, 8, 'fb4af44d-2caf-4049-9c84-ef73b2baae86', '2026-06-17 12:14:53', '109.69.110.152', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-18 10:14:27'),
(118, 8, '7abb79d8-9d60-462a-a6cf-36e6e6063c70', '2026-06-17 12:25:02', '185.199.101.3', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-18 10:24:36'),
(120, 8, '61711ead-b704-44da-ae46-ebd1c7c972b7', '2026-06-17 15:57:55', '185.199.101.12', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-18 13:57:30'),
(121, 8, '99050d1e-084a-4a8e-8db3-1a3c563f4230', '2026-06-17 16:09:02', '185.199.101.13', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-18 14:08:36'),
(122, 8, '1f57742e-3728-4b91-b9ae-976bf775ed86', '2026-06-17 20:49:11', '185.199.101.13', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-18 18:48:46'),
(124, 8, 'd8637c66-08ea-4278-b8e7-46a46baa61de', '2026-06-18 00:06:33', '91.205.106.63', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-18 22:06:07'),
(125, 8, '256b5173-ba21-41cb-a5f0-335c7d0fecd9', '2026-06-18 00:06:36', '91.205.106.63', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-18 22:06:10'),
(126, 8, 'bb588fe7-0699-4029-a82b-feacb3eb8f78', '2026-06-18 00:24:25', '45.84.136.111', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-18 22:23:59'),
(127, 8, 'ed3dedbc-6da6-47eb-913a-757efe1171e5', '2026-06-18 00:24:29', '45.84.136.111', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-18 22:24:04'),
(128, 8, 'f2af9202-9df5-4690-a90f-1e89c0dee41c', '2026-06-18 00:24:37', '45.84.136.111', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-18 22:24:12'),
(129, 8, '787752bd-5784-43f0-98fe-ee3f280183d3', '2026-06-18 00:24:44', '45.84.136.111', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-18 22:24:19'),
(130, 8, '16da29e5-c59e-45e9-afd7-b7456a55e54d', '2026-06-18 00:24:50', '45.84.136.111', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-18 22:24:24'),
(131, 8, 'd02694a8-3b70-4b46-8a84-f3463e3618ae', '2026-06-18 06:18:25', '45.84.136.109', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-19 04:17:59'),
(132, 8, '38d5ba61-b16f-41c2-ac40-3aedc95d457e', '2026-06-18 06:18:34', '45.84.136.109', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-19 04:18:09'),
(137, 8, 'f82bc97e-0b2d-4724-b8a4-fd282f310b61', '2026-06-18 06:25:45', '45.84.136.109', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-19 04:25:20'),
(138, 8, '78db53b0-e841-42bd-a889-f0bb2f4f1d86', '2026-06-18 06:38:11', '45.88.190.218', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-19 04:37:45'),
(139, 8, 'bed5d4f0-7333-487a-9f53-f022d4632fc0', '2026-06-18 06:49:32', '185.199.101.13', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-19 04:49:07'),
(140, 8, '877bf949-5229-4586-ad00-3ac70ac5d9c9', '2026-06-18 08:25:11', '185.199.101.14', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-19 06:24:46'),
(141, 8, '4acffa1b-dd44-4d9b-adec-585501376be8', '2026-06-18 08:25:43', '185.199.101.14', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-19 06:25:17'),
(142, 8, 'cb9b5665-44fc-4463-b283-7db0dd2720cf', '2026-06-18 08:33:39', '178.132.106.9', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-19 06:33:14'),
(143, 8, 'b0938224-f1d9-474a-9935-1f386370d67e', '2026-06-18 08:48:50', '185.199.101.14', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-19 06:48:25'),
(144, 8, '8ded9fb3-54aa-4b1d-bc3c-e4184ad67bfe', '2026-06-18 08:54:18', '178.132.106.9', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-19 06:53:53'),
(145, 8, '74905a31-50ee-4187-b0bc-1c200ba69b60', '2026-06-18 09:03:44', '178.132.106.9', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-19 07:03:18'),
(147, 8, 'de6bce28-9993-4c2d-be16-3cb3987a4093', '2026-06-18 12:13:39', '185.199.101.8', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-19 10:13:13'),
(148, 8, '86f28297-8562-4ea5-a8e0-b1466afe0667', '2026-06-18 14:17:10', '178.132.106.9', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-19 12:16:45'),
(149, 8, 'f82090a5-091d-4fc6-9627-f41c536ae3ab', '2026-06-18 14:23:46', '178.132.106.9', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-19 12:23:20'),
(152, 8, 'c7e20064-ba4c-4497-8717-e64b35fc54b8', '2026-06-18 18:04:57', '185.199.101.6', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-19 16:04:32'),
(156, 8, 'b3de5602-70b5-4104-ac22-efe2372fcd6e', '2026-06-18 20:00:33', '2a01:e0a:90e:6c20:e026:88f:e7af:a926', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-19 18:00:07'),
(158, 8, '8468a41e-be4e-4370-999a-504b202326aa', '2026-06-19 00:26:20', '185.199.101.11', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-19 22:25:54'),
(161, 8, '3c239aa8-e351-492a-a269-316435dac19c', '2026-06-19 00:47:27', '91.205.106.208', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-19 22:47:01'),
(164, 8, 'cc95f464-3656-4d59-b72e-81a90afb48b4', '2026-06-19 01:26:28', '91.205.106.208', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-19 23:26:02'),
(165, 8, 'ae519db3-2862-4d8b-af59-68fc08882263', '2026-06-19 07:48:14', '185.199.101.7', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-20 05:47:48'),
(166, 8, '765a6b64-3656-4664-b8d5-40508ab8be37', '2026-06-19 07:48:55', '185.199.101.7', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-20 05:48:29'),
(167, 8, '513e3bda-e2c6-42f2-b1b3-16de5c1893da', '2026-06-19 10:12:47', '185.199.101.3', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-20 08:12:21'),
(172, 8, '430d8f73-4143-41da-b332-7c6737fbf33b', '2026-06-19 15:01:25', '91.205.106.136', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0', '2026-05-20 13:01:00'),
(173, 19, '5809b885-4e93-4c6f-b92b-aca7f864585a', '2026-06-19 15:32:58', '2a01:cb0d:a04d:6377:69c0:39e6:cf4a:fc11', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.4.2 Mobile/15E148 Safari/604.1 Brave', '2026-05-20 13:32:32'),
(174, 8, '19f74de4-96fb-402b-b37c-ab16b1f86d84', '2026-06-20 00:17:55', '82.66.214.88', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-20 22:17:30'),
(175, 8, '275c16e8-91d4-4992-aa63-161da30d27eb', '2026-06-20 00:24:52', '82.66.214.88', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-20 22:24:27'),
(176, 8, '7cc585c1-8181-410b-9be4-11e9679b2927', '2026-06-20 01:31:35', '176.223.173.51', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-20 23:31:09'),
(177, 8, '843a4bbc-208e-4761-b792-6ce774f667b7', '2026-06-20 07:15:41', '176.223.173.50', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-21 05:15:16'),
(179, 8, 'd4b47743-05d5-4812-8067-acff50341966', '2026-06-20 07:41:08', '176.223.173.50', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-21 05:40:43'),
(180, 8, 'cdd88909-66f2-43e8-8674-a5461096683b', '2026-06-20 07:43:27', '45.10.155.100', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-21 05:43:01'),
(183, 8, 'd341805a-28fe-4375-be80-bb3516a4aad6', '2026-06-20 11:55:06', '185.199.101.13', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-21 09:54:40'),
(184, 8, '253583e8-4366-49fd-a52c-2bfb5dbebc23', '2026-06-20 12:00:17', '185.199.101.13', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-05-21 09:59:52'),
(186, 8, '5ae567dc-5e61-4ad9-b458-ce90c02b3c04', '2026-06-20 21:10:31', '2a01:e0a:90e:6c20:fc50:c13e:5e1c:8883', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_8) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.1 Safari/605.1.15', '2026-05-21 19:10:06'),
(187, 8, '39585969-91f2-4210-99e7-f90f733cd297', '2026-06-20 21:35:48', '2a01:e0a:90e:6c20:fc50:c13e:5e1c:8883', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_8) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.1 Safari/605.1.15', '2026-05-21 19:35:22'),
(188, 8, '86f0ee2f-1253-4d3a-9725-c2819b048b88', '2026-06-20 21:40:36', '2a01:e0a:90e:6c20:fc50:c13e:5e1c:8883', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_8) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.1 Safari/605.1.15', '2026-05-21 19:40:11'),
(189, 8, 'f5b82d55-d817-40f7-afbe-3f090cd5d84a', '2026-06-21 11:55:35', '', '', '2026-05-22 09:55:09'),
(190, 8, 'bf23ecc3-846b-4460-b431-ee9531dea6b1', '2026-06-21 11:55:35', '', '', '2026-05-22 09:55:09'),
(191, 8, 'e01abdec-ade4-4fa2-99a0-dfda5ed395b2', '2026-06-21 11:55:35', '', '', '2026-05-22 09:55:09'),
(194, 8, 'ac9fc08f-ae59-4bd6-b75f-ddcc319a850e', '2026-06-21 14:41:38', '91.205.106.139', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-22 12:41:12'),
(195, 8, '02d55992-6365-4ead-86c1-51c11bbaf5ab', '2026-06-22 00:54:08', '', '', '2026-05-22 22:53:42'),
(196, 8, 'b7ad11e5-bdc3-4ca3-8d40-205bcf62a360', '2026-06-22 00:54:08', '', '', '2026-05-22 22:53:42'),
(197, 8, '4a77f1bf-b2c6-4be2-b03d-1ed04ef385c2', '2026-06-22 00:54:14', '45.84.137.77', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-22 22:53:48'),
(198, 8, '42b484a2-b2d2-4d81-9604-c4ccf67b4f22', '2026-06-22 02:25:52', '94.101.114.33', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-23 00:25:26'),
(200, 8, 'a9057240-b2f8-4a16-bc89-9fed8bded571', '2026-06-22 04:23:12', '109.69.110.240', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-23 02:22:47'),
(201, 8, 'feb53be8-08f2-4ac8-b110-8635f8eb9ac1', '2026-06-22 04:34:32', '109.69.110.240', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-23 02:34:07'),
(202, 8, '38fd115b-1003-45c5-ab83-adf8fcf7dc7a', '2026-06-22 07:49:21', '', '', '2026-05-23 05:48:55'),
(203, 8, '9ee90115-e4e1-45eb-b40b-fdce1fa71b8f', '2026-06-22 07:49:21', '', '', '2026-05-23 05:48:55'),
(204, 8, '9b5cd8ae-cc0c-4f14-9eb9-10832b70f914', '2026-06-22 07:49:21', '', '', '2026-05-23 05:48:55'),
(209, 8, '9f1cadb0-9d6c-4d08-a898-91ec3e6a7872', '2026-06-25 01:02:28', '', '', '2026-05-25 23:02:02'),
(211, 8, '3b4ca879-924a-4807-b383-a8618d442194', '2026-06-25 08:14:15', '', '', '2026-05-26 06:13:50'),
(212, 8, 'c515dd2d-6ce8-4589-8d5f-4e6a8eab50c8', '2026-06-25 08:14:15', '', '', '2026-05-26 06:13:50'),
(213, 8, 'd3925216-6e60-41be-a14c-307b83dfc764', '2026-06-25 08:14:15', '', '', '2026-05-26 06:13:50'),
(216, 8, '0f13a3d4-9b82-4e81-a35e-791cd71b9796', '2026-06-25 09:32:45', '185.199.101.13', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Mobile/15E148 Safari/604.1', '2026-05-26 07:32:19'),
(217, 8, 'd1fb5cdc-ba85-4d00-95b6-e4f57d7dd278', '2026-06-26 00:49:09', '45.84.137.181', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-26 22:49:09'),
(218, 8, 'd23cac36-bf90-423b-9cc5-dd13fcecdf6e', '2026-06-26 01:04:10', '45.84.137.181', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-26 23:04:10'),
(220, 8, '3bd1fc3e-379a-44d5-ac59-f88c2bbcdd25', '2026-06-26 01:16:55', '', '', '2026-05-26 23:16:55'),
(221, 8, '0ac4a976-35ac-4428-9189-3839d20cb561', '2026-06-26 01:16:55', '', '', '2026-05-26 23:16:55'),
(222, 8, '10ce8df3-8ae5-4607-912b-8c7af6c264f4', '2026-06-26 01:16:55', '', '', '2026-05-26 23:16:55'),
(224, 8, '39612192-0f3c-4cf6-b114-c3661698aa21', '2026-06-26 01:30:24', '45.84.137.181', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-26 23:30:24'),
(225, 8, 'dec5fcc3-3304-426d-b3c0-8f4556fb37e2', '2026-06-26 06:57:17', '45.95.160.50', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-27 04:57:17'),
(226, 8, '06f55af9-8c9f-47ff-b58a-26149a7c9b0a', '2026-06-26 07:24:38', '', '', '2026-05-27 05:24:38'),
(227, 8, '0c5b9d03-9189-49b0-a45b-bbe8565beb3d', '2026-06-26 07:24:38', '', '', '2026-05-27 05:24:38'),
(229, 8, '20e2b3de-0b2d-4cc4-8489-1dd8fcb9443b', '2026-06-26 08:41:40', '', '', '2026-05-27 06:41:40'),
(230, 8, 'c48be147-181b-4727-8110-5dec12fa9d4a', '2026-06-26 08:41:40', '', '', '2026-05-27 06:41:40'),
(232, 20, '8a1a5268-8761-42fa-ba85-78611e720d37', '2026-06-26 15:33:55', '45.84.136.154', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-27 13:33:55'),
(233, 8, 'b4d12c9f-1f1d-4868-8b14-6a82130b1167', '2026-06-27 11:22:36', '', '', '2026-05-28 09:22:36'),
(234, 8, '19e85b40-3b75-4f80-8c24-998e81643f9c', '2026-06-27 11:23:13', '86.104.20.167', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-28 09:23:13'),
(235, 8, 'f6bc0ff2-76f0-43f5-9462-f58da12d4a70', '2026-06-27 16:57:18', '86.104.20.167', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-28 14:57:18'),
(237, 8, '367fae7a-cd71-4a49-8295-2bbf63cb8a3a', '2026-06-27 17:58:49', '45.95.160.8', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-28 15:58:49'),
(238, 8, 'a514355e-a52b-436c-8a49-69c27ba6064a', '2026-06-27 18:28:42', '', '', '2026-05-28 16:28:42'),
(239, 8, '7fbc61b9-405d-46ee-acb8-a573139b9ee0', '2026-06-27 18:28:42', '', '', '2026-05-28 16:28:42'),
(241, 8, 'ba24d0ed-4a22-4cd3-be2a-d01607c44580', '2026-06-27 21:37:06', '185.199.101.7', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Mobile/15E148 Safari/604.1', '2026-05-28 19:37:06'),
(242, 8, '040a8bbd-0b08-40d7-8702-4af4779b2bf3', '2026-06-28 03:03:31', '45.95.160.8', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-29 01:03:31'),
(243, 8, 'e8e7e7b7-7478-4e94-8a44-1ad2d30e3cce', '2026-06-28 07:34:17', '45.95.160.9', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-29 05:34:17'),
(244, 8, 'd6518422-c398-4e0a-921c-bde49c683f6a', '2026-06-28 13:39:45', '45.95.160.9', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-29 11:39:45'),
(245, 8, 'b5d7fd4b-add9-4d0b-a926-eb1992edb1f9', '2026-06-29 07:22:57', '', '', '2026-05-30 05:22:57'),
(246, 8, '221dab3e-4ef1-4b5c-b62f-c05a7526b459', '2026-06-29 07:23:04', '45.95.160.23', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-30 05:23:04'),
(247, 8, '2d947ba9-0026-40e6-81f4-e547b955a9f6', '2026-06-29 07:27:11', '45.95.160.23', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-30 05:27:11'),
(248, 8, '084334f8-c480-46f6-a6f1-602a534a6f60', '2026-06-29 07:27:44', '45.95.160.23', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0', '2026-05-30 05:27:44'),
(249, 8, 'c6426246-caeb-4914-a3f1-c8597e29c11f', '2026-06-29 08:40:08', '', '', '2026-05-30 06:40:08'),
(250, 8, 'fddb2d24-3a7c-4d86-87dd-a928eba4d39a', '2026-06-29 12:37:32', '', '', '2026-05-30 10:37:32'),
(251, 8, '132da000-6f57-48c4-93cf-46177e19ee95', '2026-06-29 12:37:32', '', '', '2026-05-30 10:37:32'),
(252, 8, '0ead6258-80ab-40f4-bd25-ea9810e5ef3e', '2026-06-29 12:37:52', '185.199.101.7', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Mobile/15E148 Safari/604.1', '2026-05-30 10:37:52');

-- --------------------------------------------------------

--
-- Structure de la table `stocks`
--

CREATE TABLE `stocks` (
  `id` int NOT NULL,
  `atelier_id` int NOT NULL,
  `produit_id` int DEFAULT NULL,
  `type_stock` enum('medaille_brute','emballage','materiau') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'medaille_brute',
  `quantite` int NOT NULL DEFAULT '0',
  `seuil_alerte` int NOT NULL DEFAULT '10',
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `strava_config`
--

CREATE TABLE `strava_config` (
  `id` int NOT NULL,
  `client_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `client_secret` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `verify_token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `webhook_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `strava_config`
--

INSERT INTO `strava_config` (`id`, `client_id`, `client_secret`, `verify_token`, `webhook_id`) VALUES
(1, '243830', '3cca3cda8126db39705b1d1a9f150976560477b0', 'Isid996910', NULL);

-- --------------------------------------------------------

--
-- Structure de la table `templates_etiquettes`
--

CREATE TABLE `templates_etiquettes` (
  `id` int NOT NULL,
  `nom` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `contenu_html` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `actif` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `templates_gravure`
--

CREATE TABLE `templates_gravure` (
  `id` int NOT NULL,
  `produit_id` int NOT NULL,
  `nom` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `fichier` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `actif` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Structure de la table `users`
--

CREATE TABLE `users` (
  `id` int NOT NULL,
  `email` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `role` enum('sportif','operateur_fab','admin_fab','admin_chrono','super_admin') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'sportif',
  `nom` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `prenom` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `atelier_id` int DEFAULT NULL,
  `presta_customer_id` int DEFAULT NULL,
  `strava_connected` tinyint(1) NOT NULL DEFAULT '0',
  `strava_id` bigint DEFAULT NULL,
  `strava_access_token` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `strava_refresh_token` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  `strava_token_expires` int DEFAULT NULL,
  `reset_token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `reset_expires` datetime DEFAULT NULL,
  `actif` tinyint(1) NOT NULL DEFAULT '1',
  `anonymized_at` datetime DEFAULT NULL,
  `date_inscription` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `derniere_connexion` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `users`
--

INSERT INTO `users` (`id`, `email`, `password`, `role`, `nom`, `prenom`, `atelier_id`, `presta_customer_id`, `strava_connected`, `strava_id`, `strava_access_token`, `strava_refresh_token`, `strava_token_expires`, `reset_token`, `reset_expires`, `actif`, `anonymized_at`, `date_inscription`, `derniere_connexion`) VALUES
(8, 'carpentier.jul@gmail.com', '$2y$10$kqWFXx0YNmvpPSOtsi6qzeqPqHQZiKlmt52ex.UI9lVfiRlP9p9dG', 'admin_fab', 'CARPENTIER', 'Julien', NULL, 11, 1, 35309298, 'S5D+8Y70ZHUHnnPKSiJmi29XRjJHcCtlMjhHYlJmSGIwb056K3p5Y1ZxM3Ribk5tZVRiTDI3SmQ4MlB0SWx6MFdLZ05Ucy93aVBwVkJpVzE=', 'oT40YBv6XvIS/xj3XqUAXGx4Y25PdHBXOTNkWmlDa2FVRVZZOEZQSmREWXJSRURXZnIvQmg3OERCQlJOeHhHdkVia3VZeGdRUDZqS05FQzE=', 1780140290, '2bddbb54-ba3c-47e1-b9fb-91602754ab38', '2026-05-20 01:23:32', 1, NULL, '2026-05-17 22:08:19', '2026-05-30 10:37:52'),
(9, 'panicky.hornet.ygyo@hidingmail.net', '$2y$10$Xt79Om.g.oX0qDdkYLUo8O9sMuIXLhUPk9vLzkUK0h1ZFZy8XxtZm', 'sportif', 'HORNET', 'Julien', NULL, 12, 0, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, '2026-05-18 00:42:09', NULL),
(11, 'anonymized_11@deleted.mko', NULL, 'sportif', NULL, NULL, NULL, 14, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, '2026-05-18 10:53:45', '2026-05-18 08:53:22', NULL),
(13, 'married.orca.xneq@hidingmail.net', '$2y$10$ZjBOJEdvcNuv/NJ/LetwFewTOaQa7x9nrLpH6rvHu7nKw38p8prhG', 'sportif', 'OK', 'Test', NULL, 15, 0, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, '2026-05-19 08:17:17', NULL),
(14, 'resident.squid.pifr@hidingmail.net', '$2y$10$.9ydR4NTkvoZ7M6HghhPRO4Ovmjr.t4zJmSD8BOswo38TK94yBsY2', 'sportif', 'DEUX', 'Test', NULL, 16, 0, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, '2026-05-19 13:58:13', NULL),
(15, 'sporting.manatee.biuc@hidingmail.net', '$2y$10$Xhnxr53RrTHcx1Ztd7z1q.AtjsK98q0GNA1PKj6iLwaeNmMIyswgK', 'sportif', 'SPORTING', 'Julien', NULL, 18, 0, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, '2026-05-19 16:01:03', NULL),
(16, 'ambitious.whale.hlmz@hidingmail.net', '$2y$10$h5/KfoZLO7vGWCvN0EH91eJVrMpxqFB0PsIYE2GX3XbLsEzIMFzGS', 'sportif', 'QUATRE', 'Julien', NULL, 19, 0, NULL, NULL, NULL, NULL, '415e50e9-5c98-4307-8c19-3f9082c81dee', '2026-05-20 01:21:25', 1, NULL, '2026-05-19 22:20:56', NULL),
(17, 'julien@mykollector.com', '$2y$10$QLkkFWZ6AVPgfU51ZgzR1eHNecN5vk91QF4ANAJsSl8lUZKb7kylq', 'sportif', 'CINQ', 'Julien', NULL, 20, 0, NULL, NULL, NULL, NULL, '25dde647-e486-4270-9cff-62d39f36e64b', '2026-05-20 01:38:54', 1, NULL, '2026-05-19 22:36:10', NULL),
(18, 'carpentier.jul+test@gmail.com', '$2y$10$A6F/wUj5P6rNMhgkXGFjZOwx9zl3B5nO1rgWoaBBk7s13YxQ94xfe', 'sportif', 'SIX', 'Julien', NULL, 21, 0, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, '2026-05-19 23:12:02', NULL),
(19, 'btomalak10@gmail.com', '$2y$10$yyj82ib9/VJJdwPsYzFOm.OCFqFFxoAVUaDiwZ49oO9IQADyorcke', 'sportif', 'TOMALAK', 'Bruno', NULL, 22, 0, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, '2026-05-20 13:32:58', NULL),
(20, 'hissing.scallop.xmcy@hidingmail.net', '$2y$10$/5JkyQvSZta1jW2Sxn7Jcune1FFdIMdTjVuEYtUNAeMkSM/UyJ036', 'sportif', 'STERONE', 'Testo', NULL, 23, 0, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, '2026-05-27 13:33:55', NULL);

--
-- Index pour les tables déchargées
--

--
-- Index pour la table `ateliers`
--
ALTER TABLE `ateliers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_contact` (`contact_id`);

--
-- Index pour la table `chat_conversations`
--
ALTER TABLE `chat_conversations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_contact_id` (`contact_id`);

--
-- Index pour la table `chat_messages`
--
ALTER TABLE `chat_messages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_conv_created` (`conversation_id`,`created_at`),
  ADD KEY `fk_cm_user` (`user_id`);

--
-- Index pour la table `chat_participants`
--
ALTER TABLE `chat_participants`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_conv_user` (`conversation_id`,`user_id`),
  ADD KEY `fk_cp_user` (`user_id`);

--
-- Index pour la table `chat_wizz`
--
ALTER TABLE `chat_wizz`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_repondu` (`repondu`),
  ADD KEY `idx_conv` (`conversation_id`);

--
-- Index pour la table `chronos`
--
ALTER TABLE `chronos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_strava_activity` (`strava_activity_id`),
  ADD KEY `idx_user_produit_date` (`user_id`,`produit_id`,`date_debut`),
  ADD KEY `idx_statut_chrono` (`statut`),
  ADD KEY `fk_chronos_produit` (`produit_id`);

--
-- Index pour la table `classements`
--
ALTER TABLE `classements`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_user_produit` (`user_id`,`produit_id`),
  ADD KEY `idx_produit_duree` (`produit_id`,`duree_secondes`),
  ADD KEY `fk_cl_chrono` (`chrono_id`);

--
-- Index pour la table `commandes`
--
ALTER TABLE `commandes`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_presta_order` (`presta_order_id`),
  ADD KEY `idx_statut` (`statut`),
  ADD KEY `idx_type_commande` (`type_commande`),
  ADD KEY `idx_is_b2b` (`is_b2b`),
  ADD KEY `idx_atelier` (`atelier_id`),
  ADD KEY `idx_user_id` (`user_id`),
  ADD KEY `fk_commandes_produit` (`produit_id`),
  ADD KEY `fk_commandes_chrono` (`chrono_id`);

--
-- Index pour la table `commande_fichier_gravure`
--
ALTER TABLE `commande_fichier_gravure`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_cfg` (`commande_id`,`fichier_gravure_id`),
  ADD KEY `fk_cfg_fichier` (`fichier_gravure_id`);

--
-- Index pour la table `commande_lot`
--
ALTER TABLE `commande_lot`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_commande_lot` (`commande_id`,`lot_id`),
  ADD KEY `fk_cl_lot` (`lot_id`);

--
-- Index pour la table `commande_session`
--
ALTER TABLE `commande_session`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_cs` (`commande_id`,`chrono_id`),
  ADD KEY `fk_cs_chrono` (`chrono_id`);

--
-- Index pour la table `defauts`
--
ALTER TABLE `defauts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_defauts_commande` (`commande_id`);

--
-- Index pour la table `dropbox_config`
--
ALTER TABLE `dropbox_config`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `etiquettes_pdf`
--
ALTER TABLE `etiquettes_pdf`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `commande_id` (`commande_id`);

--
-- Index pour la table `export_destinations`
--
ALTER TABLE `export_destinations`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `fabricants`
--
ALTER TABLE `fabricants`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_fab_produit` (`produit_id`,`atelier_id`),
  ADD KEY `fk_fab_atelier` (`atelier_id`);

--
-- Index pour la table `favoris`
--
ALTER TABLE `favoris`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `user_produit` (`user_id`,`produit_id`);

--
-- Index pour la table `fichiers_gravure`
--
ALTER TABLE `fichiers_gravure`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_fg_lot` (`lot_id`);

--
-- Index pour la table `logs_audit`
--
ALTER TABLE `logs_audit`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_action` (`action`),
  ADD KEY `idx_entite` (`entite`,`entite_id`),
  ADD KEY `idx_logs_created_at` (`created_at`),
  ADD KEY `fk_logs_user` (`user_id`);

--
-- Index pour la table `lots`
--
ALTER TABLE `lots`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_statut_lot` (`statut`),
  ADD KEY `idx_atelier_lot` (`atelier_id`),
  ADD KEY `fk_lots_produit` (`produit_id`);

--
-- Index pour la table `notifications`
--
ALTER TABLE `notifications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_user_lu` (`user_id`,`lu`);

--
-- Index pour la table `prestashop_config`
--
ALTER TABLE `prestashop_config`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `produits`
--
ALTER TABLE `produits`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `idx_slug` (`slug`),
  ADD KEY `idx_actif` (`actif`),
  ADD KEY `idx_fabricant_contact` (`fabricant_contact_id`),
  ADD KEY `idx_graveur_contact` (`graveur_contact_id`);

--
-- Index pour la table `ps_import_queue`
--
ALTER TABLE `ps_import_queue`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_ps_order` (`presta_order_id`),
  ADD KEY `idx_statut_queue` (`statut`),
  ADD KEY `idx_locked_at` (`locked_at`);

--
-- Index pour la table `rapports`
--
ALTER TABLE `rapports`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_rapports_lot` (`lot_id`);

--
-- Index pour la table `rate_limits`
--
ALTER TABLE `rate_limits`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_ip_endpoint` (`ip`,`endpoint`,`created_at`);

--
-- Index pour la table `relances_log`
--
ALTER TABLE `relances_log`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_chrono_type` (`chrono_id`,`type_relance`),
  ADD KEY `idx_commande_type` (`commande_id`,`type_relance`);

--
-- Index pour la table `relance_seuils`
--
ALTER TABLE `relance_seuils`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_rs_produit` (`produit_id`);

--
-- Index pour la table `sav_tickets`
--
ALTER TABLE `sav_tickets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_sav_statut` (`statut`),
  ADD KEY `fk_sav_commande` (`commande_id`),
  ADD KEY `fk_sav_user` (`user_id`);

--
-- Index pour la table `segment_tracking_config`
--
ALTER TABLE `segment_tracking_config`
  ADD PRIMARY KEY (`produit_id`);

--
-- Index pour la table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_refresh_token` (`refresh_token`),
  ADD KEY `idx_user_session` (`user_id`);

--
-- Index pour la table `stocks`
--
ALTER TABLE `stocks`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_stocks_atelier` (`atelier_id`),
  ADD KEY `fk_stocks_produit` (`produit_id`);

--
-- Index pour la table `strava_config`
--
ALTER TABLE `strava_config`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `templates_etiquettes`
--
ALTER TABLE `templates_etiquettes`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `templates_gravure`
--
ALTER TABLE `templates_gravure`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_tg_produit` (`produit_id`);

--
-- Index pour la table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `idx_email` (`email`),
  ADD UNIQUE KEY `idx_presta` (`presta_customer_id`),
  ADD KEY `idx_strava` (`strava_id`),
  ADD KEY `idx_atelier` (`atelier_id`);

--
-- AUTO_INCREMENT pour les tables déchargées
--

--
-- AUTO_INCREMENT pour la table `ateliers`
--
ALTER TABLE `ateliers`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT pour la table `chat_conversations`
--
ALTER TABLE `chat_conversations`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `chat_messages`
--
ALTER TABLE `chat_messages`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `chat_participants`
--
ALTER TABLE `chat_participants`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `chat_wizz`
--
ALTER TABLE `chat_wizz`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `chronos`
--
ALTER TABLE `chronos`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT pour la table `classements`
--
ALTER TABLE `classements`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT pour la table `commandes`
--
ALTER TABLE `commandes`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `commande_fichier_gravure`
--
ALTER TABLE `commande_fichier_gravure`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `commande_lot`
--
ALTER TABLE `commande_lot`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `commande_session`
--
ALTER TABLE `commande_session`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `defauts`
--
ALTER TABLE `defauts`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `dropbox_config`
--
ALTER TABLE `dropbox_config`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `etiquettes_pdf`
--
ALTER TABLE `etiquettes_pdf`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `export_destinations`
--
ALTER TABLE `export_destinations`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `fabricants`
--
ALTER TABLE `fabricants`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `favoris`
--
ALTER TABLE `favoris`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `fichiers_gravure`
--
ALTER TABLE `fichiers_gravure`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `logs_audit`
--
ALTER TABLE `logs_audit`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT pour la table `lots`
--
ALTER TABLE `lots`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `notifications`
--
ALTER TABLE `notifications`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `prestashop_config`
--
ALTER TABLE `prestashop_config`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT pour la table `produits`
--
ALTER TABLE `produits`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT pour la table `ps_import_queue`
--
ALTER TABLE `ps_import_queue`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `rapports`
--
ALTER TABLE `rapports`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `rate_limits`
--
ALTER TABLE `rate_limits`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `relances_log`
--
ALTER TABLE `relances_log`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `relance_seuils`
--
ALTER TABLE `relance_seuils`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT pour la table `sav_tickets`
--
ALTER TABLE `sav_tickets`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `sessions`
--
ALTER TABLE `sessions`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=253;

--
-- AUTO_INCREMENT pour la table `stocks`
--
ALTER TABLE `stocks`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `strava_config`
--
ALTER TABLE `strava_config`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT pour la table `templates_etiquettes`
--
ALTER TABLE `templates_etiquettes`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `templates_gravure`
--
ALTER TABLE `templates_gravure`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `users`
--
ALTER TABLE `users`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- Contraintes pour les tables déchargées
--

--
-- Contraintes pour la table `chat_messages`
--
ALTER TABLE `chat_messages`
  ADD CONSTRAINT `fk_cm_conversation` FOREIGN KEY (`conversation_id`) REFERENCES `chat_conversations` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_cm_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Contraintes pour la table `chat_participants`
--
ALTER TABLE `chat_participants`
  ADD CONSTRAINT `fk_cp_conversation` FOREIGN KEY (`conversation_id`) REFERENCES `chat_conversations` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_cp_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `chronos`
--
ALTER TABLE `chronos`
  ADD CONSTRAINT `fk_chronos_produit` FOREIGN KEY (`produit_id`) REFERENCES `produits` (`id`),
  ADD CONSTRAINT `fk_chronos_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Contraintes pour la table `classements`
--
ALTER TABLE `classements`
  ADD CONSTRAINT `fk_cl_chrono` FOREIGN KEY (`chrono_id`) REFERENCES `chronos` (`id`),
  ADD CONSTRAINT `fk_cl_produit` FOREIGN KEY (`produit_id`) REFERENCES `produits` (`id`),
  ADD CONSTRAINT `fk_cl_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Contraintes pour la table `commandes`
--
ALTER TABLE `commandes`
  ADD CONSTRAINT `fk_commandes_atelier` FOREIGN KEY (`atelier_id`) REFERENCES `ateliers` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fk_commandes_chrono` FOREIGN KEY (`chrono_id`) REFERENCES `chronos` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fk_commandes_produit` FOREIGN KEY (`produit_id`) REFERENCES `produits` (`id`),
  ADD CONSTRAINT `fk_commandes_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `commande_fichier_gravure`
--
ALTER TABLE `commande_fichier_gravure`
  ADD CONSTRAINT `fk_cfg_commande` FOREIGN KEY (`commande_id`) REFERENCES `commandes` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_cfg_fichier` FOREIGN KEY (`fichier_gravure_id`) REFERENCES `fichiers_gravure` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `commande_lot`
--
ALTER TABLE `commande_lot`
  ADD CONSTRAINT `fk_cl_commande` FOREIGN KEY (`commande_id`) REFERENCES `commandes` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_cl_lot` FOREIGN KEY (`lot_id`) REFERENCES `lots` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `commande_session`
--
ALTER TABLE `commande_session`
  ADD CONSTRAINT `fk_cs_chrono` FOREIGN KEY (`chrono_id`) REFERENCES `chronos` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_cs_commande` FOREIGN KEY (`commande_id`) REFERENCES `commandes` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `defauts`
--
ALTER TABLE `defauts`
  ADD CONSTRAINT `fk_defauts_commande` FOREIGN KEY (`commande_id`) REFERENCES `commandes` (`id`);

--
-- Contraintes pour la table `fabricants`
--
ALTER TABLE `fabricants`
  ADD CONSTRAINT `fk_fab_atelier` FOREIGN KEY (`atelier_id`) REFERENCES `ateliers` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_fab_produit` FOREIGN KEY (`produit_id`) REFERENCES `produits` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `fichiers_gravure`
--
ALTER TABLE `fichiers_gravure`
  ADD CONSTRAINT `fk_fg_lot` FOREIGN KEY (`lot_id`) REFERENCES `lots` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `logs_audit`
--
ALTER TABLE `logs_audit`
  ADD CONSTRAINT `fk_logs_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `lots`
--
ALTER TABLE `lots`
  ADD CONSTRAINT `fk_lots_atelier` FOREIGN KEY (`atelier_id`) REFERENCES `ateliers` (`id`),
  ADD CONSTRAINT `fk_lots_produit` FOREIGN KEY (`produit_id`) REFERENCES `produits` (`id`);

--
-- Contraintes pour la table `notifications`
--
ALTER TABLE `notifications`
  ADD CONSTRAINT `fk_notif_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `rapports`
--
ALTER TABLE `rapports`
  ADD CONSTRAINT `fk_rapports_lot` FOREIGN KEY (`lot_id`) REFERENCES `lots` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `relances_log`
--
ALTER TABLE `relances_log`
  ADD CONSTRAINT `fk_rl_chrono` FOREIGN KEY (`chrono_id`) REFERENCES `chronos` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_rl_commande` FOREIGN KEY (`commande_id`) REFERENCES `commandes` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `relance_seuils`
--
ALTER TABLE `relance_seuils`
  ADD CONSTRAINT `fk_rs_produit` FOREIGN KEY (`produit_id`) REFERENCES `produits` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `sav_tickets`
--
ALTER TABLE `sav_tickets`
  ADD CONSTRAINT `fk_sav_commande` FOREIGN KEY (`commande_id`) REFERENCES `commandes` (`id`),
  ADD CONSTRAINT `fk_sav_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `segment_tracking_config`
--
ALTER TABLE `segment_tracking_config`
  ADD CONSTRAINT `fk_stc_produit` FOREIGN KEY (`produit_id`) REFERENCES `produits` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `sessions`
--
ALTER TABLE `sessions`
  ADD CONSTRAINT `fk_sessions_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `stocks`
--
ALTER TABLE `stocks`
  ADD CONSTRAINT `fk_stocks_atelier` FOREIGN KEY (`atelier_id`) REFERENCES `ateliers` (`id`),
  ADD CONSTRAINT `fk_stocks_produit` FOREIGN KEY (`produit_id`) REFERENCES `produits` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `templates_gravure`
--
ALTER TABLE `templates_gravure`
  ADD CONSTRAINT `fk_tg_produit` FOREIGN KEY (`produit_id`) REFERENCES `produits` (`id`);

--
-- Contraintes pour la table `users`
--
ALTER TABLE `users`
  ADD CONSTRAINT `fk_users_atelier` FOREIGN KEY (`atelier_id`) REFERENCES `ateliers` (`id`) ON DELETE SET NULL;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
