-- https://www.phpmyadmin.net/
--
-- Erstellungszeit: 15. Dez 2025 um 01:22
-- Server-Version: 8.0.42-33
-- PHP-Version: 7.2.34

START TRANSACTION;



--
-- Datenbank: `db_376260_43`
--

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

--
-- Tabellenstruktur für Tabelle `broadcasts`
--

CREATE TABLE `broadcasts` (
  `id` int NOT NULL,
  `moderator_id` int DEFAULT NULL,
  `broadcast_date` date NOT NULL,
  `start_time` time NOT NULL,
  `end_time` time DEFAULT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'Unbekannte Sendung',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `image_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `wunschbox_enabled` tinyint(1) DEFAULT '0',
  `wunschbox` tinyint(1) NOT NULL DEFAULT '0',
  `description_color` varchar(7) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '#ffffff',
  `time_limit_enabled` tinyint(1) NOT NULL DEFAULT '0',
  `time_limit_minutes` int NOT NULL DEFAULT '20'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Daten für Tabelle `broadcasts`
--

INSERT INTO `broadcasts` (`id`, `moderator_id`, `broadcast_date`, `start_time`, `end_time`, `title`, `description`, `image_path`, `wunschbox_enabled`, `wunschbox`, `description_color`, `time_limit_enabled`, `time_limit_minutes`) VALUES
(2, 9, '2025-12-14', '00:00:00', '02:00:00', 'Die Nachteulen Party', 'Party für alle Nachteulen ', NULL, 0, 0, '#ffffff', 0, 20),
(4, 36, '2025-12-14', '10:00:00', '13:00:00', 'Die Morning Show', 'Musik am Dritten Advent', 'vorlagen/morgen1.gif', 1, 0, '#ffffff', 0, 20),
(5, 36, '2025-12-14', '18:00:00', '20:00:00', 'Musik am Abend', 'Besinliche Weihnachtsmusik', NULL, 1, 0, '#ffffff', 0, 20);

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

--
-- Tabellenstruktur für Tabelle `broadcasts_archive`
--

CREATE TABLE `broadcasts_archive` (
  `id` int NOT NULL,
  `moderator_id` int NOT NULL,
  `broadcast_date` date NOT NULL,
  `start_time` time NOT NULL,
  `end_time` time NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Daten für Tabelle `broadcasts_archive`
--

INSERT INTO `broadcasts_archive` (`id`, `moderator_id`, `broadcast_date`, `start_time`, `end_time`, `title`, `created_at`) VALUES
(1, 12, '2025-12-14', '18:00:00', '20:00:00', 'Am Abend die schönste Musik', '2025-12-14 07:41:24'),
(2, 9, '2025-12-14', '00:00:00', '02:00:00', 'Die Nachteulen Party', '2025-12-14 07:41:24'),
(4, 36, '2025-12-14', '10:00:00', '12:00:00', 'Die Morning Show', '2025-12-14 09:55:36'),
(655, 0, '2025-12-14', '09:04:06', '09:04:06', 'Statistik wurde komplett geleert - 34 Einträge gelöscht', '2025-12-14 08:04:06');

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

--
-- Tabellenstruktur für Tabelle `moderator_categories`
--

CREATE TABLE `moderator_categories` (
  `id` int NOT NULL,
  `name` varchar(100) COLLATE utf8mb4_general_ci NOT NULL,
  `sort_order` int DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Daten für Tabelle `moderator_categories`
--

INSERT INTO `moderator_categories` (`id`, `name`, `sort_order`, `created_at`) VALUES
(1, 'Rathaus', 1, '2025-12-13 11:47:34'),
(2, 'Trallajaner', 2, '2025-12-13 11:47:34'),
(3, 'Ehren-Hörer', 4, '2025-12-13 11:47:34'),
(4, 'Unvergessen', 5, '2025-12-13 11:50:58'),
(5, 'Duo Moderatoren', 3, '2025-12-14 05:59:04');

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

--
-- Tabellenstruktur für Tabelle `moderator_notes`
--

CREATE TABLE `moderator_notes` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Daten für Tabelle `moderator_notes`
--

INSERT INTO `moderator_notes` (`id`, `user_id`, `note`, `created_at`) VALUES
(1, 1, 'Ihr könnt jetzt während der Sendung die Wunschbox ausschalten. Bitte nach der Sendung die Wunschbox wieder starten wenn ihr sie gestoppt habt!!! ACHTUNG wenn ihr eine Sendung eintragt und diese um 0:00 endet, tragt sendungs ende 23:59 ein...das wichtig sonst wird sie nicht angezeigt!!!      Ihr Lieben, ihr könnt jetzt das Blasenspiel selber starten und Stoppen. Den Highscore könnt ihr nach jedem spiel wieder löschen wenn ihr wollt. Viel spass.', '2025-07-26 12:22:59');

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

--
-- Tabellenstruktur für Tabelle `settings`
--

CREATE TABLE `settings` (
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Daten für Tabelle `settings`
--

INSERT INTO `settings` (`name`, `value`) VALUES
('wunschbox_disabled', '0');

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

--
-- Tabellenstruktur für Tabelle `wishes`
--

CREATE TABLE `wishes` (
  `id` int NOT NULL,
  `visitor_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `music_wish` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `timestamp` datetime DEFAULT CURRENT_TIMESTAMP,
  `greeting` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `greetings` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Tabellenstruktur für Tabelle `wishes_archive`
--

CREATE TABLE `wishes_archive` (
  `id` int NOT NULL,
  `visitor_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `artist` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `greeting` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Daten für Tabelle `wishes_archive`
--

INSERT INTO `wishes_archive` (`id`, `visitor_name`, `artist`, `title`, `created_at`, `ip_address`, `greeting`) VALUES
(1, 'ich', 'du', 'kein', '2025-12-14 07:34:32', '2a02:908:956:7be0:544f:9994:77eb:277d', NULL),
(2, 'Mutchatcho', 'Peter Maffay', 'Alter Mann', '2025-12-14 10:07:54', '2a02:908:956:7be0:544f:9994:77eb:277d', NULL),
(3, 'Mutchatcho', 'test', 'test', '2025-12-14 10:09:05', '2a02:908:956:7be0:544f:9994:77eb:277d', NULL),
(4, 'Svenni', 'Olaf Henning', 'Was macht der Weihnachtsmann im Sommer', '2025-12-14 10:14:21', '2a02:908:4b21:e1c0:d512:e21e:159d:104c', NULL),
(5, 'Svenni', 'Udo Mc Muff & Kreisligalegende feat. Ikke Hüftgold', 'Eine Muh, eine Mäh', '2025-12-14 10:25:46', '2a02:908:4b21:e1c0:d512:e21e:159d:104c', NULL),
(6, 'Svenni', 'Mickie Krause & Cindy aus Mahrzahn', 'Una Paloma Blanca', '2025-12-14 10:34:30', '2a02:908:4b21:e1c0:d512:e21e:159d:104c', NULL),
(7, 'Schnegge', 'Wham', 'Last christmas', '2025-12-14 10:43:53', '2a02:908:956:7be0:917a:edbe:a75b:a663', NULL),
(8, 'Svenni', 'Costa Cordlis', 'Steig in das Boot heute nacht, Anna Lena', '2025-12-14 10:47:34', '2a02:908:4b21:e1c0:d512:e21e:159d:104c', NULL),
(9, 'Michi', 'Shantallica', 'Wir in Bielefeld', '2025-12-14 10:56:07', '2003:6:3184:ddd4:50cf:4213:ea88:60fe', NULL),
(10, 'Samira', 'Wolfgang Petry', 'Wir sind das Ruhrgebiet', '2025-12-14 11:10:52', '2a02:a46a:7bb7:0:7195:59dc:c003:30a9', NULL),
(11, 'Svenni', 'Safri Duo', 'Played-a-live', '2025-12-14 11:21:53', '2a02:908:4b21:e1c0:d512:e21e:159d:104c', NULL),
(12, 'Svenni', 'DJ Ötzi', 'My Bonnie is over the Ocean', '2025-12-14 11:35:51', '2a02:908:4b21:e1c0:d512:e21e:159d:104c', NULL),
(13, 'Svenni', 'Alan Jackson', 'Chattahoochee', '2025-12-14 11:37:31', '2a02:908:4b21:e1c0:d512:e21e:159d:104c', NULL),
(14, 'Svenni', 'Udo Jürgens', 'Merry Christmas allerseits', '2025-12-14 18:06:15', '2a02:908:4b21:e1c0:d512:e21e:159d:104c', NULL),
(15, 'Svenni', 'Die Toten Hosen', 'The Little Drummer Boy', '2025-12-14 18:08:26', '2a02:908:4b21:e1c0:d512:e21e:159d:104c', NULL),
(16, 'Svenni', 'Puhdys', 'Dezembernächte', '2025-12-14 18:13:24', '2a02:908:4b21:e1c0:d512:e21e:159d:104c', NULL),
(17, 'Svenni', 'Otto Waalkes', 'Single Bells - Fröhliche Weihnachten!', '2025-12-14 18:24:47', '2a02:908:4b21:e1c0:d512:e21e:159d:104c', NULL),
(18, 'Svenni', 'Elvis Presley', 'Silent Night (Official Audio)', '2025-12-14 18:37:22', '2a02:908:4b21:e1c0:d512:e21e:159d:104c', NULL),
(19, 'Svenni', 'Cher', 'DJ Play a Christmas Song', '2025-12-14 18:38:49', '2a02:908:4b21:e1c0:d512:e21e:159d:104c', NULL);

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

--
-- Tabellenstruktur für Tabelle `wunschbox_config`
--

CREATE TABLE `wunschbox_config` (
  `id` int NOT NULL,
  `time_limit_enabled` tinyint(1) NOT NULL DEFAULT '0',
  `time_limit_minutes` int NOT NULL DEFAULT '20'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Daten für Tabelle `wunschbox_config`
--

INSERT INTO `wunschbox_config` (`id`, `time_limit_enabled`, `time_limit_minutes`) VALUES
(1, 0, 20);

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

--
-- Tabellenstruktur für Tabelle `yearly_stats`
--

CREATE TABLE `yearly_stats` (
  `id` int NOT NULL,
  `moderator_id` int NOT NULL,
  `username` varchar(100) NOT NULL,
  `anzahl_sendungen` int DEFAULT '0',
  `gesamt_sendezeit` time DEFAULT '00:00:00',
  `stat_year` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Daten für Tabelle `yearly_stats`
--

INSERT INTO `yearly_stats` (`id`, `moderator_id`, `username`, `anzahl_sendungen`, `gesamt_sendezeit`, `stat_year`) VALUES
(159, 2, 'Mutchatcho', 0, '00:00:00', 2025),
(160, 4, 'Samira2222', 0, '00:00:00', 2025),
(161, 7, 'Schnegge', 0, '00:00:00', 2025),
(162, 8, 'Trucker', 0, '00:00:00', 2025),
(163, 9, 'Sandy', 1, '02:00:00', 2025),
(164, 10, 'City-Duo', 0, '00:00:00', 2025),
(165, 11, 'Maus62', 0, '00:00:00', 2025),
(166, 13, 'Blacky', 0, '00:00:00', 2025),
(167, 14, 'Wutti', 0, '00:00:00', 2025),
(168, 15, 'Die Aybis', 0, '00:00:00', 2025),
(169, 16, 'Aybiman', 0, '00:00:00', 2025),
(170, 17, 'Aybi', 0, '00:00:00', 2025),
(171, 18, 'Flash', 0, '00:00:00', 2025),
(172, 19, 'Svenni', 0, '00:00:00', 2025),
(173, 20, 'Madita', 0, '00:00:00', 2025),
(174, 21, 'CircaJAbisNein', 0, '00:00:00', 2025),
(175, 22, 'DartBaer', 0, '00:00:00', 2025),
(176, 23, 'Extic', 0, '00:00:00', 2025),
(177, 24, 'Stream-Jumper', 0, '00:00:00', 2025),
(178, 25, 'Das Chaotische Duo', 0, '00:00:00', 2025),
(179, 26, 'Florian', 0, '00:00:00', 2025),
(180, 27, 'Pad', 0, '00:00:00', 2025),
(181, 28, 'Michi', 0, '00:00:00', 2025),
(182, 29, 'Geister-Hörer', 0, '00:00:00', 2025),
(183, 30, 'Frosch', 0, '00:00:00', 2025),
(184, 31, 'Daydream', 0, '00:00:00', 2025),
(185, 32, 'Zaubermaus', 0, '00:00:00', 2025),
(186, 33, 'King Elvis', 0, '00:00:00', 2025),
(187, 34, 'TrallaKitty', 0, '00:00:00', 2025),
(188, 35, 'Geburtstags-Jumper', 0, '00:00:00', 2025),
(189, 36, 'Campino', 1, '02:00:00', 2025),
(190, 38, 'Teefax', 0, '00:00:00', 2025);

--
-- Indizes der exportierten Tabellen
--

--
-- Indizes für die Tabelle `broadcasts`
--
ALTER TABLE `broadcasts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `moderator_id` (`moderator_id`);

--
-- Indizes für die Tabelle `broadcasts_archive`
--
ALTER TABLE `broadcasts_archive`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `id` (`id`);

--
-- Indizes für die Tabelle `moderator_categories`
--
ALTER TABLE `moderator_categories`
  ADD PRIMARY KEY (`id`);

--
-- Indizes für die Tabelle `moderator_notes`
--
ALTER TABLE `moderator_notes`
  ADD PRIMARY KEY (`id`);

--
-- Indizes für die Tabelle `settings`
--
ALTER TABLE `settings`
  ADD PRIMARY KEY (`name`);

--
-- Indizes für die Tabelle `wishes`
--
ALTER TABLE `wishes`
  ADD PRIMARY KEY (`id`);

--
-- Indizes für die Tabelle `wishes_archive`
--
ALTER TABLE `wishes_archive`
  ADD PRIMARY KEY (`id`);

--
-- Indizes für die Tabelle `wunschbox_config`
--
ALTER TABLE `wunschbox_config`
  ADD PRIMARY KEY (`id`);

--
-- Indizes für die Tabelle `yearly_stats`
--
ALTER TABLE `yearly_stats`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_stat` (`moderator_id`,`stat_year`);

--
-- AUTO_INCREMENT für exportierte Tabellen
--

--
-- AUTO_INCREMENT für Tabelle `broadcasts`
--
ALTER TABLE `broadcasts`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT für Tabelle `broadcasts_archive`
--
ALTER TABLE `broadcasts_archive`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=656;

--
-- AUTO_INCREMENT für Tabelle `moderator_categories`
--
ALTER TABLE `moderator_categories`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT für Tabelle `moderator_notes`
--
ALTER TABLE `moderator_notes`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT für Tabelle `wishes`
--
ALTER TABLE `wishes`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT für Tabelle `wishes_archive`
--
ALTER TABLE `wishes_archive`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT für Tabelle `wunschbox_config`
--
ALTER TABLE `wunschbox_config`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT für Tabelle `yearly_stats`
--
ALTER TABLE `yearly_stats`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=222;

--
-- Constraints der exportierten Tabellen
--

--
-- Constraints der Tabelle `broadcasts`
--
ALTER TABLE `broadcasts`
  ADD CONSTRAINT `broadcasts_ibfk_1` FOREIGN KEY (`moderator_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
COMMIT;

