-- https://www.phpmyadmin.net/
--
-- Hôte : localhost:3306
-- Généré le : ven. 29 mai 2026 à 13:46
-- Version du serveur : 11.4.12-MariaDB
-- Version de PHP : 8.4.21

START TRANSACTION;



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

--
-- Structure de la table `cart_items`
--

CREATE TABLE `cart_items` (
  `id` int(10) UNSIGNED NOT NULL,
  `client_id` int(10) UNSIGNED NOT NULL,
  `offer_id` int(10) UNSIGNED NOT NULL,
  `quantity` int(10) UNSIGNED DEFAULT 1,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Structure de la table `class_sessions`
--

CREATE TABLE `class_sessions` (
  `id` int(10) UNSIGNED NOT NULL,
  `weekly_schedule_id` int(10) UNSIGNED DEFAULT NULL,
  `studio_id` int(10) UNSIGNED NOT NULL,
  `class_type_id` int(10) UNSIGNED NOT NULL,
  `teacher_id` int(10) UNSIGNED NOT NULL,
  `session_date` date NOT NULL,
  `start_time` time NOT NULL,
  `end_time` time NOT NULL,
  `max_capacity` int(10) UNSIGNED NOT NULL,
  `is_cancelled` tinyint(1) DEFAULT 0,
  `cancel_reason` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `is_special` tinyint(1) NOT NULL DEFAULT 0,
  `teacher_notes` mediumtext DEFAULT NULL,
  `teacher_notes_updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `class_sessions` (`id`, `weekly_schedule_id`, `studio_id`, `class_type_id`, `teacher_id`, `session_date`, `start_time`, `end_time`, `max_capacity`, `is_cancelled`, `cancel_reason`, `created_at`, `updated_at`, `is_special`, `teacher_notes`, `teacher_notes_updated_at`) VALUES
(1, 15, 1, 2, 1, '2026-03-27', '10:15:00', '11:15:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(2, 22, 2, 2, 1, '2026-03-27', '09:00:00', '10:00:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(3, 14, 1, 3, 2, '2026-03-27', '09:00:00', '10:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(4, 23, 2, 5, 3, '2026-03-27', '18:30:00', '19:30:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(5, 16, 1, 1, 1, '2026-03-28', '09:30:00', '10:30:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(6, 17, 1, 3, 2, '2026-03-28', '10:45:00', '11:45:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(7, 1, 1, 1, 1, '2026-03-30', '09:00:00', '10:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(8, 18, 2, 1, 3, '2026-03-30', '09:00:00', '10:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(9, 3, 1, 2, 1, '2026-03-30', '12:15:00', '13:15:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(10, 2, 1, 3, 2, '2026-03-30', '10:15:00', '11:15:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(11, 19, 2, 4, 2, '2026-03-30', '18:30:00', '19:30:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(12, 4, 1, 5, 3, '2026-03-30', '18:00:00', '19:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(13, 6, 1, 1, 1, '2026-03-31', '10:15:00', '11:15:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(14, 5, 1, 3, 2, '2026-03-31', '09:00:00', '10:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(15, 7, 1, 4, 3, '2026-03-31', '18:00:00', '19:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(16, 10, 1, 1, 3, '2026-04-01', '18:00:00', '19:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(17, 21, 2, 1, 3, '2026-04-01', '18:30:00', '19:30:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(18, 8, 1, 2, 1, '2026-04-01', '09:00:00', '10:00:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(19, 9, 1, 3, 2, '2026-04-01', '12:15:00', '13:15:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(20, 20, 2, 3, 2, '2026-04-01', '09:00:00', '10:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(21, 12, 1, 1, 1, '2026-04-02', '10:15:00', '11:15:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(22, 11, 1, 4, 3, '2026-04-02', '09:00:00', '10:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(23, 13, 1, 5, 2, '2026-04-02', '18:00:00', '19:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(24, 15, 1, 2, 1, '2026-04-03', '10:15:00', '11:15:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(25, 22, 2, 2, 1, '2026-04-03', '09:00:00', '10:00:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(26, 14, 1, 3, 2, '2026-04-03', '09:00:00', '10:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(27, 23, 2, 5, 3, '2026-04-03', '18:30:00', '19:30:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(28, 16, 1, 1, 1, '2026-04-04', '09:30:00', '10:30:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(29, 17, 1, 3, 2, '2026-04-04', '10:45:00', '11:45:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(30, 1, 1, 1, 1, '2026-04-06', '09:00:00', '10:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(31, 18, 2, 1, 3, '2026-04-06', '09:00:00', '10:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(32, 3, 1, 2, 1, '2026-04-06', '12:15:00', '13:15:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(33, 2, 1, 3, 2, '2026-04-06', '10:15:00', '11:15:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(34, 19, 2, 4, 2, '2026-04-06', '18:30:00', '19:30:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(35, 4, 1, 5, 3, '2026-04-06', '18:00:00', '19:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(36, 6, 1, 1, 1, '2026-04-07', '10:15:00', '11:15:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(37, 5, 1, 3, 2, '2026-04-07', '09:00:00', '10:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(38, 7, 1, 4, 3, '2026-04-07', '18:00:00', '19:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(39, 10, 1, 1, 3, '2026-04-08', '18:00:00', '19:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(40, 21, 2, 1, 3, '2026-04-08', '18:30:00', '19:30:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(41, 8, 1, 2, 1, '2026-04-08', '09:00:00', '10:00:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(42, 9, 1, 3, 2, '2026-04-08', '12:15:00', '13:15:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(43, 20, 2, 3, 2, '2026-04-08', '09:00:00', '10:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(44, 12, 1, 1, 1, '2026-04-09', '10:15:00', '11:15:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(45, 11, 1, 4, 3, '2026-04-09', '09:00:00', '10:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(46, 13, 1, 5, 2, '2026-04-09', '18:00:00', '19:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(47, 15, 1, 2, 1, '2026-04-10', '10:15:00', '11:15:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(48, 22, 2, 2, 1, '2026-04-10', '09:00:00', '10:00:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(49, 14, 1, 3, 2, '2026-04-10', '09:00:00', '10:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(50, 23, 2, 5, 3, '2026-04-10', '18:30:00', '19:30:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(51, 16, 1, 1, 1, '2026-04-11', '09:30:00', '10:30:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(52, 17, 1, 3, 2, '2026-04-11', '10:45:00', '11:45:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(53, 1, 1, 1, 1, '2026-04-13', '09:00:00', '10:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(54, 18, 2, 1, 3, '2026-04-13', '09:00:00', '10:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(55, 3, 1, 2, 1, '2026-04-13', '12:15:00', '13:15:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(56, 2, 1, 3, 2, '2026-04-13', '10:15:00', '11:15:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(57, 19, 2, 4, 2, '2026-04-13', '18:30:00', '19:30:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(58, 4, 1, 5, 3, '2026-04-13', '18:00:00', '19:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(59, 6, 1, 1, 1, '2026-04-14', '10:15:00', '11:15:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(60, 5, 1, 3, 2, '2026-04-14', '09:00:00', '10:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(61, 7, 1, 4, 3, '2026-04-14', '18:00:00', '19:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(62, 10, 1, 1, 3, '2026-04-15', '18:00:00', '19:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(63, 21, 2, 1, 3, '2026-04-15', '18:30:00', '19:30:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(64, 8, 1, 2, 1, '2026-04-15', '09:00:00', '10:00:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(65, 9, 1, 3, 2, '2026-04-15', '12:15:00', '13:15:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(66, 20, 2, 3, 2, '2026-04-15', '09:00:00', '10:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(67, 12, 1, 1, 1, '2026-04-16', '10:15:00', '11:15:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(68, 11, 1, 4, 3, '2026-04-16', '09:00:00', '10:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(69, 13, 1, 5, 2, '2026-04-16', '18:00:00', '19:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(70, 15, 1, 2, 1, '2026-04-17', '10:15:00', '11:15:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(71, 22, 2, 2, 1, '2026-04-17', '09:00:00', '10:00:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(72, 14, 1, 3, 2, '2026-04-17', '09:00:00', '10:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(73, 23, 2, 5, 3, '2026-04-17', '18:30:00', '19:30:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(74, 16, 1, 1, 1, '2026-04-18', '09:30:00', '10:30:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(75, 17, 1, 3, 2, '2026-04-18', '10:45:00', '11:45:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(76, 1, 1, 1, 1, '2026-04-20', '09:00:00', '10:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(77, 18, 2, 1, 3, '2026-04-20', '09:00:00', '10:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(78, 3, 1, 2, 1, '2026-04-20', '12:15:00', '13:15:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(79, 2, 1, 3, 2, '2026-04-20', '10:15:00', '11:15:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(80, 19, 2, 4, 2, '2026-04-20', '18:30:00', '19:30:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(81, 4, 1, 5, 3, '2026-04-20', '18:00:00', '19:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(82, 6, 1, 1, 1, '2026-04-21', '10:15:00', '11:15:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(83, 5, 1, 3, 2, '2026-04-21', '09:00:00', '10:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(84, 7, 1, 4, 3, '2026-04-21', '18:00:00', '19:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(85, 10, 1, 1, 3, '2026-04-22', '18:00:00', '19:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(86, 21, 2, 1, 3, '2026-04-22', '18:30:00', '19:30:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(87, 8, 1, 2, 1, '2026-04-22', '09:00:00', '10:00:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(88, 9, 1, 3, 2, '2026-04-22', '12:15:00', '13:15:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(89, 20, 2, 3, 2, '2026-04-22', '09:00:00', '10:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(90, 12, 1, 1, 1, '2026-04-23', '10:15:00', '11:15:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(91, 11, 1, 4, 3, '2026-04-23', '09:00:00', '10:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(92, 13, 1, 5, 2, '2026-04-23', '18:00:00', '19:00:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(93, 15, 1, 2, 1, '2026-04-24', '10:15:00', '11:15:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(94, 22, 2, 2, 1, '2026-04-24', '09:00:00', '10:00:00', 10, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(95, 14, 1, 3, 2, '2026-04-24', '09:00:00', '10:00:00', 15, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(96, 23, 2, 5, 3, '2026-04-24', '18:30:00', '19:30:00', 12, 0, NULL, '2026-03-27 08:29:14', '2026-03-27 08:29:14', 0, NULL, NULL),
(97, 16, 1, 1, 1, '2026-04-25', '09:30:00', '10:30:00', 12, 0, NULL, '2026-04-01 08:53:24', '2026-04-01 08:53:24', 0, NULL, NULL),
(98, 17, 1, 3, 2, '2026-04-25', '10:45:00', '11:45:00', 15, 0, NULL, '2026-04-01 08:53:24', '2026-04-01 08:53:24', 0, NULL, NULL),
(99, 1, 1, 1, 1, '2026-04-27', '09:00:00', '10:00:00', 12, 1, 'Test dates repoussées', '2026-04-01 08:53:24', '2026-04-21 14:18:18', 0, NULL, NULL),
(100, 2, 1, 3, 2, '2026-04-27', '10:15:00', '11:15:00', 15, 1, 'Test dates repoussées', '2026-04-01 08:53:24', '2026-04-21 14:18:18', 0, NULL, NULL),
(101, 3, 1, 2, 1, '2026-04-27', '12:15:00', '13:15:00', 10, 1, 'Test dates repoussées', '2026-04-01 08:53:24', '2026-04-21 14:18:18', 0, NULL, NULL),
(102, 4, 1, 5, 3, '2026-04-27', '18:00:00', '19:00:00', 12, 1, 'Test dates repoussées', '2026-04-01 08:53:24', '2026-04-21 14:18:18', 0, NULL, NULL),
(103, 18, 2, 1, 3, '2026-04-27', '09:00:00', '10:00:00', 12, 1, 'Test dates repoussées', '2026-04-01 08:53:24', '2026-04-21 14:18:18', 0, NULL, NULL),
(104, 19, 2, 4, 2, '2026-04-27', '18:30:00', '19:30:00', 15, 1, 'Test dates repoussées', '2026-04-01 08:53:24', '2026-04-21 14:18:18', 0, NULL, NULL),
(105, 5, 1, 3, 2, '2026-04-28', '09:00:00', '10:00:00', 15, 1, 'Test dates repoussées', '2026-04-01 08:53:24', '2026-04-21 14:18:18', 0, NULL, NULL),
(106, 6, 1, 1, 1, '2026-04-28', '10:15:00', '11:15:00', 12, 1, 'Test dates repoussées', '2026-04-01 08:53:24', '2026-04-21 14:18:18', 0, NULL, NULL),
(107, 7, 1, 4, 3, '2026-04-28', '18:00:00', '19:00:00', 15, 1, 'Test dates repoussées', '2026-04-01 08:53:24', '2026-04-21 14:18:18', 0, NULL, NULL),
(108, 8, 1, 2, 1, '2026-04-29', '09:00:00', '10:00:00', 10, 1, 'Test dates repoussées', '2026-04-01 08:53:24', '2026-04-21 14:18:18', 0, NULL, NULL),
(109, 9, 1, 3, 2, '2026-04-29', '12:15:00', '13:15:00', 15, 1, 'Test dates repoussées', '2026-04-01 08:53:24', '2026-04-21 14:18:18', 0, NULL, NULL),
(110, 10, 1, 1, 3, '2026-04-29', '18:00:00', '19:00:00', 12, 1, 'Test dates repoussées', '2026-04-01 08:53:24', '2026-04-21 14:18:18', 0, NULL, NULL),
(111, 20, 2, 3, 2, '2026-04-29', '09:00:00', '10:00:00', 15, 1, 'Test dates repoussées', '2026-04-01 08:53:24', '2026-04-21 14:18:18', 0, NULL, NULL),
(112, 21, 2, 1, 3, '2026-04-29', '18:30:00', '19:30:00', 12, 1, 'Test dates repoussées', '2026-04-01 08:53:24', '2026-04-21 14:18:18', 0, NULL, NULL),
(113, 11, 1, 4, 3, '2026-04-30', '09:00:00', '10:00:00', 15, 1, 'Test dates repoussées', '2026-04-14 07:54:17', '2026-04-21 14:18:18', 0, NULL, NULL),
(114, 12, 1, 1, 1, '2026-04-30', '10:15:00', '11:15:00', 12, 1, 'Test dates repoussées', '2026-04-14 07:54:17', '2026-04-21 14:18:18', 0, NULL, NULL),
(115, 13, 1, 5, 2, '2026-04-30', '18:00:00', '19:00:00', 12, 1, 'Test dates repoussées', '2026-04-14 07:54:17', '2026-04-21 14:18:18', 0, NULL, NULL),
(116, 14, 1, 3, 2, '2026-05-01', '09:00:00', '10:00:00', 15, 1, 'Vacances', '2026-04-14 07:54:17', '2026-04-21 16:17:12', 0, NULL, NULL),
(117, 15, 1, 2, 1, '2026-05-01', '10:15:00', '11:15:00', 10, 1, 'Vacances', '2026-04-14 07:54:17', '2026-04-21 16:17:12', 0, NULL, NULL),
(118, 22, 2, 2, 1, '2026-05-01', '09:00:00', '10:00:00', 10, 1, 'Vacances', '2026-04-14 07:54:17', '2026-04-21 16:17:12', 0, NULL, NULL),
(119, 23, 2, 5, 3, '2026-05-01', '18:30:00', '19:30:00', 12, 1, 'Vacances', '2026-04-14 07:54:17', '2026-04-21 16:17:12', 0, NULL, NULL),
(120, 16, 1, 1, 1, '2026-05-02', '09:30:00', '10:30:00', 12, 1, 'Vacances', '2026-04-14 07:54:17', '2026-04-21 16:17:12', 0, NULL, NULL),
(121, 17, 1, 3, 2, '2026-05-02', '10:45:00', '11:45:00', 15, 1, 'Vacances', '2026-04-14 07:54:18', '2026-04-21 16:17:12', 0, NULL, NULL),
(122, 1, 1, 1, 1, '2026-05-04', '09:00:00', '10:00:00', 12, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(123, 2, 1, 3, 2, '2026-05-04', '10:15:00', '11:15:00', 15, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(124, 3, 1, 2, 1, '2026-05-04', '12:15:00', '13:15:00', 10, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(125, 4, 1, 5, 3, '2026-05-04', '18:00:00', '19:00:00', 12, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(126, 18, 2, 1, 3, '2026-05-04', '09:00:00', '10:00:00', 12, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(127, 19, 2, 4, 2, '2026-05-04', '18:30:00', '19:30:00', 15, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(128, 5, 1, 3, 2, '2026-05-05', '09:00:00', '10:00:00', 15, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(129, 6, 1, 1, 1, '2026-05-05', '10:15:00', '11:15:00', 12, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(130, 7, 1, 4, 3, '2026-05-05', '18:00:00', '19:00:00', 15, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(131, 8, 1, 2, 1, '2026-05-06', '09:00:00', '10:00:00', 10, 1, 'TEST', '2026-04-14 07:54:18', '2026-04-28 10:39:49', 0, NULL, NULL),
(132, 9, 1, 3, 2, '2026-05-06', '12:15:00', '13:15:00', 15, 1, 'TEST', '2026-04-14 07:54:18', '2026-04-28 10:39:49', 0, NULL, NULL),
(133, 10, 1, 1, 3, '2026-05-06', '18:00:00', '19:00:00', 12, 1, 'TEST', '2026-04-14 07:54:18', '2026-04-28 10:39:49', 0, NULL, NULL),
(134, 20, 2, 3, 2, '2026-05-06', '09:00:00', '10:00:00', 15, 1, 'TEST', '2026-04-14 07:54:18', '2026-04-28 10:39:49', 0, NULL, NULL),
(135, 21, 2, 1, 3, '2026-05-06', '18:30:00', '19:30:00', 12, 1, 'TEST', '2026-04-14 07:54:18', '2026-04-28 10:39:49', 0, NULL, NULL),
(136, 11, 1, 4, 3, '2026-05-07', '09:00:00', '10:00:00', 15, 1, 'TEST', '2026-04-14 07:54:18', '2026-04-28 10:39:49', 0, NULL, NULL),
(137, 12, 1, 1, 1, '2026-05-07', '10:15:00', '11:15:00', 12, 1, 'TEST', '2026-04-14 07:54:18', '2026-04-28 10:39:49', 0, NULL, NULL),
(138, 13, 1, 5, 2, '2026-05-07', '18:00:00', '19:00:00', 12, 1, 'TEST', '2026-04-14 07:54:18', '2026-04-28 10:39:49', 0, NULL, NULL),
(139, 14, 1, 3, 2, '2026-05-08', '09:00:00', '10:00:00', 15, 1, 'TEST', '2026-04-14 07:54:18', '2026-04-28 10:39:49', 0, NULL, NULL),
(140, 15, 1, 2, 1, '2026-05-08', '10:15:00', '11:15:00', 10, 1, 'TEST', '2026-04-14 07:54:18', '2026-04-28 10:39:49', 0, NULL, NULL),
(141, 22, 2, 2, 1, '2026-05-08', '09:00:00', '10:00:00', 10, 1, 'TEST', '2026-04-14 07:54:18', '2026-04-28 10:39:49', 0, NULL, NULL),
(142, 23, 2, 5, 3, '2026-05-08', '18:30:00', '19:30:00', 12, 1, 'TEST', '2026-04-14 07:54:18', '2026-04-28 10:39:49', 0, NULL, NULL),
(143, 16, 1, 1, 1, '2026-05-09', '09:30:00', '10:30:00', 12, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(144, 17, 1, 3, 2, '2026-05-09', '10:45:00', '11:45:00', 15, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(145, 1, 1, 1, 1, '2026-05-11', '09:00:00', '10:00:00', 12, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(146, 2, 1, 3, 2, '2026-05-11', '10:15:00', '11:15:00', 15, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(147, 3, 1, 2, 1, '2026-05-11', '12:15:00', '13:15:00', 10, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(148, 4, 1, 5, 3, '2026-05-11', '18:00:00', '19:00:00', 12, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(149, 18, 2, 1, 3, '2026-05-11', '09:00:00', '10:00:00', 12, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(150, 19, 2, 4, 2, '2026-05-11', '18:30:00', '19:30:00', 15, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(151, 5, 1, 3, 2, '2026-05-12', '09:00:00', '10:00:00', 15, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(152, 6, 1, 1, 1, '2026-05-12', '10:15:00', '11:15:00', 12, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(153, 7, 1, 4, 3, '2026-05-12', '18:00:00', '19:00:00', 15, 0, NULL, '2026-04-14 07:54:18', '2026-04-14 07:54:18', 0, NULL, NULL),
(154, 8, 1, 2, 1, '2026-05-13', '09:00:00', '10:00:00', 10, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(155, 9, 1, 3, 2, '2026-05-13', '12:15:00', '13:15:00', 15, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(156, 10, 1, 1, 3, '2026-05-13', '18:00:00', '19:00:00', 12, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(157, 20, 2, 3, 2, '2026-05-13', '09:00:00', '10:00:00', 15, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(158, 21, 2, 1, 3, '2026-05-13', '18:30:00', '19:30:00', 12, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(159, 11, 1, 4, 3, '2026-05-14', '09:00:00', '10:00:00', 15, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(160, 12, 1, 1, 1, '2026-05-14', '10:15:00', '11:15:00', 12, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(161, 13, 1, 5, 2, '2026-05-14', '18:00:00', '19:00:00', 12, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(162, 14, 1, 3, 2, '2026-05-15', '09:00:00', '10:00:00', 15, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(163, 15, 1, 2, 1, '2026-05-15', '10:15:00', '11:15:00', 10, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(164, 22, 2, 2, 1, '2026-05-15', '09:00:00', '10:00:00', 10, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(165, 23, 2, 5, 3, '2026-05-15', '18:30:00', '19:30:00', 12, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(166, 16, 1, 1, 1, '2026-05-16', '09:30:00', '10:30:00', 12, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(167, 17, 1, 3, 2, '2026-05-16', '10:45:00', '11:45:00', 15, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(168, 1, 1, 1, 1, '2026-05-18', '09:00:00', '10:00:00', 12, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(169, 2, 1, 3, 2, '2026-05-18', '10:15:00', '11:15:00', 15, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(170, 3, 1, 2, 1, '2026-05-18', '12:15:00', '13:15:00', 10, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(171, 4, 1, 5, 3, '2026-05-18', '18:00:00', '19:00:00', 12, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(172, 18, 2, 1, 3, '2026-05-18', '09:00:00', '10:00:00', 12, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(173, 19, 2, 4, 2, '2026-05-18', '18:30:00', '19:30:00', 15, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(174, 5, 1, 3, 2, '2026-05-19', '09:00:00', '10:00:00', 15, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(175, 6, 1, 1, 1, '2026-05-19', '10:15:00', '11:15:00', 12, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(176, 7, 1, 4, 3, '2026-05-19', '18:00:00', '19:00:00', 15, 0, NULL, '2026-04-21 09:02:37', '2026-04-21 09:02:37', 0, NULL, NULL),
(177, 8, 1, 2, 1, '2026-05-20', '09:00:00', '10:00:00', 10, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(178, 9, 1, 3, 2, '2026-05-20', '12:15:00', '13:15:00', 15, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(179, 10, 1, 1, 3, '2026-05-20', '18:00:00', '19:00:00', 12, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(180, 20, 2, 3, 2, '2026-05-20', '09:00:00', '10:00:00', 15, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(181, 21, 2, 1, 3, '2026-05-20', '18:30:00', '19:30:00', 12, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(182, 11, 1, 4, 3, '2026-05-21', '09:00:00', '10:00:00', 15, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(183, 12, 1, 1, 1, '2026-05-21', '10:15:00', '11:15:00', 12, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(184, 13, 1, 5, 2, '2026-05-21', '18:00:00', '19:00:00', 12, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(185, 14, 1, 3, 2, '2026-05-22', '09:00:00', '10:00:00', 15, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(186, 15, 1, 2, 1, '2026-05-22', '10:15:00', '11:15:00', 10, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(187, 22, 2, 2, 1, '2026-05-22', '09:00:00', '10:00:00', 10, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(188, 23, 2, 5, 3, '2026-05-22', '18:30:00', '19:30:00', 12, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(189, 16, 1, 1, 1, '2026-05-23', '09:30:00', '10:30:00', 12, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(190, 17, 1, 3, 2, '2026-05-23', '10:45:00', '11:45:00', 15, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(191, 1, 1, 1, 1, '2026-05-25', '09:00:00', '10:00:00', 12, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(192, 2, 1, 3, 2, '2026-05-25', '10:15:00', '11:15:00', 15, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(193, 3, 1, 2, 1, '2026-05-25', '12:15:00', '13:15:00', 10, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(194, 4, 1, 5, 3, '2026-05-25', '18:00:00', '19:00:00', 12, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(195, 18, 2, 1, 3, '2026-05-25', '09:00:00', '10:00:00', 12, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(196, 19, 2, 4, 2, '2026-05-25', '18:30:00', '19:30:00', 15, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(197, 5, 1, 3, 2, '2026-05-26', '09:00:00', '10:00:00', 15, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(198, 6, 1, 1, 1, '2026-05-26', '10:15:00', '11:15:00', 12, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(199, 7, 1, 4, 3, '2026-05-26', '18:00:00', '19:00:00', 15, 0, NULL, '2026-04-28 08:11:56', '2026-04-28 08:11:56', 0, NULL, NULL),
(200, 8, 1, 2, 1, '2026-05-27', '09:00:00', '10:00:00', 10, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(201, 9, 1, 3, 2, '2026-05-27', '12:15:00', '13:15:00', 15, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(202, 10, 1, 1, 3, '2026-05-27', '18:00:00', '19:00:00', 12, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(203, 20, 2, 3, 2, '2026-05-27', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(204, 21, 2, 1, 3, '2026-05-27', '18:30:00', '19:30:00', 12, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(205, 11, 1, 4, 3, '2026-05-28', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(206, 12, 1, 1, 1, '2026-05-28', '10:15:00', '11:15:00', 12, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(207, 13, 1, 5, 2, '2026-05-28', '18:00:00', '19:00:00', 12, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(208, 14, 1, 3, 2, '2026-05-29', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(209, 15, 1, 2, 1, '2026-05-29', '10:15:00', '11:15:00', 10, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(210, 22, 2, 2, 1, '2026-05-29', '09:00:00', '10:00:00', 10, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(211, 23, 2, 5, 3, '2026-05-29', '18:30:00', '19:30:00', 12, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(212, 16, 1, 1, 1, '2026-05-30', '09:30:00', '10:30:00', 12, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(213, 17, 1, 3, 2, '2026-05-30', '10:45:00', '11:45:00', 15, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(214, 1, 1, 1, 1, '2026-06-01', '09:00:00', '10:00:00', 12, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(215, 2, 1, 3, 2, '2026-06-01', '10:15:00', '11:15:00', 15, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(216, 3, 1, 2, 1, '2026-06-01', '12:15:00', '13:15:00', 10, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(217, 4, 1, 5, 3, '2026-06-01', '18:00:00', '19:00:00', 12, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(218, 18, 2, 1, 3, '2026-06-01', '09:00:00', '10:00:00', 12, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(219, 19, 2, 4, 2, '2026-06-01', '18:30:00', '19:30:00', 15, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(220, 5, 1, 3, 2, '2026-06-02', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(221, 6, 1, 1, 1, '2026-06-02', '10:15:00', '11:15:00', 12, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(222, 7, 1, 4, 3, '2026-06-02', '18:00:00', '19:00:00', 15, 0, NULL, '2026-05-05 08:34:38', '2026-05-05 08:34:38', 0, NULL, NULL),
(223, 8, 1, 2, 1, '2026-06-03', '09:00:00', '10:00:00', 10, 0, NULL, '2026-05-08 08:53:58', '2026-05-08 08:53:58', 0, NULL, NULL),
(224, 9, 1, 3, 2, '2026-06-03', '12:15:00', '13:15:00', 15, 0, NULL, '2026-05-08 08:53:58', '2026-05-08 08:53:58', 0, NULL, NULL),
(225, 10, 1, 1, 3, '2026-06-03', '18:00:00', '19:00:00', 12, 0, NULL, '2026-05-08 08:53:58', '2026-05-08 08:53:58', 0, NULL, NULL),
(226, 20, 2, 3, 2, '2026-06-03', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-08 08:53:58', '2026-05-08 08:53:58', 0, NULL, NULL),
(227, 21, 2, 1, 3, '2026-06-03', '18:30:00', '19:30:00', 12, 0, NULL, '2026-05-08 08:53:58', '2026-05-08 08:53:58', 0, NULL, NULL),
(228, 11, 1, 4, 3, '2026-06-04', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-08 08:53:58', '2026-05-08 08:53:58', 0, NULL, NULL),
(229, 12, 1, 1, 1, '2026-06-04', '10:15:00', '11:15:00', 12, 0, NULL, '2026-05-08 08:53:58', '2026-05-08 08:53:58', 0, NULL, NULL),
(230, 13, 1, 5, 2, '2026-06-04', '18:00:00', '19:00:00', 12, 0, NULL, '2026-05-08 08:53:58', '2026-05-08 08:53:58', 0, NULL, NULL),
(231, 14, 1, 3, 2, '2026-06-05', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-08 08:53:58', '2026-05-08 08:53:58', 0, NULL, NULL),
(232, 15, 1, 2, 1, '2026-06-05', '10:15:00', '11:15:00', 10, 0, NULL, '2026-05-08 08:53:58', '2026-05-08 08:53:58', 0, NULL, NULL),
(233, 22, 2, 2, 1, '2026-06-05', '09:00:00', '10:00:00', 10, 0, NULL, '2026-05-08 08:53:58', '2026-05-08 08:53:58', 0, NULL, NULL),
(234, 23, 2, 5, 3, '2026-06-05', '18:30:00', '19:30:00', 12, 0, NULL, '2026-05-08 08:53:58', '2026-05-08 08:53:58', 0, NULL, NULL),
(235, 16, 1, 1, 1, '2026-06-06', '09:30:00', '10:30:00', 12, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(236, 17, 1, 3, 2, '2026-06-06', '10:45:00', '11:45:00', 15, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(237, 1, 1, 1, 1, '2026-06-08', '09:00:00', '10:00:00', 12, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(238, 2, 1, 3, 2, '2026-06-08', '10:15:00', '11:15:00', 15, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(239, 3, 1, 2, 1, '2026-06-08', '12:15:00', '13:15:00', 10, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(240, 4, 1, 5, 3, '2026-06-08', '18:00:00', '19:00:00', 12, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(241, 18, 2, 1, 3, '2026-06-08', '09:00:00', '10:00:00', 12, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(242, 19, 2, 4, 2, '2026-06-08', '18:30:00', '19:30:00', 15, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(243, 5, 1, 3, 2, '2026-06-09', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(244, 6, 1, 1, 1, '2026-06-09', '10:15:00', '11:15:00', 12, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(245, 7, 1, 4, 3, '2026-06-09', '18:00:00', '19:00:00', 15, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(246, 8, 1, 2, 1, '2026-06-10', '09:00:00', '10:00:00', 10, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(247, 9, 1, 3, 2, '2026-06-10', '12:15:00', '13:15:00', 15, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(248, 10, 1, 1, 3, '2026-06-10', '18:00:00', '19:00:00', 12, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(249, 20, 2, 3, 2, '2026-06-10', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(250, 21, 2, 1, 3, '2026-06-10', '18:30:00', '19:30:00', 12, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(251, 11, 1, 4, 3, '2026-06-11', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(252, 12, 1, 1, 1, '2026-06-11', '10:15:00', '11:15:00', 12, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(253, 13, 1, 5, 2, '2026-06-11', '18:00:00', '19:00:00', 12, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(254, 14, 1, 3, 2, '2026-06-12', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(255, 15, 1, 2, 1, '2026-06-12', '10:15:00', '11:15:00', 10, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(256, 22, 2, 2, 1, '2026-06-12', '09:00:00', '10:00:00', 10, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(257, 23, 2, 5, 3, '2026-06-12', '18:30:00', '19:30:00', 12, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(258, 16, 1, 1, 1, '2026-06-13', '09:30:00', '10:30:00', 12, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(259, 17, 1, 3, 2, '2026-06-13', '10:45:00', '11:45:00', 15, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(260, 1, 1, 1, 1, '2026-06-15', '09:00:00', '10:00:00', 12, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(261, 2, 1, 3, 2, '2026-06-15', '10:15:00', '11:15:00', 15, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(262, 3, 1, 2, 1, '2026-06-15', '12:15:00', '13:15:00', 10, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(263, 4, 1, 5, 3, '2026-06-15', '18:00:00', '19:00:00', 12, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(264, 18, 2, 1, 3, '2026-06-15', '09:00:00', '10:00:00', 12, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(265, 19, 2, 4, 2, '2026-06-15', '18:30:00', '19:30:00', 15, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(266, 5, 1, 3, 2, '2026-06-16', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(267, 6, 1, 1, 1, '2026-06-16', '10:15:00', '11:15:00', 12, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(268, 7, 1, 4, 3, '2026-06-16', '18:00:00', '19:00:00', 15, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(269, 8, 1, 2, 1, '2026-06-17', '09:00:00', '10:00:00', 10, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(270, 9, 1, 3, 2, '2026-06-17', '12:15:00', '13:15:00', 15, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(271, 10, 1, 1, 3, '2026-06-17', '18:00:00', '19:00:00', 12, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(272, 20, 2, 3, 2, '2026-06-17', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(273, 21, 2, 1, 3, '2026-06-17', '18:30:00', '19:30:00', 12, 0, NULL, '2026-05-20 12:50:42', '2026-05-20 12:50:42', 0, NULL, NULL),
(274, 11, 1, 4, 3, '2026-06-18', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-21 12:45:10', '2026-05-21 12:45:10', 0, NULL, NULL),
(275, 12, 1, 1, 1, '2026-06-18', '10:15:00', '11:15:00', 12, 0, NULL, '2026-05-21 12:45:10', '2026-05-21 12:45:10', 0, NULL, NULL),
(276, 13, 1, 5, 2, '2026-06-18', '18:00:00', '19:00:00', 12, 0, NULL, '2026-05-21 12:45:10', '2026-05-21 12:45:10', 0, NULL, NULL),
(277, NULL, 2, 1, 3, '2026-05-23', '09:00:00', '10:00:00', 10, 1, 'Cours ponctuel supprimé', '2026-05-21 13:21:23', '2026-05-21 13:23:12', 1, NULL, NULL),
(278, NULL, 2, 6, 3, '2026-05-23', '09:00:00', '10:00:00', 10, 0, NULL, '2026-05-21 13:24:03', '2026-05-21 13:24:03', 1, NULL, NULL),
(279, NULL, 3, 6, 2, '2026-05-27', '17:00:00', '18:00:00', 10, 0, NULL, '2026-05-21 13:24:20', '2026-05-21 13:24:20', 1, NULL, NULL),
(280, 14, 1, 3, 2, '2026-06-19', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(281, 15, 1, 2, 1, '2026-06-19', '10:15:00', '11:15:00', 10, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(282, 22, 2, 2, 1, '2026-06-19', '09:00:00', '10:00:00', 10, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(283, 23, 2, 5, 3, '2026-06-19', '18:30:00', '19:30:00', 12, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(284, 16, 1, 1, 1, '2026-06-20', '09:30:00', '10:30:00', 12, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(285, 17, 1, 3, 2, '2026-06-20', '10:45:00', '11:45:00', 15, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(286, 1, 1, 1, 1, '2026-06-22', '09:00:00', '10:00:00', 12, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(287, 2, 1, 3, 2, '2026-06-22', '10:15:00', '11:15:00', 15, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(288, 3, 1, 2, 1, '2026-06-22', '12:15:00', '13:15:00', 10, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(289, 4, 1, 5, 3, '2026-06-22', '18:00:00', '19:00:00', 12, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(290, 18, 2, 1, 3, '2026-06-22', '09:00:00', '10:00:00', 12, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(291, 19, 2, 4, 2, '2026-06-22', '18:30:00', '19:30:00', 15, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(292, 5, 1, 3, 2, '2026-06-23', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(293, 6, 1, 1, 1, '2026-06-23', '10:15:00', '11:15:00', 12, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(294, 7, 1, 4, 3, '2026-06-23', '18:00:00', '19:00:00', 15, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(295, 8, 1, 2, 1, '2026-06-24', '09:00:00', '10:00:00', 10, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(296, 9, 1, 3, 2, '2026-06-24', '12:15:00', '13:15:00', 15, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(297, 10, 1, 1, 3, '2026-06-24', '18:00:00', '19:00:00', 12, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(298, 20, 2, 3, 2, '2026-06-24', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(299, 21, 2, 1, 3, '2026-06-24', '18:30:00', '19:30:00', 12, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(300, 11, 1, 4, 3, '2026-06-25', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(301, 12, 1, 1, 1, '2026-06-25', '10:15:00', '11:15:00', 12, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(302, 13, 1, 5, 2, '2026-06-25', '18:00:00', '19:00:00', 12, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(303, 14, 1, 3, 2, '2026-06-26', '09:00:00', '10:00:00', 15, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(304, 15, 1, 2, 1, '2026-06-26', '10:15:00', '11:15:00', 10, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(305, 22, 2, 2, 1, '2026-06-26', '09:00:00', '10:00:00', 10, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(306, 23, 2, 5, 3, '2026-06-26', '18:30:00', '19:30:00', 12, 0, NULL, '2026-05-29 08:38:20', '2026-05-29 08:38:20', 0, NULL, NULL),
(307, NULL, 2, 6, 3, '2026-06-02', '09:00:00', '10:00:00', 10, 0, NULL, '2026-05-29 08:40:31', '2026-05-29 08:40:31', 1, NULL, NULL),
(308, 25, 3, 7, 3, '2026-06-03', '12:00:00', '13:00:00', 10, 0, NULL, '2026-05-29 10:36:13', '2026-05-29 10:36:13', 0, NULL, NULL),
(309, 25, 3, 7, 3, '2026-06-10', '12:00:00', '13:00:00', 10, 0, NULL, '2026-05-29 10:36:13', '2026-05-29 10:36:13', 0, NULL, NULL),
(310, 25, 3, 7, 3, '2026-06-17', '12:00:00', '13:00:00', 10, 0, NULL, '2026-05-29 10:36:13', '2026-05-29 10:36:13', 0, NULL, NULL),
(311, 25, 3, 7, 3, '2026-06-24', '12:00:00', '13:00:00', 10, 0, NULL, '2026-05-29 10:36:13', '2026-05-29 10:36:13', 0, NULL, NULL);

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

--
-- Structure de la table `class_types`
--

CREATE TABLE `class_types` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(200) NOT NULL,
  `description` mediumtext DEFAULT NULL,
  `max_capacity` int(10) UNSIGNED NOT NULL DEFAULT 10,
  `waitlist_enabled` tinyint(1) DEFAULT 0,
  `color` varchar(7) DEFAULT '#6366f1',
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `class_types` (`id`, `name`, `description`, `max_capacity`, `waitlist_enabled`, `color`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'Pilates Fondamental', 'Cours de Pilates pour tous les niveaux', 12, 1, '#4a6741', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(2, 'Pilates Intermédiaire', 'Cours de Pilates niveau intermédiaire', 10, 1, '#6a8f5e', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(3, 'Yoga Vinyasa', 'Yoga dynamique avec enchaînements fluides', 15, 1, '#c4956a', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(4, 'Yoga Doux', 'Yoga relaxant et restauratif', 15, 0, '#8B7355', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(5, 'Stretching', 'Séance d\'étirements profonds', 12, 0, '#6366f1', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(6, 'Atelier Zen', 'Test description atelier', 10, 1, '#ff0000', 1, '2026-05-21 13:23:41', '2026-05-21 13:23:41'),
(7, 'Pilates Reformer', 'test', 1, 0, '#6366f1', 1, '2026-05-29 10:33:43', '2026-05-29 10:34:20');

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

--
-- Structure de la table `class_type_offers`
--

CREATE TABLE `class_type_offers` (
  `class_type_id` int(10) UNSIGNED NOT NULL,
  `offer_id` int(10) UNSIGNED NOT NULL,
  `credit_cost` int(10) UNSIGNED NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

INSERT INTO `class_type_offers` (`class_type_id`, `offer_id`, `credit_cost`) VALUES
(1, 1, 1),
(1, 2, 1),
(1, 3, 1),
(1, 4, 1),
(1, 5, 1),
(1, 6, 1),
(2, 1, 1),
(2, 2, 1),
(2, 3, 1),
(2, 4, 1),
(2, 5, 1),
(2, 6, 1),
(3, 1, 1),
(3, 2, 1),
(3, 3, 1),
(3, 4, 1),
(3, 5, 1),
(3, 6, 1),
(4, 1, 1),
(4, 2, 1),
(4, 3, 1),
(4, 4, 1),
(4, 5, 1),
(4, 6, 1),
(5, 1, 1),
(5, 2, 1),
(5, 3, 1),
(5, 4, 1),
(5, 5, 1),
(5, 6, 1),
(6, 2, 1),
(7, 1, 1),
(7, 5, 1);

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

--
-- Structure de la table `class_type_studio_capacity`
--

CREATE TABLE `class_type_studio_capacity` (
  `class_type_id` int(10) UNSIGNED NOT NULL,
  `studio_id` int(10) UNSIGNED NOT NULL,
  `max_capacity` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

INSERT INTO `class_type_studio_capacity` (`class_type_id`, `studio_id`, `max_capacity`) VALUES
(7, 3, 10);

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

--
-- Structure de la table `client_purchases`
--

CREATE TABLE `client_purchases` (
  `id` int(10) UNSIGNED NOT NULL,
  `client_id` int(10) UNSIGNED NOT NULL,
  `offer_id` int(10) UNSIGNED NOT NULL,
  `purchase_date` datetime NOT NULL DEFAULT current_timestamp(),
  `expiry_date` date DEFAULT NULL,
  `original_expiry_date` date DEFAULT NULL,
  `credits_total` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `credits_remaining` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `status` enum('active','expired','cancelled','cancelled_pending','pending','paused','suspended') DEFAULT 'active',
  `subscription_start_date` date DEFAULT NULL,
  `subscription_end_date` date DEFAULT NULL,
  `next_billing_date` date DEFAULT NULL,
  `billing_count` int(10) UNSIGNED DEFAULT 0,
  `max_billing_count` int(10) UNSIGNED DEFAULT NULL,
  `subscription_paused_until` date DEFAULT NULL,
  `stripe_payment_intent_id` varchar(255) DEFAULT NULL,
  `stripe_subscription_id` varchar(255) DEFAULT NULL,
  `gocardless_subscription_id` varchar(255) DEFAULT NULL,
  `gocardless_mandate_id` varchar(255) DEFAULT NULL,
  `amount_paid` decimal(10,2) DEFAULT 0.00,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `payment_source` enum('stripe','gocardless','manual_cash','manual_check','free') DEFAULT NULL,
  `added_by_admin_id` int(10) UNSIGNED DEFAULT NULL,
  `commitment_end_date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `client_purchases` (`id`, `client_id`, `offer_id`, `purchase_date`, `expiry_date`, `original_expiry_date`, `credits_total`, `credits_remaining`, `status`, `subscription_start_date`, `subscription_end_date`, `next_billing_date`, `billing_count`, `max_billing_count`, `subscription_paused_until`, `stripe_payment_intent_id`, `stripe_subscription_id`, `gocardless_subscription_id`, `gocardless_mandate_id`, `amount_paid`, `created_at`, `updated_at`, `payment_source`, `added_by_admin_id`, `commitment_end_date`) VALUES
(1, 1, 1, '2026-04-28 10:45:34', '2026-05-10', NULL, 1, 0, 'active', NULL, NULL, NULL, 0, NULL, NULL, 'pm_1TR7GsJQrmDjpH0NyW8B76dc', NULL, NULL, NULL, 10.00, '2026-04-28 08:45:34', '2026-05-08 10:29:14', NULL, NULL, NULL),
(2, 1, 4, '2026-04-28 11:17:15', '2026-04-30', NULL, 10, 0, 'active', NULL, NULL, NULL, 0, NULL, NULL, 'pi_3TR7lVJQrmDjpH0N0TfXrXsl', NULL, NULL, NULL, 180.00, '2026-04-28 09:17:15', '2026-04-28 09:42:23', NULL, NULL, NULL),
(3, 1, 6, '2026-04-28 11:42:00', NULL, NULL, 8, 4, 'active', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, 69.00, '2026-04-28 09:42:00', '2026-05-29 10:51:52', 'manual_cash', 1, '2027-05-01'),
(4, 1, 2, '2026-05-21 14:45:10', '2026-07-20', NULL, 1, 1, 'active', NULL, NULL, NULL, 0, NULL, NULL, 'pm_1TZVyMJQrmDjpH0NqHkxrOoq', NULL, NULL, NULL, 22.00, '2026-05-21 12:45:10', '2026-05-21 12:45:10', NULL, NULL, NULL),
(5, 2, 1, '2026-05-21 15:53:21', '2026-06-20', NULL, 1, 0, 'active', NULL, NULL, NULL, 0, NULL, NULL, '', NULL, NULL, NULL, 10.00, '2026-05-21 13:53:21', '2026-05-29 08:53:25', NULL, NULL, NULL),
(6, 2, 1, '2026-05-29 11:19:08', '2026-06-28', '2026-06-28', 1, 1, 'active', NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, 10.00, '2026-05-29 09:19:08', '2026-05-29 09:19:08', 'manual_cash', 1, NULL);

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

--
-- Structure de la table `contacts`
--

CREATE TABLE `contacts` (
  `id` int(10) UNSIGNED NOT NULL,
  `first_name` varchar(100) NOT NULL,
  `last_name` varchar(100) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(30) NOT NULL,
  `phone_country_code` varchar(5) DEFAULT '+33',
  `client_id` int(10) UNSIGNED DEFAULT NULL,
  `created_by_client_id` int(10) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `contacts` (`id`, `first_name`, `last_name`, `email`, `phone`, `phone_country_code`, `client_id`, `created_by_client_id`, `created_at`) VALUES
(1, 'Elsa', 'AURE', 'elsa.pilates.yoga@gmail.com', '0604033138', '+33', NULL, 1, '2026-04-28 09:16:12'),
(2, 'Martine', 'VERDIER', 'vincent@wenet-communication.com', '0600000000', '+33', NULL, 1, '2026-04-28 09:18:22');

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

--
-- Structure de la table `credit_history`
--

CREATE TABLE `credit_history` (
  `id` int(10) UNSIGNED NOT NULL,
  `client_id` int(10) UNSIGNED NOT NULL,
  `client_purchase_id` int(10) UNSIGNED DEFAULT NULL,
  `booking_id` int(10) UNSIGNED DEFAULT NULL,
  `type` enum('debit','credit') NOT NULL,
  `amount` int(11) NOT NULL DEFAULT 1,
  `reason` varchar(255) DEFAULT NULL,
  `performed_by` enum('system','admin','client','teacher') DEFAULT 'system',
  `performed_by_id` int(10) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `credit_history` (`id`, `client_id`, `client_purchase_id`, `booking_id`, `type`, `amount`, `reason`, `performed_by`, `performed_by_id`, `created_at`) VALUES
(1, 1, 1, NULL, 'credit', 1, 'Achat de formule', 'system', NULL, '2026-04-28 08:45:34'),
(2, 1, 1, 1, 'debit', 1, 'Réservation de cours', 'system', NULL, '2026-04-28 08:45:38'),
(3, 1, 2, NULL, 'credit', 10, 'Achat de formule', 'system', NULL, '2026-04-28 09:17:15'),
(4, 1, 2, 2, 'debit', 1, 'Réservation de cours', 'system', NULL, '2026-04-28 09:17:55'),
(5, 1, 2, 3, 'debit', 1, 'Réservation de cours', 'system', NULL, '2026-04-28 09:18:22'),
(6, 1, 3, NULL, 'credit', 8, 'Achat en espèces - Abonnement 12 mois', 'admin', 1, '2026-04-28 09:42:00'),
(7, 1, 3, NULL, 'debit', 8, 'Débit manuel admin', 'admin', 1, '2026-04-28 09:42:10'),
(8, 1, 2, NULL, 'debit', 8, 'Débit manuel admin', 'admin', 1, '2026-04-28 09:42:23'),
(9, 1, 3, NULL, 'credit', 8, 'Ajout manuel par admin', 'admin', 1, '2026-04-28 09:42:29'),
(10, 1, 3, 5, 'debit', 1, 'Réservation de cours', 'client', NULL, '2026-04-28 10:07:43'),
(11, 1, 3, 6, 'debit', 1, 'Réservation de cours', 'system', NULL, '2026-04-28 10:12:58'),
(12, 1, 3, 6, 'credit', 1, 'Annulation de réservation', 'admin', NULL, '2026-04-28 10:16:22'),
(13, 1, 1, 1, 'credit', 1, 'Annulation de réservation', 'system', NULL, '2026-04-28 10:39:49'),
(14, 1, 3, 7, 'debit', 1, 'Réservation de cours', 'client', NULL, '2026-05-08 09:43:09'),
(15, 1, 3, NULL, 'credit', 1, 'Crédit exceptionnel (abus)', 'admin', 1, '2026-05-08 09:48:55'),
(16, 1, 3, NULL, 'debit', 1, 'Débit manuel admin', 'admin', 1, '2026-05-08 09:49:59'),
(17, 1, 1, 8, 'debit', 1, 'Réservation de cours', 'system', NULL, '2026-05-08 10:29:14'),
(18, 1, 4, NULL, 'credit', 1, 'Achat de formule', 'system', NULL, '2026-05-21 12:45:10'),
(19, 2, 5, NULL, 'credit', 1, 'Achat de formule', 'system', NULL, '2026-05-21 13:53:21'),
(20, 2, 5, 9, 'debit', 1, 'Réservation de cours', 'system', NULL, '2026-05-29 08:52:55'),
(21, 2, 5, 9, 'credit', 1, 'Annulation de réservation', 'admin', NULL, '2026-05-29 08:53:14'),
(22, 2, 5, 10, 'debit', 1, 'Réservation de cours', 'system', NULL, '2026-05-29 08:53:25'),
(23, 2, 6, NULL, 'credit', 1, 'Achat en espèces - Cours Découverte', 'admin', 1, '2026-05-29 09:19:08'),
(24, 1, 3, 11, 'debit', 1, 'Réservation de cours', 'system', NULL, '2026-05-29 10:38:09'),
(25, 1, 3, 12, 'debit', 1, 'Réservation de cours', 'system', NULL, '2026-05-29 10:51:52');

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

--
-- Structure de la table `gift_cards`
--

CREATE TABLE `gift_cards` (
  `id` int(10) UNSIGNED NOT NULL,
  `code` varchar(20) NOT NULL,
  `amount` decimal(8,2) NOT NULL,
  `amount_remaining` decimal(8,2) NOT NULL,
  `buyer_email` varchar(190) NOT NULL,
  `buyer_name` varchar(120) DEFAULT NULL,
  `recipient_first_name` varchar(120) NOT NULL,
  `personal_message` mediumtext DEFAULT NULL,
  `stripe_payment_intent_id` varchar(255) DEFAULT NULL,
  `pdf_filename` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `expires_at` datetime NOT NULL,
  `first_redeemed_at` datetime DEFAULT NULL,
  `fully_consumed_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `gift_cards` (`id`, `code`, `amount`, `amount_remaining`, `buyer_email`, `buyer_name`, `recipient_first_name`, `personal_message`, `stripe_payment_intent_id`, `pdf_filename`, `created_at`, `expires_at`, `first_redeemed_at`, `fully_consumed_at`) VALUES
(1, 'VQT4-9GAV-SM7F', 10.00, 10.00, 'vincent.wenet@gmail.com', 'Vincent', 'Elsa', 'Joyeux anniversaire Elsa', 'pi_3TZVlYJQrmDjpH0N2YNW3FQk', NULL, '2026-05-21 12:31:57', '2026-11-21 14:31:57', NULL, NULL),
(2, 'P9J3-829G-WR84', 30.00, 8.00, 'vincent.wenet@gmail.com', 'Vincent', 'Elsa', 'Joyeux anniversaire Elsa', 'pi_3TZVnuJQrmDjpH0N2Npa5Pix', 'assets/uploads/giftcards/giftcard-P9J3829GWR84.pdf', '2026-05-21 12:34:23', '2026-11-21 14:34:23', '2026-05-21 14:45:10', '2026-05-21 14:45:10'),
(3, 'BLCT-5JSL-89DC', 10.00, 10.00, 'vincent.wenet@gmail.com', 'Vincent', 'Paul', 'Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire', 'pi_3TZWEHJQrmDjpH0N2yLBpayr', 'assets/uploads/giftcards/giftcard-BLCT5JSL89DC.pdf', '2026-05-21 13:01:39', '2026-11-21 15:01:39', NULL, NULL),
(4, 'AXPJ-XQ3Y-9847', 10.00, 10.00, 'vincent.wenet@gmail.com', 'Vincent', 'Paul', 'Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire Joyeux anniversaire', 'pi_3TZWLNJQrmDjpH0N2Q9zcv4Z', 'assets/uploads/giftcards/giftcard-AXPJXQ3Y9847.pdf', '2026-05-21 13:08:59', '2026-11-21 15:08:59', NULL, NULL),
(5, 'RD5Q-RH3L-TTSD', 10.00, 0.00, 'vincent.wenet@gmail.com', 'Vincent', 'Martine', 'Joyeux anniversaire maman Joyeux anniversaire maman Joyeux anniversaire maman Joyeux anniversaire maman Joyeux anniversaire maman Joyeux anniversaire maman Joyeux anniversaire maman Joyeux anniversaire maman Joyeux anniversaire maman Joyeux anniversaire maman Joyeux anniversaire maman Joyeux anniver', 'pi_3TZWbyJQrmDjpH0N0eonWnaE', 'assets/uploads/giftcards/giftcard-RD5QRH3LTTSD.pdf', '2026-05-21 13:26:07', '2026-11-21 15:26:07', '2026-05-21 15:53:21', '2026-05-21 15:53:21');

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

--
-- Structure de la table `gift_card_redemptions`
--

CREATE TABLE `gift_card_redemptions` (
  `id` int(10) UNSIGNED NOT NULL,
  `gift_card_id` int(10) UNSIGNED NOT NULL,
  `client_id` int(10) UNSIGNED NOT NULL,
  `amount_used` decimal(8,2) NOT NULL,
  `client_purchase_id` int(10) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `gift_card_redemptions` (`id`, `gift_card_id`, `client_id`, `amount_used`, `client_purchase_id`, `created_at`) VALUES
(1, 2, 1, 22.00, NULL, '2026-05-21 12:45:10'),
(2, 5, 2, 10.00, NULL, '2026-05-21 13:53:21');

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

--
-- Structure de la table `health_questionnaires`
--

CREATE TABLE `health_questionnaires` (
  `id` int(10) UNSIGNED NOT NULL,
  `client_id` int(10) UNSIGNED NOT NULL,
  `status` enum('pending_signature','signed','expired') DEFAULT 'pending_signature',
  `answers_json` mediumtext NOT NULL,
  `certificate_required` tinyint(1) NOT NULL DEFAULT 0,
  `medical_certificate_provided` tinyint(1) NOT NULL DEFAULT 0,
  `medical_certificate_provided_at` datetime DEFAULT NULL,
  `medical_certificate_admin_id` int(10) UNSIGNED DEFAULT NULL,
  `signature_code` varchar(6) DEFAULT NULL,
  `signature_code_sent_at` datetime DEFAULT NULL,
  `signature_code_expires_at` datetime DEFAULT NULL,
  `signed_at` datetime DEFAULT NULL,
  `signature_ip` varchar(45) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `health_questionnaires` (`id`, `client_id`, `status`, `answers_json`, `certificate_required`, `medical_certificate_provided`, `medical_certificate_provided_at`, `medical_certificate_admin_id`, `signature_code`, `signature_code_sent_at`, `signature_code_expires_at`, `signed_at`, `signature_ip`, `created_at`, `updated_at`) VALUES
(1, 1, 'signed', '[true,true,true,true,true,true,true,true,true]', 1, 1, '2026-05-08 13:04:46', 1, NULL, '2026-05-08 11:26:11', '2026-05-08 11:56:11', '2026-05-08 11:26:33', '88.127.203.121', '2026-05-08 09:26:11', '2026-05-08 11:04:46'),
(2, 2, 'expired', '[false,false,false,false,false,false,false,false,false]', 0, 0, NULL, NULL, '424454', '2026-05-21 15:26:58', '2026-05-21 15:56:58', NULL, NULL, '2026-05-21 13:26:58', '2026-05-21 13:29:12'),
(3, 2, 'signed', '[false,false,false,false,false,false,false,false,false]', 0, 0, NULL, NULL, NULL, '2026-05-21 15:29:24', '2026-05-21 15:59:24', '2026-05-21 15:32:50', '88.127.203.121', '2026-05-21 13:29:24', '2026-05-21 13:32:50'),
(4, 3, 'signed', '[false,false,false,false,false,false,false,false,false]', 0, 0, NULL, NULL, NULL, '2026-05-29 13:07:22', '2026-05-29 13:37:22', '2026-05-29 13:08:19', '88.127.203.121', '2026-05-29 11:07:22', '2026-05-29 11:08:19');

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

--
-- Structure de la table `offers`
--

CREATE TABLE `offers` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(200) NOT NULL,
  `description` mediumtext DEFAULT NULL,
  `type` enum('discovery','single','pack','subscription') NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `credits` int(10) UNSIGNED DEFAULT 1,
  `validity_days` int(10) UNSIGNED DEFAULT NULL,
  `payment_method` enum('card','direct_debit','card_then_debit') NOT NULL DEFAULT 'card',
  `subscription_commitment_months` int(10) UNSIGNED DEFAULT NULL,
  `subscription_end_date` date DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `sort_order` int(11) DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `features` mediumtext DEFAULT NULL COMMENT 'Liste à puces JSON',
  `installment_count` tinyint(3) UNSIGNED DEFAULT NULL,
  `installment_fee` decimal(10,2) DEFAULT 0.00,
  `unlimited_guest_invitations` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `offers` (`id`, `name`, `description`, `type`, `price`, `credits`, `validity_days`, `payment_method`, `subscription_commitment_months`, `subscription_end_date`, `is_active`, `sort_order`, `created_at`, `updated_at`, `features`, `installment_count`, `installment_fee`, `unlimited_guest_invitations`) VALUES
(1, 'Cours Découverte', 'Votre premier cours pour découvrir notre studio', 'discovery', 10.00, 1, 30, 'card', NULL, NULL, 1, 1, '2026-03-27 08:28:10', '2026-04-21 14:07:39', '[\"Valide 1 mois et 1 fois par personne\"]', NULL, 0.00, 0),
(2, 'Cours à l\'unité', 'Un cours à l\'unité', 'single', 22.00, 1, 60, 'card', NULL, NULL, 1, 2, '2026-03-27 08:28:10', '2026-04-21 14:08:24', '[\"Idéal pour découvrir ou pratiquer très occasionnellement\",\"Aucune contrainte, zéro engagement\",\"Liberté totale : venez quand vous voulez\"]', NULL, 0.00, 0),
(3, 'Carnet 5 cours', '5 cours à utiliser sur 3 mois', 'pack', 95.00, 5, 90, 'card', NULL, NULL, 1, 3, '2026-03-27 08:28:10', '2026-04-21 14:41:19', NULL, 3, 5.00, 0),
(4, 'Carnet 10 cours', '10 cours à utiliser sur 6 mois', 'pack', 180.00, 10, 180, 'card', NULL, NULL, 1, 4, '2026-03-27 08:28:10', '2026-03-27 08:28:10', NULL, NULL, 0.00, 0),
(5, 'Abonnement Liberté', '8 cours par mois sans engagement', 'subscription', 79.00, 8, NULL, 'card_then_debit', NULL, NULL, 1, 5, '2026-03-27 08:28:10', '2026-03-27 08:28:10', NULL, NULL, 0.00, 0),
(6, 'Abonnement 12 mois', '8 cours par mois, engagement 12 mois', 'subscription', 69.00, 8, NULL, 'card_then_debit', 12, NULL, 1, 6, '2026-03-27 08:28:10', '2026-03-27 08:28:10', NULL, NULL, 0.00, 0);

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

--
-- Structure de la table `payments`
--

CREATE TABLE `payments` (
  `id` int(10) UNSIGNED NOT NULL,
  `client_id` int(10) UNSIGNED NOT NULL,
  `client_purchase_id` int(10) UNSIGNED DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `currency` varchar(3) DEFAULT 'EUR',
  `payment_method` enum('card','direct_debit','manual','free') NOT NULL,
  `status` enum('pending','succeeded','failed','refunded','cancelled') DEFAULT 'pending',
  `payment_date` datetime NOT NULL DEFAULT current_timestamp(),
  `stripe_payment_intent_id` varchar(255) DEFAULT NULL,
  `gocardless_payment_id` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `deleted_at` datetime DEFAULT NULL,
  `cancelled_at` datetime DEFAULT NULL,
  `cancel_reason` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `payments` (`id`, `client_id`, `client_purchase_id`, `amount`, `currency`, `payment_method`, `status`, `payment_date`, `stripe_payment_intent_id`, `gocardless_payment_id`, `description`, `created_at`, `updated_at`, `deleted_at`, `cancelled_at`, `cancel_reason`) VALUES
(1, 1, 1, 10.00, 'EUR', 'card', 'succeeded', '2026-04-28 10:45:34', 'pm_1TR7GsJQrmDjpH0NyW8B76dc', NULL, 'Achat: Cours Découverte', '2026-04-28 08:45:34', '2026-04-28 08:45:34', NULL, NULL, NULL),
(2, 1, 2, 180.00, 'EUR', 'card', 'succeeded', '2026-04-28 11:17:15', 'pi_3TR7lVJQrmDjpH0N0TfXrXsl', NULL, 'Achat: Carnet 10 cours', '2026-04-28 09:17:15', '2026-04-28 09:17:15', NULL, NULL, NULL),
(3, 1, 3, 69.00, 'EUR', 'manual', 'succeeded', '2026-04-28 11:42:00', NULL, NULL, 'Achat Abonnement 12 mois (espèces)', '2026-04-28 09:42:00', '2026-04-28 09:42:00', NULL, NULL, NULL),
(4, 1, NULL, 22.00, 'EUR', 'manual', 'succeeded', '2026-05-21 14:45:10', NULL, NULL, 'Carte-cadeau P9J3-829G-WR84', '2026-05-21 12:45:10', '2026-05-21 12:45:10', NULL, NULL, NULL),
(5, 2, NULL, 10.00, 'EUR', 'manual', 'succeeded', '2026-05-21 15:53:21', NULL, NULL, 'Carte-cadeau RD5Q-RH3L-TTSD', '2026-05-21 13:53:21', '2026-05-21 13:53:21', NULL, NULL, NULL),
(6, 2, 6, 10.00, 'EUR', 'manual', 'succeeded', '2026-05-29 11:19:08', NULL, NULL, 'Achat Cours Découverte (espèces)', '2026-05-29 09:19:08', '2026-05-29 09:19:08', NULL, NULL, NULL);

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

--
-- Structure de la table `payment_alerts`
--

CREATE TABLE `payment_alerts` (
  `id` int(10) UNSIGNED NOT NULL,
  `client_id` int(10) UNSIGNED NOT NULL,
  `client_purchase_id` int(10) UNSIGNED DEFAULT NULL,
  `alert_type` enum('payment_failed','mandate_failed','subscription_cancelled','payment_late') NOT NULL,
  `message` text DEFAULT NULL,
  `is_read` tinyint(1) DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Structure de la table `prospect_emails`
--

CREATE TABLE `prospect_emails` (
  `id` int(10) UNSIGNED NOT NULL,
  `email` varchar(190) NOT NULL,
  `first_name` varchar(100) DEFAULT NULL,
  `last_name` varchar(100) DEFAULT NULL,
  `source` enum('discovery','guest_invitation','other') DEFAULT 'discovery',
  `first_booking_id` int(10) UNSIGNED DEFAULT NULL,
  `welcome_sent_at` datetime DEFAULT NULL,
  `promo_72h_expires_at` datetime DEFAULT NULL,
  `reminder_sent_at` datetime DEFAULT NULL,
  `j7_email_sent_at` datetime DEFAULT NULL,
  `converted_client_id` int(10) UNSIGNED DEFAULT NULL,
  `converted_at` datetime DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Structure de la table `push_notifications_log`
--

CREATE TABLE `push_notifications_log` (
  `id` int(10) UNSIGNED NOT NULL,
  `title` varchar(100) NOT NULL,
  `body` varchar(255) NOT NULL,
  `url` varchar(500) NOT NULL DEFAULT '',
  `target` varchar(50) NOT NULL DEFAULT 'all',
  `sent` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `failed` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `admin_id` int(10) UNSIGNED DEFAULT NULL,
  `sent_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `push_notifications_log` (`id`, `title`, `body`, `url`, `target`, `sent`, `failed`, `admin_id`, `sent_at`) VALUES
(1, 'test', 'Test', 'https://serveur2test.net/elsa/client/index.php', 'all', 0, 2, 1, '2026-04-01 11:13:41'),
(2, 'test 2', 'test', 'https://serveur2test.net/elsa/client/index.php', 'all', 2, 0, 1, '2026-04-01 11:29:10'),
(3, 'Test', 'Test', 'https://serveur2test.net/elsa/client/index.php', 'all', 2, 0, 1, '2026-04-01 11:41:59'),
(4, 'test', 'test', 'https://serveur2test.net/elsa/client/index.php', 'all', 2, 0, 1, '2026-04-01 11:53:36'),
(5, 'Test notif', 'Ceci est un test', 'https://serveur2test.net/elsa/client/index.php', 'all', 2, 0, 1, '2026-04-01 11:54:04'),
(6, 'Test 2', 'Tets 2', 'https://serveur2test.net/elsa/client/index.php', 'all', 2, 0, 1, '2026-04-01 12:11:25'),
(7, 'Test 2', 'Test', 'https://serveur2test.net/elsa/client/index.php', 'all', 2, 0, 1, '2026-04-01 12:11:44'),
(8, 'Notif', 'Un cours de yoga ce samedi à la plage inscrivez-vous de suite', 'https://serveur2test.net/elsa/client/index.php', 'client:6', 2, 0, 1, '2026-04-01 12:13:21'),
(9, 'Une super nouvelle 🎉', 'J\'ai une super nouvelle pour toi clique 🎉', 'https://serveur2test.net/elsa/client/index.php', 'all', 2, 0, 1, '2026-04-01 12:18:10'),
(10, 'Test', 'Ceci est un test', 'https://serveur2test.net/elsa/client/index.php', 'all', 1, 1, 1, '2026-04-14 12:02:20'),
(11, 'Test', 'Ceci est un cours', 'https://serveur2test.net/elsa/client/index.php', 'client:6', 2, 0, 1, '2026-04-14 12:03:33');

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

--
-- Structure de la table `push_subscriptions`
--

CREATE TABLE `push_subscriptions` (
  `id` int(10) UNSIGNED NOT NULL,
  `client_id` int(10) UNSIGNED NOT NULL,
  `endpoint` text NOT NULL,
  `p256dh` varchar(255) NOT NULL,
  `auth` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `push_subscriptions` (`id`, `client_id`, `endpoint`, `p256dh`, `auth`, `created_at`, `updated_at`) VALUES
(2, 6, 'https://web.push.apple.com/QH3STk1h5Im5_BPKTcWMtRtICYe7btpWXcwk12Zpz5CPM9wTPnwVxv-fJx9KQZWYXjVcxCZS3rrSdTHx1DZp0z064vLULBjojOFe-nb98nB3G0PflRlyiMRMzKuNl5qEhS36RJndBsaMQGxBTsc1i4Wr4w5d-nZMhNfBhrU_s3E', 'BHprun8ktGhVh4kdZ0Ks6A65--Axo5Y5UcPafRWGKAbc3wFlTIkBrW5x1AUdfkbMxExklZ_cJAl0ddN7xfb9BGs', '4gd2fTiUVc54uklzBg777Q', '2026-04-01 11:13:14', '2026-04-01 17:16:09'),
(3, 6, 'https://fcm.googleapis.com/fcm/send/dR5v3Rw88kk:APA91bGNRxsvaMeWObtuqTPnh89bKxxLxRgHO712W9lvHam9LU7F5vOzT-15lzkuAsppngN0ejURIxNJy_Zq6fC4u77_v4JCsTLRV3dnd_ZtO35SjOCcWJ5IQnWsvOTkuipIYKzL8cfj', 'BG2sXR6CvT-7ux7pIpI9nnpTMdkjNxFx-clMVG3177GfG5qzNzEOld8VxdnaCX1NFAATLfU_NOSFNOvstpRIoC4', 'EdqWPpbxY8bXBIP_Pzn9cw', '2026-04-14 12:03:09', '2026-04-14 12:03:09'),
(4, 6, 'https://fcm.googleapis.com/fcm/send/dqvISYKaGFk:APA91bGL1Olj41ztN0FgFem_7AGHdcWSISjzxSnulA045utKYo6ks2FX3Ckb309qlRGjZ1gpN7FaSLORDaBE6300y2w4XYNAZmZYeypKB0kNYq_OVMZAVitZaUD_R6WnN4mMfOtLNsLn', 'BOq-XPtehRawGoggBfrayqq_2SFZdhrrf4_QI8ZyX2_dsbtEyC5xoTnPRmT2J_CDq57iR1TGXdVaqBiZ5eDVs5k', 'ovdNZbwsbQxSQMWvIL5IpQ', '2026-04-21 16:02:54', '2026-04-21 19:32:12'),
(5, 1, 'https://fcm.googleapis.com/fcm/send/d0RTDmtg5Hs:APA91bE2UJtY3CR2emacm6NqRv_vWoluS98tAwdP6c6x7LY6VNizMipmKNhpByRh09bqDLXPjam8M4uDzCqdScRAjaiRMLh6r1LdLNiPAm62sBgmoLitMZCMnjrcyGmvmFcxAv4vO9kX', 'BGgEQAIscCZ7oPr6JooOpOfQ-jOCBA8J88jUjA6rYNJvof3jmYWw9eSsaSKf8mR8PAXcmGSjig40AbbOSx0BHoM', 'rAwmM3SoCsU6W38l21dPzw', '2026-05-21 14:45:12', '2026-05-29 12:38:48'),
(6, 2, 'https://fcm.googleapis.com/fcm/send/d0RTDmtg5Hs:APA91bE2UJtY3CR2emacm6NqRv_vWoluS98tAwdP6c6x7LY6VNizMipmKNhpByRh09bqDLXPjam8M4uDzCqdScRAjaiRMLh6r1LdLNiPAm62sBgmoLitMZCMnjrcyGmvmFcxAv4vO9kX', 'BGgEQAIscCZ7oPr6JooOpOfQ-jOCBA8J88jUjA6rYNJvof3jmYWw9eSsaSKf8mR8PAXcmGSjig40AbbOSx0BHoM', 'rAwmM3SoCsU6W38l21dPzw', '2026-05-21 15:36:29', '2026-05-21 15:53:22'),
(7, 3, 'https://fcm.googleapis.com/fcm/send/d0RTDmtg5Hs:APA91bE2UJtY3CR2emacm6NqRv_vWoluS98tAwdP6c6x7LY6VNizMipmKNhpByRh09bqDLXPjam8M4uDzCqdScRAjaiRMLh6r1LdLNiPAm62sBgmoLitMZCMnjrcyGmvmFcxAv4vO9kX', 'BGgEQAIscCZ7oPr6JooOpOfQ-jOCBA8J88jUjA6rYNJvof3jmYWw9eSsaSKf8mR8PAXcmGSjig40AbbOSx0BHoM', 'rAwmM3SoCsU6W38l21dPzw', '2026-05-29 13:08:20', '2026-05-29 13:08:20');

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

--
-- Structure de la table `schedule_exceptions`
--

CREATE TABLE `schedule_exceptions` (
  `id` int(10) UNSIGNED NOT NULL,
  `studio_id` int(10) UNSIGNED DEFAULT NULL,
  `exception_type` enum('closure','modification') NOT NULL DEFAULT 'closure',
  `date_start` date NOT NULL,
  `date_end` date NOT NULL,
  `title` varchar(200) DEFAULT NULL,
  `description` mediumtext DEFAULT NULL,
  `weekly_schedule_id` int(10) UNSIGNED DEFAULT NULL,
  `replacement_class_type_id` int(10) UNSIGNED DEFAULT NULL,
  `replacement_teacher_id` int(10) UNSIGNED DEFAULT NULL,
  `replacement_start_time` time DEFAULT NULL,
  `replacement_end_time` time DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Structure de la table `settings`
--

CREATE TABLE `settings` (
  `id` int(10) UNSIGNED NOT NULL,
  `setting_key` varchar(100) NOT NULL,
  `setting_value` mediumtext DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `settings` (`id`, `setting_key`, `setting_value`, `updated_at`) VALUES
(1, 'studio_name', 'Elsa Pilates Yoga', '2026-05-05 08:35:27'),
(2, 'cancellation_hours_refund', '24', '2026-03-27 08:28:09'),
(3, 'cancellation_hours_no_refund', '6', '2026-03-27 08:28:09'),
(4, 'credit_low_threshold', '2', '2026-03-27 08:28:09'),
(5, 'stripe_public_key', 'pk_test_Hn2Y4821ZNpnWiqsxe3sVYNh', '2026-03-27 08:28:34'),
(6, 'stripe_secret_key', 'sk_test_ZcXqPwxUquU8Yx1FonDBnscy00SLqB4oy5', '2026-03-27 08:28:34'),
(7, 'gocardless_access_token', 'live_8UtuTWR7H0jY8_YhhtpcYeDUCq5cbusDq-usC9dB', '2026-03-27 08:28:46'),
(8, 'gocardless_environment', 'live', '2026-03-27 08:28:46'),
(9, 'currency', 'EUR', '2026-03-27 08:28:09'),
(10, 'timezone', 'Europe/Paris', '2026-03-27 08:28:09'),
(11, 'guest_price', '15.00', '2026-03-27 08:28:09'),
(12, 'guest_free_per_month', '2', '2026-03-27 08:28:09'),
(13, 'expiry_warning_days', '7', '2026-03-27 08:28:09'),
(20, 'vapid_public_key', 'BOXSTYub9f7z9i0UmL_cYSejZKuB50-4UfOB9xFSLc7al3zDKCjrEYK4InTGPpV3xrwIJ8YE8JH2ujtObHqV3Qc', '2026-04-01 08:46:54'),
(21, 'vapid_private_key', 'i8-6qT7hDEl157dRFHAr0DhkmrvtmkmEa5FJgZHDc1E', '2026-04-01 08:46:54'),
(29, 'booking_custom_message', '✨ Planning spécial vacances', '2026-04-28 10:10:31'),
(30, 'home_content', 'Ceci est un texte personnalisé 😟', '2026-04-21 16:44:59'),
(76, 'logo_dark_bg_path', 'assets/uploads/logo_dark_bg-1779366428.webp', '2026-05-21 12:27:08'),
(77, 'logo_light_bg_path', 'assets/uploads/logo_light_bg-1779366428.webp', '2026-05-21 12:27:08'),
(78, 'giftcard_pdf_template', 'assets/uploads/giftcard-template-1779369392.pdf', '2026-05-21 13:16:32'),
(79, 'giftcard_pdf_coords', '{\"recipient\":{\"x\":105,\"y\":72.7000000000000028421709430404007434844970703125,\"width\":180,\"font_size\":22,\"align\":\"C\"},\"message\":{\"x\":26.10000000000000142108547152020037174224853515625,\"y\":96,\"width\":170,\"font_size\":12,\"line_height\":6},\"code\":{\"x\":122.2999999999999971578290569595992565155029296875,\"y\":198.099999999999994315658113919198513031005859375,\"width\":180,\"font_size\":16},\"qr\":{\"x\":41.2000000000000028421709430404007434844970703125,\"y\":184.5,\"size\":40},\"amount\":{\"x\":149,\"y\":213,\"width\":180,\"font_size\":28,\"align\":\"C\"}}', '2026-05-21 13:15:34');

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

--
-- Structure de la table `studios`
--

CREATE TABLE `studios` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(150) NOT NULL,
  `address_line1` varchar(255) DEFAULT NULL,
  `address_line2` varchar(255) DEFAULT NULL,
  `postal_code` varchar(20) DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `country` varchar(100) DEFAULT 'France',
  `latitude` decimal(10,7) DEFAULT NULL,
  `longitude` decimal(10,7) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `studios` (`id`, `name`, `address_line1`, `address_line2`, `postal_code`, `city`, `country`, `latitude`, `longitude`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'Pilates & Yoga à St Pierre (sur tapis)', '15 rue de la Paix', '', '75002', 'Paris', 'France', 48.8698000, 2.3304000, 1, '2026-03-27 08:28:10', '2026-04-28 09:36:56'),
(2, 'Pilates & Yoga à St Leu (sur tapis & en extérieur)', '42 rue des Francs-Bourgeois', '', '75003', 'Paris', 'France', 48.8567000, 2.3618000, 1, '2026-03-27 08:28:10', '2026-04-28 09:37:28'),
(3, 'Studio Reformer à St Leu', '', '', '', '', 'France', NULL, NULL, 1, '2026-04-28 09:37:37', '2026-05-29 10:35:09');

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

--
-- Structure de la table `teacher_billing_rules`
--

CREATE TABLE `teacher_billing_rules` (
  `id` int(10) UNSIGNED NOT NULL,
  `teacher_id` int(10) UNSIGNED NOT NULL,
  `class_type_id` int(10) UNSIGNED NOT NULL,
  `billing_type` enum('hourly','fixed') NOT NULL DEFAULT 'hourly',
  `hourly_rate` decimal(8,2) DEFAULT NULL,
  `fixed_rate_under_9` decimal(8,2) DEFAULT NULL,
  `fixed_rate_9plus` decimal(8,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `teacher_billing_rules` (`id`, `teacher_id`, `class_type_id`, `billing_type`, `hourly_rate`, `fixed_rate_under_9`, `fixed_rate_9plus`, `created_at`, `updated_at`) VALUES
(1, 3, 1, 'fixed', 50.00, 50.00, 54.97, '2026-05-29 09:46:06', '2026-05-29 09:49:27'),
(2, 3, 6, 'hourly', 50.00, NULL, NULL, '2026-05-29 09:48:45', '2026-05-29 09:48:45'),
(3, 3, 2, 'hourly', 50.00, NULL, NULL, '2026-05-29 09:48:45', '2026-05-29 09:48:45'),
(4, 3, 5, 'hourly', 50.00, NULL, NULL, '2026-05-29 09:48:45', '2026-05-29 09:48:45'),
(5, 3, 4, 'hourly', 50.00, NULL, NULL, '2026-05-29 09:48:45', '2026-05-29 09:48:45'),
(6, 3, 3, 'hourly', 50.00, NULL, NULL, '2026-05-29 09:48:45', '2026-05-29 09:48:45');

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

--
-- Structure de la table `upcoming_payments`
--

CREATE TABLE `upcoming_payments` (
  `id` int(10) UNSIGNED NOT NULL,
  `client_id` int(10) UNSIGNED NOT NULL,
  `client_purchase_id` int(10) UNSIGNED NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `scheduled_date` date NOT NULL,
  `status` enum('scheduled','processing','paid','failed','cancelled') DEFAULT 'scheduled',
  `gocardless_payment_id` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Structure de la table `weekly_schedule`
--

CREATE TABLE `weekly_schedule` (
  `id` int(10) UNSIGNED NOT NULL,
  `studio_id` int(10) UNSIGNED NOT NULL,
  `class_type_id` int(10) UNSIGNED NOT NULL,
  `teacher_id` int(10) UNSIGNED NOT NULL,
  `day_of_week` tinyint(3) UNSIGNED NOT NULL,
  `start_time` time NOT NULL,
  `end_time` time NOT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

INSERT INTO `weekly_schedule` (`id`, `studio_id`, `class_type_id`, `teacher_id`, `day_of_week`, `start_time`, `end_time`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, 1, '09:00:00', '10:00:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(2, 1, 3, 2, 1, '10:15:00', '11:15:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(3, 1, 2, 1, 1, '12:15:00', '13:15:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(4, 1, 5, 3, 1, '18:00:00', '19:00:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(5, 1, 3, 2, 2, '09:00:00', '10:00:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(6, 1, 1, 1, 2, '10:15:00', '11:15:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(7, 1, 4, 3, 2, '18:00:00', '19:00:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(8, 1, 2, 1, 3, '09:00:00', '10:00:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(9, 1, 3, 2, 3, '12:15:00', '13:15:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(10, 1, 1, 3, 3, '18:00:00', '19:00:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(11, 1, 4, 3, 4, '09:00:00', '10:00:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(12, 1, 1, 1, 4, '10:15:00', '11:15:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(13, 1, 5, 2, 4, '18:00:00', '19:00:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(14, 1, 3, 2, 5, '09:00:00', '10:00:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(15, 1, 2, 1, 5, '10:15:00', '11:15:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(16, 1, 1, 1, 6, '09:30:00', '10:30:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(17, 1, 3, 2, 6, '10:45:00', '11:45:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(18, 2, 1, 3, 1, '09:00:00', '10:00:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(19, 2, 4, 2, 1, '18:30:00', '19:30:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(20, 2, 3, 2, 3, '09:00:00', '10:00:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(21, 2, 1, 3, 3, '18:30:00', '19:30:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(22, 2, 2, 1, 5, '09:00:00', '10:00:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(23, 2, 5, 3, 5, '18:30:00', '19:30:00', 1, '2026-03-27 08:28:10', '2026-03-27 08:28:10'),
(25, 3, 7, 3, 3, '12:00:00', '13:00:00', 1, '2026-05-29 10:36:01', '2026-05-29 10:36:01');

--
-- Index pour la table `cart_items`
--
ALTER TABLE `cart_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `client_id` (`client_id`),
  ADD KEY `offer_id` (`offer_id`);

--
-- Index pour la table `class_sessions`
--
ALTER TABLE `class_sessions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_session` (`weekly_schedule_id`,`session_date`),
  ADD KEY `studio_id` (`studio_id`),
  ADD KEY `class_type_id` (`class_type_id`),
  ADD KEY `teacher_id` (`teacher_id`);

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

--
-- Index pour la table `class_type_offers`
--
ALTER TABLE `class_type_offers`
  ADD PRIMARY KEY (`class_type_id`,`offer_id`),
  ADD KEY `offer_id` (`offer_id`);

--
-- Index pour la table `class_type_studio_capacity`
--
ALTER TABLE `class_type_studio_capacity`
  ADD PRIMARY KEY (`class_type_id`,`studio_id`),
  ADD KEY `studio_id` (`studio_id`);

--
-- Index pour la table `client_purchases`
--
ALTER TABLE `client_purchases`
  ADD PRIMARY KEY (`id`),
  ADD KEY `client_id` (`client_id`),
  ADD KEY `offer_id` (`offer_id`);

--
-- Index pour la table `contacts`
--
ALTER TABLE `contacts`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_phone` (`phone`,`phone_country_code`),
  ADD KEY `client_id` (`client_id`),
  ADD KEY `created_by_client_id` (`created_by_client_id`);

--
-- Index pour la table `credit_history`
--
ALTER TABLE `credit_history`
  ADD PRIMARY KEY (`id`),
  ADD KEY `client_id` (`client_id`),
  ADD KEY `client_purchase_id` (`client_purchase_id`),
  ADD KEY `booking_id` (`booking_id`);

--
-- Index pour la table `gift_cards`
--
ALTER TABLE `gift_cards`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `code` (`code`),
  ADD KEY `idx_code` (`code`),
  ADD KEY `idx_buyer` (`buyer_email`);

--
-- Index pour la table `gift_card_redemptions`
--
ALTER TABLE `gift_card_redemptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_card` (`gift_card_id`),
  ADD KEY `idx_client` (`client_id`);

--
-- Index pour la table `health_questionnaires`
--
ALTER TABLE `health_questionnaires`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_client` (`client_id`),
  ADD KEY `idx_status` (`status`);

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

--
-- Index pour la table `payments`
--
ALTER TABLE `payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `client_id` (`client_id`),
  ADD KEY `client_purchase_id` (`client_purchase_id`);

--
-- Index pour la table `payment_alerts`
--
ALTER TABLE `payment_alerts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `client_id` (`client_id`),
  ADD KEY `client_purchase_id` (`client_purchase_id`);

--
-- Index pour la table `prospect_emails`
--
ALTER TABLE `prospect_emails`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_email` (`email`);

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

--
-- Index pour la table `push_subscriptions`
--
ALTER TABLE `push_subscriptions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uq_client_endpoint` (`client_id`,`endpoint`(255)),
  ADD KEY `idx_client` (`client_id`);

--
-- Index pour la table `schedule_exceptions`
--
ALTER TABLE `schedule_exceptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `studio_id` (`studio_id`),
  ADD KEY `weekly_schedule_id` (`weekly_schedule_id`),
  ADD KEY `replacement_class_type_id` (`replacement_class_type_id`),
  ADD KEY `replacement_teacher_id` (`replacement_teacher_id`);

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

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

--
-- Index pour la table `teacher_billing_rules`
--
ALTER TABLE `teacher_billing_rules`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_teacher_class` (`teacher_id`,`class_type_id`);

--
-- Index pour la table `upcoming_payments`
--
ALTER TABLE `upcoming_payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `client_id` (`client_id`),
  ADD KEY `client_purchase_id` (`client_purchase_id`);

--
-- Index pour la table `weekly_schedule`
--
ALTER TABLE `weekly_schedule`
  ADD PRIMARY KEY (`id`),
  ADD KEY `studio_id` (`studio_id`),
  ADD KEY `class_type_id` (`class_type_id`),
  ADD KEY `teacher_id` (`teacher_id`);

--
-- AUTO_INCREMENT pour la table `cart_items`
--
ALTER TABLE `cart_items`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;

--
-- AUTO_INCREMENT pour la table `class_sessions`
--
ALTER TABLE `class_sessions`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=312;

--
-- AUTO_INCREMENT pour la table `class_types`
--
ALTER TABLE `class_types`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT pour la table `client_purchases`
--
ALTER TABLE `client_purchases`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT pour la table `contacts`
--
ALTER TABLE `contacts`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT pour la table `credit_history`
--
ALTER TABLE `credit_history`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT pour la table `gift_cards`
--
ALTER TABLE `gift_cards`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT pour la table `gift_card_redemptions`
--
ALTER TABLE `gift_card_redemptions`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT pour la table `health_questionnaires`
--
ALTER TABLE `health_questionnaires`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT pour la table `offers`
--
ALTER TABLE `offers`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT pour la table `payments`
--
ALTER TABLE `payments`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT pour la table `payment_alerts`
--
ALTER TABLE `payment_alerts`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT pour la table `prospect_emails`
--
ALTER TABLE `prospect_emails`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `push_notifications_log`
--
ALTER TABLE `push_notifications_log`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT pour la table `push_subscriptions`
--
ALTER TABLE `push_subscriptions`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT pour la table `schedule_exceptions`
--
ALTER TABLE `schedule_exceptions`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT pour la table `settings`
--
ALTER TABLE `settings`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=88;

--
-- AUTO_INCREMENT pour la table `studios`
--
ALTER TABLE `studios`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT pour la table `teacher_billing_rules`
--
ALTER TABLE `teacher_billing_rules`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT pour la table `upcoming_payments`
--
ALTER TABLE `upcoming_payments`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT pour la table `weekly_schedule`
--
ALTER TABLE `weekly_schedule`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- Contraintes pour la table `cart_items`
--
ALTER TABLE `cart_items`
  ADD CONSTRAINT `cart_items_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `cart_items_ibfk_2` FOREIGN KEY (`offer_id`) REFERENCES `offers` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `class_sessions`
--
ALTER TABLE `class_sessions`
  ADD CONSTRAINT `class_sessions_ibfk_1` FOREIGN KEY (`weekly_schedule_id`) REFERENCES `weekly_schedule` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `class_sessions_ibfk_2` FOREIGN KEY (`studio_id`) REFERENCES `studios` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `class_sessions_ibfk_3` FOREIGN KEY (`class_type_id`) REFERENCES `class_types` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `class_sessions_ibfk_4` FOREIGN KEY (`teacher_id`) REFERENCES `teachers` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `class_type_offers`
--
ALTER TABLE `class_type_offers`
  ADD CONSTRAINT `class_type_offers_ibfk_1` FOREIGN KEY (`class_type_id`) REFERENCES `class_types` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `class_type_offers_ibfk_2` FOREIGN KEY (`offer_id`) REFERENCES `offers` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `class_type_studio_capacity`
--
ALTER TABLE `class_type_studio_capacity`
  ADD CONSTRAINT `class_type_studio_capacity_ibfk_1` FOREIGN KEY (`class_type_id`) REFERENCES `class_types` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `class_type_studio_capacity_ibfk_2` FOREIGN KEY (`studio_id`) REFERENCES `studios` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `client_purchases`
--
ALTER TABLE `client_purchases`
  ADD CONSTRAINT `client_purchases_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `client_purchases_ibfk_2` FOREIGN KEY (`offer_id`) REFERENCES `offers` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `contacts`
--
ALTER TABLE `contacts`
  ADD CONSTRAINT `contacts_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `contacts_ibfk_2` FOREIGN KEY (`created_by_client_id`) REFERENCES `clients` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `credit_history`
--
ALTER TABLE `credit_history`
  ADD CONSTRAINT `credit_history_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `credit_history_ibfk_2` FOREIGN KEY (`client_purchase_id`) REFERENCES `client_purchases` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `credit_history_ibfk_3` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `payments`
--
ALTER TABLE `payments`
  ADD CONSTRAINT `payments_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `payments_ibfk_2` FOREIGN KEY (`client_purchase_id`) REFERENCES `client_purchases` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `payment_alerts`
--
ALTER TABLE `payment_alerts`
  ADD CONSTRAINT `payment_alerts_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `payment_alerts_ibfk_2` FOREIGN KEY (`client_purchase_id`) REFERENCES `client_purchases` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `schedule_exceptions`
--
ALTER TABLE `schedule_exceptions`
  ADD CONSTRAINT `schedule_exceptions_ibfk_1` FOREIGN KEY (`studio_id`) REFERENCES `studios` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `schedule_exceptions_ibfk_2` FOREIGN KEY (`weekly_schedule_id`) REFERENCES `weekly_schedule` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `schedule_exceptions_ibfk_3` FOREIGN KEY (`replacement_class_type_id`) REFERENCES `class_types` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `schedule_exceptions_ibfk_4` FOREIGN KEY (`replacement_teacher_id`) REFERENCES `teachers` (`id`) ON DELETE SET NULL;

--
-- Contraintes pour la table `upcoming_payments`
--
ALTER TABLE `upcoming_payments`
  ADD CONSTRAINT `upcoming_payments_ibfk_1` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `upcoming_payments_ibfk_2` FOREIGN KEY (`client_purchase_id`) REFERENCES `client_purchases` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la table `weekly_schedule`
--
ALTER TABLE `weekly_schedule`
  ADD CONSTRAINT `weekly_schedule_ibfk_1` FOREIGN KEY (`studio_id`) REFERENCES `studios` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `weekly_schedule_ibfk_2` FOREIGN KEY (`class_type_id`) REFERENCES `class_types` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `weekly_schedule_ibfk_3` FOREIGN KEY (`teacher_id`) REFERENCES `teachers` (`id`) ON DELETE CASCADE;
COMMIT;

