-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : mar. 19 mai 2026 à 09:12
-- Version du serveur : 8.4.7
-- Version de PHP : 8.4.15

START TRANSACTION;



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

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

--
-- Structure de la table `actu`
--

CREATE TABLE IF NOT EXISTS `actu` (
  `id` int NOT NULL AUTO_INCREMENT,
  `titre` varchar(255) NOT NULL,
  `contenu` longtext NOT NULL,
  `categorie` varchar(30) NOT NULL,
  `image_filename` varchar(255) DEFAULT NULL,
  `cta_url` varchar(500) DEFAULT NULL,
  `cta_texte` varchar(100) DEFAULT NULL,
  `epingle` tinyint NOT NULL,
  `statut` varchar(20) NOT NULL,
  `vues` int NOT NULL,
  `clics` int NOT NULL,
  `created_at` datetime NOT NULL,
  `published_at` datetime DEFAULT NULL,
  `published_by_admin` tinyint NOT NULL,
  `beneficiaire_id` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_837303425AF81F68` (`beneficiaire_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Structure de la table `admin_access_log`
--

CREATE TABLE IF NOT EXISTS `admin_access_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `admin_id` int NOT NULL,
  `admin_email` varchar(180) NOT NULL,
  `ip_tronquee` varchar(50) NOT NULL,
  `path` varchar(500) NOT NULL,
  `method` varchar(10) NOT NULL,
  `created_at` datetime NOT NULL,
  `action` varchar(100) NOT NULL,
  `resource` varchar(255) DEFAULT NULL,
  `context` json DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_admin_log_created_at` (`created_at`),
  KEY `idx_admin_log_admin_id` (`admin_id`),
  KEY `idx_admin_log_action` (`action`)
) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `admin_access_log` (`id`, `admin_id`, `admin_email`, `ip_tronquee`, `path`, `method`, `created_at`, `action`, `resource`, `context`) VALUES
(1, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 12:10:46', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(2, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 12:12:23', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(3, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 12:18:09', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(4, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 12:18:40', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(5, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 12:19:12', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(6, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/3', 'GET', '2026-04-27 12:20:04', 'view_user', 'User#3 — cecilephilippe31@gmail.com', NULL),
(7, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 12:24:30', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(8, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 12:25:07', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(9, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 12:25:20', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(10, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 12:25:55', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(11, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 12:26:06', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(12, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 12:27:12', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(13, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 12:31:08', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(14, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 12:34:10', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(15, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 12:34:46', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(16, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd/1/rejeter', 'POST', '2026-04-27 12:34:50', 'rgpd_reject_demande', 'RgpdRequest#1', '{\"motif\": \"\"}'),
(17, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 12:34:51', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(18, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 12:36:37', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(19, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 13:06:14', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(20, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 13:09:10', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(21, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 13:09:43', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(22, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 13:09:50', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(23, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 13:11:39', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(24, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 13:12:06', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(25, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 13:13:46', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(26, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 13:13:59', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(27, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 13:14:09', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(28, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-04-27 13:21:25', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(29, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-04-28 09:45:22', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(30, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-04-28 09:47:42', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(31, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-04-28 10:21:00', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(32, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-04-28 10:21:30', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(33, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/commandes/50', 'GET', '2026-04-29 10:15:00', 'view_commande', 'Commande#50 — CMD-2026-45669', NULL),
(34, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/commandes/49', 'GET', '2026-04-29 10:15:17', 'view_commande', 'Commande#49 — CMD-2026-82440', NULL),
(35, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/commandes/47', 'GET', '2026-04-29 10:16:24', 'view_commande', 'Commande#47 — CMD-2026-91144', NULL),
(36, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-05-04 12:01:22', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(37, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/rgpd', 'GET', '2026-05-04 12:01:32', 'view_rgpd_demandes', 'Filtrage: pending', NULL),
(38, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/beneficiaire/59/toggle', 'POST', '2026-05-08 13:19:28', 'activate_beneficiaire', 'Beneficiaire#59', NULL),
(39, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-08 13:55:54', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(40, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/commandes/50', 'GET', '2026-05-08 13:56:04', 'view_commande', 'Commande#50 — CMD-2026-45669', NULL),
(41, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/commandes/51', 'GET', '2026-05-08 16:17:38', 'view_commande', 'Commande#51 — CMD-2026-93295', NULL),
(42, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/beneficiaire/60/toggle', 'POST', '2026-05-08 16:17:57', 'activate_beneficiaire', 'Beneficiaire#60', NULL),
(43, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/beneficiaire/60/toggle', 'POST', '2026-05-08 16:18:17', 'deactivate_beneficiaire', 'Beneficiaire#60', NULL),
(44, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 16:45:48', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(45, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 16:46:16', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(46, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/1', 'GET', '2026-05-14 16:46:36', 'view_user', 'User#1 — contact@num-ecard.com', NULL),
(47, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 16:48:20', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(48, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 16:52:40', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(49, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 16:52:50', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(50, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 16:57:08', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(51, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:01:28', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(52, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/1', 'GET', '2026-05-14 17:01:39', 'view_user', 'User#1 — contact@num-ecard.com', NULL),
(53, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:01:56', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(54, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:02:21', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(55, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:08:29', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(56, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:09:58', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(57, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:16:01', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(58, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:16:11', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(59, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:16:43', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(60, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:16:50', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(61, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:21:07', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(62, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:21:27', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(63, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:21:42', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(64, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:23:07', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(65, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:29:24', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(66, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:32:43', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(67, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:40:11', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(68, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:42:58', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(69, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/3', 'GET', '2026-05-14 17:43:26', 'view_user', 'User#3 — deleted-3@void.local', NULL),
(70, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:43:42', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(71, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:49:17', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(72, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:49:51', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(73, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/commandes/51', 'GET', '2026-05-14 17:54:48', 'view_commande', 'Commande#51 — CMD-2026-93295', NULL),
(74, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-14 17:55:10', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(75, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-18 09:01:11', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(76, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/commandes/52', 'GET', '2026-05-18 09:03:05', 'view_commande', 'Commande#52 — CMD-2026-15091', NULL),
(77, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/commandes/53', 'GET', '2026-05-18 09:03:58', 'view_commande', 'Commande#53 — CMD-2026-00541', NULL),
(78, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/commandes/54', 'GET', '2026-05-18 09:08:17', 'view_commande', 'Commande#54 — CMD-2026-11393', NULL),
(79, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/commandes/55', 'GET', '2026-05-18 09:19:55', 'view_commande', 'Commande#55 — CMD-2026-92150', NULL),
(80, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-18 10:11:36', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(81, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/5', 'GET', '2026-05-18 10:29:45', 'view_user', 'User#5 — phil31780@live.fr', NULL),
(82, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/utilisateurs/4', 'GET', '2026-05-18 11:00:04', 'view_user', 'User#4 — cecilephilippe31@gmail.com', NULL),
(83, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/commandes/58', 'GET', '2026-05-18 11:34:03', 'view_commande', 'Commande#58 — CMD-2026-44863', NULL),
(84, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/commandes/58', 'GET', '2026-05-18 11:34:40', 'view_commande', 'Commande#58 — CMD-2026-44863', NULL),
(85, 1, 'contact@num-ecard.com', '127.0.0.xxx', '/admin/commandes/58', 'GET', '2026-05-18 12:13:40', 'view_commande', 'Commande#58 — CMD-2026-44863', NULL);

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

--
-- Structure de la table `admin_email_log`
--

CREATE TABLE IF NOT EXISTS `admin_email_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `recipient_email` varchar(255) NOT NULL,
  `sender_name` varchar(255) NOT NULL,
  `sujet` varchar(255) NOT NULL,
  `corps` longtext,
  `status` varchar(20) NOT NULL,
  `error_message` longtext,
  `admin_ip` varchar(45) DEFAULT NULL,
  `sent_at` datetime NOT NULL,
  `body_purged_at` datetime DEFAULT NULL,
  `sent_by_id` int DEFAULT NULL,
  `sent_to_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_EF0C4DB1A45BB98C` (`sent_by_id`),
  KEY `IDX_EF0C4DB13E89D3ED` (`sent_to_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Structure de la table `beneficiaire`
--

CREATE TABLE IF NOT EXISTS `beneficiaire` (
  `avatar_type` varchar(20) NOT NULL,
  `initiales` varchar(5) DEFAULT NULL,
  `photo_filename` varchar(255) DEFAULT NULL,
  `charte_type` varchar(255) NOT NULL,
  `charte_template` int DEFAULT NULL,
  `couleur_principale` varchar(7) DEFAULT NULL,
  `couleur_secondaire` varchar(7) DEFAULT NULL,
  `police_personnalisee` varchar(100) DEFAULT NULL,
  `charte_pdf_filename` varchar(255) DEFAULT NULL,
  `service1` varchar(150) DEFAULT NULL,
  `service2` varchar(150) DEFAULT NULL,
  `service3` varchar(150) DEFAULT NULL,
  `service4` varchar(150) DEFAULT NULL,
  `threads` varchar(255) DEFAULT NULL,
  `zoom` varchar(255) DEFAULT NULL,
  `google_meet` varchar(255) DEFAULT NULL,
  `microsoft_teams` varchar(255) DEFAULT NULL,
  `feature_agenda` tinyint NOT NULL,
  `agenda_link` varchar(255) DEFAULT NULL,
  `feature_galerie` tinyint NOT NULL,
  `galerie_link` varchar(255) DEFAULT NULL,
  `feature_satisfaction` tinyint NOT NULL,
  `satisfaction_link` varchar(255) DEFAULT NULL,
  `feature_catalogue` tinyint NOT NULL,
  `catalogue_link` varchar(255) DEFAULT NULL,
  `feature_video` tinyint NOT NULL,
  `video_link` varchar(255) DEFAULT NULL,
  `lien_personnalise` varchar(255) DEFAULT NULL,
  `expertise` varchar(100) DEFAULT NULL,
  `seances` varchar(100) DEFAULT NULL,
  `satisfaction` varchar(100) DEFAULT NULL,
  `position` int NOT NULL,
  `modification_count` int NOT NULL,
  `last_modified_at` datetime DEFAULT NULL,
  `needs_regeneration` tinyint NOT NULL,
  `commande_id` int NOT NULL,
  `id` int NOT NULL,
  `card_url` varchar(500) DEFAULT NULL,
  `card_sent_at` datetime DEFAULT NULL,
  `is_active` tinyint NOT NULL,
  `deactivated_at` datetime DEFAULT NULL,
  `reactivated_at` datetime DEFAULT NULL,
  `scheduled_activation_at` datetime DEFAULT NULL,
  `timezone` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_B140D80282EA2E54` (`commande_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `beneficiaire` (`avatar_type`, `initiales`, `photo_filename`, `charte_type`, `charte_template`, `couleur_principale`, `couleur_secondaire`, `police_personnalisee`, `charte_pdf_filename`, `service1`, `service2`, `service3`, `service4`, `threads`, `zoom`, `google_meet`, `microsoft_teams`, `feature_agenda`, `agenda_link`, `feature_galerie`, `galerie_link`, `feature_satisfaction`, `satisfaction_link`, `feature_catalogue`, `catalogue_link`, `feature_video`, `video_link`, `lien_personnalise`, `expertise`, `seances`, `satisfaction`, `position`, `modification_count`, `last_modified_at`, `needs_regeneration`, `commande_id`, `id`, `card_url`, `card_sent_at`, `is_active`, `deactivated_at`, `reactivated_at`, `scheduled_activation_at`, `timezone`) VALUES
('initiales', 'JD', NULL, 'template', 53, '#667eea', '#764ba2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, 1, 0, NULL, 1, 1, 69, NULL, NULL, 0, '2026-05-19 10:49:18', NULL, '2026-05-21 00:00:00', NULL),
('initiales', 'JA', NULL, 'template', 53, '#667eea', '#764ba2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL, NULL, 1, 0, NULL, 1, 2, 70, NULL, NULL, 0, '2026-05-19 11:09:10', NULL, '2026-05-21 00:00:00', NULL);

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

--
-- Structure de la table `card`
--

CREATE TABLE IF NOT EXISTS `card` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nom` varchar(100) NOT NULL,
  `prenom` varchar(100) NOT NULL,
  `entreprise` varchar(150) DEFAULT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `titre` varchar(200) DEFAULT NULL,
  `slogan` varchar(200) DEFAULT NULL,
  `fonction` varchar(150) DEFAULT NULL,
  `fixe` varchar(50) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `email` varchar(150) DEFAULT NULL,
  `site_web` varchar(255) DEFAULT NULL,
  `adresse` longtext,
  `price` decimal(10,2) DEFAULT NULL,
  `linkedin` varchar(1000) DEFAULT NULL,
  `facebook` varchar(1000) DEFAULT NULL,
  `youtube` varchar(1000) DEFAULT NULL,
  `tiktok` varchar(1000) DEFAULT NULL,
  `insta` varchar(1000) DEFAULT NULL,
  `x` varchar(1000) DEFAULT NULL,
  `type` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `card` (`id`, `nom`, `prenom`, `entreprise`, `logo`, `titre`, `slogan`, `fonction`, `fixe`, `mobile`, `email`, `site_web`, `adresse`, `price`, `linkedin`, `facebook`, `youtube`, `tiktok`, `insta`, `x`, `type`) VALUES
(48, 'MOREAU', 'Thomas', 'SANAGENCY', NULL, '', 'L\'innovation au service de l\'immobilier', 'Designer', '0561358513', '0626214018', 'thomas.moreau@sanagency.fr', 'https://www.sanagency.fr', '8 rue Jean Jaurès, 31167 Toulouse', 349.00, 'https://linkedin.com/in/thomas-moreau', 'https://facebook.com/thomasmoreau', '', '', 'https://instagram.com/thomas_moreau', '', 'beneficiaire'),
(49, 'MARTIN', 'Nathalie', 'Sud Développement', NULL, '', 'L\'innovation au service de l\'immobilier', 'Designer', '0561753343', '0645286047', 'nathalie.martin@suddveloppement.fr', 'https://www.suddveloppement.fr', '12 rue des Coquelicots, 31477 Albi', 549.00, 'https://linkedin.com/in/nathalie-martin', 'https://facebook.com/nathaliemartin', 'https://www.youtube.com/watch?v=IC62ia_bZeY', '', 'https://instagram.com/nathalie_martin', '', 'beneficiaire'),
(55, 'DUPONT', 'Luc', 'Focus Digital', NULL, NULL, 'La musique est ma passion', 'Designer', '0579176838', '0678624871', 'luc.dupont@focusdigital.fr', 'https://www.focusdigital.fr', '65 rue du Commerce, 31673 Toulouse', 199.00, 'https://linkedin.com/in/luc-dupont', 'https://facebook.com/lucdupont', NULL, NULL, 'https://instagram.com/luc_dupont', NULL, 'beneficiaire'),
(56, 'DUPONT', 'Hugo', 'Digital Cube', NULL, NULL, 'Créons ensemble votre succès', 'Chargé de Communication', '0519360591', '0639951818', 'hugo.dupont@digitalcube.fr', 'https://www.digitalcube.fr', '83 rue des Coquelicots, 31110 Colomiers', 549.00, 'https://linkedin.com/in/hugo-dupont', 'https://facebook.com/hugodupont', NULL, NULL, 'https://instagram.com/hugo_dupont', NULL, 'beneficiaire'),
(57, 'Louis', 'Paola', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 349.00, NULL, NULL, NULL, NULL, NULL, NULL, 'beneficiaire'),
(58, 'Louis', 'Anna', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 349.00, NULL, NULL, NULL, NULL, NULL, NULL, 'beneficiaire'),
(59, 'Alain', 'Alin', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 549.00, NULL, NULL, NULL, NULL, NULL, NULL, 'beneficiaire'),
(60, 'CECILE', 'Philippe', 'Musicode', NULL, NULL, '', 'Développeur', '', '+33 07 89 54 86 28', 'cecilephilippe31@gmail.com', '', '7 place des coquelicots Larra 31330', 549.00, '', '', '', '', '', '', 'beneficiaire'),
(61, 'Martin', 'Nathalie', NULL, NULL, NULL, NULL, 'Developpeur', NULL, NULL, NULL, NULL, NULL, 199.00, NULL, NULL, NULL, NULL, NULL, NULL, 'beneficiaire'),
(62, 'Martin', 'Nathalie', NULL, NULL, NULL, NULL, 'Developpeur', NULL, NULL, NULL, NULL, NULL, 199.00, NULL, NULL, NULL, NULL, NULL, NULL, 'beneficiaire'),
(63, 'Martin', 'Nathalie', NULL, NULL, NULL, NULL, 'Developpeur', NULL, NULL, NULL, NULL, NULL, 199.00, NULL, NULL, NULL, NULL, NULL, NULL, 'beneficiaire'),
(64, 'M', 'Nathalie', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 199.00, NULL, NULL, NULL, NULL, NULL, NULL, 'beneficiaire'),
(65, 'Martin', 'Nathalie', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 179.00, NULL, NULL, NULL, NULL, NULL, NULL, 'beneficiaire'),
(66, 'CECILE', 'Philippe', NULL, NULL, NULL, NULL, 'Developpeur', NULL, NULL, NULL, NULL, NULL, 549.00, NULL, NULL, NULL, NULL, NULL, NULL, 'beneficiaire'),
(67, 'CECILE', 'Jean', NULL, NULL, NULL, NULL, 'Developpeur', NULL, NULL, NULL, NULL, NULL, 549.00, NULL, NULL, NULL, NULL, NULL, NULL, 'beneficiaire'),
(68, 'Wembi', 'Jean', NULL, NULL, NULL, NULL, 'Developpeur', NULL, NULL, NULL, NULL, NULL, 349.00, NULL, NULL, NULL, NULL, NULL, NULL, 'beneficiaire'),
(69, 'DENIS', 'Jean', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 349.00, NULL, NULL, NULL, NULL, NULL, NULL, 'beneficiaire'),
(70, 'Alfonse', 'Jean', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 549.00, NULL, NULL, NULL, NULL, NULL, NULL, 'beneficiaire');

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

--
-- Structure de la table `code_promo_admin`
--

CREATE TABLE IF NOT EXISTS `code_promo_admin` (
  `id` int NOT NULL AUTO_INCREMENT,
  `code` varchar(50) NOT NULL,
  `remise_pourcentage` decimal(5,2) NOT NULL,
  `type_usage` varchar(10) NOT NULL,
  `nb_utilisations` int NOT NULL,
  `debut_at` datetime DEFAULT NULL,
  `fin_at` datetime DEFAULT NULL,
  `actif` tinyint NOT NULL,
  `created_at` datetime NOT NULL,
  `cree_par_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_2866D85077153098` (`code`),
  KEY `IDX_2866D850FC29C013` (`cree_par_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Structure de la table `commande_multi`
--

CREATE TABLE IF NOT EXISTS `commande_multi` (
  `id` int NOT NULL AUTO_INCREMENT,
  `reference` varchar(20) NOT NULL,
  `pack_type` varchar(20) NOT NULL,
  `quantity` int NOT NULL,
  `client_nom` varchar(200) DEFAULT NULL,
  `client_entreprise` varchar(200) DEFAULT NULL,
  `client_email` varchar(180) DEFAULT NULL,
  `client_telephone` varchar(20) DEFAULT NULL,
  `client_adresse` longtext,
  `paiement_mode` varchar(20) NOT NULL,
  `total_ht` decimal(10,2) NOT NULL,
  `total_ttc` decimal(10,2) NOT NULL,
  `taux_tva` decimal(5,2) NOT NULL,
  `stripe_session_id` varchar(255) DEFAULT NULL,
  `stripe_payment_intent_id` varchar(255) DEFAULT NULL,
  `status` varchar(20) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `paid_at` datetime DEFAULT NULL,
  `completed_at` datetime DEFAULT NULL,
  `notes` longtext,
  `user_id` int DEFAULT NULL,
  `code_promo_applique` varchar(50) DEFAULT NULL,
  `remise_pourcentage` decimal(5,2) DEFAULT NULL,
  `montant_remise_ht` decimal(10,2) DEFAULT NULL,
  `retractation_choix` varchar(30) DEFAULT NULL,
  `retractation_horodatage` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_FCF99CC6AEA34913` (`reference`),
  KEY `IDX_FCF99CC6A76ED395` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `commande_multi` (`id`, `reference`, `pack_type`, `quantity`, `client_nom`, `client_entreprise`, `client_email`, `client_telephone`, `client_adresse`, `paiement_mode`, `total_ht`, `total_ttc`, `taux_tva`, `stripe_session_id`, `stripe_payment_intent_id`, `status`, `created_at`, `updated_at`, `paid_at`, `completed_at`, `notes`, `user_id`, `code_promo_applique`, `remise_pourcentage`, `montant_remise_ht`, `retractation_choix`, `retractation_horodatage`) VALUES
(1, 'CMD-2026-87382', 'premium', 1, 'SANACHY Philippe', NULL, 'phil31780@live.fr', '07 89 54 86 28', '7 place des coquelicots 31330 Larra', 'comptant', 314.10, 376.92, 20.00, 'cs_test_a1l3F5W8HB9JvgfjKiFuIjjuGK7Ul81xLA6yNKpPP7H4s9T0b1SuVVmQyf', 'pi_3TYjLQLKvnU8BpCB1UWxcMoQ', 'paid', '2026-05-19 10:49:18', '2026-05-19 10:49:47', '2026-05-19 10:49:47', NULL, NULL, 5, 'AMB101', 10.00, 34.90, 'execution_immediate', '2026-05-19 10:49:18'),
(2, 'CMD-2026-46221', 'forcevente', 1, 'SANACHY Philippe', NULL, 'phil31780@live.fr', '07 89 54 86 28', '7 place des coquelicots 31330 Larra', 'comptant', 494.10, 592.92, 20.00, 'cs_test_a1pj6uzowlrPmUYGyQPEMpUS4PYQdnGk9Ve43XTm9XKaWl1CseHXkcfd4S', 'pi_3TYjecLKvnU8BpCB1CVJGHYz', 'paid', '2026-05-19 11:09:10', '2026-05-19 11:09:37', '2026-05-19 11:09:37', NULL, NULL, 5, 'AMB101', 10.00, 54.90, 'execution_immediate', '2026-05-19 11:09:10');

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

--
-- Structure de la table `commission_vente`
--

CREATE TABLE IF NOT EXISTS `commission_vente` (
  `id` int NOT NULL AUTO_INCREMENT,
  `commande_reference` varchar(50) DEFAULT NULL,
  `code_promo_utilise` varchar(20) NOT NULL,
  `montant_htbrut` decimal(10,2) NOT NULL,
  `montant_remise` decimal(10,2) NOT NULL,
  `montant_htnet` decimal(10,2) NOT NULL,
  `taux_commission` decimal(5,2) NOT NULL,
  `montant_commission` decimal(10,2) NOT NULL,
  `created_at` datetime NOT NULL,
  `vendeur_profil_id` int NOT NULL,
  `commande_id` int DEFAULT NULL,
  `facture_commission_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_C6CB38DFF378E87B` (`vendeur_profil_id`),
  KEY `IDX_C6CB38DF82EA2E54` (`commande_id`),
  KEY `IDX_C6CB38DF73CA5452` (`facture_commission_id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `commission_vente` (`id`, `commande_reference`, `code_promo_utilise`, `montant_htbrut`, `montant_remise`, `montant_htnet`, `taux_commission`, `montant_commission`, `created_at`, `vendeur_profil_id`, `commande_id`, `facture_commission_id`) VALUES
(1, 'CMD-2026-36699', 'AMB101', 549.00, 54.90, 494.10, 25.00, 123.53, '2026-05-18 10:32:28', 1, 57, 1),
(2, 'CMD-2026-44863', 'AMB101', 549.00, 54.90, 494.10, 25.00, 123.53, '2026-05-18 11:32:24', 1, 58, 2),
(3, 'CMD-2026-87382', 'AMB101', 349.00, 34.90, 314.10, 25.00, 78.53, '2026-05-19 10:49:47', 1, 1, NULL),
(4, 'CMD-2026-46221', 'AMB101', 549.00, 54.90, 494.10, 25.00, 123.53, '2026-05-19 11:09:37', 1, 2, NULL);

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

--
-- Structure de la table `consent_log`
--

CREATE TABLE IF NOT EXISTS `consent_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `source` varchar(64) NOT NULL,
  `analytics` tinyint NOT NULL,
  `consent_version` smallint NOT NULL,
  `user_agent` varchar(512) DEFAULT NULL,
  `consent_given_at` datetime NOT NULL,
  `user_id` int DEFAULT NULL,
  `marketing` tinyint NOT NULL,
  `essential` tinyint NOT NULL,
  `ip_anonymized` varchar(64) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_30113729A76ED395` (`user_id`),
  KEY `idx_consent_source` (`source`),
  KEY `idx_consent_date` (`consent_given_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Structure de la table `consent_record`
--

CREATE TABLE IF NOT EXISTS `consent_record` (
  `id` int NOT NULL AUTO_INCREMENT,
  `purpose` varchar(50) NOT NULL,
  `action` varchar(10) NOT NULL,
  `ip_anonymized` varchar(50) DEFAULT NULL,
  `legal_basis` varchar(10) NOT NULL,
  `notice_version` varchar(100) DEFAULT NULL,
  `source` varchar(100) DEFAULT NULL,
  `user_agent` varchar(512) DEFAULT NULL,
  `consented_at` datetime NOT NULL,
  `user_id` int DEFAULT NULL,
  `analytics_consent` tinyint DEFAULT NULL,
  `marketing_consent` tinyint DEFAULT NULL,
  `visitor_token` varchar(64) DEFAULT NULL,
  `page_url` varchar(512) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_consent_user` (`user_id`),
  KEY `idx_consent_purpose` (`purpose`),
  KEY `idx_consent_date` (`consented_at`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `consent_record` (`id`, `purpose`, `action`, `ip_anonymized`, `legal_basis`, `notice_version`, `source`, `user_agent`, `consented_at`, `user_id`, `analytics_consent`, `marketing_consent`, `visitor_token`, `page_url`) VALUES
(1, 'cookie_banner', 'grant', '127.0.0.0', '6.1.a', 'cookies-v1/schema:2', 'cookie_banner', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-29 08:55:44', NULL, 1, 1, NULL, NULL),
(2, 'push_vapid', 'grant', '127.0.0.0', '6.1.a', 'push-v1', 'card_push_modal', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-30 11:03:26', NULL, NULL, NULL, NULL, 'https://localhost:8000/test-push.html'),
(3, 'push_vapid', 'revoke', '127.0.0.0', '6.1.a', NULL, 'card_push_modal', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-30 11:06:58', NULL, NULL, NULL, NULL, NULL),
(4, 'push_vapid', 'grant', '127.0.0.0', '6.1.a', 'push-v1', 'card_push_modal', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-30 11:07:04', NULL, NULL, NULL, NULL, 'https://localhost:8000/test-push.html'),
(5, 'push_vapid', 'revoke', '127.0.0.0', '6.1.a', NULL, 'card_push_modal', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-30 11:07:06', NULL, NULL, NULL, NULL, NULL),
(6, 'cookie_banner', 'grant', '127.0.0.0', '6.1.a', 'cookies-v1/schema:2', 'cookie_banner', '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 09:46:54', NULL, 1, 1, NULL, NULL),
(7, 'cookie_banner', 'grant', '127.0.0.0', '6.1.a', 'cookies-v1/schema:2', 'cookie_banner', '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-19 08:27:48', NULL, 1, 1, NULL, NULL),
(8, 'cookie_banner', 'grant', '127.0.0.0', '6.1.a', 'cookies-v1/schema:2', 'cookie_banner', '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-19 08:48:14', NULL, 1, 1, NULL, NULL),
(9, 'cookie_banner', 'grant', '127.0.0.0', '6.1.a', 'cookies-v1/schema:2', 'cookie_banner', '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-19 09:04:14', NULL, 1, 1, NULL, NULL),
(10, 'cookie_banner', 'grant', '127.0.0.0', '6.1.a', 'cookies-v1/schema:2', 'cookie_banner', '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-19 09:07:50', NULL, 1, 1, NULL, NULL);

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

--
-- Structure de la table `contact_message`
--

CREATE TABLE IF NOT EXISTS `contact_message` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nom` varchar(150) NOT NULL,
  `email` varchar(180) NOT NULL,
  `telephone` varchar(30) DEFAULT NULL,
  `entreprise` varchar(200) DEFAULT NULL,
  `sujet` varchar(20) NOT NULL,
  `message` longtext NOT NULL,
  `ip_anonymized` varchar(45) DEFAULT NULL,
  `consent_given` tinyint NOT NULL,
  `statut` varchar(20) NOT NULL DEFAULT 'nouveau',
  `created_at` datetime NOT NULL,
  `purge_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Structure de la table `deletion_log`
--

CREATE TABLE IF NOT EXISTS `deletion_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `email_hashed` varchar(64) NOT NULL,
  `original_user_id` int DEFAULT NULL,
  `channel` varchar(30) NOT NULL,
  `commandes_count` int NOT NULL,
  `beneficiaires_count` int NOT NULL,
  `files_deleted_count` int NOT NULL,
  `brevio_purged` tinyint NOT NULL,
  `ip_anonymized` varchar(50) DEFAULT NULL,
  `deleted_at` datetime NOT NULL,
  `request_reference` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_deletion_date` (`deleted_at`),
  KEY `idx_deletion_email` (`email_hashed`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `deletion_log` (`id`, `email_hashed`, `original_user_id`, `channel`, `commandes_count`, `beneficiaires_count`, `files_deleted_count`, `brevio_purged`, `ip_anonymized`, `deleted_at`, `request_reference`) VALUES
(1, '8fab9f51bdc503fb3f116f1f979b472b92cfba0c32e4d7506f193572c9d44cca', 2, 'self_service', 1, 1, 0, 0, '127.0.0.0', '2026-04-23 11:15:34', NULL),
(2, '05d47ecfa6581712db1b9dfdc86af68267fb0fb781cef4165b3262c693c28f22', 3, 'rgpd_request', 4, 4, 4, 0, NULL, '2026-04-27 13:14:07', 'RGPD-2');

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

--
-- Structure de la table `demande_retractation`
--

CREATE TABLE IF NOT EXISTS `demande_retractation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `reference` varchar(30) NOT NULL,
  `nom_client` varchar(200) NOT NULL,
  `email_client` varchar(180) NOT NULL,
  `commande_reference` varchar(50) NOT NULL,
  `commande_date` date NOT NULL,
  `motif` longtext,
  `statut` varchar(15) NOT NULL DEFAULT 'recue',
  `notes_admin` longtext,
  `created_at` datetime NOT NULL,
  `traitee_at` datetime DEFAULT NULL,
  `deadline_at` datetime NOT NULL,
  `user_id` int DEFAULT NULL,
  `commande_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_9DD3A491AEA34913` (`reference`),
  KEY `IDX_9DD3A491A76ED395` (`user_id`),
  KEY `IDX_9DD3A49182EA2E54` (`commande_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Structure de la table `doctrine_migration_versions`
--

CREATE TABLE IF NOT EXISTS `doctrine_migration_versions` (
  `version` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `executed_at` datetime DEFAULT NULL,
  `execution_time` int DEFAULT NULL,
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `doctrine_migration_versions` (`version`, `executed_at`, `execution_time`) VALUES
('DoctrineMigrations\\Version20260519081843', '2026-05-19 10:18:51', 215),
('DoctrineMigrations\\Version20260519081930', '2026-05-19 10:19:41', 190),
('DoctrineMigrations\\Version20260519083246', '2026-05-19 10:32:58', 235);

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

--
-- Structure de la table `essentiel`
--

CREATE TABLE IF NOT EXISTS `essentiel` (
  `id` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Structure de la table `facture_commission`
--

CREATE TABLE IF NOT EXISTS `facture_commission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `reference` varchar(40) NOT NULL,
  `periode_debut` date NOT NULL,
  `periode_fin` date NOT NULL,
  `montant_total_ht` decimal(10,2) NOT NULL,
  `statut` varchar(15) NOT NULL DEFAULT 'a_regler',
  `generee_at` datetime NOT NULL,
  `reglée_at` datetime DEFAULT NULL,
  `vendeur_profil_id` int NOT NULL,
  `genereed_par_id` int DEFAULT NULL,
  `reglée_par_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_F67AEE5CAEA34913` (`reference`),
  KEY `IDX_F67AEE5CF378E87B` (`vendeur_profil_id`),
  KEY `IDX_F67AEE5CB3789557` (`genereed_par_id`),
  KEY `IDX_F67AEE5CAE3D7787` (`reglée_par_id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `facture_commission` (`id`, `reference`, `periode_debut`, `periode_fin`, `montant_total_ht`, `statut`, `generee_at`, `reglée_at`, `vendeur_profil_id`, `genereed_par_id`, `reglée_par_id`) VALUES
(1, 'FC-2026-05-AMB101', '2026-05-01', '2026-05-31', 123.53, 'regle', '2026-05-18 11:01:43', '2026-05-18 11:24:42', 1, 1, 0),
(2, 'FC-2026-05-AMB101-2', '2026-05-01', '2026-05-31', 123.53, 'regle', '2026-05-18 11:45:26', '2026-05-18 11:47:45', 1, 1, NULL);

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

--
-- Structure de la table `force_carte`
--

CREATE TABLE IF NOT EXISTS `force_carte` (
  `specialite` longtext,
  `services` longtext,
  `zone_intervention` varchar(200) DEFAULT NULL,
  `horaires` varchar(100) DEFAULT NULL,
  `id` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Structure de la table `hebergement_subscription`
--

CREATE TABLE IF NOT EXISTS `hebergement_subscription` (
  `id` int NOT NULL AUTO_INCREMENT,
  `status` varchar(20) NOT NULL,
  `next_renewal_at` datetime DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `beneficiaire_id` int NOT NULL,
  `free_until` datetime NOT NULL,
  `last_paid_at` datetime DEFAULT NULL,
  `last_paid_amount_ht` decimal(8,2) DEFAULT NULL,
  `last_paid_amount_ttc` decimal(8,2) DEFAULT NULL,
  `stripe_payment_intent_id` varchar(255) DEFAULT NULL,
  `reminders_sent` int NOT NULL,
  `last_reminder_sent_at` datetime DEFAULT NULL,
  `admin_notes` longtext,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_18E62BFF5AF81F68` (`beneficiaire_id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `hebergement_subscription` (`id`, `status`, `next_renewal_at`, `created_at`, `updated_at`, `beneficiaire_id`, `free_until`, `last_paid_at`, `last_paid_amount_ht`, `last_paid_amount_ttc`, `stripe_payment_intent_id`, `reminders_sent`, `last_reminder_sent_at`, `admin_notes`) VALUES
(3, 'trial', NULL, '2026-03-25 12:19:47', NULL, 48, '0000-00-00 00:00:00', NULL, NULL, NULL, NULL, 0, NULL, NULL),
(4, 'trial', NULL, '2026-03-25 12:19:47', NULL, 49, '0000-00-00 00:00:00', NULL, NULL, NULL, NULL, 0, NULL, NULL),
(7, 'trial', NULL, '2026-04-02 11:36:54', NULL, 55, '0000-00-00 00:00:00', NULL, NULL, NULL, NULL, 0, NULL, NULL),
(8, 'trial', NULL, '2026-04-02 11:36:54', NULL, 56, '0000-00-00 00:00:00', NULL, NULL, NULL, NULL, 0, NULL, NULL),
(9, 'trial', NULL, '2026-04-02 11:36:54', NULL, 57, '0000-00-00 00:00:00', NULL, NULL, NULL, NULL, 0, NULL, NULL),
(10, 'trial', NULL, '2026-04-02 11:36:54', NULL, 58, '0000-00-00 00:00:00', NULL, NULL, NULL, NULL, 0, NULL, NULL),
(11, 'trial', NULL, '2026-04-02 11:36:54', NULL, 59, '0000-00-00 00:00:00', NULL, NULL, NULL, NULL, 0, NULL, NULL);

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

--
-- Structure de la table `messenger_messages`
--

CREATE TABLE IF NOT EXISTS `messenger_messages` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `body` longtext NOT NULL,
  `headers` longtext NOT NULL,
  `queue_name` varchar(190) NOT NULL,
  `created_at` datetime NOT NULL,
  `available_at` datetime NOT NULL,
  `delivered_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_75EA56E0FB7336F0` (`queue_name`),
  KEY `IDX_75EA56E0E3BD61CE` (`available_at`),
  KEY `IDX_75EA56E016BA31DB` (`delivered_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Structure de la table `modification_invoice`
--

CREATE TABLE IF NOT EXISTS `modification_invoice` (
  `id` int NOT NULL AUTO_INCREMENT,
  `reference` varchar(100) NOT NULL,
  `modification_number` int NOT NULL,
  `price_ht` decimal(8,2) NOT NULL,
  `tva` decimal(8,2) NOT NULL,
  `price_ttc` decimal(8,2) NOT NULL,
  `stripe_session_id` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `beneficiaire_id` int NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_4718C21AEA34913` (`reference`),
  KEY `IDX_4718C215AF81F68` (`beneficiaire_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `modification_invoice` (`id`, `reference`, `modification_number`, `price_ht`, `tva`, `price_ttc`, `stripe_session_id`, `created_at`, `beneficiaire_id`) VALUES
(3, 'MOD-49-20260324-ADMIN', 18, 0.00, 0.00, 0.00, NULL, '2026-03-24 13:27:24', 49),
(4, 'MOD-49-20260324-ADMIN-2692', 21, 0.00, 0.00, 0.00, NULL, '2026-03-24 13:30:16', 49),
(5, 'MOD-49-20260324-ADMIN-C6D4', 22, 0.00, 0.00, 0.00, NULL, '2026-03-24 13:31:51', 49),
(6, 'MOD-49-20260331-ADMIN-F137', 23, 0.00, 0.00, 0.00, NULL, '2026-03-31 08:42:50', 49),
(7, 'MOD-49-20260331-ADMIN-2E47', 24, 0.00, 0.00, 0.00, NULL, '2026-03-31 08:51:55', 49),
(8, 'MOD-49-20260331-ADMIN-1057', 25, 0.00, 0.00, 0.00, NULL, '2026-03-31 08:52:42', 49),
(9, 'MOD-49-20260331-ADMIN-97E9', 26, 0.00, 0.00, 0.00, NULL, '2026-03-31 08:53:44', 49),
(10, 'MOD-60-20260508-B5H5TX', 1, 20.00, 4.00, 24.00, 'cs_test_a1K57zz0HB93kdE5kJScwD5bdTbnNX1cXo8OCR0yPeGAKeVOWAeFB5H5Tx', '2026-05-08 14:03:52', 60);

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

--
-- Structure de la table `multi`
--

CREATE TABLE IF NOT EXISTS `multi` (
  `id` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Structure de la table `newsletter_consent_log`
--

CREATE TABLE IF NOT EXISTS `newsletter_consent_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `email` varchar(254) DEFAULT NULL,
  `email_hashed` varchar(64) NOT NULL,
  `source` varchar(64) NOT NULL,
  `consent_version` varchar(32) NOT NULL,
  `consent_text_hash` varchar(64) DEFAULT NULL,
  `form_url` varchar(512) DEFAULT NULL,
  `ip_anonymized` varchar(64) NOT NULL,
  `user_agent` varchar(512) DEFAULT NULL,
  `granted_at` datetime NOT NULL,
  `withdrawn_at` datetime DEFAULT NULL,
  `brevo_contact_id` int DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_6FF68E6A76ED395` (`user_id`),
  KEY `idx_ncl_email` (`email_hashed`),
  KEY `idx_ncl_granted_at` (`granted_at`),
  KEY `idx_ncl_withdrawn_at` (`withdrawn_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Structure de la table `premium`
--

CREATE TABLE IF NOT EXISTS `premium` (
  `expertise` varchar(100) DEFAULT NULL,
  `seances` varchar(100) DEFAULT NULL,
  `spe1` varchar(255) DEFAULT NULL,
  `spe2` varchar(255) DEFAULT NULL,
  `spe3` varchar(255) DEFAULT NULL,
  `spe4` varchar(255) DEFAULT NULL,
  `satisfaction` varchar(255) DEFAULT NULL,
  `id` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Structure de la table `push_subscription`
--

CREATE TABLE IF NOT EXISTS `push_subscription` (
  `id` int NOT NULL AUTO_INCREMENT,
  `card_slug` varchar(100) NOT NULL,
  `endpoint` longtext NOT NULL,
  `public_key` varchar(255) NOT NULL,
  `auth_token` varchar(64) NOT NULL,
  `user_agent` varchar(512) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `last_used_at` datetime DEFAULT NULL,
  `visitor_hash` varchar(64) DEFAULT NULL,
  `subscriber_ip` varchar(50) DEFAULT NULL,
  `consent_version` varchar(32) DEFAULT NULL,
  `status` varchar(20) NOT NULL,
  `unsubscribed_at` datetime DEFAULT NULL,
  `endpoint_hash` varchar(64) NOT NULL,
  `user_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_endpoint_hash` (`endpoint_hash`),
  KEY `idx_status` (`status`),
  KEY `idx_card_slug` (`card_slug`),
  KEY `idx_user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `push_subscription` (`id`, `card_slug`, `endpoint`, `public_key`, `auth_token`, `user_agent`, `created_at`, `last_used_at`, `visitor_hash`, `subscriber_ip`, `consent_version`, `status`, `unsubscribed_at`, `endpoint_hash`, `user_id`) VALUES
(1, 'test-philippe-local', 'https://fcm.googleapis.com/fcm/send/dHKvg6KD8cA:APA91bEA2lWLAp4hsfZsXY8CgUIhNZRJOm2I3dZ3dzN76vdmJpsCQQXAs7rCtS2Mn-kvlHW7lodBixL8glst6HxkvknYcJSaiPX5x5cx4Z93zO3CbYHrmj5Z-0FrCzOLup7ip3rM7Gis', 'BM9kqBQlKY6fdkBaFMikywrHcu3HsRO1sV6W-0gQk5LrHXfXvmvc2EHtN1L84eAFFld9zDdWtEVP9xIrEYX_bso', '9xcxFU3k8inrWrnvtyTmpQ', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-30 11:03:26', NULL, '312e2479916c449c8764502c7f82d108db69487b3c66b7f636d8dcb4b9192858', '127.0.0.0', 'push-v1', 'revoked', '2026-04-30 11:06:58', '433703bdf793556adb1c483e45ecc846c804766e9a6a563edffd2cc4f5104a0e', NULL),
(2, 'test-philippe-local', 'https://fcm.googleapis.com/fcm/send/e-sLjYkYEjk:APA91bFqPZJotFv4WXpSTzgMqk3Zau_wJ7-tSpbIShL_qnd06z3SrBanIIVG9tSEuJ1OvRaV6KwkL-PdjblebjYCvWcO88eKY4QUoZpWdz7wMZRh8Obx0Azfvhm2N3sW3GaaLtjeBO6y', 'BJ0E-JvlHoHHykt1Fcq9g02V90ex4IALSylzDKCdRzKBr3E7XC5UcNtHZsxMlBHeaG7HRZsoN6SjdvbflD81xIU', '_26KPne_hMHv5m_e6PxYCw', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-30 11:07:04', NULL, '312e2479916c449c8764502c7f82d108db69487b3c66b7f636d8dcb4b9192858', '127.0.0.0', 'push-v1', 'revoked', '2026-04-30 11:07:06', 'd9475ce28132d48f3461c3ee234700a082fea6aa2cfbcd42a995e5a2b910cf13', NULL);

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

--
-- Structure de la table `recommendation`
--

CREATE TABLE IF NOT EXISTS `recommendation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `message` longtext,
  `created_at` datetime NOT NULL,
  `status` varchar(20) NOT NULL,
  `recommender_name` varchar(255) NOT NULL,
  `recommender_entreprise` varchar(255) DEFAULT NULL,
  `recommender_email` varchar(255) DEFAULT NULL,
  `recommender_phone` varchar(50) DEFAULT NULL,
  `contact_name` varchar(255) NOT NULL,
  `contact_email` varchar(255) NOT NULL,
  `contact_phone` varchar(50) DEFAULT NULL,
  `contact_entreprise` varchar(255) DEFAULT NULL,
  `offre_suggeree` varchar(50) DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `beneficiaire_id` int NOT NULL,
  `submitter_ip` varchar(45) DEFAULT NULL,
  `submitter_hash` varchar(64) DEFAULT NULL,
  `consent_mention_version` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_433224D25AF81F68` (`beneficiaire_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `recommendation` (`id`, `message`, `created_at`, `status`, `recommender_name`, `recommender_entreprise`, `recommender_email`, `recommender_phone`, `contact_name`, `contact_email`, `contact_phone`, `contact_entreprise`, `offre_suggeree`, `updated_at`, `beneficiaire_id`, `submitter_ip`, `submitter_hash`, `consent_mention_version`) VALUES
(1, 'A contacter d\'urgence', '2026-03-19 10:25:31', 'new', 'Nathalie MARTIN', 'Sud Développement', NULL, NULL, 'Jean louis parfait', 'jlp@live.fr', '08 85 65 25 56', NULL, NULL, '2026-03-19 10:25:31', 49, NULL, NULL, NULL);

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

--
-- Structure de la table `rgpd_demande`
--

CREATE TABLE IF NOT EXISTS `rgpd_demande` (
  `id` int NOT NULL AUTO_INCREMENT,
  `reference` varchar(30) NOT NULL,
  `profil` varchar(20) NOT NULL,
  `droit` varchar(30) NOT NULL,
  `nom` varchar(150) NOT NULL,
  `email` varchar(180) NOT NULL,
  `telephone` varchar(30) DEFAULT NULL,
  `porteur_nom` varchar(200) DEFAULT NULL,
  `description` longtext NOT NULL,
  `categorie_donnees` varchar(50) DEFAULT NULL,
  `verification_identite` varchar(50) NOT NULL,
  `statut` varchar(20) NOT NULL DEFAULT 'recu',
  `created_at` datetime NOT NULL,
  `closed_at` datetime DEFAULT NULL,
  `purge_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_A73E63EAEA34913` (`reference`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Structure de la table `rgpd_rights_requests`
--

CREATE TABLE IF NOT EXISTS `rgpd_rights_requests` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type` varchar(50) NOT NULL,
  `status` varchar(20) NOT NULL,
  `requested_at` datetime NOT NULL,
  `processed_at` datetime DEFAULT NULL,
  `download_token` varchar(64) DEFAULT NULL,
  `download_token_expires_at` datetime DEFAULT NULL,
  `export_file_path` varchar(255) DEFAULT NULL,
  `error_message` longtext,
  `request_ip` varchar(45) DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `nom_demandeur` varchar(200) DEFAULT NULL,
  `email_demandeur` varchar(180) DEFAULT NULL,
  `deadline_at` datetime DEFAULT NULL,
  `notes_admin` longtext,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_951BA948704D2D87` (`download_token`),
  KEY `IDX_951BA948A76ED395` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `rgpd_rights_requests` (`id`, `type`, `status`, `requested_at`, `processed_at`, `download_token`, `download_token_expires_at`, `export_file_path`, `error_message`, `request_ip`, `user_id`, `nom_demandeur`, `email_demandeur`, `deadline_at`, `notes_admin`) VALUES
(1, 'suppression', 'refused', '2026-04-24 09:45:30', '2026-04-27 12:34:50', NULL, NULL, NULL, NULL, '127.0.0.1', NULL, 'Philippe CECILE', 'cecilephilippe31@gmail.com', '2026-05-24 09:45:30', '[27/04/2026 12:34] Rejet — Aucun motif renseigné — Admin : contact@num-ecard.com'),
(2, 'suppression', 'processed', '2026-04-27 12:36:18', '2026-04-27 13:14:07', NULL, NULL, NULL, NULL, '127.0.0.1', NULL, 'Philippe CECILE', 'cecilephilippe31@gmail.com', '2026-05-27 12:36:18', '[27/04/2026 13:14] Anonymisation exécutée par contact@num-ecard.com');

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

--
-- Structure de la table `taux_commission`
--

CREATE TABLE IF NOT EXISTS `taux_commission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(30) NOT NULL,
  `taux` decimal(5,2) NOT NULL,
  `updated_at` datetime NOT NULL,
  `modifie_par_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_DB15AA26E564F0BF` (`statut`),
  KEY `IDX_DB15AA26553B2554` (`modifie_par_id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `taux_commission` (`id`, `statut`, `taux`, `updated_at`, `modifie_par_id`) VALUES
(1, 'ambassadeur', 25.00, '2026-05-14 17:42:43', 1),
(2, 'agent_commercial', 20.00, '2026-05-14 17:42:43', 1),
(3, 'apporteur_affaires', 15.00, '2026-05-14 17:42:43', 1),
(4, 'influenceur', 20.00, '2026-05-14 17:44:00', 1),
(5, 'client_referent', 0.00, '2026-05-14 17:42:43', 1);

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

--
-- Structure de la table `tracking_events`
--

CREATE TABLE IF NOT EXISTS `tracking_events` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type` varchar(20) NOT NULL,
  `action` varchar(50) DEFAULT NULL,
  `pays` varchar(2) DEFAULT NULL,
  `device` varchar(50) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `beneficiaire_id` int NOT NULL,
  `source` varchar(20) DEFAULT NULL,
  `duration` smallint DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_FB0BD4065AF81F68` (`beneficiaire_id`),
  KEY `idx_tracking_benef_date` (`beneficiaire_id`,`created_at`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `tracking_events` (`id`, `type`, `action`, `pays`, `device`, `created_at`, `beneficiaire_id`, `source`, `duration`) VALUES
(1, 'vue', NULL, NULL, 'mobile', '2026-03-30 14:14:15', 48, 'qr', NULL),
(2, 'clic', 'telephone', NULL, NULL, '2026-03-30 14:16:37', 48, NULL, NULL);

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

--
-- Structure de la table `user`
--

CREATE TABLE IF NOT EXISTS `user` (
  `id` int NOT NULL AUTO_INCREMENT,
  `email` varchar(180) NOT NULL,
  `roles` json NOT NULL,
  `password` varchar(255) NOT NULL,
  `is_verified` tinyint NOT NULL,
  `reset_token` varchar(100) DEFAULT NULL,
  `reset_token_expires_at` datetime DEFAULT NULL,
  `verification_token` varchar(100) DEFAULT NULL,
  `verification_token_expires_at` datetime DEFAULT NULL,
  `nom` varchar(100) DEFAULT NULL,
  `prenom` varchar(100) DEFAULT NULL,
  `telephone` varchar(20) DEFAULT NULL,
  `entreprise` varchar(200) DEFAULT NULL,
  `adresse` longtext,
  `created_at` datetime NOT NULL,
  `last_login_at` datetime DEFAULT NULL,
  `marketing_opt_in` tinyint DEFAULT NULL,
  `marketing_opt_in_at` datetime DEFAULT NULL,
  `marketing_opt_in_ip` varchar(45) DEFAULT NULL,
  `marketing_opt_in_version` varchar(20) DEFAULT NULL,
  `marketing_opt_in_channel` varchar(30) DEFAULT NULL,
  `password_changed_at` datetime DEFAULT NULL,
  `password_history` json DEFAULT NULL,
  `totp_secret` varchar(255) DEFAULT NULL,
  `type_compte` varchar(20) NOT NULL,
  `raison_sociale` varchar(200) DEFAULT NULL,
  `siret` varchar(14) DEFAULT NULL,
  `tva_intracom` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_IDENTIFIER_EMAIL` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `user` (`id`, `email`, `roles`, `password`, `is_verified`, `reset_token`, `reset_token_expires_at`, `verification_token`, `verification_token_expires_at`, `nom`, `prenom`, `telephone`, `entreprise`, `adresse`, `created_at`, `last_login_at`, `marketing_opt_in`, `marketing_opt_in_at`, `marketing_opt_in_ip`, `marketing_opt_in_version`, `marketing_opt_in_channel`, `password_changed_at`, `password_history`, `totp_secret`, `type_compte`, `raison_sociale`, `siret`, `tva_intracom`) VALUES
(1, 'contact@num-ecard.com', '[\"ROLE_ADMIN\"]', '$2y$13$bF/QdYgEDk0XYIm6VOf6SeXBtGWLXrGhhKRTTWuimv9MtTwoLafvy', 1, NULL, NULL, 'd024184ef05ac1559b597568100b7f92a81cfdd0c4b937a55fbade3bc707afa5', '2026-02-17 15:34:29', 'Sanachy', 'Patrice', NULL, NULL, NULL, '2026-02-16 15:34:28', NULL, NULL, NULL, NULL, NULL, NULL, '2026-04-09 15:27:55', NULL, 'HMGI5SUBMT75FLKCB7U4JH26ZCPDZXPOT7M46H4WQVXVOGFXWUSA', '', NULL, NULL, NULL),
(4, 'cecilephilippe31@gmail.com', '[]', '$2y$13$LJW1xTMQ1/36xNCXkbGOAOaBN1cTQ/rJtr24aQ78SSUtJ8qCus.nW', 1, NULL, NULL, NULL, NULL, 'CECILE', 'Philippe', NULL, NULL, NULL, '2026-04-28 07:01:56', NULL, 0, '2026-05-18 09:51:39', '127.0.0.xxx', 'marketing-v1', 'checkout', NULL, NULL, NULL, '', NULL, NULL, NULL),
(5, 'phil31780@live.fr', '[]', '$2y$13$CQnQcOgEZSToDQPTlf1z4eXz74gm5KuUbvucfzr5.4UbmnptPckp6', 1, NULL, NULL, NULL, NULL, 'Philippe', 'SANACHY', '07 89 54 86 28', NULL, '7 place des coquelicots 31330 Larra', '2026-05-18 08:20:52', NULL, 0, '2026-05-19 11:09:37', '127.0.0.xxx', 'marketing-v1', 'checkout', NULL, NULL, NULL, 'particulier', NULL, NULL, NULL);

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

--
-- Structure de la table `vendeur_profil`
--

CREATE TABLE IF NOT EXISTS `vendeur_profil` (
  `id` int NOT NULL AUTO_INCREMENT,
  `statut` varchar(30) NOT NULL,
  `code_promo` varchar(20) DEFAULT NULL,
  `taux_commission` decimal(5,2) NOT NULL,
  `actif` tinyint NOT NULL,
  `notes_admin` longtext,
  `created_at` datetime NOT NULL,
  `updated_at` datetime DEFAULT NULL,
  `user_id` int NOT NULL,
  `attribute_par_id` int DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_10A2E7FCA76ED395` (`user_id`),
  UNIQUE KEY `UNIQ_10A2E7FC5C4683B7` (`code_promo`),
  KEY `IDX_10A2E7FC6465A8F0` (`attribute_par_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `vendeur_profil` (`id`, `statut`, `code_promo`, `taux_commission`, `actif`, `notes_admin`, `created_at`, `updated_at`, `user_id`, `attribute_par_id`) VALUES
(1, 'ambassadeur', 'AMB101', 25.00, 1, '', '2026-05-14 17:23:17', '2026-05-18 09:01:40', 4, 1);

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

--
-- Contraintes pour la table `actu`
--
ALTER TABLE `actu`
  ADD CONSTRAINT `FK_837303425AF81F68` FOREIGN KEY (`beneficiaire_id`) REFERENCES `beneficiaire` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `admin_email_log`
--
ALTER TABLE `admin_email_log`
  ADD CONSTRAINT `FK_EF0C4DB13E89D3ED` FOREIGN KEY (`sent_to_id`) REFERENCES `user` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `FK_EF0C4DB1A45BB98C` FOREIGN KEY (`sent_by_id`) REFERENCES `user` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `beneficiaire`
--
ALTER TABLE `beneficiaire`
  ADD CONSTRAINT `FK_B140D80282EA2E54` FOREIGN KEY (`commande_id`) REFERENCES `commande_multi` (`id`),
  ADD CONSTRAINT `FK_B140D802BF396750` FOREIGN KEY (`id`) REFERENCES `card` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `commande_multi`
--
ALTER TABLE `commande_multi`
  ADD CONSTRAINT `FK_FCF99CC6A76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `consent_log`
--
ALTER TABLE `consent_log`
  ADD CONSTRAINT `FK_30113729A76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `consent_record`
--
ALTER TABLE `consent_record`
  ADD CONSTRAINT `FK_DA39FABEA76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `essentiel`
--
ALTER TABLE `essentiel`
  ADD CONSTRAINT `FK_8E4CAEB0BF396750` FOREIGN KEY (`id`) REFERENCES `card` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `force_carte`
--
ALTER TABLE `force_carte`
  ADD CONSTRAINT `FK_2B9B2FE1BF396750` FOREIGN KEY (`id`) REFERENCES `card` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `hebergement_subscription`
--
ALTER TABLE `hebergement_subscription`
  ADD CONSTRAINT `FK_18E62BFF5AF81F68` FOREIGN KEY (`beneficiaire_id`) REFERENCES `beneficiaire` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `modification_invoice`
--
ALTER TABLE `modification_invoice`
  ADD CONSTRAINT `FK_4718C215AF81F68` FOREIGN KEY (`beneficiaire_id`) REFERENCES `beneficiaire` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `multi`
--
ALTER TABLE `multi`
  ADD CONSTRAINT `FK_C5914305BF396750` FOREIGN KEY (`id`) REFERENCES `card` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `newsletter_consent_log`
--
ALTER TABLE `newsletter_consent_log`
  ADD CONSTRAINT `FK_6FF68E6A76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `premium`
--
ALTER TABLE `premium`
  ADD CONSTRAINT `FK_893D1485BF396750` FOREIGN KEY (`id`) REFERENCES `card` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `push_subscription`
--
ALTER TABLE `push_subscription`
  ADD CONSTRAINT `FK_562830F3A76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `recommendation`
--
ALTER TABLE `recommendation`
  ADD CONSTRAINT `FK_433224D25AF81F68` FOREIGN KEY (`beneficiaire_id`) REFERENCES `beneficiaire` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `rgpd_rights_requests`
--
ALTER TABLE `rgpd_rights_requests`
  ADD CONSTRAINT `FK_951BA948A76ED395` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `tracking_events`
--
ALTER TABLE `tracking_events`
  ADD CONSTRAINT `FK_FB0BD4065AF81F68` FOREIGN KEY (`beneficiaire_id`) REFERENCES `beneficiaire` (`id`) ON DELETE CASCADE;
COMMIT;

