-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 24, 2025 at 10:20 PM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12

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


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

--
-- Database: `freestyle_db`
--

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

--
-- Table structure for table `bib_assignments`
--

CREATE TABLE `bib_assignments` (
  `id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `participant_id` int(11) NOT NULL,
  `bib_number` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `bib_series`
--

CREATE TABLE `bib_series` (
  `id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `color` varchar(20) DEFAULT NULL,
  `start_number` int(11) NOT NULL,
  `end_number` int(11) NOT NULL,
  `missing_numbers` text DEFAULT NULL,
  `additional_numbers` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `bib_series`
--

INSERT INTO `bib_series` (`id`, `event_id`, `name`, `color`, `start_number`, `end_number`, `missing_numbers`, `additional_numbers`, `created_at`) VALUES
(1, 3, 'Niebieskie', '#007BFF', 1, 150, '100', '155', '2025-07-27 09:48:19'),
(8, 3, 'Sprzęt DJ ski', '#28A745', 160, 250, '', '', '2025-07-27 10:02:29'),
(13, 4, 'Sprzęt DJ ski', '#003366', 1, 500, '', '', '2025-07-28 00:44:11'),
(14, 3, 'Miksery', '#DC3545', 251, 350, '', '', '2025-07-28 12:00:39');

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

--
-- Table structure for table `budgets`
--

CREATE TABLE `budgets` (
  `id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  `balance` decimal(10,2) DEFAULT 0.00,
  `total_purchased` decimal(10,2) DEFAULT 0.00,
  `total_spent` decimal(10,2) DEFAULT 0.00,
  `currency` varchar(3) DEFAULT 'USD',
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `user_id` int(11) DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `budgets`
--

INSERT INTO `budgets` (`id`, `group_id`, `balance`, `total_purchased`, `total_spent`, `currency`, `is_active`, `created_at`, `updated_at`, `user_id`, `created_by`) VALUES
(1, 1, 1154.00, 100.00, 0.00, 'USD', 1, '2025-08-16 02:01:42', '2025-08-18 23:46:29', NULL, NULL),
(2, 2, 100.00, 100.00, 0.00, 'USD', 1, '2025-08-16 02:01:42', '2025-08-16 02:01:42', NULL, NULL),
(3, 3, 100.00, 100.00, 0.00, 'USD', 1, '2025-08-16 02:01:42', '2025-08-16 02:01:42', NULL, NULL),
(4, 4, 100.00, 100.00, 0.00, 'USD', 1, '2025-08-16 02:01:42', '2025-08-16 02:01:42', NULL, NULL),
(5, 5, 372.01, 100.00, 0.00, 'USD', 1, '2025-08-16 02:01:42', '2025-08-18 21:03:54', NULL, NULL),
(18, 0, 5.00, 0.00, 0.00, 'USD', 1, '2025-08-18 22:34:53', '2025-08-18 22:34:53', 14, 1),
(21, 2, 200.00, 0.00, 0.00, 'USD', 1, '2025-08-18 22:36:15', '2025-08-18 22:36:15', NULL, 1),
(22, 0, 150.00, 0.00, 0.00, 'USD', 1, '2025-08-18 22:36:57', '2025-08-18 22:36:57', 1, 1),
(23, 3, 300.00, 0.00, 0.00, 'USD', 1, '2025-08-18 22:36:57', '2025-08-18 22:36:57', NULL, NULL),
(24, 7, 40.00, 0.00, 0.00, 'USD', 1, '2025-08-18 22:51:54', '2025-08-18 22:51:54', NULL, 1),
(25, 6, 123.00, 123.00, 0.00, 'USD', 1, '2025-08-18 23:10:53', '2025-08-18 23:10:53', NULL, 1);

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

--
-- Table structure for table `events`
--

CREATE TABLE `events` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `date` date DEFAULT NULL,
  `location` varchar(255) DEFAULT NULL,
  `scoring_mode` enum('average','best','total') DEFAULT 'average',
  `scoring_format` varchar(50) NOT NULL,
  `runs_per_heat` int(11) DEFAULT 2,
  `heats_total` int(11) DEFAULT 1,
  `sport_discipline` varchar(100) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `max_participants` int(11) DEFAULT NULL,
  `age_limit` varchar(50) NOT NULL DEFAULT 'None',
  `entry_fee` decimal(10,2) DEFAULT NULL,
  `contact_email` varchar(255) DEFAULT NULL,
  `contact_phone` varchar(50) DEFAULT NULL,
  `registration_deadline` date DEFAULT NULL,
  `status` enum('draft','open','closed','completed','live') DEFAULT 'open',
  `owner_group_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `events`
--

INSERT INTO `events` (`id`, `name`, `date`, `location`, `scoring_mode`, `scoring_format`, `runs_per_heat`, `heats_total`, `sport_discipline`, `description`, `max_participants`, `age_limit`, `entry_fee`, `contact_email`, `contact_phone`, `registration_deadline`, `status`, `owner_group_id`) VALUES
(3, 'Hocki Klocki', '2025-07-28', 'Kraków', 'best', 'snowboard_big_air_best_two', 3, 4, 'snowboard', '', 0, 'None', 0.00, '', '', '0000-00-00', 'live', NULL),
(4, 'Puchar Osiałka', '2025-09-30', 'Kraków', 'best', 'freeski_big_air_best_two', 3, 2, 'freeski', '', 50, 'None', 0.00, '', '', '2025-07-29', 'draft', NULL),
(5, 'septy', '2025-08-22', 'Kraków', 'best', 'snowboard_slopestyle_sections_oi', 2, 2, 'snowboard', '', 0, 'None', 0.00, '', '', '0000-00-00', 'draft', NULL);

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

--
-- Table structure for table `event_categories`
--

CREATE TABLE `event_categories` (
  `id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `category_name` varchar(100) NOT NULL,
  `start_year` int(11) DEFAULT NULL,
  `end_year` int(11) DEFAULT NULL,
  `gender` enum('M','F','open') DEFAULT 'open',
  `requires_fis_number` tinyint(1) DEFAULT 0,
  `requires_licence_number` tinyint(1) DEFAULT 0,
  `is_main_category` tinyint(1) DEFAULT 0,
  `use_for_ranking` tinyint(1) DEFAULT 0,
  `country_rule` enum('all','include','exclude') DEFAULT 'all',
  `country_codes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`country_codes`)),
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `event_categories`
--

INSERT INTO `event_categories` (`id`, `event_id`, `category_name`, `start_year`, `end_year`, `gender`, `requires_fis_number`, `requires_licence_number`, `is_main_category`, `use_for_ranking`, `country_rule`, `country_codes`, `created_at`, `updated_at`) VALUES
(1, 3, 'testowa - senior men', 1983, 2005, 'M', 0, 0, 1, 1, 'all', '[]', '2025-08-06 16:48:00', '2025-08-08 09:20:43'),
(3, 3, 'testowa - senior female', 1983, 2005, 'F', 0, 0, 1, 1, 'all', '[]', '2025-08-06 16:52:33', '2025-08-08 09:20:35'),
(9, 3, 'Chłopcy junor', 2006, NULL, 'M', 0, 0, 1, 1, 'all', '[]', '2025-08-06 17:56:59', '2025-08-10 23:36:38'),
(10, 3, 'Dziewczynki junior', 2006, NULL, 'F', 0, 0, 1, 1, 'all', '[]', '2025-08-06 17:57:15', '2025-08-10 23:32:26'),
(11, 3, 'Dziewczynki FIS', NULL, NULL, 'F', 1, 0, 0, 1, 'all', '[]', '2025-08-11 09:43:33', '2025-08-11 09:43:33');

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

--
-- Table structure for table `event_control_points`
--

CREATE TABLE `event_control_points` (
  `id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `control_point_name` varchar(100) NOT NULL,
  `description` text DEFAULT NULL,
  `sort_order` int(11) DEFAULT 0,
  `is_active` tinyint(1) DEFAULT 1,
  `weight` varchar(250) DEFAULT NULL,
  `status` tinyint(4) NOT NULL DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `event_control_points`
--

INSERT INTO `event_control_points` (`id`, `event_id`, `control_point_name`, `description`, `sort_order`, `is_active`, `weight`, `status`, `created_at`, `updated_at`) VALUES
(1, 3, 'Jump 1', '', 1, 1, '1.0', 1, '2025-08-06 15:22:24', '2025-08-15 02:25:07'),
(2, 3, 'Bula pierwsza', '', 2, 1, '0.8', 1, '2025-08-06 15:24:01', '2025-08-15 02:25:12');

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

--
-- Table structure for table `event_heat_settings`
--

CREATE TABLE `event_heat_settings` (
  `id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `heat_number` int(11) NOT NULL,
  `heat_name` varchar(255) DEFAULT NULL,
  `scoring_type` enum('Points','Time','Style') DEFAULT 'Points',
  `runs_count` int(11) DEFAULT 1,
  `runs_scoring_method` varchar(50) DEFAULT 'best_from_all',
  `time_start` time DEFAULT NULL,
  `estimate_time_per_participant` int(11) DEFAULT 0,
  `categories` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`categories`)),
  `flow_type` enum('none','promotion','qualifying') NOT NULL DEFAULT 'none',
  `flow_source_heat` int(11) DEFAULT NULL,
  `flow_participants_per_category` int(11) NOT NULL DEFAULT 0,
  `is_active` tinyint(1) DEFAULT 0,
  `active_run` int(11) DEFAULT 1,
  `bib_on_start` int(11) DEFAULT NULL,
  `bib_latest_on_run` int(11) DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `format_name` varchar(255) DEFAULT NULL COMMENT 'Heat-specific format name override',
  `discipline` varchar(100) DEFAULT NULL COMMENT 'Sport discipline for this heat',
  `difficulty_level` varchar(50) DEFAULT NULL COMMENT 'Difficulty level',
  `course_length` int(11) DEFAULT 0 COMMENT 'Course length in meters',
  `time_limit` int(11) DEFAULT 0 COMMENT 'Time limit per run in seconds',
  `weather_dependent` tinyint(1) DEFAULT 0 COMMENT 'Whether heat is weather dependent',
  `format_description` text DEFAULT NULL COMMENT 'Detailed format description',
  `scoring_method` varchar(100) DEFAULT 'standard' COMMENT 'Scoring method',
  `required_figures` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'JSON array of required figures' CHECK (json_valid(`required_figures`)),
  `judges_required` int(11) DEFAULT 5 COMMENT 'Number of judges required',
  `scale_min` decimal(5,2) DEFAULT 0.00 COMMENT 'Minimum score value',
  `scale_max` decimal(5,2) DEFAULT 100.00 COMMENT 'Maximum score value',
  `precision_decimal` int(11) DEFAULT 0 COMMENT 'Number of decimal places for scores'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `event_heat_settings`
--

INSERT INTO `event_heat_settings` (`id`, `event_id`, `heat_number`, `heat_name`, `scoring_type`, `runs_count`, `runs_scoring_method`, `time_start`, `estimate_time_per_participant`, `categories`, `flow_type`, `flow_source_heat`, `flow_participants_per_category`, `is_active`, `active_run`, `bib_on_start`, `bib_latest_on_run`, `updated_at`, `created_at`, `format_name`, `discipline`, `difficulty_level`, `course_length`, `time_limit`, `weather_dependent`, `format_description`, `scoring_method`, `required_figures`, `judges_required`, `scale_min`, `scale_max`, `precision_decimal`) VALUES
(112, 4, 1, 'Kwalifikacje 1', 'Points', 1, 'best_from_all', NULL, 0, NULL, 'none', NULL, 0, 0, 1, NULL, NULL, '2025-08-15 13:14:17', '2025-08-08 12:02:40', 'Freeski – Big Air (Best 2)', 'freeski', NULL, 0, 0, 0, NULL, 'standard', NULL, 5, 0.00, 100.00, 0),
(113, 4, 2, 'Półfinał 1', 'Points', 1, 'best_from_all', NULL, 0, NULL, 'none', NULL, 0, 0, 1, NULL, NULL, '2025-08-15 13:14:17', '2025-08-08 12:02:40', 'Freeski – Big Air (Best 2)', 'freeski', NULL, 0, 0, 0, NULL, 'standard', NULL, 5, 0.00, 100.00, 0),
(114, 3, 1, 'Kwalifikacje - Junior', 'Points', 3, 'best_from_3', '04:00:00', 125, '[\"9\",\"10\"]', 'none', NULL, 0, 1, 1, 10, 6, '2025-08-24 16:24:21', '2025-08-08 12:02:40', 'Snowboard – Big Air (Best 2)', 'snowboard_freestyle', 'intermediate', 0, 0, 0, '', 'standard', '\"\"', 6, 0.00, 100.00, 0),
(115, 3, 2, 'Finał - Junior', 'Points', 2, 'best_from_all', '05:50:00', 80, '[\"9\",\"10\"]', 'promotion', 1, 8, 0, 0, NULL, 7, '2025-08-18 08:18:19', '2025-08-08 12:02:40', 'Snowboard – Big Air (Best 2)', 'snowboard', NULL, 0, 0, 0, NULL, 'standard', NULL, 5, 0.00, 100.00, 0),
(116, 3, 3, 'Kwalifikacje - senior 2', 'Points', 2, 'best_from_2', '06:00:00', 0, '[\"3\",\"1\"]', 'none', NULL, 0, 0, 0, NULL, NULL, '2025-08-20 08:48:13', '2025-08-08 12:02:40', 'Snowboard – Big Air (Best 2)', '', '', 0, 0, 0, '', 'standard', '\"\"', 5, 0.00, 100.00, 0),
(120, 3, 4, 'Finał - Senior', 'Points', 3, 'best_from_3', '07:00:00', 0, '[\"3\",\"1\"]', 'promotion', 3, 25, 0, 0, NULL, NULL, '2025-08-15 13:14:17', '2025-08-08 12:02:40', 'Snowboard – Big Air (Best 2)', 'snowboard', NULL, 0, 0, 0, NULL, 'standard', NULL, 5, 0.00, 100.00, 0),
(127, 4, 3, 'Wielki finał', 'Points', 1, 'best_from_all', NULL, 0, NULL, 'none', NULL, 0, 0, 1, NULL, NULL, '2025-08-15 13:14:17', '2025-08-08 12:02:40', 'Freeski – Big Air (Best 2)', 'freeski', NULL, 0, 0, 0, NULL, 'standard', NULL, 5, 0.00, 100.00, 0),
(196, 3, 5, 'Super finał Junior', 'Points', 2, 'best_from_2', '00:00:00', 0, '[\"9\",\"10\"]', 'promotion', 2, 5, 0, 0, NULL, 6, '2025-08-15 13:14:17', '2025-08-08 12:02:40', 'Snowboard – Big Air (Best 2)', 'snowboard', NULL, 0, 0, 0, NULL, 'standard', NULL, 5, 0.00, 100.00, 0),
(197, 3, 6, 'Super finał - senior', 'Points', 1, 'single_run', '00:00:00', 0, '[\"3\",\"1\"]', 'promotion', 4, 5, 0, 0, NULL, NULL, '2025-08-15 13:14:17', '2025-08-08 12:02:40', 'Snowboard – Big Air (Best 2)', 'snowboard', NULL, 0, 0, 0, NULL, 'standard', NULL, 5, 0.00, 100.00, 0);

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

--
-- Table structure for table `event_notifications`
--

CREATE TABLE `event_notifications` (
  `id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `type` enum('success','danger','warning','info') DEFAULT 'info',
  `category` enum('general','competition','participant','judge','system','heat','scoring','technical') DEFAULT 'general',
  `title` varchar(255) NOT NULL,
  `message` text DEFAULT NULL,
  `user_id` varchar(100) DEFAULT 'system',
  `data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`data`)),
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `event_notifications`
--

INSERT INTO `event_notifications` (`id`, `event_id`, `type`, `category`, `title`, `message`, `user_id`, `data`, `created_at`) VALUES
(165, 4, 'success', 'participant', 'Test: Participant #42 Ready', 'Participant #42 (John Doe) please report to the start area.', 'test_admin', '{}', '2025-08-23 00:35:34'),
(166, 4, 'info', 'scoring', 'Test: Score Update', 'Participant #15 scored 8.5 points from Judge #2.', 'test_admin', '{}', '2025-08-23 00:35:40'),
(167, 4, 'info', 'general', 'sda', 'sad', 'admin_admin', NULL, '2025-08-23 00:35:48'),
(169, 4, 'info', 'general', 'gfhf', 'hfgh', 'admin_admin', NULL, '2025-08-23 00:36:13'),
(170, 4, 'info', 'general', 'gfhf', 'hfgh', 'admin_admin', NULL, '2025-08-23 00:39:25'),
(171, 4, 'info', 'general', 'fsdf', 'fds', 'admin_admin', NULL, '2025-08-23 00:39:29'),
(172, 4, 'success', 'general', 'fsadsa', 'saddas', 'admin_admin', NULL, '2025-08-23 00:39:36'),
(173, 4, 'info', 'general', 'Test Info Notification', 'This is a test general notification.', 'test_admin', '{}', '2025-08-23 00:39:48'),
(174, 4, 'success', 'participant', 'Test: Participant #42 Ready', 'Participant #42 (John Doe) please report to the start area.', 'test_admin', '{}', '2025-08-23 00:39:49'),
(175, 4, 'warning', 'heat', 'Test Warning Notification', 'This is a test heat notification.', 'test_admin', '{}', '2025-08-23 00:39:50'),
(176, 4, 'info', 'scoring', 'Test: Score Update', 'Participant #15 scored 8.5 points from Judge #2.', 'test_admin', '{}', '2025-08-23 00:39:51'),
(177, 4, 'danger', 'heat', 'Test: Heat #3 Alert', 'Heat #3 requires immediate attention from judges.', 'test_admin', '{}', '2025-08-23 00:39:53'),
(178, 4, 'success', 'participant', 'Test: Participant #42 Ready', 'Participant #42 (John Doe) please report to the start area.', 'test_admin', '{}', '2025-08-23 00:39:54'),
(179, 4, 'info', 'scoring', 'Test: Score Update', 'Participant #15 scored 8.5 points from Judge #2.', 'test_admin', '{}', '2025-08-23 00:39:55'),
(180, 4, 'success', 'participant', 'Test: Participant #42 Ready', 'Participant #42 (John Doe) please report to the start area.', 'test_admin', '{}', '2025-08-23 00:41:06'),
(181, 4, 'success', 'participant', 'Test: Participant #42 Ready', 'Participant #42 (John Doe) please report to the start area.', 'admin_admin', NULL, '2025-08-23 00:41:13'),
(194, 4, 'success', 'participant', 'Test: Participant #42 Ready', 'Participant #42 (John Doe) please report to the start area.', 'admin_admin', NULL, '2025-08-23 00:47:47'),
(199, 4, 'info', 'scoring', 'Test: Score Update', 'Participant #15 scored 8.5 points from Judge #2.', 'admin_admin', NULL, '2025-08-23 00:49:39'),
(266, 3, 'danger', 'system', '🚨 EMERGENCY STOP', 'Competition has been immediately stopped - all activities halted', 'user_1755912273460', '{\"type\":\"emergency_stop\"}', '2025-08-23 01:34:18'),
(267, 3, 'success', 'heat', '🔥 Heat 1 Activated', 'Run 1 is now active and competition is live', 'user_1755912273460', '{\"type\":\"heat_activated\",\"heat\":\"1\",\"run\":\"1\"}', '2025-08-23 01:34:30'),
(268, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #10 Melania Siebert', 'user_1755912273460', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 01:36:43'),
(269, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755912273460', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 01:36:45'),
(270, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755912273460', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 01:37:08'),
(271, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #6 Nela Madziar', 'user_1755912273460', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-23 01:37:12'),
(272, 3, 'info', 'participant', '⏭️ Next Participant Ready', '#5 Dorota Pezda is now next in queue', 'user_1755912273460', '{\"type\":\"next_participant\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 01:37:31'),
(273, 3, 'warning', 'participant', '🚀 Participant #55 Started', 'Rafał Gadzała has begun their performance', 'user_1755912273460', '{\"type\":\"participant_started\",\"bib\":\"55\",\"name\":\"Rafał Gadzała\"}', '2025-08-23 01:37:43'),
(274, 3, 'warning', 'participant', '🚀 Participant #55 Started', 'Rafał Gadzała has begun their performance', 'user_1755912273460', '{\"type\":\"participant_started\",\"bib\":\"55\",\"name\":\"Rafał Gadzała\"}', '2025-08-23 01:38:37'),
(275, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #55 to #5 Dorota Pezda', 'user_1755912273460', '{\"type\":\"auto_advance\",\"from_bib\":\"55\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 01:38:47'),
(276, 3, 'warning', 'participant', '🚀 Participant #53 Started', 'Jerzy Dorobek has begun their performance', 'user_1755912273460', '{\"type\":\"participant_started\",\"bib\":\"53\",\"name\":\"Jerzy Dorobek\"}', '2025-08-23 01:39:09'),
(277, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #53 to #10 Melania Siebert', 'user_1755912273460', '{\"type\":\"auto_advance\",\"from_bib\":\"53\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 01:41:18'),
(278, 3, 'warning', 'participant', '🚀 Participant #55 Started', 'Rafał Gadzała has begun their performance', 'user_1755912273460', '{\"type\":\"participant_started\",\"bib\":\"55\",\"name\":\"Rafał Gadzała\"}', '2025-08-23 01:41:29'),
(279, 3, 'info', 'participant', '⏭️ Next Participant Ready', '#10 Melania Siebert is now next in queue', 'user_1755912273460', '{\"type\":\"next_participant\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 01:42:10'),
(280, 3, 'warning', 'participant', '🚀 Participant #55 Started', 'Rafał Gadzała has begun their performance', 'user_1755913747140', '{\"type\":\"participant_started\",\"bib\":\"55\",\"name\":\"Rafał Gadzała\"}', '2025-08-23 01:49:57'),
(281, 3, 'info', 'participant', '🏁 Participant #10 On Start', 'Melania Siebert is now on the starting line', 'user_1755913747140', '{\"type\":\"participant_on_start\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 01:50:52'),
(282, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755913747140', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 01:50:57'),
(283, 3, 'info', 'participant', '🏁 Participant #5 On Start', 'Dorota Pezda is now on the starting line', 'user_1755913747140', '{\"type\":\"participant_on_start\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 01:51:28'),
(284, 3, 'info', 'participant', '🏁 Participant #10 On Start', 'Melania Siebert is now on the starting line', 'user_1755913747140', '{\"type\":\"participant_on_start\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 01:51:31'),
(285, 3, 'info', 'participant', '🏁 Participant #5 On Start', 'Dorota Pezda is now on the starting line', 'user_1755913747140', '{\"type\":\"participant_on_start\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 01:51:32'),
(286, 3, 'info', 'participant', '🏁 Participant #10 On Start', 'Melania Siebert is now on the starting line', 'user_1755913747140', '{\"type\":\"participant_on_start\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 01:51:33'),
(287, 3, 'info', 'participant', '🏁 Participant #5 On Start', 'Dorota Pezda is now on the starting line', 'user_1755913747140', '{\"type\":\"participant_on_start\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 01:51:34'),
(288, 3, 'info', 'participant', '🏁 Participant #10 On Start', 'Melania Siebert is now on the starting line', 'user_1755913747140', '{\"type\":\"participant_on_start\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 01:51:35'),
(289, 3, 'info', 'participant', '🏁 Participant #5 On Start', 'Dorota Pezda is now on the starting line', 'user_1755913747140', '{\"type\":\"participant_on_start\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 01:51:35'),
(290, 3, 'info', 'participant', '🏁 Participant #10 On Start', 'Melania Siebert is now on the starting line', 'user_1755913747140', '{\"type\":\"participant_on_start\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 01:51:36'),
(291, 3, 'info', 'participant', '🏁 Participant #5 On Start', 'Dorota Pezda is now on the starting line', 'user_1755913747140', '{\"type\":\"participant_on_start\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 01:51:37'),
(292, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755913747140', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 01:51:41'),
(293, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755914362792', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 01:59:47'),
(294, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755914362792', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:00:38'),
(295, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755914362792', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:00:58'),
(296, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1755914362792', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 02:00:58'),
(297, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755914362792', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 02:01:09'),
(298, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755914362792', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 02:01:28'),
(299, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755914362792', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 02:02:29'),
(300, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755914362792', '{\"type\":\"participant_completed\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 02:04:33'),
(301, 3, 'info', 'participant', '⏭️ Next Participant Ready', '#10 Melania Siebert is now next in queue', 'user_1755914362792', '{\"type\":\"next_participant\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 02:05:02'),
(302, 3, 'info', 'participant', '🏁 Participant #10 On Start', 'Melania Siebert is now on the starting line', 'user_1755914362792', '{\"type\":\"participant_on_start\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 02:05:12'),
(303, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755914362792', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:05:14'),
(304, 3, 'success', 'heat', '🔥 Heat 1 Activated', 'Run 1 is now active and competition is live', 'user_1755914362792', '{\"type\":\"heat_activated\",\"heat\":\"1\",\"run\":\"1\"}', '2025-08-23 02:06:05'),
(305, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #6 Nela Madziar', 'user_1755914808263', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-23 02:07:39'),
(306, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755914808263', '{\"type\":\"participant_completed\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-23 02:07:40'),
(307, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #5 Dorota Pezda', 'user_1755914808263', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 02:07:40'),
(308, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755914808263', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 02:07:41'),
(309, 3, 'info', 'participant', '🏁 Participant #9 On Start', 'Marika Wikło is now on the starting line', 'user_1755914808263', '{\"type\":\"participant_on_start\",\"bib\":9,\"name\":\"Marika Wikło\"}', '2025-08-23 02:07:55'),
(310, 3, 'info', 'participant', '🏁 Participant #12 On Start', 'ZUZANNA SIELAŻCZYK is now on the starting line', 'user_1755914808263', '{\"type\":\"participant_on_start\",\"bib\":12,\"name\":\"ZUZANNA SIELAŻCZYK\"}', '2025-08-23 02:08:06'),
(311, 3, 'info', 'participant', '🏁 Participant #9 On Start', 'Marika Wikło is now on the starting line', 'user_1755915205518', '{\"type\":\"participant_on_start\",\"bib\":9,\"name\":\"Marika Wikło\"}', '2025-08-23 02:13:36'),
(312, 3, 'warning', 'participant', '🚀 Participant #6 Started', 'Nela Madziar has begun their performance', 'user_1755915224791', '{\"type\":\"participant_started\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-23 02:14:03'),
(313, 3, 'warning', 'participant', '🚀 Participant #8 Started', 'ZOFIA MAMROWICZ has begun their performance', 'user_1755915381369', '{\"type\":\"participant_started\",\"bib\":\"8\",\"name\":\"ZOFIA MAMROWICZ\"}', '2025-08-23 02:16:43'),
(314, 3, 'info', 'participant', '🏁 Participant #11 On Start', 'Monika Maruszczyk is now on the starting line', 'user_1755915381369', '{\"type\":\"participant_on_start\",\"bib\":11,\"name\":\"Monika Maruszczyk\"}', '2025-08-23 02:16:53'),
(315, 3, 'info', 'participant', '🏁 Participant #8 On Start', 'ZOFIA MAMROWICZ is now on the starting line', 'user_1755915576896', '{\"type\":\"participant_on_start\",\"bib\":8,\"name\":\"ZOFIA MAMROWICZ\"}', '2025-08-23 02:19:52'),
(316, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755915806866', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 02:24:05'),
(317, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755915806866', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 02:24:13'),
(318, 3, 'success', 'heat', '🔥 Heat 1 Activated', 'Run 1 is now active and competition is live', 'user_1755915806866', '{\"type\":\"heat_activated\",\"heat\":\"1\",\"run\":\"1\"}', '2025-08-23 02:24:14'),
(319, 3, 'info', 'participant', '🏁 Participant #6 On Start', 'Nela Madziar is now on the starting line', 'user_1755915806866', '{\"type\":\"participant_on_start\",\"bib\":6,\"name\":\"Nela Madziar\"}', '2025-08-23 02:24:55'),
(320, 3, 'success', 'participant', '🏆 Participant #8 Completed', 'ZOFIA MAMROWICZ has finished their run', 'user_1755915944099', '{\"type\":\"participant_completed\",\"bib\":\"8\",\"name\":\"ZOFIA MAMROWICZ\"}', '2025-08-23 02:26:33'),
(321, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #8 to #10 Melania Siebert', 'user_1755915944099', '{\"type\":\"auto_advance\",\"from_bib\":\"8\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 02:26:33'),
(322, 3, 'warning', 'participant', '🚀 Participant #6 Started', 'Nela Madziar has begun their performance', 'user_1755916044794', '{\"type\":\"participant_started\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-23 02:27:55'),
(323, 3, 'success', 'participant', '🏆 Participant #8 Completed', 'ZOFIA MAMROWICZ has finished their run', 'user_1755916044794', '{\"type\":\"participant_completed\",\"bib\":8,\"name\":\"ZOFIA MAMROWICZ\"}', '2025-08-23 02:28:10'),
(324, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755916044794', '{\"type\":\"participant_completed\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-23 02:28:20'),
(325, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #10 Melania Siebert', 'user_1755916044794', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 02:28:20'),
(326, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755916044794', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:28:27'),
(327, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1755916044794', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 02:28:27'),
(328, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755916044794', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:29:07'),
(329, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755916044794', '{\"type\":\"participant_completed\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 02:29:43'),
(330, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755916044794', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 02:30:01'),
(331, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755916044794', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 02:30:08'),
(332, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755916229248', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 02:31:00'),
(333, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755916229248', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:32:25'),
(334, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755916229248', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:33:04'),
(335, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755916436604', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:34:16'),
(336, 3, 'info', 'participant', '🏁 Participant #6 On Start', 'Nela Madziar is now on the starting line', 'user_1755916470299', '{\"type\":\"participant_on_start\",\"bib\":6,\"name\":\"Nela Madziar\"}', '2025-08-23 02:34:43'),
(337, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755916677473', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:38:04'),
(338, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1755916677473', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 02:38:04'),
(339, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755916691132', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 02:38:17'),
(340, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755916691132', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 02:38:24'),
(341, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755916724980', '{\"type\":\"participant_completed\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 02:38:48'),
(342, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #6 Nela Madziar', 'user_1755916724980', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-23 02:38:48'),
(343, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755916746926', '{\"type\":\"participant_completed\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 02:39:09'),
(344, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755916746926', '{\"type\":\"participant_completed\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 02:39:21'),
(345, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755916767424', '{\"type\":\"participant_completed\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-23 02:39:45'),
(346, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #10 Melania Siebert', 'user_1755916767424', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 02:39:46'),
(347, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755916767424', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:40:17'),
(348, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1755916767424', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 02:40:17'),
(349, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755916767424', '{\"type\":\"participant_completed\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 02:40:18'),
(350, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #6 Nela Madziar', 'user_1755916767424', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-23 02:40:18'),
(351, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755916767424', '{\"type\":\"participant_completed\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-23 02:40:18'),
(352, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #10 Melania Siebert', 'user_1755916767424', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 02:40:18'),
(353, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755916767424', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:40:20'),
(354, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755916767424', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:40:22'),
(355, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755916839214', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:40:56'),
(356, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #5 Dorota Pezda', 'user_1755916839214', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 02:41:23'),
(357, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #6 Nela Madziar', 'user_1755916839214', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-23 02:41:27'),
(358, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #10 Melania Siebert', 'user_1755916839214', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 02:41:29'),
(359, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1755916839214', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 02:41:30'),
(360, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755916839214', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 02:42:36'),
(361, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from # to #6 Nela Madziar', 'user_1755917054487', '{\"type\":\"auto_advance\",\"from_bib\":\"\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-23 02:44:21'),
(362, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #10 Melania Siebert', 'user_1755917054487', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 02:44:22'),
(363, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1755917054487', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 02:44:23'),
(364, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #6 Nela Madziar', 'user_1755917054487', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-23 02:44:23'),
(365, 3, 'warning', 'participant', '🚀 Participant #6 Started', 'Nela Madziar has begun their performance', 'user_1755917054487', '{\"type\":\"participant_started\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-23 02:44:24'),
(366, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755917054487', '{\"type\":\"participant_completed\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-23 02:44:27'),
(367, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #10 Melania Siebert', 'user_1755917054487', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 02:44:27'),
(368, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755917054487', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:44:32'),
(369, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1755917054487', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 02:44:32'),
(370, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755917076275', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 02:44:39'),
(371, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755917076275', '{\"type\":\"participant_completed\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 02:44:46'),
(372, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #6 Nela Madziar', 'user_1755917076275', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-23 02:44:46'),
(373, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755917089233', '{\"type\":\"participant_completed\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 02:44:52'),
(374, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #10 Melania Siebert', 'user_1755917089233', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 02:45:06'),
(375, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755917089233', '{\"type\":\"participant_completed\",\"bib\":6,\"name\":\"Nela Madziar\"}', '2025-08-23 02:45:11'),
(376, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755917118532', '{\"type\":\"participant_completed\",\"bib\":6,\"name\":\"Nela Madziar\"}', '2025-08-23 02:45:33'),
(377, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755917118532', '{\"type\":\"participant_completed\",\"bib\":6,\"name\":\"Nela Madziar\"}', '2025-08-23 02:45:35'),
(378, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755917137441', '{\"type\":\"participant_completed\",\"bib\":6,\"name\":\"Nela Madziar\"}', '2025-08-23 02:45:39'),
(379, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #5 Dorota Pezda', 'user_1755917157974', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 02:46:06'),
(380, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755917157974', '{\"type\":\"participant_completed\",\"bib\":6,\"name\":\"Nela Madziar\"}', '2025-08-23 02:46:09'),
(381, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755917175459', '{\"type\":\"participant_completed\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 02:46:17'),
(382, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #10 Melania Siebert', 'user_1755917175459', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 02:46:17'),
(383, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755917217267', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:47:01'),
(384, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #6 Nela Madziar', 'user_1755917217267', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-23 02:47:01'),
(385, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755917217267', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:47:08'),
(386, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1755917243859', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 02:47:26'),
(387, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #6 Nela Madziar', 'user_1755917260735', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-23 02:49:10'),
(388, 3, 'danger', 'system', '🚨 EMERGENCY STOP', 'Competition has been immediately stopped - all activities halted', 'user_1755917260735', '{\"type\":\"emergency_stop\"}', '2025-08-23 02:49:33'),
(389, 3, 'success', 'heat', '🔥 Heat 1 Activated', 'Run 1 is now active and competition is live', 'user_1755917260735', '{\"type\":\"heat_activated\",\"heat\":\"1\",\"run\":\"1\"}', '2025-08-23 02:49:44'),
(390, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755917523403', '{\"type\":\"participant_completed\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 02:52:30'),
(391, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #10 Melania Siebert', 'user_1755917523403', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 02:53:24'),
(392, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755917523403', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:53:42'),
(393, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1755917523403', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 02:53:42'),
(394, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755917523403', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 02:53:46'),
(395, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755917523403', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 02:53:48'),
(396, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755917668633', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 02:54:56'),
(397, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755917735360', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:55:42'),
(398, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755917735360', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:55:45'),
(399, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755917735360', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:55:49'),
(400, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755917735360', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 02:55:50'),
(401, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755917752242', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:55:56'),
(402, 3, 'danger', 'system', '🚨 EMERGENCY STOP', 'Competition has been immediately stopped - all activities halted', 'user_1755917752242', '{\"type\":\"emergency_stop\"}', '2025-08-23 02:56:03'),
(403, 3, 'success', 'heat', '🔥 Heat 1 Activated', 'Run 1 is now active and competition is live', 'user_1755917752242', '{\"type\":\"heat_activated\",\"heat\":\"1\",\"run\":\"1\"}', '2025-08-23 02:56:12'),
(404, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755917752242', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 02:56:16'),
(405, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from # to #6 Nela Madziar', 'user_1755917752242', '{\"type\":\"auto_advance\",\"from_bib\":\"\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-23 02:56:23'),
(406, 3, 'success', 'heat', '🔥 Heat 1 Activated', 'Run 1 is now active and competition is live', 'user_1755917868521', '{\"type\":\"heat_activated\",\"heat\":\"1\",\"run\":\"1\"}', '2025-08-23 02:57:56'),
(407, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1755917905613', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 02:58:40'),
(408, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #10 Melania Siebert', 'user_1755917905613', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 02:58:45'),
(409, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #6 Nela Madziar', 'user_1755917905613', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-23 02:58:47'),
(410, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755917957182', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 02:59:24'),
(411, 3, 'warning', 'participant', '🚀 Participant #6 Started', 'Nela Madziar has begun their performance', 'user_1755917957182', '{\"type\":\"participant_started\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-23 02:59:42'),
(412, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #10 Melania Siebert', 'user_1755917957182', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 02:59:51'),
(413, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1755917957182', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 02:59:55'),
(414, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755917957182', '{\"type\":\"participant_completed\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:00:48'),
(415, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755918260833', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:04:37'),
(416, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755918260833', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:04:42'),
(417, 3, 'warning', 'participant', '🚀 Participant #6 Started', 'Nela Madziar has begun their performance', 'user_1755918283894', '{\"type\":\"participant_started\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-23 03:04:54'),
(418, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755918283894', '{\"type\":\"participant_completed\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 03:04:56'),
(419, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755918283894', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:05:08'),
(420, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755918283894', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:05:08'),
(421, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from # to #6 Nela Madziar', 'user_1755918283894', '{\"type\":\"auto_advance\",\"from_bib\":\"\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-23 03:05:09'),
(422, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755918283894', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 03:05:13'),
(423, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755918283894', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 03:05:16'),
(424, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755918283894', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:05:23'),
(425, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755918283894', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 03:05:33'),
(426, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755918283894', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 03:05:37'),
(427, 3, 'warning', 'participant', '🚀 Participant #6 Started', 'Nela Madziar has begun their performance', 'user_1755918283894', '{\"type\":\"participant_started\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-23 03:05:39'),
(428, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755918347376', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 03:05:51'),
(429, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755918378304', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 03:06:21'),
(430, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #5 Dorota Pezda', 'user_1755918378304', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 03:06:24'),
(431, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #10 Melania Siebert', 'user_1755918378304', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 03:06:30'),
(432, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #6 Nela Madziar', 'user_1755918378304', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-23 03:06:32'),
(433, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #5 Dorota Pezda', 'user_1755918378304', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 03:06:33'),
(434, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #10 Melania Siebert', 'user_1755918378304', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 03:06:33'),
(435, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755918378304', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:06:35'),
(436, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755918378304', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:06:35'),
(437, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755918419820', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 03:07:33'),
(438, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755918419820', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 03:07:43'),
(439, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755918419820', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 03:08:33'),
(440, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755918419820', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:08:38'),
(441, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from # to #5 Dorota Pezda', 'user_1755918419820', '{\"type\":\"auto_advance\",\"from_bib\":\"\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 03:08:53'),
(442, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755918419820', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:08:56'),
(443, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755918419820', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:08:58'),
(444, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755918419820', '{\"type\":\"participant_completed\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:08:59'),
(445, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755918419820', '{\"type\":\"participant_completed\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 03:09:06'),
(446, 3, 'warning', 'participant', '🚀 Participant #6 Started', 'Nela Madziar has begun their performance', 'user_1755918419820', '{\"type\":\"participant_started\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-23 03:09:21'),
(447, 3, 'warning', 'participant', '🚀 Participant #6 Started', 'Nela Madziar has begun their performance', 'user_1755918419820', '{\"type\":\"participant_started\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-23 03:09:28'),
(448, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755918419820', '{\"type\":\"participant_completed\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-23 03:09:29'),
(449, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #10 Melania Siebert', 'user_1755918419820', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 03:09:29'),
(450, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755918419820', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:09:43'),
(451, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755918419820', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:09:50'),
(452, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755918419820', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:09:52'),
(453, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1755918419820', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 03:09:52'),
(454, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755918419820', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:09:54'),
(455, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755918419820', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:09:57'),
(456, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755918419820', '{\"type\":\"participant_completed\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:09:58'),
(457, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #6 Nela Madziar', 'user_1755918419820', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-23 03:09:58'),
(458, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755918419820', '{\"type\":\"participant_completed\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:10:06'),
(459, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #10 Melania Siebert', 'user_1755918419820', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 03:10:06'),
(460, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755918419820', '{\"type\":\"participant_completed\",\"bib\":6,\"name\":\"Nela Madziar\"}', '2025-08-23 03:10:17'),
(461, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755918419820', '{\"type\":\"participant_completed\",\"bib\":6,\"name\":\"Nela Madziar\"}', '2025-08-23 03:10:19'),
(462, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #5 Dorota Pezda', 'user_1755918419820', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 03:10:23'),
(463, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755918419820', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:10:26'),
(464, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755918419820', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:10:43'),
(465, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755918419820', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:10:46'),
(466, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1755918419820', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 03:10:46'),
(467, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755918419820', '{\"type\":\"participant_completed\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:10:49'),
(468, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #6 Nela Madziar', 'user_1755918419820', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-23 03:10:49'),
(469, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755918419820', '{\"type\":\"participant_completed\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-23 03:10:52'),
(470, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #10 Melania Siebert', 'user_1755918419820', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 03:10:53'),
(471, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755918419820', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:10:54'),
(472, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755918419820', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:11:03');
INSERT INTO `event_notifications` (`id`, `event_id`, `type`, `category`, `title`, `message`, `user_id`, `data`, `created_at`) VALUES
(473, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1755918419820', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 03:11:07'),
(474, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755918419820', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:11:15'),
(475, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755918721081', '{\"type\":\"participant_completed\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:12:06'),
(476, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #6 Nela Madziar', 'user_1755918721081', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-23 03:12:06'),
(477, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755918721081', '{\"type\":\"participant_completed\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-23 03:12:18'),
(478, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #10 Melania Siebert', 'user_1755918721081', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 03:12:18'),
(479, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755918721081', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:13:27'),
(480, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755918721081', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 03:13:39'),
(481, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755918721081', '{\"type\":\"participant_completed\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-23 03:14:15'),
(482, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755919076866', '{\"type\":\"participant_completed\",\"bib\":6,\"name\":\"Nela Madziar\"}', '2025-08-23 03:18:00'),
(483, 3, 'info', 'participant', '🏁 Participant #6 On Start', 'Nela Madziar is now on the starting line', 'user_1755919076866', '{\"type\":\"participant_on_start\",\"bib\":6,\"name\":\"Nela Madziar\"}', '2025-08-23 03:18:06'),
(484, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #5 Dorota Pezda', 'user_1755919076866', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 03:18:25'),
(485, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755919076866', '{\"type\":\"participant_completed\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:18:39'),
(486, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #5 Dorota Pezda', 'user_1755919133316', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 03:19:01'),
(487, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755919133316', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:19:12'),
(488, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755919133316', '{\"type\":\"participant_completed\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:19:20'),
(489, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755919133316', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:19:33'),
(490, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755919133316', '{\"type\":\"participant_completed\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:23:13'),
(491, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755919487246', '{\"type\":\"participant_completed\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 03:24:55'),
(492, 3, 'info', 'participant', '🏁 Participant #10 On Start', 'Melania Siebert is now on the starting line', 'user_1755919487246', '{\"type\":\"participant_on_start\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 03:25:09'),
(493, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #5 Dorota Pezda', 'user_1755919487246', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 03:25:45'),
(494, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755919487246', '{\"type\":\"participant_completed\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 03:25:48'),
(495, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755919487246', '{\"type\":\"participant_completed\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 03:25:50'),
(496, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755919487246', '{\"type\":\"participant_completed\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 03:25:52'),
(497, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755919487246', '{\"type\":\"participant_completed\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 03:26:28'),
(498, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755919487246', '{\"type\":\"participant_completed\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 03:27:01'),
(499, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755919487246', '{\"type\":\"participant_completed\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 03:27:03'),
(500, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755919487246', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 03:27:06'),
(501, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755919487246', '{\"type\":\"participant_completed\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 03:27:42'),
(502, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1755919487246', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 03:27:45'),
(503, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755919814081', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:30:38'),
(504, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755919814081', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 03:31:10'),
(505, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755919897986', '{\"type\":\"participant_completed\",\"bib\":10,\"name\":\"Melania Siebert\"}', '2025-08-23 03:31:45'),
(506, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755919970075', '{\"type\":\"participant_completed\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 03:32:59'),
(507, 3, 'success', 'participant', '🏆 Participant #6 Completed', 'Nela Madziar has finished their run', 'user_1755919970075', '{\"type\":\"participant_completed\",\"bib\":6,\"name\":\"Nela Madziar\"}', '2025-08-23 03:34:00'),
(508, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from # to #5 Dorota Pezda', 'user_1755919970075', '{\"type\":\"auto_advance\",\"from_bib\":\"\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-23 03:35:27'),
(509, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1755919970075', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-23 03:35:29'),
(510, 3, 'success', 'participant', '🏆 Participant #10 Completed', 'Melania Siebert has finished their run', 'user_1755919970075', '{\"type\":\"participant_completed\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:35:29'),
(511, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #10 Melania Siebert', 'user_1755919970075', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-23 03:36:05'),
(512, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1755919970075', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-23 03:36:06'),
(513, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1755919970075', '{\"type\":\"participant_completed\",\"bib\":5,\"name\":\"Dorota Pezda\"}', '2025-08-23 03:36:08'),
(514, 3, 'success', 'judge', '✅ Score Approved', '\r\n            <div class=\"d-flex align-items-center\">\r\n                <div class=\"me-2\">\r\n                    <span class=\"badge bg-primary css-bib fs-7\">#9</span>\r\n                    <strong>Marika Wikło</strong>\r\n                </div>\r\n                <div class=\"ms-auto\">\r\n                    <span class=\"badge bg-success judge_score approved fs-7\"></span>\r\n                </div>\r\n            </div>\r\n        <div class=\"mt-2\"><span class=\"badge approved bg-success judge_score me-1\" title=\"admin\"></span></div>', 'judge_1', '{\"type\":\"score_approval\",\"bib\":9,\"name\":\"Marika Wikło\",\"score\":\"\",\"judge\":\"admin\",\"heat\":1,\"run\":1,\"text_message\":\"#9 Marika Wikło - Score:  approved\",\"all_scores\":[{\"judge\":\"admin\",\"score\":\"\",\"approved\":true}],\"current_result\":null,\"rank_position\":null,\"approved_count\":0,\"total_judges\":1}', '2025-08-23 06:35:49'),
(515, 3, 'success', 'judge', '✅ Score Approved', '\r\n            <div class=\"d-flex align-items-center\">\r\n                <div class=\"me-2\">\r\n                    <span class=\"badge bg-primary css-bib fs-7\">#9</span>\r\n                    <strong>Marika Wikło</strong>\r\n                </div>\r\n                <div class=\"ms-auto\">\r\n                    <span class=\"badge bg-success judge_score approved fs-7\">56.20</span>\r\n                </div>\r\n            </div>\r\n        \r\n                <div class=\"mt-2 d-flex align-items-center\">\r\n                    <small class=\" me-2\">Result:</small>\r\n                    <span class=\"badge bg-warning fs-7\">56.2</span>\r\n            \r\n                    <small class=\" ms-2 me-2\">Rank:</small>\r\n                    <span class=\"badge bg-info fs-7\">#3</span>\r\n                \r\n                    <small class=\" ms-2 me-2\">Progress:</small>\r\n                    <span class=\"badge bg-secondary\">1/1</span>\r\n                </div><div class=\"mt-2\"><span class=\"badge approved bg-success judge_score me-1\" title=\"admin\">56.20</span></div>', 'judge_1', '{\"type\":\"score_approval\",\"bib\":9,\"name\":\"Marika Wikło\",\"score\":\"56.20\",\"judge\":\"admin\",\"heat\":1,\"run\":1,\"text_message\":\"#9 Marika Wikło - Score: 56.20 approved | Result: 56.2 | Rank: #3\",\"all_scores\":[{\"judge\":\"admin\",\"score\":\"56.20\",\"approved\":true}],\"current_result\":56.2,\"rank_position\":3,\"approved_count\":1,\"total_judges\":1}', '2025-08-24 16:17:25'),
(516, 3, 'success', 'judge', '✅ Score Approved', '\r\n            <div class=\"d-flex align-items-center\">\r\n                <div class=\"me-2\">\r\n                    <span class=\"badge bg-primary css-bib fs-7\">#12</span>\r\n                    <strong>ZUZANNA SIELAŻCZYK</strong>\r\n                </div>\r\n                <div class=\"ms-auto\">\r\n                    <span class=\"badge bg-success judge_score approved fs-7\">38.60</span>\r\n                </div>\r\n            </div>\r\n        \r\n                <div class=\"mt-2 d-flex align-items-center\">\r\n                    <small class=\" me-2\">Result:</small>\r\n                    <span class=\"badge bg-warning fs-7\">38.6</span>\r\n            \r\n                    <small class=\" ms-2 me-2\">Rank:</small>\r\n                    <span class=\"badge bg-info fs-7\">#8</span>\r\n                \r\n                    <small class=\" ms-2 me-2\">Progress:</small>\r\n                    <span class=\"badge bg-secondary\">1/1</span>\r\n                </div><div class=\"mt-2\"><span class=\"badge approved bg-success judge_score me-1\" title=\"admin\">38.60</span></div>', 'judge_1', '{\"type\":\"score_approval\",\"bib\":12,\"name\":\"ZUZANNA SIELAŻCZYK\",\"score\":\"38.60\",\"judge\":\"admin\",\"heat\":1,\"run\":1,\"text_message\":\"#12 ZUZANNA SIELAŻCZYK - Score: 38.60 approved | Result: 38.6 | Rank: #8\",\"all_scores\":[{\"judge\":\"admin\",\"score\":\"38.60\",\"approved\":true}],\"current_result\":38.6,\"rank_position\":8,\"approved_count\":1,\"total_judges\":1}', '2025-08-24 16:17:41'),
(517, 3, 'success', 'judge', '✅ Score Approved', '\r\n            <div class=\"d-flex align-items-center\">\r\n                <div class=\"me-2\">\r\n                    <span class=\"badge bg-primary css-bib fs-7\">#6</span>\r\n                    <strong>Nela Madziar</strong>\r\n                </div>\r\n                <div class=\"ms-auto\">\r\n                    <span class=\"badge bg-success judge_score approved fs-7\">51.00</span>\r\n                </div>\r\n            </div>\r\n        \r\n                <div class=\"mt-2 d-flex align-items-center\">\r\n                    <small class=\" me-2\">Result:</small>\r\n                    <span class=\"badge bg-warning fs-7\">51</span>\r\n            \r\n                    <small class=\" ms-2 me-2\">Rank:</small>\r\n                    <span class=\"badge bg-info fs-7\">#5</span>\r\n                \r\n                    <small class=\" ms-2 me-2\">Progress:</small>\r\n                    <span class=\"badge bg-secondary\">1/1</span>\r\n                </div><div class=\"mt-2\"><span class=\"badge approved bg-success judge_score me-1\" title=\"admin\">51.00</span></div>', 'judge_1', '{\"type\":\"score_approval\",\"bib\":6,\"name\":\"Nela Madziar\",\"score\":\"51.00\",\"judge\":\"admin\",\"heat\":1,\"run\":1,\"text_message\":\"#6 Nela Madziar - Score: 51.00 approved | Result: 51 | Rank: #5\",\"all_scores\":[{\"judge\":\"admin\",\"score\":\"51.00\",\"approved\":true}],\"current_result\":51,\"rank_position\":5,\"approved_count\":1,\"total_judges\":1}', '2025-08-24 16:18:14'),
(518, 3, 'success', 'judge', '✅ All Scores Approved', '\r\n            <div class=\"d-flex align-items-center\">\r\n                <div class=\"me-2\">\r\n                    <span class=\"badge bg-primary css-bib\">#6</span>\r\n                    <strong>Nela Madziar</strong>\r\n                </div>\r\n                <div class=\"ms-auto\">\r\n                    <span class=\"badge bg-success\">1 scores</span>\r\n                    <span class=\"badge bg-success ms-1\">✅ ALL</span>\r\n                </div>\r\n            </div>\r\n        \r\n                <div class=\"mt-2 d-flex align-items-center\">\r\n                    <small class=\" me-2\">Final Result:</small>\r\n                    <span class=\"badge bg-warning fs-7\">48</span>\r\n            \r\n                    <small class=\" ms-2 me-2\">Final Rank:</small>\r\n                    <span class=\"badge bg-info fs-7\">#6</span>\r\n                </div><div class=\"mt-2\"><span class=\"badge approved bg-success judge_score me-1\" title=\"admin\">51.00</span><span class=\"badge approved bg-success judge_score me-1\" title=\"eskes\">45.00</span></div>', 'judge_1', '{\"type\":\"bulk_score_approval\",\"bib\":6,\"name\":\"Nela Madziar\",\"count\":1,\"heat\":\"1\",\"run\":\"1\",\"text_message\":\"#6 Nela Madziar - All 1 scores approved | Final: 48 | Rank: #6\",\"all_scores\":[{\"judge\":\"admin\",\"score\":\"51.00\",\"approved\":true},{\"judge\":\"eskes\",\"score\":\"45.00\",\"approved\":true}],\"final_result\":48,\"rank_position\":6,\"total_judges\":2}', '2025-08-24 16:18:32'),
(519, 3, 'success', 'judge', '✅ Score Approved', '\r\n            <div class=\"d-flex align-items-center\">\r\n                <div class=\"me-2\">\r\n                    <span class=\"badge bg-primary css-bib fs-7\">#22</span>\r\n                    <strong>Klara Duczmal</strong>\r\n                </div>\r\n                <div class=\"ms-auto\">\r\n                    <span class=\"badge bg-success judge_score approved fs-7\">DNS</span>\r\n                </div>\r\n            </div>\r\n        <div class=\"mt-2\"><span class=\"badge approved bg-success judge_score me-1\" title=\"admin\">DNS</span></div>', 'judge_1', '{\"type\":\"score_approval\",\"bib\":22,\"name\":\"Klara Duczmal\",\"score\":\"DNS\",\"judge\":\"admin\",\"heat\":1,\"run\":1,\"text_message\":\"#22 Klara Duczmal - Score: DNS approved\",\"all_scores\":[{\"judge\":\"admin\",\"score\":\"DNS\",\"approved\":true}],\"current_result\":null,\"rank_position\":null,\"approved_count\":0,\"total_judges\":1}', '2025-08-24 16:18:52'),
(520, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1756052530358', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-24 16:22:47'),
(521, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1756052530358', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-24 16:22:54'),
(522, 3, 'warning', 'participant', '🚀 Participant #5 Started', 'Dorota Pezda has begun their performance', 'user_1756052530358', '{\"type\":\"participant_started\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-24 16:22:57'),
(523, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #6 Nela Madziar', 'user_1756052587474', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-24 16:23:18'),
(524, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #10 Melania Siebert', 'user_1756052587474', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-24 16:23:18'),
(525, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1756052587474', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-24 16:23:19'),
(526, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #6 Nela Madziar', 'user_1756052587474', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-24 16:23:20'),
(527, 3, 'warning', 'participant', '🚀 Participant #6 Started', 'Nela Madziar has begun their performance', 'user_1756052587474', '{\"type\":\"participant_started\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-24 16:23:22'),
(528, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #10 Melania Siebert', 'user_1756052587474', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-24 16:23:53'),
(529, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1756052587474', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-24 16:23:54'),
(530, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #6 Nela Madziar', 'user_1756052587474', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-24 16:23:54'),
(531, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #10 Melania Siebert', 'user_1756052587474', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-24 16:23:55'),
(532, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #10 to #5 Dorota Pezda', 'user_1756052587474', '{\"type\":\"auto_advance\",\"from_bib\":\"10\",\"to_bib\":5,\"to_name\":\"Dorota Pezda\"}', '2025-08-24 16:23:55'),
(533, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #5 to #6 Nela Madziar', 'user_1756052587474', '{\"type\":\"auto_advance\",\"from_bib\":\"5\",\"to_bib\":6,\"to_name\":\"Nela Madziar\"}', '2025-08-24 16:23:56'),
(534, 3, 'success', 'participant', '🏆 Participant #5 Completed', 'Dorota Pezda has finished their run', 'user_1756052587474', '{\"type\":\"participant_completed\",\"bib\":\"5\",\"name\":\"Dorota Pezda\"}', '2025-08-24 16:24:11'),
(535, 3, 'warning', 'participant', '🚀 Participant #6 Started', 'Nela Madziar has begun their performance', 'user_1756052587474', '{\"type\":\"participant_started\",\"bib\":\"6\",\"name\":\"Nela Madziar\"}', '2025-08-24 16:24:12'),
(536, 3, 'info', 'competition', '⚡ Auto-Advanced', 'Moved from #6 to #10 Melania Siebert', 'user_1756052587474', '{\"type\":\"auto_advance\",\"from_bib\":\"6\",\"to_bib\":10,\"to_name\":\"Melania Siebert\"}', '2025-08-24 16:24:13'),
(537, 3, 'warning', 'participant', '🚀 Participant #10 Started', 'Melania Siebert has begun their performance', 'user_1756052587474', '{\"type\":\"participant_started\",\"bib\":\"10\",\"name\":\"Melania Siebert\"}', '2025-08-24 16:24:14');

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

--
-- Table structure for table `event_notification_settings`
--

CREATE TABLE `event_notification_settings` (
  `id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `poll_interval` int(11) DEFAULT 3000,
  `max_visible_notifications` int(11) DEFAULT 5,
  `notification_duration` int(11) DEFAULT 10,
  `sound_enabled` tinyint(1) DEFAULT 1,
  `auto_dismiss` tinyint(1) DEFAULT 0,
  `show_categories` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '[]' CHECK (json_valid(`show_categories`)),
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `event_notification_settings`
--

INSERT INTO `event_notification_settings` (`id`, `event_id`, `poll_interval`, `max_visible_notifications`, `notification_duration`, `sound_enabled`, `auto_dismiss`, `show_categories`, `created_at`, `updated_at`) VALUES
(1, 3, 5, 5, 14, 1, 0, '\"[]\"', '2025-08-23 01:13:24', '2025-08-23 01:21:16'),
(6, 4, 0, 5, 10, 1, 0, '\"[]\"', '2025-08-23 01:27:57', '2025-08-23 01:28:31');

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

--
-- Table structure for table `event_participants`
--

CREATE TABLE `event_participants` (
  `id` int(11) NOT NULL,
  `event_id` int(11) DEFAULT NULL,
  `participant_id` int(11) DEFAULT NULL,
  `heat_number` int(11) DEFAULT NULL,
  `sort_order` int(11) DEFAULT 0,
  `bib_number` int(11) DEFAULT NULL,
  `category_id` int(11) DEFAULT NULL,
  `matching_category_ids` text DEFAULT NULL,
  `category` varchar(100) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `event_participants`
--

INSERT INTO `event_participants` (`id`, `event_id`, `participant_id`, `heat_number`, `sort_order`, `bib_number`, `category_id`, `matching_category_ids`, `category`, `created_at`) VALUES
(1489, 3, 1366, 1, 23, 12, 10, '[10,3,11]', 'Dziewczynki junior', '2025-08-07 00:31:04'),
(1493, 3, 1360, 1, 36, 35, 9, '[9]', 'Chłopcy junor', '2025-08-07 00:31:04'),
(1495, 3, 1357, 1, 24, 14, 10, '[10,11]', 'Dziewczynki junior', '2025-08-07 00:31:04'),
(1496, 3, 1356, 1, 25, 15, 10, '[10,11]', 'Dziewczynki junior', '2025-08-07 00:31:04'),
(1504, 3, 1348, 1, 37, 37, 9, '[9]', 'Chłopcy junor', '2025-08-07 00:31:04'),
(1505, 3, 1347, 1, 26, 17, 10, '[10,11]', 'Dziewczynki junior', '2025-08-07 00:31:04'),
(1508, 3, 1344, 1, 3, 10, 10, '[10,11]', 'Dziewczynki junior', '2025-08-07 00:31:04'),
(1510, 3, 1342, 1, 33, 30, 9, '[9]', 'Chłopcy junor', '2025-08-07 00:31:04'),
(1513, 3, 1339, 1, 34, 32, 9, '[9]', 'Chłopcy junor', '2025-08-07 00:31:04'),
(1516, 3, 1336, 1, 35, 33, 9, '[9]', 'Chłopcy junor', '2025-08-07 00:31:04'),
(1523, 3, 1329, 1, 27, 19, 10, '[10,11]', 'Dziewczynki junior', '2025-08-07 00:31:04'),
(1524, 3, 1328, 1, 28, 20, 10, '[10]', 'Dziewczynki junior', '2025-08-07 00:31:04'),
(1527, 3, 1325, 1, 42, 50, 9, '[9]', 'Chłopcy junor', '2025-08-07 00:31:04'),
(1532, 3, 1320, 1, 43, 53, 9, '[9]', 'Chłopcy junor', '2025-08-07 00:31:04'),
(1533, 3, 1319, 1, 44, 54, 9, '[9]', 'Chłopcy junor', '2025-08-07 00:31:04'),
(1535, 3, 1317, 1, 45, 55, 9, '[9]', 'Chłopcy junor', '2025-08-07 00:31:04'),
(1536, 3, 1316, 1, 46, 56, 9, '[9]', 'Chłopcy junor', '2025-08-07 00:31:04'),
(1538, 3, 1314, 1, 41, 47, 9, '[9]', 'Chłopcy junor', '2025-08-07 00:31:04'),
(1540, 3, 1312, 1, 38, 41, 9, '[9]', 'Chłopcy junor', '2025-08-07 00:31:04'),
(1543, 3, 1309, 1, 39, 43, 9, '[9]', 'Chłopcy junor', '2025-08-07 00:31:04'),
(1544, 3, 1308, 1, 40, 44, 9, '[9]', 'Chłopcy junor', '2025-08-07 00:31:04'),
(1545, 3, 1307, 1, 29, 22, 10, '[10,11]', 'Dziewczynki junior', '2025-08-07 00:31:04'),
(1550, 3, 1302, 1, 30, 25, 10, '[10,11]', 'Dziewczynki junior', '2025-08-07 00:31:04'),
(1551, 3, 1301, 1, 47, 57, 9, '[9]', 'Chłopcy junor', '2025-08-07 00:31:04'),
(1634, 3, 1358, 1, 15, 8, 10, '[10,3,11]', 'Dziewczynki junior', '2025-08-07 11:51:39'),
(1635, 3, 1340, 1, 6, 5, 10, '[10,11]', 'Dziewczynki junior', '2025-08-07 11:51:39'),
(1636, 3, 1338, 1, 22, 11, 10, '[10,11]', 'Dziewczynki junior', '2025-08-07 12:57:26'),
(1637, 3, 1337, 1, 18, 9, 10, '[10,11]', 'Dziewczynki junior', '2025-08-07 12:57:26'),
(1639, 3, 1333, 1, 9, 6, 10, '[10,11]', 'Dziewczynki junior', '2025-08-07 12:57:26'),
(1714, 3, 1343, 1, 31, 61, 10, '[10,11]', 'Dziewczynki junior', '2025-08-07 14:26:03'),
(1716, 3, 1331, 1, 32, 63, 10, '[10,11]', 'Dziewczynki junior', '2025-08-07 14:26:03'),
(2055, 3, 1366, 2, 12, 12, 10, '[10,3,11]', 'Dziewczynki junior', '2025-08-14 23:12:42'),
(2056, 3, 1360, 2, 10, 35, 9, '[9]', 'Chłopcy junor', '2025-08-14 23:12:42'),
(2057, 3, 1347, 2, 19, 17, 10, '[10,11]', 'Dziewczynki junior', '2025-08-14 23:12:42'),
(2058, 3, 1344, 2, 16, 10, 10, '[10,11]', 'Dziewczynki junior', '2025-08-14 23:12:42'),
(2059, 3, 1342, 2, 5, 30, 9, '[9]', 'Chłopcy junor', '2025-08-14 23:12:42'),
(2060, 3, 1336, 2, 7, 33, 9, '[9]', 'Chłopcy junor', '2025-08-14 23:12:42'),
(2061, 3, 1325, 2, 1, 50, 9, '[9]', 'Chłopcy junor', '2025-08-14 23:12:42'),
(2062, 3, 1312, 2, 11, 41, 9, '[9]', 'Chłopcy junor', '2025-08-14 23:12:42'),
(2063, 3, 1309, 2, 2, 43, 9, '[9]', 'Chłopcy junor', '2025-08-14 23:12:42'),
(2064, 3, 1308, 2, 4, 44, 9, '[9]', 'Chłopcy junor', '2025-08-14 23:12:42'),
(2065, 3, 1302, 2, 21, 25, 10, '[10,11]', 'Dziewczynki junior', '2025-08-14 23:12:42'),
(2066, 3, 1301, 2, 8, 57, 9, '[9]', 'Chłopcy junor', '2025-08-14 23:12:42'),
(2067, 3, 1358, 2, 14, 8, 10, '[10,3,11]', 'Dziewczynki junior', '2025-08-14 23:12:42'),
(2068, 3, 1340, 2, 20, 5, 10, '[10,11]', 'Dziewczynki junior', '2025-08-14 23:12:42'),
(2069, 3, 1338, 2, 17, 11, 10, '[10,11]', 'Dziewczynki junior', '2025-08-14 23:12:42'),
(2070, 3, 1331, 2, 13, 63, 10, '[10,11]', 'Dziewczynki junior', '2025-08-14 23:12:42');

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

--
-- Table structure for table `figure_categories`
--

CREATE TABLE `figure_categories` (
  `id` int(11) NOT NULL,
  `sport_name` varchar(100) NOT NULL,
  `category_name` varchar(100) NOT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `sort_order` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `figure_categories`
--

INSERT INTO `figure_categories` (`id`, `sport_name`, `category_name`, `is_active`, `sort_order`) VALUES
(1, 'snowboard', 'Rotation', 1, 0),
(2, 'snowboard', 'Direction', 1, 1),
(3, 'snowboard', 'Axis', 1, 2),
(4, 'snowboard', 'Grab', 1, 3),
(5, 'snowboard', 'Feature', 1, 4),
(6, 'snowboard', 'Rail', 1, 5),
(7, 'freeski', 'Rotation', 1, 0),
(8, 'freeski', 'Direction', 1, 1),
(9, 'freeski', 'Axis', 1, 2),
(10, 'freeski', 'Grab', 1, 3),
(11, 'freeski', 'Feature', 1, 4),
(12, 'skateboard', 'Flip', 1, 0),
(13, 'skateboard', 'Grind/Slide', 1, 1),
(14, 'skateboard', 'Gap', 1, 2),
(15, 'skateboard', 'Obstacle', 1, 3),
(16, 'bmx', 'Tricks', 1, 0),
(17, 'bmx', 'Feature', 1, 1),
(18, 'inline', 'Grind', 1, 0),
(19, 'inline', 'Air', 1, 1),
(20, 'inline', 'Feature', 1, 2),
(21, 'surf', 'Maneuver', 1, 0),
(22, 'surf', 'Wave', 1, 1),
(23, 'kitesurf', 'Jump', 1, 0),
(24, 'kitesurf', 'Style', 1, 1),
(25, 'kitesurf', 'Grab', 1, 2),
(26, 'parkour', 'Move', 1, 0),
(27, 'parkour', 'Flow', 1, 1),
(28, 'breaking', 'Powermove', 1, 0),
(29, 'breaking', 'Footwork', 1, 1),
(30, 'breaking', 'Freeze', 1, 2),
(31, 'breaking', 'Blowup', 1, 3),
(32, 'wakeboard', 'Rail', 1, 0),
(33, 'wakeboard', 'Air', 1, 1),
(34, 'wakeboard', 'Feature', 1, 2);

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

--
-- Table structure for table `figure_items`
--

CREATE TABLE `figure_items` (
  `id` int(11) NOT NULL,
  `sport_name` varchar(100) NOT NULL,
  `category_name` varchar(100) NOT NULL,
  `item_name` varchar(255) NOT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `sort_order` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `figure_items`
--

INSERT INTO `figure_items` (`id`, `sport_name`, `category_name`, `item_name`, `is_active`, `sort_order`) VALUES
(1, 'snowboard', 'Rotation', '180', 1, 0),
(2, 'snowboard', 'Rotation', '360', 1, 1),
(3, 'snowboard', 'Rotation', '540', 1, 2),
(4, 'snowboard', 'Rotation', '720', 1, 3),
(5, 'snowboard', 'Rotation', '900', 1, 4),
(6, 'snowboard', 'Rotation', '1080', 1, 5),
(7, 'snowboard', 'Rotation', '1260', 1, 6),
(8, 'snowboard', 'Rotation', '1440', 1, 7),
(9, 'snowboard', 'Rotation', '1620', 1, 8),
(10, 'snowboard', 'Rotation', '1800', 1, 9),
(11, 'snowboard', 'Direction', 'Frontside', 1, 0),
(12, 'snowboard', 'Direction', 'Backside', 1, 1),
(13, 'snowboard', 'Direction', 'Switch FS', 1, 2),
(14, 'snowboard', 'Direction', 'Switch BS', 1, 3),
(15, 'snowboard', 'Axis', 'Flat', 1, 0),
(16, 'snowboard', 'Axis', 'Cork', 1, 1),
(17, 'snowboard', 'Axis', 'Double Cork', 1, 2),
(18, 'snowboard', 'Axis', 'Triple Cork', 1, 3),
(19, 'snowboard', 'Grab', 'Mute', 1, 0),
(20, 'snowboard', 'Grab', 'Indy', 1, 1),
(21, 'snowboard', 'Grab', 'Tail', 1, 2),
(22, 'snowboard', 'Grab', 'Nose', 1, 3),
(23, 'snowboard', 'Grab', 'Method', 1, 4),
(24, 'snowboard', 'Grab', 'Stalefish', 1, 5),
(25, 'snowboard', 'Grab', 'Melon', 1, 6),
(26, 'snowboard', 'Grab', 'Japan', 1, 7),
(27, 'snowboard', 'Grab', 'Seatbelt', 1, 8),
(28, 'snowboard', 'Feature', 'Kicker', 1, 0),
(29, 'snowboard', 'Feature', 'Rail', 1, 1),
(30, 'snowboard', 'Feature', 'Box', 1, 2),
(31, 'snowboard', 'Feature', 'Wallride', 1, 3),
(32, 'snowboard', 'Feature', 'Hip', 1, 4),
(33, 'snowboard', 'Rail', 'Boardslide', 1, 0),
(34, 'snowboard', 'Rail', 'Lipslide', 1, 1),
(35, 'snowboard', 'Rail', '270 In', 1, 2),
(36, 'snowboard', 'Rail', '270 Out', 1, 3),
(37, 'snowboard', 'Rail', '450 Out', 1, 4),
(38, 'freeski', 'Rotation', '180', 1, 0),
(39, 'freeski', 'Rotation', '360', 1, 1),
(40, 'freeski', 'Rotation', '540', 1, 2),
(41, 'freeski', 'Rotation', '720', 1, 3),
(42, 'freeski', 'Rotation', '900', 1, 4),
(43, 'freeski', 'Rotation', '1080', 1, 5),
(44, 'freeski', 'Rotation', '1260', 1, 6),
(45, 'freeski', 'Rotation', '1440', 1, 7),
(46, 'freeski', 'Rotation', '1620', 1, 8),
(47, 'freeski', 'Direction', 'Left', 1, 0),
(48, 'freeski', 'Direction', 'Right', 1, 1),
(49, 'freeski', 'Direction', 'Switch L', 1, 2),
(50, 'freeski', 'Direction', 'Switch R', 1, 3),
(51, 'freeski', 'Axis', 'Flat', 1, 0),
(52, 'freeski', 'Axis', 'Cork', 1, 1),
(53, 'freeski', 'Axis', 'Double Cork', 1, 2),
(54, 'freeski', 'Axis', 'Triple Cork', 1, 3),
(55, 'freeski', 'Grab', 'Safety', 1, 0),
(56, 'freeski', 'Grab', 'Mute', 1, 1),
(57, 'freeski', 'Grab', 'Tail', 1, 2),
(58, 'freeski', 'Grab', 'Japan', 1, 3),
(59, 'freeski', 'Grab', 'Blunt', 1, 4),
(60, 'freeski', 'Grab', 'Nose', 1, 5),
(61, 'freeski', 'Feature', 'Kicker', 1, 0),
(62, 'freeski', 'Feature', 'Rail', 1, 1),
(63, 'freeski', 'Feature', 'Box', 1, 2),
(64, 'freeski', 'Feature', 'Wallride', 1, 3),
(65, 'freeski', 'Feature', 'Hip', 1, 4),
(66, 'skateboard', 'Flip', 'Kickflip', 1, 0),
(67, 'skateboard', 'Flip', 'Heelflip', 1, 1),
(68, 'skateboard', 'Flip', 'Varial Flip', 1, 2),
(69, 'skateboard', 'Flip', 'Hardflip', 1, 3),
(70, 'skateboard', 'Flip', '360 Flip', 1, 4),
(71, 'skateboard', 'Flip', 'Impossible', 1, 5),
(72, 'skateboard', 'Grind/Slide', 'FS 50-50', 1, 0),
(73, 'skateboard', 'Grind/Slide', 'BS 50-50', 1, 1),
(74, 'skateboard', 'Grind/Slide', 'BS Smith', 1, 2),
(75, 'skateboard', 'Grind/Slide', 'FS Smith', 1, 3),
(76, 'skateboard', 'Grind/Slide', 'Crooked', 1, 4),
(77, 'skateboard', 'Grind/Slide', 'Nosegrind', 1, 5),
(78, 'skateboard', 'Grind/Slide', 'Feeble', 1, 6),
(79, 'skateboard', 'Grind/Slide', 'Boardslide', 1, 7),
(80, 'skateboard', 'Grind/Slide', 'Lipslide', 1, 8),
(81, 'skateboard', 'Gap', 'Ollie', 1, 0),
(82, 'skateboard', 'Gap', 'Nollie', 1, 1),
(83, 'skateboard', 'Gap', 'Switch Ollie', 1, 2),
(84, 'skateboard', 'Gap', '360', 1, 3),
(85, 'skateboard', 'Gap', 'Shuvit', 1, 4),
(86, 'skateboard', 'Obstacle', 'Rail', 1, 0),
(87, 'skateboard', 'Obstacle', 'Hubba', 1, 1),
(88, 'skateboard', 'Obstacle', 'Stairs', 1, 2),
(89, 'skateboard', 'Obstacle', 'Ledge', 1, 3),
(90, 'skateboard', 'Obstacle', 'Quarter', 1, 4),
(91, 'skateboard', 'Obstacle', 'Manual Pad', 1, 5),
(92, 'bmx', 'Tricks', 'Barspin', 1, 0),
(93, 'bmx', 'Tricks', 'Double Bar', 1, 1),
(94, 'bmx', 'Tricks', 'Tailwhip', 1, 2),
(95, 'bmx', 'Tricks', 'Double Whip', 1, 3),
(96, 'bmx', 'Tricks', 'Truckdriver (360 bar)', 1, 4),
(97, 'bmx', 'Tricks', 'Flair', 1, 5),
(98, 'bmx', 'Tricks', '720', 1, 6),
(99, 'bmx', 'Tricks', 'No-Hander', 1, 7),
(100, 'bmx', 'Tricks', 'Superman', 1, 8),
(101, 'bmx', 'Tricks', 'Decade', 1, 9),
(102, 'bmx', 'Tricks', 'Footjam', 1, 10),
(103, 'bmx', 'Feature', 'Quarter', 1, 0),
(104, 'bmx', 'Feature', 'Box Jump', 1, 1),
(105, 'bmx', 'Feature', 'Spine', 1, 2),
(106, 'bmx', 'Feature', 'Sub Box', 1, 3),
(107, 'bmx', 'Feature', 'Rail', 1, 4),
(108, 'bmx', 'Feature', 'Flyout', 1, 5),
(109, 'inline', 'Grind', 'Soul', 1, 0),
(110, 'inline', 'Grind', 'Royale', 1, 1),
(111, 'inline', 'Grind', 'Top Soul', 1, 2),
(112, 'inline', 'Grind', 'Top Acid', 1, 3),
(113, 'inline', 'Grind', 'Backslide', 1, 4),
(114, 'inline', 'Grind', 'Makio', 1, 5),
(115, 'inline', 'Grind', 'Fishbrain', 1, 6),
(116, 'inline', 'Air', '540', 1, 0),
(117, 'inline', 'Air', '720', 1, 1),
(118, 'inline', 'Air', '900', 1, 2),
(119, 'inline', 'Air', 'Alley Oop', 1, 3),
(120, 'inline', 'Air', 'Switch', 1, 4),
(121, 'inline', 'Feature', 'Rail', 1, 0),
(122, 'inline', 'Feature', 'Box', 1, 1),
(123, 'inline', 'Feature', 'Quarter', 1, 2),
(124, 'inline', 'Feature', 'Spine', 1, 3),
(125, 'surf', 'Maneuver', 'Cutback', 1, 0),
(126, 'surf', 'Maneuver', 'Snap', 1, 1),
(127, 'surf', 'Maneuver', 'Carve', 1, 2),
(128, 'surf', 'Maneuver', 'Re-entry', 1, 3),
(129, 'surf', 'Maneuver', 'Floater', 1, 4),
(130, 'surf', 'Maneuver', 'Aerial', 1, 5),
(131, 'surf', 'Maneuver', 'Tube', 1, 6),
(132, 'surf', 'Wave', 'Left', 1, 0),
(133, 'surf', 'Wave', 'Right', 1, 1),
(134, 'surf', 'Wave', 'Closeout', 1, 2),
(135, 'surf', 'Wave', 'Point', 1, 3),
(136, 'surf', 'Wave', 'Beachbreak', 1, 4),
(137, 'surf', 'Wave', 'Reef', 1, 5),
(138, 'kitesurf', 'Jump', 'Kiteloop', 1, 0),
(139, 'kitesurf', 'Jump', 'Double Loop', 1, 1),
(140, 'kitesurf', 'Jump', 'Late Backroll', 1, 2),
(141, 'kitesurf', 'Jump', 'Backroll', 1, 3),
(142, 'kitesurf', 'Jump', 'Frontroll', 1, 4),
(143, 'kitesurf', 'Jump', 'Board-off', 1, 5),
(144, 'kitesurf', 'Jump', 'One Foot', 1, 6),
(145, 'kitesurf', 'Style', 'Contraloop', 1, 0),
(146, 'kitesurf', 'Style', 'Boogie', 1, 1),
(147, 'kitesurf', 'Style', 'Darkslide', 1, 2),
(148, 'kitesurf', 'Style', 'Downloop', 1, 3),
(149, 'kitesurf', 'Grab', 'Tail', 1, 0),
(150, 'kitesurf', 'Grab', 'Nose', 1, 1),
(151, 'kitesurf', 'Grab', 'Mute', 1, 2),
(152, 'kitesurf', 'Grab', 'Indy', 1, 3),
(153, 'kitesurf', 'Grab', 'Seatbelt', 1, 4),
(154, 'parkour', 'Move', 'Kong', 1, 0),
(155, 'parkour', 'Move', 'Dash', 1, 1),
(156, 'parkour', 'Move', 'Speed Vault', 1, 2),
(157, 'parkour', 'Move', 'Lazy', 1, 3),
(158, 'parkour', 'Move', 'Precision', 1, 4),
(159, 'parkour', 'Move', 'Cat Leap', 1, 5),
(160, 'parkour', 'Move', 'Palm Spin', 1, 6),
(161, 'parkour', 'Move', 'Wall Run', 1, 7),
(162, 'parkour', 'Move', 'Backflip', 1, 8),
(163, 'parkour', 'Move', 'Gainer', 1, 9),
(164, 'parkour', 'Flow', 'Link-up', 1, 0),
(165, 'parkour', 'Flow', 'Direction Change', 1, 1),
(166, 'parkour', 'Flow', 'Stride', 1, 2),
(167, 'parkour', 'Flow', 'Bar Combo', 1, 3),
(168, 'breaking', 'Powermove', 'Windmill', 1, 0),
(169, 'breaking', 'Powermove', 'Flare', 1, 1),
(170, 'breaking', 'Powermove', 'Airflare', 1, 2),
(171, 'breaking', 'Powermove', 'Headspin', 1, 3),
(172, 'breaking', 'Powermove', 'Swipe', 1, 4),
(173, 'breaking', 'Powermove', 'Halo', 1, 5),
(174, 'breaking', 'Footwork', '6-step', 1, 0),
(175, 'breaking', 'Footwork', 'CCs', 1, 1),
(176, 'breaking', 'Footwork', 'Zulus', 1, 2),
(177, 'breaking', 'Footwork', 'Russian', 1, 3),
(178, 'breaking', 'Footwork', 'Knee Rock', 1, 4),
(179, 'breaking', 'Freeze', 'Baby', 1, 0),
(180, 'breaking', 'Freeze', 'Airchair', 1, 1),
(181, 'breaking', 'Freeze', 'Hollowback', 1, 2),
(182, 'breaking', 'Freeze', 'Chair', 1, 3),
(183, 'breaking', 'Freeze', 'Pike', 1, 4),
(184, 'breaking', 'Blowup', 'Combo', 1, 0),
(185, 'breaking', 'Blowup', 'Thread', 1, 1),
(186, 'breaking', 'Blowup', 'Power to Freeze', 1, 2),
(187, 'wakeboard', 'Rail', 'Front Board', 1, 0),
(188, 'wakeboard', 'Rail', 'Back Board', 1, 1),
(189, 'wakeboard', 'Rail', '270 In', 1, 2),
(190, 'wakeboard', 'Rail', '270 Out', 1, 3),
(191, 'wakeboard', 'Rail', 'Transfer', 1, 4),
(192, 'wakeboard', 'Rail', 'Press', 1, 5),
(193, 'wakeboard', 'Air', 'Tantrum', 1, 0),
(194, 'wakeboard', 'Air', 'Backroll', 1, 1),
(195, 'wakeboard', 'Air', 'Raley', 1, 2),
(196, 'wakeboard', 'Air', 'S-Bend', 1, 3),
(197, 'wakeboard', 'Air', '540', 1, 4),
(198, 'wakeboard', 'Air', '720', 1, 5),
(199, 'wakeboard', 'Air', 'KGB', 1, 6),
(200, 'wakeboard', 'Feature', 'Kicker', 1, 0),
(201, 'wakeboard', 'Feature', 'Rail', 1, 1),
(202, 'wakeboard', 'Feature', 'Funbox', 1, 2),
(203, 'wakeboard', 'Feature', 'Wall', 1, 3);

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

--
-- Table structure for table `figure_sports`
--

CREATE TABLE `figure_sports` (
  `id` int(11) NOT NULL,
  `sport_name` varchar(100) NOT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `figure_sports`
--

INSERT INTO `figure_sports` (`id`, `sport_name`, `is_active`, `created_at`) VALUES
(1, 'snowboard', 1, '2025-08-15 04:20:10'),
(2, 'freeski', 1, '2025-08-15 04:20:10'),
(3, 'skateboard', 1, '2025-08-15 04:20:10'),
(4, 'bmx', 1, '2025-08-15 04:20:10'),
(5, 'inline', 1, '2025-08-15 04:20:10'),
(6, 'surf', 1, '2025-08-15 04:20:10'),
(7, 'kitesurf', 1, '2025-08-15 04:20:10'),
(8, 'parkour', 1, '2025-08-15 04:20:10'),
(9, 'breaking', 1, '2025-08-15 04:20:10'),
(10, 'wakeboard', 1, '2025-08-15 04:20:10');

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

--
-- Table structure for table `figure_sport_details`
--

CREATE TABLE `figure_sport_details` (
  `sport_id` int(11) NOT NULL,
  `slug` varchar(60) NOT NULL,
  `short_name` varchar(40) DEFAULT NULL,
  `aliases` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`aliases`)),
  `description` text DEFAULT NULL,
  `family` enum('bike','ski','board','parkour','surf','dance','other') NOT NULL,
  `environment` set('snow','water','street','park','indoor','outdoor') NOT NULL,
  `team_mode` enum('individual','team','both') DEFAULT 'individual',
  `judged` tinyint(1) DEFAULT 1,
  `time_based` tinyint(1) DEFAULT 0,
  `distance_based` tinyint(1) DEFAULT 0,
  `primary_metric` enum('score','time','distance','height') DEFAULT 'score',
  `default_runs_per_heat` tinyint(4) DEFAULT 2,
  `default_best_of_rule` enum('best','best_n_sum','average','sum_all') DEFAULT 'best',
  `default_judges` tinyint(4) DEFAULT 5,
  `course_features` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`course_features`)),
  `course_notes` text DEFAULT NULL,
  `required_equipment` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`required_equipment`)),
  `protective_gear_required` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`protective_gear_required`)),
  `risk_level` enum('low','medium','high') DEFAULT 'high',
  `min_age` smallint(6) DEFAULT NULL,
  `max_age` smallint(6) DEFAULT NULL,
  `supported_genders` set('M','F','Open','X') DEFAULT 'Open',
  `sanctioning_bodies` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`sanctioning_bodies`)),
  `rulebook_url` varchar(255) DEFAULT NULL,
  `brand_color_hex` char(7) DEFAULT NULL,
  `icon_svg` mediumtext DEFAULT NULL,
  `tags` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`tags`)),
  `name_translations` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`name_translations`)),
  `seo_title` varchar(150) DEFAULT NULL,
  `seo_description` varchar(255) DEFAULT NULL,
  `display_order` int(11) DEFAULT 0,
  `icon_path` varchar(255) DEFAULT NULL,
  `mascot_neutral` varchar(255) DEFAULT NULL,
  `mascot_happy` varchar(255) DEFAULT NULL,
  `mascot_sad` varchar(255) DEFAULT NULL,
  `mascot_asking` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `figure_sport_details`
--

INSERT INTO `figure_sport_details` (`sport_id`, `slug`, `short_name`, `aliases`, `description`, `family`, `environment`, `team_mode`, `judged`, `time_based`, `distance_based`, `primary_metric`, `default_runs_per_heat`, `default_best_of_rule`, `default_judges`, `course_features`, `course_notes`, `required_equipment`, `protective_gear_required`, `risk_level`, `min_age`, `max_age`, `supported_genders`, `sanctioning_bodies`, `rulebook_url`, `brand_color_hex`, `icon_svg`, `tags`, `name_translations`, `seo_title`, `seo_description`, `display_order`, `icon_path`, `mascot_neutral`, `mascot_happy`, `mascot_sad`, `mascot_asking`, `created_at`, `updated_at`) VALUES
(1, 'snowboard', 'Snowboard', NULL, 'Snowboard freestyle park and halfpipe disciplines', 'board', 'snow,park,outdoor', 'individual', 1, 0, 0, 'score', 2, 'best', 5, NULL, '', '[\"board\",\" bindings\",\" boots\",\" helmet\"]', '[\"helmet\",\" back_protector\"]', 'high', NULL, NULL, 'Open', NULL, '', '#ff704d', NULL, NULL, NULL, 'Snowboard', 'Snowboard freestyle park and halfpipe disciplines', 10, 'uploads/sports/icon_1_1755469989.svg', NULL, NULL, NULL, NULL, '2025-08-17 21:47:01', '2025-08-17 22:33:09'),
(2, 'freeski', 'Freeski', NULL, 'Freeski slopestyle and halfpipe disciplines', 'ski', 'snow,park,outdoor', 'individual', 1, 0, 0, 'score', 2, 'best', 5, NULL, '', '[\"skis\",\"  bindings\",\"  boots\",\"  helmet\"]', '[\"helmet\",\"  back_protector\"]', 'high', NULL, NULL, 'Open', NULL, '', '#6e02d9', NULL, NULL, NULL, 'Freeski', 'Freeski slopestyle and halfpipe disciplines', 20, 'uploads/sports/icon_2_1755470281.svg', NULL, NULL, NULL, NULL, '2025-08-17 21:47:01', '2025-08-18 14:05:38'),
(3, 'skateboard', 'Skateboard', NULL, 'Skateboard street and park disciplines', 'board', 'street,park,indoor,outdoor', 'individual', 1, 0, 0, 'score', 2, 'best', 5, NULL, '', '[\"skateboard\",\"  helmet\"]', '[\"helmet\",\"  knee_pads\"]', 'high', NULL, NULL, 'Open', NULL, '', '#cc4700', NULL, NULL, NULL, 'Skateboard', 'Skateboard street and park disciplines', 30, 'uploads/sports/icon_3_1755471288.svg', NULL, NULL, NULL, NULL, '2025-08-17 21:47:01', '2025-08-18 14:06:00'),
(4, 'bmx', 'Bmx', NULL, 'BMX freestyle park and street disciplines', 'bike', 'park,indoor,outdoor', 'individual', 1, 0, 0, 'score', 2, 'best', 5, NULL, '', '[\"bike\",\"  helmet\"]', '[\"helmet\",\"  knee_pads\"]', 'high', NULL, NULL, 'Open', NULL, '', '#24a00e', NULL, NULL, NULL, 'Bmx', 'BMX freestyle park and street disciplines', 40, 'uploads/sports/icon_4_1755471275.svg', NULL, NULL, NULL, NULL, '2025-08-17 21:47:01', '2025-08-18 00:14:46'),
(5, 'inline', 'Inline', NULL, 'Inline skating park and street disciplines', 'board', 'street,park,indoor,outdoor', 'individual', 1, 0, 0, 'score', 2, 'best', 5, NULL, '', '[\"inline_skates\",\"  helmet\"]', '[\"helmet\",\"  wrist_guards\"]', 'high', NULL, NULL, 'Open', NULL, '', '#8494ae', NULL, NULL, NULL, 'Inline', 'Inline skating park and street disciplines', 50, NULL, NULL, NULL, NULL, NULL, '2025-08-17 21:47:01', '2025-08-18 14:13:53'),
(6, 'surf', 'Surf', NULL, 'Surfing competitions on various wave conditions', 'surf', 'water,outdoor', 'individual', 1, 0, 0, 'score', 2, 'best', 5, NULL, '', '[\"surfboard\",\" leash\"]', '[\"impact_vest\"]', 'high', NULL, NULL, 'Open', NULL, '', '#0099cc', NULL, NULL, NULL, 'Surf', 'Surfing competitions on various wave conditions', 60, 'uploads/sports/icon_6_1755471303.svg', NULL, NULL, NULL, NULL, '2025-08-17 21:47:01', '2025-08-17 22:55:03'),
(7, 'kitesurf', 'Kitesurf', NULL, 'Kitesurfing big air and freestyle disciplines', 'surf', 'water,outdoor', 'individual', 1, 0, 0, 'score', 2, 'best', 5, NULL, '', NULL, NULL, 'high', NULL, NULL, 'Open', NULL, '', '#ad26ff', NULL, NULL, NULL, 'Kitesurf', 'Kitesurfing big air and freestyle disciplines', 70, 'uploads/sports/icon_7_1755470311.svg', NULL, NULL, NULL, NULL, '2025-08-17 21:47:01', '2025-08-17 22:38:31'),
(8, 'parkour', 'Parkour', NULL, 'Parkour freestyle and speed disciplines', 'parkour', 'street,park,indoor,outdoor', 'individual', 1, 0, 0, 'score', 2, 'best', 5, NULL, NULL, '[\"shoes\"]', '[\"helmet\"]', 'high', NULL, NULL, 'Open', NULL, NULL, '#FF6B35', NULL, NULL, NULL, 'Parkour', 'Parkour freestyle and speed disciplines', 80, NULL, NULL, NULL, NULL, NULL, '2025-08-17 21:47:01', '2025-08-17 22:21:32'),
(9, 'breaking', 'Breaking', NULL, 'Breaking battles judged on multiple criteria', 'dance', 'street,indoor', 'individual', 1, 0, 0, 'score', 2, 'best', 5, NULL, '', NULL, NULL, 'high', NULL, NULL, 'Open', NULL, '', '#8f4500', NULL, NULL, NULL, 'Breaking', 'Breaking battles judged on multiple criteria', 90, NULL, NULL, NULL, NULL, NULL, '2025-08-17 21:47:01', '2025-08-18 14:13:37'),
(10, 'wakeboard', 'Wakeboard', NULL, 'Wakeboard cable and boat disciplines', 'surf', 'water,outdoor', 'individual', 1, 0, 0, 'score', 2, 'best', 5, NULL, '', '[\"wakeboard\",\"  life_vest\",\"  helmet\"]', '[\"helmet\",\"  impact_vest\"]', 'high', NULL, NULL, 'Open', NULL, '', '#1814ff', NULL, NULL, NULL, 'Wakeboard', 'Wakeboard cable and boat disciplines', 100, 'uploads/sports/icon_10_1755470297.svg', NULL, NULL, NULL, NULL, '2025-08-17 21:47:01', '2025-08-18 14:04:32');

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

--
-- Table structure for table `figure_sport_formats`
--

CREATE TABLE `figure_sport_formats` (
  `id` int(11) NOT NULL,
  `sport_id` int(11) NOT NULL,
  `name` varchar(60) NOT NULL,
  `judged` tinyint(1) DEFAULT 1,
  `time_based` tinyint(1) DEFAULT 0,
  `distance_based` tinyint(1) DEFAULT 0,
  `primary_metric` enum('score','time','distance','height') DEFAULT 'score',
  `runs_per_heat` tinyint(4) DEFAULT 2,
  `best_of_rule` enum('best','best_n_sum','average','sum_all') DEFAULT 'best',
  `default_judges` tinyint(4) DEFAULT 5,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `figure_sport_formats`
--

INSERT INTO `figure_sport_formats` (`id`, `sport_id`, `name`, `judged`, `time_based`, `distance_based`, `primary_metric`, `runs_per_heat`, `best_of_rule`, `default_judges`, `created_at`, `updated_at`) VALUES
(1, 1, 'Slopestyle', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(2, 1, 'Halfpipe', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(3, 1, 'Big Air', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(4, 2, 'Slopestyle', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(5, 2, 'Halfpipe', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(6, 2, 'Big Air', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(7, 3, 'Street', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(8, 3, 'Park', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(9, 3, 'Vert', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(10, 4, 'Park', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(11, 4, 'Street', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(12, 4, 'Flatland', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(13, 5, 'Park', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(14, 5, 'Street', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(15, 5, 'Vert', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(16, 6, 'Shortboard Heat', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(17, 6, 'Longboard Heat', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(18, 7, 'Big Air', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(19, 7, 'Freestyle', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(20, 8, 'Freestyle', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(21, 8, 'Speed Run', 0, 1, 0, 'time', 1, 'sum_all', 0, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(22, 9, 'Battle', 1, 0, 0, 'score', 1, 'sum_all', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(23, 10, 'Cable Park', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01'),
(24, 10, 'Boat', 1, 0, 0, 'score', 2, 'best', 5, '2025-08-17 21:47:01', '2025-08-17 21:47:01');

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

--
-- Table structure for table `group_event_access`
--

CREATE TABLE `group_event_access` (
  `id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `access_level` enum('view','judge','manage','own') DEFAULT 'view',
  `granted_by` int(11) DEFAULT NULL,
  `granted_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `judges`
--

CREATE TABLE `judges` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `is_head` tinyint(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `judge_assignments`
--

CREATE TABLE `judge_assignments` (
  `id` int(11) NOT NULL,
  `event_id` int(11) DEFAULT NULL,
  `judge_id` int(11) DEFAULT NULL,
  `event_control_point_id` int(11) DEFAULT NULL,
  `heat_number` int(11) DEFAULT NULL,
  `control_point_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `judge_assignments`
--

INSERT INTO `judge_assignments` (`id`, `event_id`, `judge_id`, `event_control_point_id`, `heat_number`, `control_point_id`) VALUES
(348, 3, 6, NULL, NULL, 2),
(349, 3, 29, NULL, NULL, 2),
(357, 3, 1, NULL, NULL, 1),
(358, 3, 30, NULL, NULL, 1),
(359, 3, 3, NULL, NULL, 1),
(360, 3, 31, NULL, NULL, 1);

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

--
-- Table structure for table `notification_reads`
--

CREATE TABLE `notification_reads` (
  `id` int(11) NOT NULL,
  `notification_id` int(11) NOT NULL,
  `user_id` varchar(100) NOT NULL,
  `read_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `notification_reads`
--

INSERT INTO `notification_reads` (`id`, `notification_id`, `user_id`, `read_at`) VALUES
(86, 28, '1', '2025-08-18 21:46:23'),
(87, 29, '1', '2025-08-18 21:46:23'),
(88, 30, '1', '2025-08-18 21:46:24'),
(89, 31, '1', '2025-08-18 21:46:29'),
(90, 32, '1', '2025-08-18 21:46:29'),
(91, 33, '1', '2025-08-18 21:46:29'),
(92, 34, '1', '2025-08-18 21:46:30'),
(93, 35, '1', '2025-08-18 21:46:35'),
(94, 36, '1', '2025-08-18 21:48:27'),
(95, 38, '1', '2025-08-18 21:57:23'),
(96, 40, '1', '2025-08-18 21:57:38'),
(97, 41, '1', '2025-08-18 21:57:39'),
(98, 37, '1', '2025-08-18 21:57:46'),
(99, 39, '1', '2025-08-18 21:57:46'),
(100, 42, '1', '2025-08-19 00:27:45'),
(101, 43, '1', '2025-08-19 00:34:17'),
(102, 44, '1', '2025-08-19 00:34:30'),
(103, 45, '1', '2025-08-19 00:34:44'),
(104, 46, '1', '2025-08-19 00:34:57'),
(105, 47, '1', '2025-08-19 01:08:27'),
(106, 48, '1', '2025-08-19 01:08:33'),
(107, 49, '1', '2025-08-19 01:09:05'),
(108, 50, '1', '2025-08-19 01:21:04'),
(109, 51, '1', '2025-08-19 01:21:04'),
(110, 53, '1', '2025-08-19 01:21:41'),
(111, 54, '1', '2025-08-19 01:21:51'),
(112, 52, '1', '2025-08-19 01:21:55'),
(113, 57, '1', '2025-08-19 11:22:35'),
(114, 56, '1', '2025-08-19 11:22:36'),
(115, 58, '1', '2025-08-19 11:22:39'),
(116, 55, '1', '2025-08-19 11:22:52'),
(117, 59, '1', '2025-08-19 11:23:02'),
(118, 60, '1', '2025-08-19 11:23:42'),
(119, 61, '1', '2025-08-20 10:31:35'),
(120, 62, '1', '2025-08-20 10:31:51'),
(121, 63, '1', '2025-08-20 22:37:06'),
(122, 64, '1', '2025-08-20 22:37:06'),
(123, 65, '1', '2025-08-22 04:18:55'),
(124, 66, '1', '2025-08-22 04:41:05'),
(125, 67, '1', '2025-08-22 04:41:06'),
(126, 68, '1', '2025-08-22 04:55:57'),
(127, 69, '1', '2025-08-22 05:00:21'),
(128, 70, '1', '2025-08-22 05:02:49'),
(129, 71, '1', '2025-08-22 05:02:49'),
(130, 73, '1', '2025-08-22 05:02:50'),
(131, 72, '1', '2025-08-22 05:02:59'),
(132, 74, '1', '2025-08-22 05:03:00'),
(133, 55, '1755854810050', '2025-08-22 09:26:52'),
(134, 56, '1755854810050', '2025-08-22 09:26:53'),
(135, 57, '1755854810050', '2025-08-22 09:26:53'),
(136, 58, '1755854810050', '2025-08-22 09:26:53'),
(137, 59, '1755854810050', '2025-08-22 09:26:54'),
(138, 60, '1755854810050', '2025-08-22 09:26:54'),
(139, 61, '1755854810050', '2025-08-22 09:26:54'),
(140, 62, '1755854810050', '2025-08-22 09:26:54'),
(141, 63, '1755854810050', '2025-08-22 09:26:55'),
(142, 64, '1755854810050', '2025-08-22 09:26:55'),
(143, 65, '1755854810050', '2025-08-22 09:26:55'),
(144, 66, '1755854810050', '2025-08-22 09:26:55'),
(145, 67, '1755854810050', '2025-08-22 09:26:55'),
(146, 68, '1755854810050', '2025-08-22 09:26:56'),
(147, 69, '1755854810050', '2025-08-22 09:26:57'),
(148, 70, '1755854810050', '2025-08-22 09:26:58'),
(149, 71, '1755854810050', '2025-08-22 09:26:59'),
(150, 72, '1755854810050', '2025-08-22 09:27:00'),
(151, 73, '1755854810050', '2025-08-22 09:27:01'),
(152, 74, '1755854810050', '2025-08-22 09:27:02'),
(153, 75, '1755854810050', '2025-08-22 09:27:18'),
(154, 75, '1', '2025-08-22 09:27:45'),
(155, 76, '1', '2025-08-22 09:27:46'),
(156, 78, '1', '2025-08-22 09:27:46'),
(157, 77, '1', '2025-08-22 09:27:47'),
(158, 79, '1', '2025-08-22 09:27:49'),
(159, 80, '1', '2025-08-22 09:27:49'),
(160, 82, '1', '2025-08-22 09:27:51'),
(161, 81, '1', '2025-08-22 09:27:51'),
(162, 84, '1', '2025-08-22 09:29:39'),
(163, 83, '1', '2025-08-22 09:29:40'),
(164, 75, '1755855599248', '2025-08-22 09:40:03'),
(165, 76, '1755855599248', '2025-08-22 09:40:04'),
(166, 77, '1755855599248', '2025-08-22 09:40:04'),
(167, 78, '1755855599248', '2025-08-22 09:40:05'),
(168, 79, '1755855599248', '2025-08-22 09:40:06'),
(169, 80, '1755855599248', '2025-08-22 09:40:06'),
(170, 81, '1755855599248', '2025-08-22 09:40:07'),
(171, 82, '1755855599248', '2025-08-22 09:40:08'),
(172, 83, '1755855599248', '2025-08-22 09:40:09'),
(173, 84, '1755855599248', '2025-08-22 09:40:10'),
(174, 85, '1', '2025-08-22 09:43:59'),
(215, 105, '1', '2025-08-22 11:50:01'),
(216, 129, '1', '2025-08-22 18:16:51'),
(217, 130, '1', '2025-08-22 18:16:52'),
(218, 131, '1', '2025-08-22 18:16:53'),
(219, 132, '1', '2025-08-22 18:16:54'),
(220, 133, '1', '2025-08-22 18:16:56'),
(221, 128, '1', '2025-08-22 18:17:06'),
(227, 154, '1', '2025-08-23 00:30:35'),
(228, 159, '1', '2025-08-23 00:34:47'),
(229, 160, '1', '2025-08-23 00:34:48'),
(230, 163, '1', '2025-08-23 00:34:49'),
(231, 164, '1', '2025-08-23 00:34:51'),
(232, 162, '1', '2025-08-23 00:34:52'),
(233, 161, '1', '2025-08-23 00:34:53'),
(244, 182, '1', '2025-08-23 00:41:41'),
(245, 183, '1', '2025-08-23 00:41:42'),
(246, 184, '1', '2025-08-23 00:41:43'),
(249, 185, '1', '2025-08-23 00:42:19'),
(250, 186, '1', '2025-08-23 00:42:20'),
(253, 187, '1', '2025-08-23 00:43:02'),
(254, 188, '1', '2025-08-23 00:43:03'),
(258, 189, '1', '2025-08-23 00:44:05'),
(259, 190, '1', '2025-08-23 00:44:56'),
(260, 191, '1', '2025-08-23 00:46:52'),
(262, 192, '1', '2025-08-23 00:46:59'),
(265, 193, '1', '2025-08-23 00:47:06'),
(275, 195, '1', '2025-08-23 00:48:50'),
(276, 196, '1', '2025-08-23 00:48:50'),
(278, 197, '1', '2025-08-23 00:49:02'),
(280, 198, '1', '2025-08-23 00:49:04'),
(281, 200, '1', '2025-08-23 00:49:54'),
(283, 201, '1', '2025-08-23 00:54:54'),
(284, 202, '1', '2025-08-23 00:55:33'),
(285, 203, '1', '2025-08-23 00:55:34'),
(286, 204, '1', '2025-08-23 00:55:35'),
(287, 205, '1', '2025-08-23 00:55:36'),
(288, 207, '1', '2025-08-23 00:56:31'),
(290, 208, '1', '2025-08-23 00:57:24'),
(292, 210, '1', '2025-08-23 00:57:46'),
(293, 209, '1', '2025-08-23 00:57:47'),
(296, 219, '1', '2025-08-23 01:04:30'),
(297, 220, '1', '2025-08-23 01:04:32'),
(298, 221, '1', '2025-08-23 01:04:33'),
(299, 222, '1', '2025-08-23 01:04:33'),
(300, 223, '1', '2025-08-23 01:04:34'),
(301, 227, '1', '2025-08-23 01:07:18'),
(302, 230, '1', '2025-08-23 01:07:19'),
(303, 231, '1', '2025-08-23 01:07:19'),
(304, 232, '1', '2025-08-23 01:07:20'),
(305, 233, '1', '2025-08-23 01:10:54'),
(306, 235, '1', '2025-08-23 01:19:29'),
(309, 236, '1', '2025-08-23 01:19:42'),
(310, 237, '1', '2025-08-23 01:19:50'),
(311, 242, '1', '2025-08-23 01:21:35'),
(312, 241, '1', '2025-08-23 01:21:35'),
(313, 244, '1', '2025-08-23 01:21:36'),
(314, 245, '1', '2025-08-23 01:21:37'),
(315, 246, '1', '2025-08-23 01:21:38'),
(316, 243, '1', '2025-08-23 01:21:39'),
(317, 247, '1', '2025-08-23 01:22:02'),
(318, 248, '1', '2025-08-23 01:22:03'),
(319, 249, '1', '2025-08-23 01:22:04'),
(320, 260, '1', '2025-08-23 01:28:48'),
(321, 261, '1', '2025-08-23 01:28:49'),
(322, 262, '1', '2025-08-23 01:28:50'),
(323, 263, '1', '2025-08-23 01:28:51'),
(324, 264, '1', '2025-08-23 01:28:51'),
(325, 265, '1', '2025-08-23 01:28:52'),
(326, 266, '1755912273460', '2025-08-23 01:34:41'),
(327, 267, '1755912273460', '2025-08-23 01:34:42'),
(328, 278, '1', '2025-08-23 01:41:47'),
(329, 280, '1755913747140', '2025-08-23 01:50:07'),
(330, 296, '1755914362792', '2025-08-23 02:01:02'),
(331, 295, '1755914362792', '2025-08-23 02:01:03'),
(332, 300, '1755914362792', '2025-08-23 02:04:47'),
(333, 304, '1755914362792', '2025-08-23 02:06:11'),
(334, 305, '1755914808263', '2025-08-23 02:07:46'),
(335, 307, '1755914808263', '2025-08-23 02:07:48'),
(336, 306, '1755914808263', '2025-08-23 02:07:49'),
(337, 308, '1755914808263', '2025-08-23 02:07:49'),
(338, 310, '1755914808263', '2025-08-23 02:08:08'),
(339, 309, '1755914906073', '2025-08-23 02:08:29'),
(340, 310, '1755914906073', '2025-08-23 02:08:29'),
(341, 311, '1755915224791', '2025-08-23 02:13:48'),
(342, 312, '1755915224791', '2025-08-23 02:14:07'),
(343, 311, '1755915250591', '2025-08-23 02:14:12'),
(344, 312, '1755915250591', '2025-08-23 02:14:14'),
(345, 313, '1755915381369', '2025-08-23 02:16:50'),
(346, 314, '1755915381369', '2025-08-23 02:16:58'),
(347, 314, '1755915449157', '2025-08-23 02:17:35'),
(348, 315, '1755915576896', '2025-08-23 02:19:59'),
(349, 326, '1755916044794', '2025-08-23 02:28:40'),
(350, 330, '1755916044794', '2025-08-23 02:30:19'),
(351, 331, '1755916044794', '2025-08-23 02:30:19'),
(352, 333, '1755916229248', '2025-08-23 02:32:35'),
(353, 334, '1755916413867', '2025-08-23 02:33:44'),
(354, 337, '1755916691132', '2025-08-23 02:38:19'),
(355, 338, '1755916691132', '2025-08-23 02:38:20'),
(356, 339, '1755916691132', '2025-08-23 02:38:22'),
(357, 361, '1755917076275', '2025-08-23 02:44:43'),
(358, 362, '1755917076275', '2025-08-23 02:44:43'),
(359, 363, '1755917076275', '2025-08-23 02:44:44'),
(360, 364, '1755917076275', '2025-08-23 02:44:45'),
(361, 361, '1755917089233', '2025-08-23 02:44:53'),
(362, 362, '1755917089233', '2025-08-23 02:44:54'),
(363, 363, '1755917089233', '2025-08-23 02:44:54'),
(364, 364, '1755917089233', '2025-08-23 02:44:54'),
(365, 365, '1755917089233', '2025-08-23 02:44:55'),
(366, 366, '1755917089233', '2025-08-23 02:44:55'),
(367, 367, '1755917089233', '2025-08-23 02:44:56'),
(368, 368, '1755917089233', '2025-08-23 02:44:56'),
(369, 369, '1755917089233', '2025-08-23 02:44:57'),
(370, 370, '1755917089233', '2025-08-23 02:44:58'),
(371, 371, '1755917089233', '2025-08-23 02:44:59'),
(372, 373, '1755917089233', '2025-08-23 02:45:00'),
(373, 388, '1755917260735', '2025-08-23 02:49:49'),
(374, 389, '1755917260735', '2025-08-23 02:49:49'),
(375, 393, '1755917523403', '2025-08-23 02:53:55'),
(376, 401, '1755917793356', '2025-08-23 02:56:44'),
(377, 403, '1755917793356', '2025-08-23 02:56:46'),
(378, 402, '1755917793356', '2025-08-23 02:56:46'),
(379, 404, '1755917793356', '2025-08-23 02:56:47'),
(380, 408, '1755917905613', '2025-08-23 02:58:55'),
(381, 409, '1755917905613', '2025-08-23 02:58:56'),
(382, 414, '1755917957182', '2025-08-23 03:00:57'),
(383, 429, '1755918413292', '2025-08-23 03:06:55'),
(384, 511, '1755919970075', '2025-08-23 03:36:15'),
(385, 512, '1755919970075', '2025-08-23 03:36:16'),
(386, 513, '1755919970075', '2025-08-23 03:36:17'),
(387, 511, '1', '2025-08-23 03:36:26'),
(388, 512, '1', '2025-08-23 03:36:28'),
(389, 513, '1', '2025-08-23 03:36:28'),
(390, 516, '1', '2025-08-24 16:17:56');

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

--
-- Table structure for table `participants`
--

CREATE TABLE `participants` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `country` varchar(100) DEFAULT NULL,
  `date_of_birth` date DEFAULT NULL,
  `bib` int(11) DEFAULT NULL,
  `first_name` varchar(100) DEFAULT NULL,
  `last_name` varchar(100) DEFAULT NULL,
  `gender` enum('M','K','F') DEFAULT NULL,
  `fis_code` varchar(50) DEFAULT NULL,
  `licence_code` varchar(50) DEFAULT NULL,
  `licence_type` varchar(50) DEFAULT NULL,
  `club` varchar(255) DEFAULT NULL,
  `category` varchar(100) DEFAULT NULL,
  `created_at` date NOT NULL DEFAULT current_timestamp(),
  `imported_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `participants`
--

INSERT INTO `participants` (`id`, `name`, `country`, `date_of_birth`, `bib`, `first_name`, `last_name`, `gender`, `fis_code`, `licence_code`, `licence_type`, `club`, `category`, `created_at`, `imported_at`, `updated_at`) VALUES
(1301, NULL, 'CZ', '2006-02-13', 129, 'Andrzej', 'Rorat', 'M', '', '522', 'Pro', 'Freestyle Club', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1302, NULL, 'PL', '2015-03-20', 128, 'Natasza', 'Ziniewicz', 'F', '9829839', '529', 'Pro', 'STOWARZYSZENIE HIGH 5', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1303, NULL, 'PL', '1999-03-02', 127, 'Malwina', 'Prokopiak', 'F', '9444478', '', 'Pro', 'STOWARZYSZENIE HIGH 5', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1304, NULL, 'PL', '2004-09-02', 126, 'Natan', 'Kacperek', 'M', '9354020', '672', 'Pro', 'STOWARZYSZENIE HIGH 5', 'OPEN', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1305, NULL, 'CZ', '2005-06-28', 125, 'Nicole', 'Rychcik', 'F', '9505082', '476', 'Pro', 'Wrocławski Klub Snowboardowy', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1306, NULL, 'CZ', '1998-05-19', 124, 'Robert', 'Lizoń', 'M', '9895917', '451', 'Pro', 'KS PROGRESS BIELSKO-BIAŁA', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1307, NULL, 'PL', '2014-07-23', 123, 'Klara', 'Duczmal', 'F', '9974338', '572', 'Pro', 'Wrocławski Klub Snowboardowy', 'OPEN', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1308, NULL, 'SK', '2013-04-16', 121, 'Aleksander', 'Idec', 'M', '9667036', '603', 'Pro', 'Wrocławski Klub Snowboardowy', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1309, NULL, 'DE', '2013-03-24', 120, 'Robert', 'Pacholczak', 'M', '9153034', '656', 'Pro', 'STOWARZYSZENIE HIGH 5', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1310, NULL, 'CZ', '2002-01-21', 118, 'Ada', 'Drywa', 'F', '9678873', '472', 'Pro', 'Freestyle Club', 'OPEN', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1311, NULL, 'DE', '1999-11-23', 116, 'Leon', 'Tondera', 'M', '9835798', '695', 'Pro', 'KS PROGRESS BIELSKO-BIAŁA', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1312, NULL, 'PL', '2013-02-19', 115, 'Stefan', 'Wasiewicz', 'M', '9436556', '490', 'Pro', 'STOWARZYSZENIE HIGH 5', 'OPEN', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1313, NULL, 'DE', '2005-09-22', 113, 'Olaf', 'Warwas', 'M', '9306196', '326', 'Pro', 'KS PROGRESS BIELSKO-BIAŁA', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1314, NULL, 'CZ', '2012-09-22', 111, 'Mieszko', 'Sośniak', 'M', '9321403', '607', 'Pro', 'AKADEMIA SPORTU FREESTYLE PARK', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1315, NULL, 'CZ', '1998-01-04', 108, 'Aleksander', 'Tabiś', 'M', '9159864', '534', 'Pro', 'STOWARZYSZENIE HIGH 5', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1316, NULL, 'CZ', '2009-03-05', 107, 'Arkadiusz', 'Dobroń', 'M', '9348755', '575', 'Pro', 'AKADEMIA SPORTU FREESTYLE PARK', 'OPEN', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1317, NULL, 'SK', '2012-08-27', 106, 'Rafał', 'Gadzała', 'M', '9395438', '422', 'Pro', 'Wrocławski Klub Snowboardowy', 'OPEN', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1318, NULL, 'DE', '2004-01-14', 105, 'Rozalia', 'Graboś', 'F', '9821793', '653', 'Pro', 'AKADEMIA SPORTU FREESTYLE PARK', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1319, NULL, 'DE', '2010-07-15', 104, 'Jakub', 'Wenzel', 'M', '9482927', '459', 'Pro', 'STOWARZYSZENIE HIGH 5', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1320, NULL, 'PL', '2014-06-02', 102, 'Jerzy', 'Dorobek', 'M', '9162653', '444', 'Pro', 'STOWARZYSZENIE HIGH 5', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1321, NULL, 'PL', '1999-03-21', 99, 'Cezary', 'Hrabia', 'M', '9705326', '513', 'Pro', 'STOWARZYSZENIE HIGH 5', 'OPEN', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1322, NULL, 'PL', '1995-10-21', 98, 'Marika', 'Protasiuk', 'F', '9329231', '570', 'Pro', 'Wrocławski Klub Snowboardowy', 'OPEN', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1323, NULL, 'PL', '1998-04-28', 95, 'Olga', 'Ziemak', 'F', '9263637', '334', 'Pro', 'STOWARZYSZENIE HIGH 5', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1324, NULL, 'SK', '2005-09-01', 94, 'Ignacy', 'Sobisz', 'M', '9765139', '428', 'Pro', 'AKADEMIA SPORTU FREESTYLE PARK', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1325, NULL, 'DE', '2012-07-26', 93, 'Ryszard', 'Zmarzły', 'M', '9165658', '580', 'Pro', 'STOWARZYSZENIE HIGH 5', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1326, NULL, 'PL', '2001-05-12', 91, 'Eliza', 'Sularz', 'F', '9338295', '447', 'Pro', 'KS PROGRESS BIELSKO-BIAŁA', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1327, NULL, 'SK', '1996-04-18', 90, 'Alan', 'Jędraszczyk', 'M', '9052367', '331', 'Pro', 'Freestyle Club', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1328, NULL, 'DE', '2007-10-02', 89, 'Sonia', 'Wawrzkiewicz', 'F', '', '674', 'Pro', 'Snow Unity Kraków', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1329, NULL, 'PL', '2014-01-10', 88, 'Urszula', 'Rosłon', 'F', '9096567', '356', 'Pro', 'Snow Unity Kraków', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1330, NULL, 'DE', '2003-09-12', 87, 'Andrzej', 'Guziak', 'M', '9417341', '501', 'Pro', 'AKADEMIA SPORTU FREESTYLE PARK', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1331, NULL, 'PL', '2009-05-27', 86, 'Julianna', 'Łuckiewicz', 'F', '9011971', '473', 'Pro', 'Freestyle Club', 'OPEN', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1332, NULL, 'SK', '1999-01-19', 85, 'Klara', 'Stąpor', 'F', '9470559', '475', 'Pro', 'STOWARZYSZENIE HIGH 5', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1333, NULL, 'SK', '2014-03-28', 83, 'Nela', 'Madziar', 'F', '9721039', '468', 'Pro', 'Wrocławski Klub Snowboardowy', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1334, NULL, 'SK', '2001-05-19', 81, 'Rozalia', 'Indyk', 'F', '9365266', '361', 'Pro', 'Snow Unity Kraków', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1335, NULL, 'CZ', '1996-10-10', 80, 'Kamil', 'Pacia', 'M', '9447974', '661', 'Pro', 'KS PROGRESS BIELSKO-BIAŁA', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1336, NULL, 'SK', '2011-03-06', 79, 'Nikodem', 'Moroń', 'M', '9365744', '380', 'Pro', 'AKADEMIA SPORTU FREESTYLE PARK', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1337, NULL, 'SK', '2010-10-29', 78, 'Marika', 'Wikło', 'F', '9314545', '417', 'Pro', 'Freestyle Club', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1338, NULL, 'DE', '2013-10-14', 77, 'Monika', 'Maruszczyk', 'F', '9293354', '408', 'Pro', 'STOWARZYSZENIE HIGH 5', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1339, NULL, 'PL', '2010-02-11', 76, 'Igor', 'Masiak', 'M', '9278987', '368', 'Pro', 'Snow Unity Kraków', 'OPEN', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1340, NULL, 'SK', '2011-02-16', 75, 'Dorota', 'Pezda', 'F', '9018565', '676', 'Pro', 'AKADEMIA SPORTU FREESTYLE PARK', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1341, NULL, 'PL', '1995-09-12', 73, 'Nikodem', 'Budzeń', 'M', '9424006', '545', 'Pro', 'Wrocławski Klub Snowboardowy', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1342, NULL, 'CZ', '2008-05-16', 72, 'Igor', 'Kupaj', 'M', '9877699', '507', 'Pro', 'AKADEMIA SPORTU FREESTYLE PARK', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1343, NULL, 'PL', '2012-05-06', 71, 'Urszula', 'Pyszny', 'F', '9610573', '509', 'Pro', 'Wrocławski Klub Snowboardowy', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1344, NULL, 'PL', '2008-06-04', 70, 'Melania', 'Siebert', 'F', '9496010', '396', 'Pro', 'Wrocławski Klub Snowboardowy', 'OPEN', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1345, NULL, 'SK', '1999-05-12', 68, 'Ada', 'Wochnik', 'F', '9341176', '548', 'Pro', 'Freestyle Club', 'OPEN', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1346, NULL, 'PL', '1998-04-21', 67, 'Maks', 'Suchenek', 'M', '9642780', '390', 'Pro', 'Wrocławski Klub Snowboardowy', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1347, NULL, 'DE', '2011-11-08', 66, 'Karina', 'Mila', 'F', '9226732', '543', 'Pro', 'AKADEMIA SPORTU FREESTYLE PARK', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1348, NULL, 'DE', '2007-11-21', 65, 'Olaf', 'Piechura', 'M', '9449781', '622', 'Pro', 'Snow Unity Kraków', 'OPEN', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1349, NULL, 'SK', '1994-10-04', 62, 'Jacek', 'Lelito', 'M', '9312827', '552', 'Pro', 'Freestyle Club', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1350, NULL, 'DE', '2003-07-18', 60, 'Sonia', 'Kansy', 'F', '9348122', '410', 'Pro', 'Wrocławski Klub Snowboardowy', 'Seniorzy', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1351, NULL, 'PL', '0000-00-00', 58, 'JAKUB', 'NAWROCKI', 'M', '9430224', '505', 'Pro', 'KS AZS AWF KATOWICE', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1352, NULL, 'PL', '0000-00-00', 56, 'TYMOTEUSZ', 'R??AK', 'M', '9430232', '847', 'Pro', 'KLUB SPORTOWY AZS ZAKOPANE', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1353, NULL, 'PL', '0000-00-00', 55, 'TYMOTEUSZ', 'SZOT', 'M', '9430226', '774', 'Pro', 'AKADEMIA SPORTU FREESTYLE PARK', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1354, NULL, 'PL', '0000-00-00', 50, 'VALERIY', 'SYTYKH', 'M', '9430234', '776', 'Pro', 'AKADEMIA SPORTU FREESTYLE PARK', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1355, NULL, 'PL', '0000-00-00', 49, 'JOANNA', 'W?SIK', 'F', '9435124', '814', 'Pro', 'KS AZS AWF KATOWICE', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1356, NULL, 'PL', '2017-06-14', 48, 'ANTONINA', 'STASINOWSKA', 'F', '9435127', '800', 'Pro', 'Freestyle Club', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1357, NULL, 'PL', '2018-06-15', 46, 'MATYLDA', 'ŻUROWSKA', 'F', '9435125', '840', 'Pro', 'KS AZS AWF KATOWICE', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1358, NULL, 'PL', NULL, 45, 'ZOFIA', 'MAMROWICZ', 'F', '9435126', '841', 'Pro', 'KS AZS AWF KATOWICE', 'Junior (U18)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1359, NULL, 'PL', '0000-00-00', 44, 'FRANCISZEK', 'BARAN', 'M', '9430233', '521', 'Pro', 'KS AZS AWF Wroc?aw', 'Junior M?odszy (U15)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1360, NULL, 'PL', '2025-07-03', 32, 'BORYS', 'RABIAŃSKI', 'M', '9430239', '839', 'Pro', 'KS SNPTT-1907', 'Junior M?odszy (U15)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1365, NULL, 'PL', '1999-12-28', 26, 'ZUZANNA', 'MACHOWSKA', 'F', '9435123', '752', 'Pro', 'AKADEMIA SPORTU FREESTYLE PARK', 'Junior M?odszy (U15)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1366, NULL, 'PL', NULL, 0, 'ZUZANNA', 'SIELAŻCZYK', 'F', '9435122', '854', 'Pro', 'AKADEMIA SPORTU FREESTYLE PARK', 'Junior M?odszy (U15)', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22'),
(1367, NULL, 'CZ', '1999-12-14', 92, 'Dagmara', 'Guściora', 'F', '9709838', '498', 'Pro', 'AKADEMIA SPORTU FREESTYLE PARK', 'OPEN', '2025-08-06', '2025-08-06 22:34:22', '2025-08-06 22:34:22');

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

--
-- Table structure for table `participants_event`
--

CREATE TABLE `participants_event` (
  `id` int(11) NOT NULL,
  `participant_id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `imported_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `participants_event`
--

INSERT INTO `participants_event` (`id`, `participant_id`, `event_id`, `imported_at`) VALUES
(541, 1366, 3, '2025-08-06 22:30:39'),
(542, 1365, 3, '2025-08-06 22:30:39'),
(547, 1360, 3, '2025-08-06 22:30:39'),
(550, 1357, 3, '2025-08-06 22:30:39'),
(551, 1356, 3, '2025-08-06 22:30:39'),
(557, 1350, 3, '2025-08-06 22:30:39'),
(558, 1349, 3, '2025-08-06 22:30:39'),
(559, 1348, 3, '2025-08-06 22:30:39'),
(560, 1347, 3, '2025-08-06 22:30:39'),
(561, 1346, 3, '2025-08-06 22:30:39'),
(562, 1345, 3, '2025-08-06 22:30:39'),
(563, 1344, 3, '2025-08-06 22:30:39'),
(564, 1343, 3, '2025-08-06 22:30:39'),
(565, 1342, 3, '2025-08-06 22:30:39'),
(566, 1341, 3, '2025-08-06 22:30:39'),
(568, 1339, 3, '2025-08-06 22:30:39'),
(570, 1337, 3, '2025-08-06 22:30:39'),
(571, 1336, 3, '2025-08-06 22:30:39'),
(572, 1335, 3, '2025-08-06 22:30:39'),
(573, 1334, 3, '2025-08-06 22:30:39'),
(574, 1333, 3, '2025-08-06 22:30:39'),
(575, 1332, 3, '2025-08-06 22:30:39'),
(576, 1331, 3, '2025-08-06 22:30:39'),
(577, 1330, 3, '2025-08-06 22:30:39'),
(578, 1329, 3, '2025-08-06 22:30:39'),
(579, 1328, 3, '2025-08-06 22:30:39'),
(580, 1327, 3, '2025-08-06 22:30:39'),
(581, 1326, 3, '2025-08-06 22:30:39'),
(582, 1325, 3, '2025-08-06 22:30:39'),
(583, 1324, 3, '2025-08-06 22:30:39'),
(584, 1323, 3, '2025-08-06 22:30:39'),
(585, 1322, 3, '2025-08-06 22:30:39'),
(586, 1321, 3, '2025-08-06 22:30:39'),
(587, 1320, 3, '2025-08-06 22:30:39'),
(588, 1319, 3, '2025-08-06 22:30:39'),
(589, 1318, 3, '2025-08-06 22:30:39'),
(590, 1317, 3, '2025-08-06 22:30:39'),
(591, 1316, 3, '2025-08-06 22:30:39'),
(592, 1315, 3, '2025-08-06 22:30:39'),
(593, 1314, 3, '2025-08-06 22:30:39'),
(594, 1313, 3, '2025-08-06 22:30:39'),
(595, 1312, 3, '2025-08-06 22:30:39'),
(596, 1311, 3, '2025-08-06 22:30:39'),
(597, 1310, 3, '2025-08-06 22:30:39'),
(598, 1309, 3, '2025-08-06 22:30:39'),
(599, 1308, 3, '2025-08-06 22:30:39'),
(600, 1307, 3, '2025-08-06 22:30:39'),
(601, 1306, 3, '2025-08-06 22:30:39'),
(602, 1305, 3, '2025-08-06 22:30:39'),
(603, 1304, 3, '2025-08-06 22:30:39'),
(604, 1303, 3, '2025-08-06 22:30:39'),
(605, 1302, 3, '2025-08-06 22:30:39'),
(606, 1301, 3, '2025-08-06 22:30:39'),
(682, 1359, 3, '2025-08-06 22:33:12'),
(686, 1355, 3, '2025-08-06 22:33:12'),
(687, 1354, 3, '2025-08-06 22:33:12'),
(688, 1353, 3, '2025-08-06 22:33:12'),
(689, 1352, 3, '2025-08-06 22:33:12'),
(690, 1351, 3, '2025-08-06 22:33:12'),
(809, 1367, 3, '2025-08-06 23:03:30'),
(810, 1358, 3, '2025-08-06 23:03:30'),
(811, 1340, 3, '2025-08-06 23:03:30'),
(812, 1338, 3, '2025-08-06 23:03:30');

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

--
-- Table structure for table `result_configurations`
--

CREATE TABLE `result_configurations` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `view_type` enum('start_list','summary_table') NOT NULL,
  `event_id` int(11) NOT NULL,
  `heat_number` int(11) DEFAULT NULL,
  `category` varchar(100) DEFAULT NULL,
  `configuration` text NOT NULL COMMENT 'JSON configuration data',
  `display_order` int(11) NOT NULL DEFAULT 0,
  `status` enum('active','draft','public','private') NOT NULL DEFAULT 'draft',
  `created_by` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `result_configurations`
--

INSERT INTO `result_configurations` (`id`, `name`, `view_type`, `event_id`, `heat_number`, `category`, `configuration`, `display_order`, `status`, `created_by`, `created_at`, `updated_at`) VALUES
(14, 'Lista startowa ogólna', 'start_list', 3, NULL, NULL, '{\"event_id\":\"3\",\"heat_number\":\"2\",\"gender_filter_main\":\"all\",\"category_filter\":\"all\",\"showRank\":true,\"showBib\":true,\"showParticipant\":true,\"showCategory\":false,\"showClub\":false,\"showGender\":false,\"showFisCode\":false,\"showLicenceCode\":false,\"showCountry\":false,\"showBirthYear\":false,\"showAge\":false,\"showRuns\":true,\"showJudges\":false,\"showControlPoints\":false,\"showFigures\":false,\"sortBy\":\"OverallAverage\",\"sortDirection\":\"desc\",\"genderFilter\":\"all\",\"columnRenames\":{\"rank\":\"Miej\",\"participant\":\"Nazwisko Imi\\u0119\",\"club\":\"Klub\",\"H1R1_figures\":\"Trick 1\"}}', 0, 'active', 1, '2025-08-08 20:30:57', '2025-08-20 18:21:19'),
(16, 'Summary Table - Hocki Klocki - Heat 1 - Wszystkie kategorie', 'summary_table', 3, 1, NULL, '{\"event_id\":\"3\",\"heat_number\":\"1\",\"gender_filter_main\":\"all\",\"category_filter\":\"all\",\"showRank\":true,\"showBib\":true,\"showParticipant\":true,\"showCategory\":false,\"showClub\":false,\"showGender\":false,\"showFisCode\":false,\"showLicenceCode\":false,\"showCountry\":false,\"showRuns\":true,\"showJudges\":false,\"showControlPoints\":false,\"showFigures\":false,\"showEventSettings\":true,\"showHeatBest\":true,\"showHeatAverage\":false,\"showOverallBest\":false,\"showHighestAverage\":true,\"showFormatName\":false,\"showJudgeInfo\":false,\"showScaleInfo\":false,\"showDropRule\":true,\"showModeConfig\":false,\"showHeatInfo\":false,\"sortBy\":\"OverallAverage\",\"sortDirection\":\"desc\",\"gender\":\"all\",\"columnRenames\":{\"rank\":\"Miej\",\"participant\":\"Nazwisko Imi\\u0119\",\"club\":\"Klub\",\"H1R1_figures\":\"Trick 1\"}}', 0, 'active', 1, '2025-08-10 19:59:05', '2025-08-21 17:32:25'),
(20, 'Lista startowa - Finał Junior', 'start_list', 3, 2, NULL, '{\"genderFilter\":\"all\"}', 0, 'active', 1, '2025-08-13 17:15:57', '2025-08-14 21:31:28'),
(28, 'Hocki Klocki - Heat 1 -setting', 'summary_table', 3, 1, 'all', '{\"event_id\":\"3\",\"heat_number\":\"1\",\"gender_filter_main\":\"all\",\"category_filter\":\"all\",\"showRank\":true,\"showBib\":true,\"showParticipant\":true,\"showCategory\":false,\"showClub\":false,\"showGender\":false,\"showFisCode\":false,\"showLicenceCode\":false,\"showCountry\":false,\"showRuns\":true,\"showJudges\":false,\"showControlPoints\":false,\"showFigures\":false,\"showEventSettings\":true,\"showHeatBest\":true,\"showHeatAverage\":false,\"showOverallBest\":false,\"showHighestAverage\":false,\"showFormatName\":false,\"showJudgeInfo\":false,\"showScaleInfo\":false,\"showDropRule\":true,\"showModeConfig\":false,\"showHeatInfo\":false,\"sortBy\":\"OverallAverage\",\"sortDirection\":\"desc\",\"gender\":\"all\",\"columnRenames\":{\"rank\":\"Miej\",\"participant\":\"Nazwisko Imi\\u0119\",\"club\":\"Klub\",\"H1R1_figures\":\"Trick 1\"}}', 0, 'active', 1, '2025-08-20 08:44:41', '2025-08-20 10:48:37'),
(30, 'Summary Table - Hocki Klocki - Heat 1', 'summary_table', 3, 1, 'all', '{\"event_id\":\"3\",\"heat_number\":\"1\",\"gender_filter_main\":\"all\",\"category_filter\":\"all\",\"showRank\":true,\"showBib\":true,\"showParticipant\":true,\"showCategory\":true,\"showClub\":true,\"showGender\":true,\"showFisCode\":false,\"showLicenceCode\":false,\"showCountry\":false,\"showRuns\":true,\"showJudges\":false,\"showControlPoints\":false,\"showFigures\":false,\"showEventSettings\":false,\"showHeatBest\":true,\"showHeatAverage\":false,\"showOverallBest\":false,\"showHighestAverage\":false,\"showFormatName\":true,\"showJudgeInfo\":true,\"showScaleInfo\":true,\"showDropRule\":true,\"showModeConfig\":false,\"showHeatInfo\":true,\"sortBy\":\"OverallAverage\",\"sortDirection\":\"desc\",\"gender\":\"all\",\"columnRenames\":{\"rank\":\"Miej\",\"participant\":\"Nazwisko Imi\\u0119\",\"club\":\"Klub\",\"H1R1_figures\":\"Trick 1\"}}', 0, 'active', 1, '2025-08-20 16:58:19', '2025-08-20 16:58:19'),
(31, 'Start List - Hocki Klocki', 'start_list', 3, NULL, 'all', '{\"event_id\":\"3\",\"heat_number\":\"2\",\"gender_filter_main\":\"all\",\"category_filter\":\"all\",\"showRank\":true,\"showBib\":true,\"showParticipant\":true,\"showCategory\":false,\"showClub\":false,\"showGender\":false,\"showFisCode\":true,\"showLicenceCode\":true,\"showCountry\":true,\"showBirthYear\":true,\"showAge\":true,\"showRuns\":true,\"showJudges\":false,\"showControlPoints\":false,\"showFigures\":false,\"sortBy\":\"OverallAverage\",\"sortDirection\":\"desc\",\"genderFilter\":\"all\",\"columnRenames\":{\"rank\":\"Miej\",\"participant\":\"Nazwisko Imi\\u0119\",\"club\":\"Klub\",\"H1R1_figures\":\"Trick 1\"}}', 0, 'active', 1, '2025-08-20 17:48:52', '2025-08-20 18:07:30'),
(32, 'Start List - Hocki Klocki', 'start_list', 3, NULL, 'all', '{\"event_id\":\"3\",\"heat_number\":\"2\",\"gender_filter_main\":\"all\",\"category_filter\":\"all\",\"showRank\":true,\"showBib\":true,\"showParticipant\":true,\"showCategory\":false,\"showClub\":false,\"showGender\":true,\"showFisCode\":true,\"showLicenceCode\":true,\"showCountry\":true,\"showBirthYear\":true,\"showAge\":true,\"showRuns\":true,\"showJudges\":false,\"showControlPoints\":false,\"showFigures\":false,\"sortBy\":\"OverallAverage\",\"sortDirection\":\"desc\",\"genderFilter\":\"all\",\"columnRenames\":{\"rank\":\"Miej\",\"participant\":\"Nazwisko Imi\\u0119\",\"club\":\"Klub\",\"H1R1_figures\":\"Trick 1\"}}', 0, 'active', 1, '2025-08-20 17:50:01', '2025-08-20 18:07:05');

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

--
-- Table structure for table `result_styling`
--

CREATE TABLE `result_styling` (
  `id` int(11) NOT NULL,
  `event_id` int(11) NOT NULL,
  `config_id` int(11) DEFAULT NULL,
  `styling_data` longtext NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `result_styling`
--

INSERT INTO `result_styling` (`id`, `event_id`, `config_id`, `styling_data`, `created_at`, `updated_at`) VALUES
(14, 3, 0, '{\"header_content\":\"<h1 style=\\\"margin: 0; color: #1f2937; font-weight: bold; text-align: center;\\\">OFFICIAL RESULTS<\\/h1>\\n<p style=\\\"margin: 10px 0 0 0; font-size: 16px; text-align: center; font-weight: 600;\\\">Championship Competition<\\/p>\",\"footer_content\":\"<p style=\\\"margin: 0; text-align: center; font-size: 12px;\\\"><strong>CERTIFIED OFFICIAL RESULTS<\\/strong><br>This document contains the official results as certified by the competition committee.<br><em>Any protests must be submitted within 24 hours of publication<\\/em><\\/p>\",\"logo_url\":\"..\\/uploads\\/logos\\/logo_1755199424_689e37c0d803a.gif\",\"logo_position\":\"left\",\"logo_size\":\"large\",\"font_family\":\"DejaVu Sans\",\"font_size\":\"7\",\"primary_color\":\"#1f2937\",\"secondary_color\":\"#6b7280\",\"table_style\":\"bordered\",\"page_margins\":\"normal\",\"show_event_info\":\"1\",\"show_generation_date\":\"1\",\"custom_css\":\"\",\"watermark_text\":\"\",\"watermark_opacity\":\"0.15\"}', '2025-07-28 19:51:38', '2025-08-21 17:39:43');

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

--
-- Table structure for table `runs`
--

CREATE TABLE `runs` (
  `id` int(11) NOT NULL,
  `event_participant_id` int(11) DEFAULT NULL,
  `run_number` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `runs`
--

INSERT INTO `runs` (`id`, `event_participant_id`, `run_number`) VALUES
(387, 1508, 1),
(389, 1635, 1),
(390, 1639, 1),
(392, 1634, 1),
(393, 1524, 1),
(394, 1637, 1),
(395, 1636, 1),
(397, 1489, 1),
(401, 1508, 2),
(402, 1527, 2),
(411, 1495, 1),
(412, 1496, 1),
(413, 1635, 2),
(414, 1639, 2),
(416, 1634, 2),
(417, 1637, 2),
(418, 1636, 2),
(419, 1489, 2),
(420, 1495, 2),
(424, 1496, 2),
(425, 1527, 1),
(426, 1505, 1),
(428, 1523, 1),
(432, 1714, 1),
(433, 1545, 1),
(434, 1716, 1),
(435, 1550, 1),
(436, 1516, 1),
(439, 1510, 1),
(440, 1513, 1),
(441, 1513, 2),
(442, 1504, 1),
(443, 1540, 1),
(444, 1532, 1),
(446, 1493, 1),
(448, 1536, 1),
(449, 1543, 1),
(450, 1544, 1),
(451, 1538, 1),
(452, 1533, 1),
(453, 1535, 1),
(454, 1551, 1),
(455, 1550, 2),
(456, 1505, 2),
(458, 1523, 2),
(459, 1524, 2),
(461, 1545, 2),
(464, 1714, 2),
(465, 1716, 2),
(466, 1510, 2),
(467, 1516, 2),
(468, 1493, 2),
(469, 1504, 2),
(470, 1540, 2),
(471, 1543, 2),
(472, 1544, 2),
(473, 1551, 2),
(475, 1533, 2),
(476, 1508, 3),
(477, 1639, 3),
(478, 1635, 3),
(479, 1538, 2),
(480, 1634, 3),
(481, 1637, 3),
(482, 1532, 2),
(483, 1532, 3),
(484, 1535, 2),
(485, 1636, 3),
(486, 1489, 3),
(487, 1536, 3),
(488, 1495, 3);

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

--
-- Table structure for table `scores`
--

CREATE TABLE `scores` (
  `id` int(11) NOT NULL,
  `run_id` int(11) DEFAULT NULL,
  `judge_id` int(11) DEFAULT NULL,
  `control_point_id` int(11) DEFAULT NULL,
  `score_value` decimal(5,2) DEFAULT NULL,
  `status` enum('OK','DNS','DNF','DSQ') DEFAULT 'OK',
  `figures_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`figures_json`)),
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `is_approved` tinyint(1) DEFAULT 0,
  `approved_by` int(11) DEFAULT NULL,
  `approved_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `scores`
--

INSERT INTO `scores` (`id`, `run_id`, `judge_id`, `control_point_id`, `score_value`, `status`, `figures_json`, `created_at`, `updated_at`, `is_approved`, `approved_by`, `approved_at`) VALUES
(997, 387, 1, NULL, 61.00, 'OK', '{\"figures\":{\"Rotation\":[\"540\"],\"Axis\":[\"Double Cork\"],\"Feature\":[\"Box\"]},\"validation\":{\"diversity_valid\":true,\"validation_timestamp\":1755920289719,\"run_number\":\"1\",\"client_validated\":true,\"diversity_rules_checked\":2}}', '2025-08-23 05:38:10', '2025-08-23 08:54:32', 1, 1, '2025-08-23 06:54:32'),
(998, 425, 1, NULL, 40.00, 'OK', '{\"figures\":{\"Rotation\":[\"540\"],\"Axis\":[\"Double Cork\"],\"Feature\":[\"Box\"]},\"validation\":{\"diversity_valid\":true,\"validation_timestamp\":1755921565427,\"run_number\":\"1\",\"client_validated\":true,\"diversity_rules_checked\":2}}', '2025-08-23 05:59:33', '2025-08-23 08:54:30', 1, 1, '2025-08-23 06:54:30'),
(999, 389, 1, NULL, 54.00, 'OK', '{\"figures\":{\"Rotation\":[\"540\"],\"Direction\":[\"Backside\"],\"Axis\":[\"Double Cork\"],\"Grab\":[\"Tail\"],\"Feature\":[\"Box\"],\"Rail\":[\"270 In\"]},\"validation\":{\"diversity_valid\":true,\"validation_timestamp\":1755923886566,\"run_number\":\"1\",\"client_validated\":true,\"diversity_rules_checked\":2}}', '2025-08-23 06:38:15', '2025-08-23 08:54:34', 1, 1, '2025-08-23 06:54:34'),
(1000, 390, 1, NULL, 51.00, 'OK', '{\"figures\":{\"Direction\":[\"Switch BS\"]},\"validation\":{\"diversity_valid\":true,\"validation_timestamp\":1755923953474,\"run_number\":\"1\",\"client_validated\":true,\"diversity_rules_checked\":2},\"Rotation\":[\"540\"],\"Direction\":[\"Backside\"],\"Axis\":[\"Cork\"],\"Feature\":[\"Rail\"]}', '2025-08-23 06:39:14', '2025-08-24 18:18:14', 1, 1, '2025-08-24 16:18:14'),
(1001, 392, 1, NULL, 58.00, 'OK', '{\"figures\":{\"Rotation\":[\"1080\"],\"Direction\":[\"Switch BS\"],\"Axis\":[\"Double Cork\"],\"Grab\":[\"Nose\"],\"Feature\":[\"Box\"],\"Rail\":[\"270 Out\"]},\"validation\":{\"diversity_valid\":true,\"validation_timestamp\":1755929513945,\"run_number\":\"1\",\"client_validated\":true,\"diversity_rules_checked\":2}}', '2025-08-23 08:11:58', '2025-08-23 08:54:26', 1, 1, '2025-08-23 06:54:26'),
(1002, 433, 1, NULL, 45.50, 'DNS', '{\"figures\":{\"Direction\":[\"Switch FS\"],\"Rotation\":[\"900\"],\"Axis\":[\"Double Cork\"],\"Grab\":[\"Nose\"],\"Feature\":[\"Box\"],\"Rail\":[\"270 In\"]},\"validation\":{\"diversity_valid\":true,\"validation_timestamp\":1755930734174,\"run_number\":\"1\",\"client_validated\":true,\"diversity_rules_checked\":0}}', '2025-08-23 08:32:21', '2025-08-24 18:18:52', 1, 1, '2025-08-24 16:18:52'),
(1003, 394, 1, NULL, 56.20, 'OK', '{\"figures\":{\"Rotation\":[\"900\"],\"Direction\":[\"Switch FS\"],\"Axis\":[\"Double Cork\"],\"Grab\":[\"Tail\"],\"Feature\":[\"Wallride\"],\"Rail\":[\"270 Out\"]},\"validation\":{\"diversity_valid\":true,\"validation_timestamp\":1755930913968,\"run_number\":\"1\",\"client_validated\":true,\"diversity_rules_checked\":0}}', '2025-08-23 08:35:19', '2025-08-24 18:17:25', 1, 1, '2025-08-24 16:17:25'),
(1004, 395, 1, NULL, 48.00, 'OK', '{\"figures\":{\"Rotation\":[\"180\"],\"Axis\":[\"Cork\"],\"Grab\":[\"Mute\"],\"Direction\":[\"Frontside\"],\"Feature\":[\"Kicker\"],\"Rail\":[\"Boardslide\"]},\"validation\":{\"diversity_valid\":true,\"validation_timestamp\":1755930980899,\"run_number\":\"1\",\"client_validated\":true,\"diversity_rules_checked\":0}}', '2025-08-23 08:36:40', '2025-08-23 08:37:51', 1, 1, '2025-08-23 06:37:20'),
(1005, 397, 1, NULL, 38.60, 'OK', '{\"figures\":{\"Rotation\":[\"900\"],\"Axis\":[\"Double Cork\"]},\"validation\":{\"diversity_valid\":true,\"validation_timestamp\":1755931882999,\"run_number\":\"1\",\"client_validated\":true,\"diversity_rules_checked\":0}}', '2025-08-23 08:51:35', '2025-08-24 18:17:41', 1, 1, '2025-08-24 16:17:41'),
(1006, 390, 30, NULL, 45.00, 'OK', '{\"Rotation\":[\"180\"],\"Direction\":[\"Backside\"],\"Axis\":[\"Double Cork\"],\"Grab\":[\"Tail\"]}', '2025-08-24 18:18:26', '2025-08-24 18:18:32', 1, 1, '2025-08-24 16:18:32');

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

--
-- Table structure for table `scoring_formats`
--

CREATE TABLE `scoring_formats` (
  `id` int(11) NOT NULL,
  `format_id` varchar(100) NOT NULL,
  `name` varchar(255) NOT NULL,
  `sport` varchar(100) NOT NULL,
  `mode` varchar(100) NOT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `scoring_formats`
--

INSERT INTO `scoring_formats` (`id`, `format_id`, `name`, `sport`, `mode`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'snowboard_slopestyle_sections_oi', 'Snowboard – Slopestyle (Sections+OI)', 'snowboard', 'sections_plus_oi', 1, '2025-08-15 04:20:17', '2025-08-15 04:20:17'),
(2, 'snowboard_halfpipe_best_run', 'Snowboard – Halfpipe (Best Run)', 'snowboard', 'halfpipe', 1, '2025-08-15 04:20:17', '2025-08-17 21:05:25'),
(3, 'snowboard_big_air_best_two', 'Snowboard – Big Air (Best 2)', 'snowboard', 'big_air', 1, '2025-08-15 04:20:17', '2025-08-21 15:30:52'),
(4, 'freeski_slopestyle_sections_oi', 'Freeski – Slopestyle (Sections+OI)', 'freeski', 'sections_plus_oi', 1, '2025-08-15 04:20:17', '2025-08-15 04:20:17'),
(5, 'freeski_halfpipe_best_run', 'Freeski – Halfpipe (Best Run)', 'freeski', 'best_run', 1, '2025-08-15 04:20:17', '2025-08-15 04:20:17'),
(6, 'freeski_big_air_best_two', 'Freeski – Big Air (Best 2)', 'freeski', 'attempts_best_n', 1, '2025-08-15 04:20:17', '2025-08-15 04:20:17'),
(7, 'skate_street_hybrid', 'Skateboarding – Street (Runs + Tricks)', 'skateboard', 'runs_plus_tricks', 1, '2025-08-15 04:20:17', '2025-08-15 04:20:17'),
(8, 'skate_park_runs', 'Skateboarding – Park (Best Run)', 'skateboard', 'best_run', 1, '2025-08-15 04:20:17', '2025-08-15 04:20:17'),
(9, 'bmx_freestyle_park', 'BMX Freestyle – Park', 'bmx', 'best_vs_avg', 1, '2025-08-15 04:20:17', '2025-08-15 22:16:33'),
(10, 'inline_roller_freestyle', 'Inline – Roller Freestyle', 'inline', 'best_run', 1, '2025-08-15 04:20:17', '2025-08-15 04:20:17'),
(11, 'wake_cable_features_air', 'Wakeboard – Cable (Features + Air)', 'wakeboard', 'best_run', 1, '2025-08-15 04:20:17', '2025-08-15 04:20:17'),
(12, 'surf_two_best_waves', 'Surf – Best Two Waves', 'surf', 'attempts_best_n', 1, '2025-08-15 04:20:17', '2025-08-15 04:20:17'),
(13, 'kitesurf_freestyle_tricks', 'Kitesurf – Freestyle (Best N + OI)', 'kitesurf', 'attempts_best_n_plus_oi', 1, '2025-08-15 04:20:17', '2025-08-15 04:20:17'),
(14, 'kitesurf_big_air', 'Kitesurf – Big Air (Best 3)', 'kitesurf', 'attempts_best_n', 1, '2025-08-15 04:20:17', '2025-08-15 04:20:17'),
(15, 'parkour_freestyle_fig', 'Parkour – Freestyle (FIG)', 'parkour', 'components_ED', 1, '2025-08-15 04:20:17', '2025-08-15 04:20:17'),
(16, 'breaking_wdsf_comparative', 'Breaking – WDSF Comparative', 'breaking', 'comparative', 1, '2025-08-15 04:20:17', '2025-08-15 04:20:17');

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

--
-- Table structure for table `scoring_format_criteria`
--

CREATE TABLE `scoring_format_criteria` (
  `id` int(11) NOT NULL,
  `format_id` varchar(100) NOT NULL,
  `criteria_type` varchar(50) NOT NULL,
  `criteria_name` varchar(255) NOT NULL,
  `sort_order` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `scoring_format_criteria`
--

INSERT INTO `scoring_format_criteria` (`id`, `format_id`, `criteria_type`, `criteria_name`, `sort_order`) VALUES
(1, 'snowboard_slopestyle_sections_oi', 'sections', 'Amplitude', 0),
(2, 'snowboard_slopestyle_sections_oi', 'sections', 'Difficulty', 1),
(3, 'snowboard_slopestyle_sections_oi', 'sections', 'Execution', 2),
(4, 'snowboard_slopestyle_sections_oi', 'sections', 'Variety', 3),
(5, 'snowboard_slopestyle_sections_oi', 'oi', 'Progression', 0),
(6, 'snowboard_slopestyle_sections_oi', 'oi', 'Use of Course', 1),
(7, 'snowboard_slopestyle_sections_oi', 'oi', 'Execution', 2),
(8, 'snowboard_slopestyle_sections_oi', 'oi', 'Difficulty', 3),
(21, 'freeski_slopestyle_sections_oi', 'sections', 'Amplitude', 0),
(22, 'freeski_slopestyle_sections_oi', 'sections', 'Difficulty', 1),
(23, 'freeski_slopestyle_sections_oi', 'sections', 'Execution', 2),
(24, 'freeski_slopestyle_sections_oi', 'sections', 'Variety', 3),
(25, 'freeski_slopestyle_sections_oi', 'oi', 'Progression', 0),
(26, 'freeski_slopestyle_sections_oi', 'oi', 'Use of Course', 1),
(27, 'freeski_slopestyle_sections_oi', 'oi', 'Execution', 2),
(28, 'freeski_slopestyle_sections_oi', 'oi', 'Difficulty', 3),
(29, 'freeski_halfpipe_best_run', 'oi', 'Difficulty', 0),
(30, 'freeski_halfpipe_best_run', 'oi', 'Execution', 1),
(31, 'freeski_halfpipe_best_run', 'oi', 'Amplitude', 2),
(32, 'freeski_halfpipe_best_run', 'oi', 'Variety', 3),
(33, 'freeski_halfpipe_best_run', 'oi', 'Progression', 4),
(34, 'freeski_halfpipe_best_run', 'oi', 'Use of Pipe', 5),
(35, 'freeski_big_air_best_two', 'attempt', 'Difficulty', 0),
(36, 'freeski_big_air_best_two', 'attempt', 'Execution', 1),
(37, 'freeski_big_air_best_two', 'attempt', 'Amplitude', 2),
(38, 'freeski_big_air_best_two', 'attempt', 'Landing', 3),
(39, 'freeski_big_air_best_two', 'attempt', 'Variety', 4),
(40, 'freeski_big_air_best_two', 'attempt', 'Progression', 5),
(41, 'skate_street_hybrid', 'oi', 'Difficulty', 0),
(42, 'skate_street_hybrid', 'oi', 'Execution', 1),
(43, 'skate_street_hybrid', 'oi', 'Variety', 2),
(44, 'skate_street_hybrid', 'oi', 'Amplitude', 3),
(45, 'skate_street_hybrid', 'oi', 'Flow', 4),
(46, 'skate_street_hybrid', 'oi', 'Use of Course', 5),
(47, 'skate_park_runs', 'oi', 'Difficulty', 0),
(48, 'skate_park_runs', 'oi', 'Execution', 1),
(49, 'skate_park_runs', 'oi', 'Variety', 2),
(50, 'skate_park_runs', 'oi', 'Amplitude', 3),
(51, 'skate_park_runs', 'oi', 'Flow', 4),
(52, 'skate_park_runs', 'oi', 'Use of Park', 5),
(53, 'bmx_freestyle_park', 'oi', 'Difficulty', 0),
(54, 'bmx_freestyle_park', 'oi', 'Progression', 1),
(55, 'bmx_freestyle_park', 'oi', 'Variety', 2),
(56, 'bmx_freestyle_park', 'oi', 'Creativity', 3),
(57, 'bmx_freestyle_park', 'oi', 'Execution', 4),
(58, 'bmx_freestyle_park', 'oi', 'Amplitude', 5),
(59, 'bmx_freestyle_park', 'oi', 'Flow', 6),
(60, 'bmx_freestyle_park', 'oi', 'Use of Course', 7),
(61, 'bmx_freestyle_park', 'oi', 'Risk', 8),
(62, 'bmx_freestyle_park', 'oi', 'Style', 9),
(63, 'inline_roller_freestyle', 'oi', 'Difficulty', 0),
(64, 'inline_roller_freestyle', 'oi', 'Execution', 1),
(65, 'inline_roller_freestyle', 'oi', 'Amplitude', 2),
(66, 'inline_roller_freestyle', 'oi', 'Flow', 3),
(67, 'inline_roller_freestyle', 'oi', 'Variety', 4),
(68, 'wake_cable_features_air', 'oi', 'Composition/Variety', 0),
(69, 'wake_cable_features_air', 'oi', 'Intensity', 1),
(70, 'wake_cable_features_air', 'oi', 'Execution', 2),
(71, 'wake_cable_features_air', 'oi', 'Features vs Air Balance', 3),
(72, 'surf_two_best_waves', 'attempt', 'Commitment', 0),
(73, 'surf_two_best_waves', 'attempt', 'Innovation', 1),
(74, 'surf_two_best_waves', 'attempt', 'Combo/Variety', 2),
(75, 'surf_two_best_waves', 'attempt', 'Speed/Power/Flow', 3),
(76, 'kitesurf_freestyle_tricks', 'attempt', 'Height/Extremity', 0),
(77, 'kitesurf_freestyle_tricks', 'attempt', 'Technicality', 1),
(78, 'kitesurf_freestyle_tricks', 'attempt', 'Variety', 2),
(79, 'kitesurf_freestyle_tricks', 'attempt', 'Innovation', 3),
(80, 'kitesurf_freestyle_tricks', 'attempt', 'Smoothness', 4),
(81, 'kitesurf_freestyle_tricks', 'attempt', 'Commitment', 5),
(82, 'kitesurf_freestyle_tricks', 'oi', 'Overall Impression', 0),
(83, 'kitesurf_big_air', 'attempt', 'Height', 0),
(84, 'kitesurf_big_air', 'attempt', 'Extremity', 1),
(85, 'kitesurf_big_air', 'attempt', 'Technicality', 2),
(86, 'kitesurf_big_air', 'attempt', 'Control', 3),
(87, 'kitesurf_big_air', 'attempt', 'Variety', 4),
(88, 'parkour_freestyle_fig', 'E', 'Safety/Landings', 0),
(89, 'parkour_freestyle_fig', 'E', 'Flow', 1),
(90, 'parkour_freestyle_fig', 'E', 'Quality', 2),
(91, 'parkour_freestyle_fig', 'D', 'Difficulty via elements table', 0),
(92, 'breaking_wdsf_comparative', 'comparative', 'Technique', 0),
(93, 'breaking_wdsf_comparative', 'comparative', 'Vocabulary', 0),
(94, 'breaking_wdsf_comparative', 'comparative', 'Originality', 0),
(95, 'breaking_wdsf_comparative', 'comparative', 'Execution', 0),
(96, 'breaking_wdsf_comparative', 'comparative', 'Musicality', 0),
(133, 'snowboard_halfpipe_best_run', 'oi', 'Difficulty', 0),
(134, 'snowboard_halfpipe_best_run', 'oi', 'Execution', 1),
(135, 'snowboard_halfpipe_best_run', 'oi', 'Amplitude', 2),
(136, 'snowboard_halfpipe_best_run', 'oi', 'Variety', 3),
(137, 'snowboard_halfpipe_best_run', 'oi', 'Progression', 4),
(138, 'snowboard_halfpipe_best_run', 'oi', 'Use of Pipe', 5),
(157, 'snowboard_big_air_best_two', 'attempt', 'Difficulty', 0),
(158, 'snowboard_big_air_best_two', 'attempt', 'Execution', 1),
(159, 'snowboard_big_air_best_two', 'attempt', 'Amplitude', 2),
(160, 'snowboard_big_air_best_two', 'attempt', 'Landing', 3),
(161, 'snowboard_big_air_best_two', 'attempt', 'Variety', 4),
(162, 'snowboard_big_air_best_two', 'attempt', 'Progression', 5);

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

--
-- Table structure for table `scoring_format_diversity_rules`
--

CREATE TABLE `scoring_format_diversity_rules` (
  `id` int(11) NOT NULL,
  `format_id` varchar(100) NOT NULL,
  `rule_type` varchar(100) NOT NULL,
  `scope` varchar(100) DEFAULT NULL,
  `group_name` varchar(100) DEFAULT NULL,
  `min_distinct` int(11) DEFAULT NULL,
  `is_optional` tinyint(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `scoring_format_diversity_rules`
--

INSERT INTO `scoring_format_diversity_rules` (`id`, `format_id`, `rule_type`, `scope`, `group_name`, `min_distinct`, `is_optional`) VALUES
(3, 'freeski_big_air_best_two', 'requireDistinct', 'attempts', 'Direction', 2, 0),
(4, 'freeski_big_air_best_two', 'requireDistinct', 'attempts', 'Rotation', 2, 0),
(5, 'kitesurf_big_air', 'requireDistinct', 'attempts', 'Jump', 3, 0),
(6, 'kitesurf_freestyle_tricks', 'requireDistinct', 'attempts', 'Jump', 2, 1),
(7, 'kitesurf_freestyle_tricks', 'requireDistinct', 'attempts', 'Style', 2, 1),
(8, 'skate_street_hybrid', 'tricksDistinctGroups', 'tricks', 'Flip', 2, 0),
(9, 'skate_street_hybrid', 'tricksDistinctGroups', 'tricks', 'Grind/Slide', 2, 0),
(10, 'skate_street_hybrid', 'tricksDistinctGroups', 'tricks', 'Gap', 2, 0),
(11, 'surf_two_best_waves', 'anyPass', NULL, 'Wave', 2, 0),
(12, 'surf_two_best_waves', 'anyPass', NULL, 'Maneuver', 2, 0),
(27, 'snowboard_big_air_best_two', 'requireDistinct', 'run', 'Direction', 2, 0),
(28, 'snowboard_big_air_best_two', 'requireDistinct', 'run', 'Rotation', 2, 0);

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

--
-- Table structure for table `scoring_format_flow`
--

CREATE TABLE `scoring_format_flow` (
  `id` int(11) NOT NULL,
  `format_id` varchar(100) NOT NULL,
  `flow_stage` varchar(255) NOT NULL,
  `sort_order` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `scoring_format_flow`
--

INSERT INTO `scoring_format_flow` (`id`, `format_id`, `flow_stage`, `sort_order`) VALUES
(1, 'snowboard_slopestyle_sections_oi', 'Qualification', 0),
(2, 'snowboard_slopestyle_sections_oi', 'Final', 1),
(7, 'freeski_slopestyle_sections_oi', 'Qualification', 0),
(8, 'freeski_slopestyle_sections_oi', 'Final', 1),
(9, 'freeski_halfpipe_best_run', 'Qualification', 0),
(10, 'freeski_halfpipe_best_run', 'Final', 1),
(11, 'freeski_big_air_best_two', 'Qualification', 0),
(12, 'freeski_big_air_best_two', 'Final', 1),
(13, 'skate_street_hybrid', 'Qualification', 0),
(14, 'skate_street_hybrid', 'Final', 1),
(15, 'skate_park_runs', 'Qualification', 0),
(16, 'skate_park_runs', 'Final', 1),
(17, 'bmx_freestyle_park', 'Qualification', 0),
(18, 'bmx_freestyle_park', 'Final', 1),
(19, 'inline_roller_freestyle', 'Qualification', 0),
(20, 'inline_roller_freestyle', 'Final', 1),
(21, 'wake_cable_features_air', 'Qualification', 0),
(22, 'wake_cable_features_air', 'Final', 1),
(23, 'surf_two_best_waves', 'Heats', 0),
(24, 'surf_two_best_waves', 'Elimination', 1),
(25, 'surf_two_best_waves', 'Final', 2),
(26, 'kitesurf_freestyle_tricks', 'Heats', 0),
(27, 'kitesurf_freestyle_tricks', 'Quarters', 1),
(28, 'kitesurf_freestyle_tricks', 'Semis', 2),
(29, 'kitesurf_freestyle_tricks', 'Final', 3),
(30, 'kitesurf_big_air', 'Heats', 0),
(31, 'kitesurf_big_air', 'Quarters', 1),
(32, 'kitesurf_big_air', 'Semis', 2),
(33, 'kitesurf_big_air', 'Final', 3),
(34, 'parkour_freestyle_fig', 'Qualification', 0),
(35, 'parkour_freestyle_fig', 'Final', 1),
(36, 'breaking_wdsf_comparative', 'Top 16', 0),
(37, 'breaking_wdsf_comparative', 'Quarters', 1),
(38, 'breaking_wdsf_comparative', 'Semis', 2),
(39, 'breaking_wdsf_comparative', 'Final', 3),
(52, 'snowboard_halfpipe_best_run', 'Qualification', 0),
(53, 'snowboard_halfpipe_best_run', 'Final', 1),
(60, 'snowboard_big_air_best_two', 'Qualification', 0),
(61, 'snowboard_big_air_best_two', 'Final', 1);

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

--
-- Table structure for table `scoring_format_judges`
--

CREATE TABLE `scoring_format_judges` (
  `id` int(11) NOT NULL,
  `format_id` varchar(100) NOT NULL,
  `min_judges` int(11) NOT NULL DEFAULT 5,
  `max_judges` int(11) DEFAULT NULL,
  `scale_min` decimal(5,2) DEFAULT 0.00,
  `scale_max` decimal(5,2) DEFAULT 100.00,
  `scale_type` varchar(50) DEFAULT 'numeric',
  `scale_custom` text DEFAULT NULL,
  `precision_decimal` int(11) DEFAULT 0,
  `drop_rule` varchar(100) DEFAULT 'none'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `scoring_format_judges`
--

INSERT INTO `scoring_format_judges` (`id`, `format_id`, `min_judges`, `max_judges`, `scale_min`, `scale_max`, `scale_type`, `scale_custom`, `precision_decimal`, `drop_rule`) VALUES
(1, 'snowboard_slopestyle_sections_oi', 5, 7, 0.00, 100.00, 'numeric', NULL, 0, 'none'),
(2, 'snowboard_halfpipe_best_run', 6, 7, 0.00, 100.00, 'numeric', NULL, 0, 'highest_and_lowest'),
(4, 'freeski_slopestyle_sections_oi', 5, 7, 0.00, 100.00, 'numeric', NULL, 0, 'none'),
(5, 'freeski_halfpipe_best_run', 6, 7, 0.00, 100.00, 'numeric', NULL, 0, 'drop high/low'),
(6, 'freeski_big_air_best_two', 5, 7, 0.00, 100.00, 'numeric', NULL, 0, 'drop high/low'),
(7, 'skate_street_hybrid', 5, 5, 0.00, 100.00, 'numeric', NULL, 0, 'drop high/low'),
(8, 'skate_park_runs', 5, 5, 0.00, 100.00, 'numeric', NULL, 0, 'drop high/low'),
(9, 'bmx_freestyle_park', 5, 7, 0.00, 100.00, 'numeric', NULL, 0, 'none'),
(10, 'inline_roller_freestyle', 5, 5, 0.00, 100.00, 'numeric', NULL, 0, 'none'),
(11, 'wake_cable_features_air', 5, 5, 0.00, 100.00, 'numeric', NULL, 0, 'none'),
(12, 'surf_two_best_waves', 5, 5, 0.00, 10.00, 'numeric', NULL, 1, 'drop high/low per wave'),
(13, 'kitesurf_freestyle_tricks', 5, 5, 0.00, 10.00, 'numeric', NULL, 1, 'drop high/low per trick'),
(14, 'kitesurf_big_air', 5, 5, 0.00, 10.00, 'numeric', NULL, 1, 'drop high/low per trick'),
(15, 'parkour_freestyle_fig', 6, 6, NULL, NULL, 'custom', 'E 0–15 + D open', 0, 'components'),
(16, 'breaking_wdsf_comparative', 5, 9, NULL, NULL, 'custom', 'comparative', 0, 'n/a'),
(20, 'snowboard_big_air_best_two', 5, 8, 0.00, 100.00, 'numeric', NULL, 0, 'highest_and_lowest');

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

--
-- Table structure for table `scoring_format_mode_config`
--

CREATE TABLE `scoring_format_mode_config` (
  `id` int(11) NOT NULL,
  `format_id` varchar(100) NOT NULL,
  `config_type` varchar(50) NOT NULL,
  `config_key` varchar(100) NOT NULL,
  `config_value` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `scoring_format_mode_config`
--

INSERT INTO `scoring_format_mode_config` (`id`, `format_id`, `config_type`, `config_key`, `config_value`) VALUES
(1, 'snowboard_slopestyle_sections_oi', 'sections', 'count', '6'),
(2, 'snowboard_slopestyle_sections_oi', 'sections', 'weight', '0.6'),
(3, 'snowboard_slopestyle_sections_oi', 'oi', 'weight', '0.4'),
(7, 'freeski_slopestyle_sections_oi', 'sections', 'count', '6'),
(8, 'freeski_slopestyle_sections_oi', 'sections', 'weight', '0.6'),
(9, 'freeski_slopestyle_sections_oi', 'oi', 'weight', '0.4'),
(10, 'freeski_big_air_best_two', 'attempts', 'max', '3'),
(11, 'freeski_big_air_best_two', 'attempts', 'bestN', '2'),
(12, 'freeski_big_air_best_two', 'attempts', 'diversity', 'different tricks/dirs'),
(13, 'skate_street_hybrid', 'runs', 'perRound', '2'),
(14, 'skate_street_hybrid', 'tricks', 'attempts', '5'),
(15, 'skate_street_hybrid', 'tricks', 'bestN', '2'),
(16, 'surf_two_best_waves', 'attempts', 'max', '12'),
(17, 'surf_two_best_waves', 'attempts', 'bestN', '2'),
(18, 'kitesurf_freestyle_tricks', 'oi', 'weight', '0.2'),
(19, 'kitesurf_freestyle_tricks', 'attempts', 'max', '7'),
(20, 'kitesurf_freestyle_tricks', 'attempts', 'bestN', '4'),
(21, 'kitesurf_big_air', 'attempts', 'max', '8'),
(22, 'kitesurf_big_air', 'attempts', 'bestN', '3'),
(50, 'snowboard_big_air_best_two', 'attempts', 'bestN', '2'),
(51, 'snowboard_big_air_best_two', 'attempts', 'diversity', 'different tricks/dirs'),
(52, 'snowboard_big_air_best_two', 'attempts', 'max', '3');

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

--
-- Table structure for table `scoring_format_results`
--

CREATE TABLE `scoring_format_results` (
  `id` int(11) NOT NULL,
  `format_id` varchar(100) NOT NULL,
  `header_name` varchar(255) NOT NULL,
  `sort_order` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `scoring_format_results`
--

INSERT INTO `scoring_format_results` (`id`, `format_id`, `header_name`, `sort_order`) VALUES
(1, 'snowboard_slopestyle_sections_oi', 'Rank', 0),
(2, 'snowboard_slopestyle_sections_oi', 'Bib', 1),
(3, 'snowboard_slopestyle_sections_oi', 'Name', 2),
(4, 'snowboard_slopestyle_sections_oi', 'Run 1', 3),
(5, 'snowboard_slopestyle_sections_oi', 'Run 2', 4),
(6, 'snowboard_slopestyle_sections_oi', 'Best', 5),
(7, 'snowboard_slopestyle_sections_oi', 'Sections (Σ)', 6),
(8, 'snowboard_slopestyle_sections_oi', 'OI', 7),
(9, 'snowboard_slopestyle_sections_oi', 'Total', 8),
(25, 'freeski_slopestyle_sections_oi', 'Rank', 0),
(26, 'freeski_slopestyle_sections_oi', 'Bib', 1),
(27, 'freeski_slopestyle_sections_oi', 'Name', 2),
(28, 'freeski_slopestyle_sections_oi', 'Run 1', 3),
(29, 'freeski_slopestyle_sections_oi', 'Run 2', 4),
(30, 'freeski_slopestyle_sections_oi', 'Best', 5),
(31, 'freeski_slopestyle_sections_oi', 'Sections (Σ)', 6),
(32, 'freeski_slopestyle_sections_oi', 'OI', 7),
(33, 'freeski_slopestyle_sections_oi', 'Total', 8),
(34, 'freeski_halfpipe_best_run', 'Rank', 0),
(35, 'freeski_halfpipe_best_run', 'Bib', 1),
(36, 'freeski_halfpipe_best_run', 'Name', 2),
(37, 'freeski_halfpipe_best_run', 'Run 1', 3),
(38, 'freeski_halfpipe_best_run', 'Run 2', 4),
(39, 'freeski_halfpipe_best_run', 'Run 3', 5),
(40, 'freeski_halfpipe_best_run', 'Best', 6),
(41, 'freeski_big_air_best_two', 'Rank', 0),
(42, 'freeski_big_air_best_two', 'Bib', 1),
(43, 'freeski_big_air_best_two', 'Name', 2),
(44, 'freeski_big_air_best_two', 'Jump 1', 3),
(45, 'freeski_big_air_best_two', 'Jump 2', 4),
(46, 'freeski_big_air_best_two', 'Jump 3', 5),
(47, 'freeski_big_air_best_two', 'Best Two', 6),
(48, 'freeski_big_air_best_two', 'Total', 7),
(49, 'skate_street_hybrid', 'Rank', 0),
(50, 'skate_street_hybrid', 'Bib', 1),
(51, 'skate_street_hybrid', 'Name', 2),
(52, 'skate_street_hybrid', 'Run 1', 3),
(53, 'skate_street_hybrid', 'Run 2', 4),
(54, 'skate_street_hybrid', 'Best Run', 5),
(55, 'skate_street_hybrid', 'Best Tricks (×2)', 6),
(56, 'skate_street_hybrid', 'Total', 7),
(57, 'skate_park_runs', 'Rank', 0),
(58, 'skate_park_runs', 'Bib', 1),
(59, 'skate_park_runs', 'Name', 2),
(60, 'skate_park_runs', 'Run 1', 3),
(61, 'skate_park_runs', 'Run 2', 4),
(62, 'skate_park_runs', 'Run 3', 5),
(63, 'skate_park_runs', 'Best', 6),
(64, 'bmx_freestyle_park', 'Rank', 0),
(65, 'bmx_freestyle_park', 'Bib', 1),
(66, 'bmx_freestyle_park', 'Name', 2),
(67, 'bmx_freestyle_park', 'Run 1', 3),
(68, 'bmx_freestyle_park', 'Run 2', 4),
(69, 'bmx_freestyle_park', 'Average/Best', 5),
(70, 'bmx_freestyle_park', 'Total', 6),
(71, 'inline_roller_freestyle', 'Rank', 0),
(72, 'inline_roller_freestyle', 'Bib', 1),
(73, 'inline_roller_freestyle', 'Name', 2),
(74, 'inline_roller_freestyle', 'Run 1', 3),
(75, 'inline_roller_freestyle', 'Run 2', 4),
(76, 'inline_roller_freestyle', 'Best', 5),
(77, 'wake_cable_features_air', 'Rank', 0),
(78, 'wake_cable_features_air', 'Bib', 1),
(79, 'wake_cable_features_air', 'Name', 2),
(80, 'wake_cable_features_air', 'Run 1', 3),
(81, 'wake_cable_features_air', 'Run 2', 4),
(82, 'wake_cable_features_air', 'Best', 5),
(83, 'surf_two_best_waves', 'Rank', 0),
(84, 'surf_two_best_waves', 'Name', 1),
(85, 'surf_two_best_waves', 'Wave 1', 2),
(86, 'surf_two_best_waves', 'Wave 2', 3),
(87, 'surf_two_best_waves', 'Wave 3', 4),
(88, 'surf_two_best_waves', '…', 5),
(89, 'surf_two_best_waves', 'Best Two', 6),
(90, 'surf_two_best_waves', 'Total /20', 7),
(91, 'kitesurf_freestyle_tricks', 'Rank', 0),
(92, 'kitesurf_freestyle_tricks', 'Name', 1),
(93, 'kitesurf_freestyle_tricks', 'Trick Attempts', 2),
(94, 'kitesurf_freestyle_tricks', 'Best 4', 3),
(95, 'kitesurf_freestyle_tricks', 'OI', 4),
(96, 'kitesurf_freestyle_tricks', 'Total', 5),
(97, 'kitesurf_big_air', 'Rank', 0),
(98, 'kitesurf_big_air', 'Name', 1),
(99, 'kitesurf_big_air', 'Jump Attempts', 2),
(100, 'kitesurf_big_air', 'Best 3', 3),
(101, 'kitesurf_big_air', 'Total', 4),
(102, 'parkour_freestyle_fig', 'Rank', 0),
(103, 'parkour_freestyle_fig', 'Name', 1),
(104, 'parkour_freestyle_fig', 'E total', 2),
(105, 'parkour_freestyle_fig', 'D1', 3),
(106, 'parkour_freestyle_fig', 'D2', 4),
(107, 'parkour_freestyle_fig', 'D3', 5),
(108, 'parkour_freestyle_fig', 'Ded.', 6),
(109, 'parkour_freestyle_fig', 'Final', 7),
(110, 'breaking_wdsf_comparative', 'Battle', 0),
(111, 'breaking_wdsf_comparative', 'Bboy/Bgirl A', 1),
(112, 'breaking_wdsf_comparative', 'Bboy/Bgirl B', 2),
(113, 'breaking_wdsf_comparative', 'Technique', 3),
(114, 'breaking_wdsf_comparative', 'Vocabulary', 4),
(115, 'breaking_wdsf_comparative', 'Originality', 5),
(116, 'breaking_wdsf_comparative', 'Execution', 6),
(117, 'breaking_wdsf_comparative', 'Musicality', 7),
(118, 'breaking_wdsf_comparative', 'Winner', 8),
(167, 'snowboard_halfpipe_best_run', 'Rank', 0),
(168, 'snowboard_halfpipe_best_run', 'Bib', 1),
(169, 'snowboard_halfpipe_best_run', 'Name', 2),
(170, 'snowboard_halfpipe_best_run', 'Run 1', 3),
(171, 'snowboard_halfpipe_best_run', 'Run 2', 4),
(172, 'snowboard_halfpipe_best_run', 'Run 3', 5),
(173, 'snowboard_halfpipe_best_run', 'Best', 6),
(198, 'snowboard_big_air_best_two', 'Rank', 0),
(199, 'snowboard_big_air_best_two', 'Bib', 1),
(200, 'snowboard_big_air_best_two', 'Name', 2),
(201, 'snowboard_big_air_best_two', 'Jump 1', 3),
(202, 'snowboard_big_air_best_two', 'Jump 2', 4),
(203, 'snowboard_big_air_best_two', 'Jump 3', 5),
(204, 'snowboard_big_air_best_two', 'Best Two', 6),
(205, 'snowboard_big_air_best_two', 'Total', 7);

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

--
-- Table structure for table `scoring_format_rounds`
--

CREATE TABLE `scoring_format_rounds` (
  `id` int(11) NOT NULL,
  `format_id` varchar(100) NOT NULL,
  `round_name` varchar(100) NOT NULL,
  `runs` int(11) DEFAULT 0,
  `aggregation` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `scoring_format_rounds`
--

INSERT INTO `scoring_format_rounds` (`id`, `format_id`, `round_name`, `runs`, `aggregation`) VALUES
(1, 'snowboard_slopestyle_sections_oi', 'qualifying', 2, 'best run'),
(2, 'snowboard_slopestyle_sections_oi', 'final', 3, 'best run'),
(7, 'freeski_slopestyle_sections_oi', 'qualifying', 2, 'best'),
(8, 'freeski_slopestyle_sections_oi', 'final', 3, 'best'),
(9, 'freeski_halfpipe_best_run', 'qualifying', 2, 'best'),
(10, 'freeski_halfpipe_best_run', 'final', 3, 'best'),
(11, 'freeski_big_air_best_two', 'qualifying', 3, 'best 2 of 3'),
(12, 'freeski_big_air_best_two', 'final', 3, 'best 2 of 3'),
(13, 'skate_street_hybrid', 'qualifying', 2, 'best run + best 2 tricks'),
(14, 'skate_street_hybrid', 'final', 2, 'best run + best 2 tricks'),
(15, 'skate_park_runs', 'qualifying', 3, 'best'),
(16, 'skate_park_runs', 'final', 3, 'best'),
(17, 'bmx_freestyle_park', 'qualifying', 2, 'average of 2'),
(18, 'bmx_freestyle_park', 'final', 2, 'best 1'),
(19, 'inline_roller_freestyle', 'qualifying', 2, 'best'),
(20, 'inline_roller_freestyle', 'final', 2, 'best'),
(21, 'wake_cable_features_air', 'qualifying', 2, 'best'),
(22, 'wake_cable_features_air', 'final', 2, 'best'),
(23, 'surf_two_best_waves', 'heat', 3, 'sum best 2 waves'),
(24, 'kitesurf_freestyle_tricks', 'heat', 8, 'sum best 4 + OI(20%)'),
(25, 'kitesurf_big_air', 'heat', 8, 'sum best 3'),
(26, 'parkour_freestyle_fig', 'qualifying', 1, 'E + top3 D - ded.'),
(27, 'parkour_freestyle_fig', 'final', 1, 'E + top3 D - ded.'),
(28, 'breaking_wdsf_comparative', 'battle', 1, 'majority of criteria'),
(41, 'snowboard_halfpipe_best_run', 'final', 3, 'best'),
(42, 'snowboard_halfpipe_best_run', 'qualifying', 2, 'best'),
(49, 'snowboard_big_air_best_two', 'final', 3, 'best_2_of_3'),
(50, 'snowboard_big_air_best_two', 'qualifying', 3, 'best_2_of_3');

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

--
-- Table structure for table `scoring_format_tiebreak`
--

CREATE TABLE `scoring_format_tiebreak` (
  `id` int(11) NOT NULL,
  `format_id` varchar(100) NOT NULL,
  `tiebreak_rule` varchar(255) NOT NULL,
  `sort_order` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `scoring_format_tiebreak`
--

INSERT INTO `scoring_format_tiebreak` (`id`, `format_id`, `tiebreak_rule`, `sort_order`) VALUES
(1, 'snowboard_slopestyle_sections_oi', 'higher section total', 0),
(2, 'snowboard_slopestyle_sections_oi', 'higher OI', 1),
(3, 'snowboard_slopestyle_sections_oi', 'HJ vote', 2),
(10, 'freeski_slopestyle_sections_oi', 'higher section total', 0),
(11, 'freeski_slopestyle_sections_oi', 'higher OI', 1),
(12, 'freeski_slopestyle_sections_oi', 'HJ vote', 2),
(13, 'freeski_halfpipe_best_run', '2nd best run', 0),
(14, 'freeski_halfpipe_best_run', '3rd best run', 1),
(15, 'freeski_halfpipe_best_run', 'HJ vote', 2),
(16, 'freeski_big_air_best_two', 'highest jump', 0),
(17, 'freeski_big_air_best_two', '2nd highest', 1),
(18, 'freeski_big_air_best_two', 'HJ vote', 2),
(19, 'skate_street_hybrid', 'best run', 0),
(20, 'skate_street_hybrid', 'best trick', 1),
(21, 'skate_street_hybrid', 'HJ vote', 2),
(22, 'skate_park_runs', '2nd best run', 0),
(23, 'skate_park_runs', '3rd best run', 1),
(24, 'skate_park_runs', 'HJ vote', 2),
(25, 'bmx_freestyle_park', 'highest single run', 0),
(26, 'bmx_freestyle_park', 'HJ vote', 1),
(27, 'inline_roller_freestyle', '2nd best run', 0),
(28, 'inline_roller_freestyle', 'HJ vote', 1),
(29, 'wake_cable_features_air', 'highest single run', 0),
(30, 'wake_cable_features_air', 'HJ vote', 1),
(31, 'surf_two_best_waves', 'highest wave', 0),
(32, 'surf_two_best_waves', '2nd highest', 1),
(33, 'surf_two_best_waves', '3rd highest', 2),
(34, 'kitesurf_freestyle_tricks', 'highest trick', 0),
(35, 'kitesurf_freestyle_tricks', '2nd highest', 1),
(36, 'kitesurf_freestyle_tricks', 'variety idx', 2),
(37, 'kitesurf_big_air', 'highest trick', 0),
(38, 'kitesurf_big_air', '2nd highest', 1),
(39, 'parkour_freestyle_fig', 'higher E', 0),
(40, 'parkour_freestyle_fig', 'higher D element', 1),
(41, 'parkour_freestyle_fig', 'HJ vote', 2),
(42, 'breaking_wdsf_comparative', 'additional round', 0),
(43, 'breaking_wdsf_comparative', 'HJ decision', 1),
(62, 'snowboard_halfpipe_best_run', '2nd best run', 0),
(63, 'snowboard_halfpipe_best_run', '3rd best run', 1),
(64, 'snowboard_halfpipe_best_run', 'HJ vote', 2),
(74, 'snowboard_big_air_best_two', 'highest jump', 0),
(75, 'snowboard_big_air_best_two', '2nd highest', 1),
(76, 'snowboard_big_air_best_two', 'HJ vote', 2);

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

--
-- Table structure for table `token_actions`
--

CREATE TABLE `token_actions` (
  `id` int(11) NOT NULL,
  `action_name` varchar(100) NOT NULL,
  `action_description` text DEFAULT NULL,
  `token_cost` decimal(8,2) NOT NULL,
  `category` varchar(50) DEFAULT 'general',
  `is_active` tinyint(1) DEFAULT 1,
  `code_snippet` text DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `token_actions`
--

INSERT INTO `token_actions` (`id`, `action_name`, `action_description`, `token_cost`, `category`, `is_active`, `code_snippet`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 'add_participant', 'Add new participant to event', 1.00, 'participants', 1, 'TokenSystem::charge(\'add_participant\', $user_id, [\'participant_id\' => $participant_id]);', NULL, '2025-08-16 02:01:42', '2025-08-16 02:01:42'),
(2, 'add_judge', 'Add new judge to system', 5.00, 'judges', 1, 'TokenSystem::charge(\'add_judge\', $user_id, [\'judge_id\' => $judge_id]);', NULL, '2025-08-16 02:01:42', '2025-08-16 02:01:42'),
(3, 'create_event', 'Create new event', 30.00, 'events', 1, 'TokenSystem::charge(\'create_event\', $user_id, [\'event_id\' => $event_id]);', NULL, '2025-08-16 02:01:42', '2025-08-16 02:01:42'),
(4, 'generate_pdf', 'Generate PDF report/certificate', 40.00, 'reports', 1, 'TokenSystem::charge(\'generate_pdf\', $user_id, [\'document_type\' => $type]);', NULL, '2025-08-16 02:01:42', '2025-08-16 02:01:42'),
(5, 'send_email', 'Send email notification', 0.50, 'communications', 1, 'TokenSystem::charge(\'send_email\', $user_id, [\'recipient\' => $email]);', NULL, '2025-08-16 02:01:42', '2025-08-16 02:01:42'),
(6, 'sms_notification', 'Send SMS notification', 2.00, 'communications', 1, 'TokenSystem::charge(\'sms_notification\', $user_id, [\'phone\' => $phone]);', NULL, '2025-08-16 02:01:42', '2025-08-16 02:01:42'),
(7, 'live_streaming', 'Enable live streaming for event', 100.00, 'premium', 1, 'TokenSystem::charge(\'live_streaming\', $user_id, [\'event_id\' => $event_id]);', NULL, '2025-08-16 02:01:42', '2025-08-16 02:01:42'),
(8, 'custom_branding', 'Apply custom branding to event', 50.00, 'premium', 1, 'TokenSystem::charge(\'custom_branding\', $user_id, [\'event_id\' => $event_id]);', NULL, '2025-08-16 02:01:42', '2025-08-16 02:01:42'),
(9, 'export_data', 'Export event data (CSV/Excel)', 10.00, 'reports', 1, 'TokenSystem::charge(\'export_data\', $user_id, [\'format\' => $format]);', NULL, '2025-08-16 02:01:42', '2025-08-16 02:01:42'),
(10, 'api_call', 'External API integration call', 0.10, 'integrations', 1, 'TokenSystem::charge(\'api_call\', $user_id, [\'api_service\' => $service]);', NULL, '2025-08-16 02:01:42', '2025-08-16 02:01:42'),
(11, 'print', 'fasdas', 1.00, 'reports', 1, 'TokenSystem::charge(\'print\', $user_id, [\'printSpace\' => $printSpace]);', 1, '2025-08-18 20:59:28', '2025-08-18 20:59:28'),
(12, 'generate_report', 'Generate and export reports', 10.00, 'reports', 1, 'TokenSystem::charge(\'generate_report\', $user_id, [\'report_type\' => $report_type]);', 1, '2025-08-18 21:03:12', '2025-08-18 21:03:12'),
(13, 'send_notification', 'Send notifications to participants/judges', 2.00, 'communications', 1, 'TokenSystem::charge(\'send_notification\', $user_id, [\'notification_id\' => $notification_id]);', 1, '2025-08-18 21:03:12', '2025-08-18 21:03:12'),
(14, 'premium_feature', 'Access premium features', 50.00, 'premium', 1, 'TokenSystem::charge(\'premium_feature\', $user_id, [\'feature_id\' => $feature_id]);', 1, '2025-08-18 21:03:12', '2025-08-18 21:03:12'),
(75, 'bulk_import', 'Import participants in bulk', 15.00, 'participants', 1, 'TokenSystem::charge(\'bulk_import\', $user_id, [\'import_id\' => $import_id]);', 1, '2025-08-18 22:30:13', '2025-08-18 22:30:13'),
(76, 'advanced_scoring', 'Use advanced scoring features', 25.00, 'scoring', 1, 'TokenSystem::charge(\'advanced_scoring\', $user_id, [\'scoring_id\' => $scoring_id]);', 1, '2025-08-18 22:30:13', '2025-08-18 22:30:13'),
(77, 'custom_reports', 'Generate custom reports', 20.00, 'reports', 1, 'TokenSystem::charge(\'custom_reports\', $user_id, [\'report_id\' => $report_id]);', 1, '2025-08-18 22:30:13', '2025-08-18 22:30:13');

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

--
-- Table structure for table `token_packages`
--

CREATE TABLE `token_packages` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `description` text DEFAULT NULL,
  `token_amount` decimal(10,2) NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `currency` varchar(3) DEFAULT 'USD',
  `bonus_tokens` decimal(8,2) DEFAULT 0.00,
  `is_active` tinyint(1) DEFAULT 1,
  `sort_order` int(11) DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `token_packages`
--

INSERT INTO `token_packages` (`id`, `name`, `description`, `token_amount`, `price`, `currency`, `bonus_tokens`, `is_active`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 'Starter Pack', 'Perfect for small events', 100.00, 19.99, 'USD', 0.00, 1, 1, '2025-08-16 02:01:42', '2025-08-16 02:01:42'),
(2, 'Professional Pack', 'Great for regular organizers', 500.00, 89.99, 'USD', 50.00, 1, 2, '2025-08-16 02:01:42', '2025-08-16 02:01:42'),
(3, 'Enterprise Pack', 'For large organizations', 1500.00, 249.99, 'USD', 200.00, 1, 3, '2025-08-16 02:01:42', '2025-08-16 02:01:42'),
(4, 'Premium Pack', 'Maximum value package', 3000.00, 449.99, 'USD', 500.00, 1, 4, '2025-08-16 02:01:42', '2025-08-16 02:01:42');

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

--
-- Table structure for table `token_transactions`
--

CREATE TABLE `token_transactions` (
  `id` int(11) NOT NULL,
  `budget_id` int(11) NOT NULL,
  `action_id` int(11) DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  `transaction_type` enum('debit','credit','purchase','refund') NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `balance_before` decimal(10,2) NOT NULL,
  `balance_after` decimal(10,2) NOT NULL,
  `description` text DEFAULT NULL,
  `reference_id` varchar(100) DEFAULT NULL,
  `reference_type` varchar(50) DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `created_by` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `token_transactions`
--

INSERT INTO `token_transactions` (`id`, `budget_id`, `action_id`, `user_id`, `transaction_type`, `amount`, `balance_before`, `balance_after`, `description`, `reference_id`, `reference_type`, `ip_address`, `user_agent`, `created_at`, `created_by`) VALUES
(5, 18, NULL, 0, 'credit', 5.00, 0.00, 5.00, '', NULL, NULL, NULL, NULL, '2025-08-18 22:34:53', 1),
(6, 25, NULL, 1, 'credit', 123.00, 0.00, 123.00, 'Initial budget allocation', NULL, NULL, NULL, NULL, '2025-08-18 23:10:53', 1),
(7, 1, NULL, 1, 'credit', 154.00, 1000.00, 1154.00, 'Token credit', NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-18 23:46:29', NULL);

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `username` varchar(50) DEFAULT NULL,
  `first_name` varchar(100) DEFAULT NULL,
  `last_name` varchar(100) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `role` enum('super_admin','admin','judge','head_judge','office','media','participant') DEFAULT 'participant',
  `judge_id` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `last_login` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `username`, `first_name`, `last_name`, `password`, `role`, `judge_id`, `created_at`, `last_login`) VALUES
(1, 'admin', NULL, NULL, 'admin123', 'admin', 1, '2025-08-06 15:23:21', NULL),
(3, 'judge2', NULL, NULL, 'judgepass', 'judge', NULL, '2025-08-06 15:23:21', NULL),
(6, 'karolina_6', NULL, NULL, 'judge275', 'judge', NULL, '2025-08-06 15:23:21', NULL),
(8, 'Łukasz_gasienica_8', NULL, NULL, 'judge642', 'judge', 8, '2025-08-06 15:23:21', NULL),
(14, 'admin_14', NULL, NULL, 'judge640', 'judge', 14, '2025-08-06 15:23:21', NULL),
(23, 'sprzęt_dj_ski', NULL, NULL, 'judge866', 'judge', 0, '2025-08-06 15:23:21', NULL),
(29, 'miksery', NULL, NULL, 'judge197', 'judge', 1, '2025-08-06 15:23:21', NULL),
(30, 'eskes', NULL, NULL, 'judge162', 'judge', 1, '2025-08-06 15:23:21', NULL),
(31, 'piatek', NULL, NULL, 'judge103', 'head_judge', 1, '2025-08-06 15:23:31', NULL),
(33, 'd', NULL, NULL, '$2y$10$GR7EL2G41RgwuVe8YHwzkueRB9XLv6uARnyJhG3Dk0SwIjbwHJLuu', 'judge', NULL, '2025-08-18 10:23:12', NULL);

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

--
-- Table structure for table `user_groups`
--

CREATE TABLE `user_groups` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `description` text DEFAULT NULL,
  `color` varchar(7) DEFAULT '#007bff',
  `is_active` tinyint(1) DEFAULT 1,
  `created_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `budget_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `user_groups`
--

INSERT INTO `user_groups` (`id`, `name`, `description`, `color`, `is_active`, `created_by`, `created_at`, `updated_at`, `budget_id`) VALUES
(1, 'Administrators', 'System administrators with full access', '#dc3545', 1, NULL, '2025-08-16 01:34:19', '2025-08-18 22:30:13', NULL),
(2, 'Event Organizers', 'Users who can create and manage events', '#fd7e14', 1, NULL, '2025-08-16 01:34:19', '2025-08-16 01:34:19', NULL),
(3, 'Media Team', 'Media personnel with access to photos/videos', '#6f42c1', 1, NULL, '2025-08-16 01:34:19', '2025-08-16 01:34:19', NULL),
(4, 'Office Staff', 'Administrative office personnel', '#20c997', 1, NULL, '2025-08-16 01:34:19', '2025-08-16 01:34:19', NULL),
(5, 'VIP Access', 'Special access group for VIP users', '#ffc107', 1, NULL, '2025-08-16 01:34:19', '2025-08-16 01:34:19', NULL),
(6, 'testowa grup', '', '#9c8f07', 1, 1, '2025-08-18 20:40:31', '2025-08-18 20:40:31', NULL),
(7, 'sepa', '', '#007bff', 1, 1, '2025-08-18 22:51:54', '2025-08-18 22:51:54', NULL);

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

--
-- Table structure for table `user_group_memberships`
--

CREATE TABLE `user_group_memberships` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `group_id` int(11) NOT NULL,
  `role_in_group` enum('member','manager','owner') DEFAULT 'member',
  `joined_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `added_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `user_group_memberships`
--

INSERT INTO `user_group_memberships` (`id`, `user_id`, `group_id`, `role_in_group`, `joined_at`, `added_by`, `created_at`) VALUES
(2, 8, 1, 'member', '2025-08-18 20:50:50', NULL, '2025-08-18 22:48:55'),
(4, 29, 1, '', '2025-08-18 20:51:31', NULL, '2025-08-18 22:48:55'),
(5, 33, 2, '', '2025-08-18 20:51:56', NULL, '2025-08-18 22:48:55'),
(6, 1, 5, '', '2025-08-18 20:54:00', NULL, '2025-08-18 22:48:55'),
(7, 1, 1, '', '2025-08-18 21:09:12', NULL, '2025-08-18 22:48:55'),
(8, 30, 6, '', '2025-08-18 22:48:13', 1, '2025-08-18 22:48:55'),
(9, 1, 7, 'owner', '2025-08-18 22:51:54', 1, '2025-08-18 22:51:54');

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

--
-- Table structure for table `user_permissions`
--

CREATE TABLE `user_permissions` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `permission` varchar(100) NOT NULL,
  `granted_by` int(11) DEFAULT NULL,
  `granted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `expires_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `user_permissions`
--

INSERT INTO `user_permissions` (`id`, `user_id`, `permission`, `granted_by`, `granted_at`, `expires_at`) VALUES
(1, 1, 'login', 1, '2025-08-16 01:34:19', NULL),
(2, 3, 'login', 1, '2025-08-16 01:34:19', NULL),
(3, 6, 'login', 1, '2025-08-16 01:34:19', NULL),
(4, 8, 'login', 1, '2025-08-16 01:34:19', NULL),
(5, 14, 'login', 1, '2025-08-16 01:34:19', NULL),
(6, 23, 'login', 1, '2025-08-16 01:34:19', NULL),
(7, 29, 'login', 1, '2025-08-16 01:34:19', NULL),
(8, 30, 'login', 1, '2025-08-16 01:34:19', NULL),
(9, 31, 'login', 1, '2025-08-16 01:34:19', NULL),
(16, 33, 'login', 1, '2025-08-18 08:23:12', NULL);

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

--
-- Table structure for table `user_profiles`
--

CREATE TABLE `user_profiles` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `full_name` varchar(255) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `emergency_contact` varchar(255) DEFAULT NULL,
  `emergency_phone` varchar(50) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `avatar` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `user_profiles`
--

INSERT INTO `user_profiles` (`id`, `user_id`, `full_name`, `email`, `phone`, `address`, `emergency_contact`, `emergency_phone`, `notes`, `avatar`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 1, 'Admin', 'admin@example.com', NULL, NULL, NULL, NULL, NULL, NULL, 1, '2025-08-16 01:39:05', '2025-08-16 01:39:05'),
(2, 3, 'Judge2', 'judge2@example.com', '', NULL, NULL, NULL, NULL, NULL, 1, '2025-08-16 01:39:05', '2025-08-18 20:52:47'),
(3, 6, 'Karolina 6', 'karolina_6@example.com', NULL, NULL, NULL, NULL, NULL, NULL, 1, '2025-08-16 01:39:05', '2025-08-16 01:39:05'),
(4, 8, 'Łukasz Gasienica 8', 'Łukasz_gasienica_8@example.com', NULL, NULL, NULL, NULL, NULL, NULL, 1, '2025-08-16 01:39:05', '2025-08-16 01:39:05'),
(5, 14, 'Admin 14', 'admin_14@example.com', NULL, NULL, NULL, NULL, NULL, NULL, 1, '2025-08-16 01:39:05', '2025-08-16 01:39:05'),
(6, 23, 'Sprzęt Dj Ski', 'sprzęt_dj_ski@example.com', NULL, NULL, NULL, NULL, NULL, NULL, 1, '2025-08-16 01:39:05', '2025-08-16 01:39:05'),
(7, 29, 'Miksery', 'miksery@example.com', NULL, NULL, NULL, NULL, NULL, NULL, 1, '2025-08-16 01:39:05', '2025-08-16 01:39:05'),
(8, 30, 'Eskes', 'eskes@example.com', NULL, NULL, NULL, NULL, NULL, NULL, 1, '2025-08-16 01:39:05', '2025-08-16 01:39:05'),
(9, 31, 'Piatek', 'piatek@example.com', '', NULL, NULL, NULL, NULL, NULL, 1, '2025-08-16 01:39:05', '2025-08-18 20:54:31'),
(10, 33, 'd', 'lukas@nowagency.pl', '', NULL, NULL, NULL, NULL, NULL, 1, '2025-08-18 08:23:12', '2025-08-18 08:23:12');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `bib_assignments`
--
ALTER TABLE `bib_assignments`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `event_id` (`event_id`,`bib_number`),
  ADD UNIQUE KEY `event_id_2` (`event_id`,`participant_id`);

--
-- Indexes for table `bib_series`
--
ALTER TABLE `bib_series`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `budgets`
--
ALTER TABLE `budgets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_budgets_group_id` (`group_id`),
  ADD KEY `idx_group_id` (`group_id`),
  ADD KEY `idx_user_id` (`user_id`),
  ADD KEY `idx_active` (`is_active`);

--
-- Indexes for table `events`
--
ALTER TABLE `events`
  ADD PRIMARY KEY (`id`),
  ADD KEY `owner_group_id` (`owner_group_id`);

--
-- Indexes for table `event_categories`
--
ALTER TABLE `event_categories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_event_categories_event_id` (`event_id`);

--
-- Indexes for table `event_control_points`
--
ALTER TABLE `event_control_points`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_event_control_points_event_id` (`event_id`),
  ADD KEY `idx_event_control_points_sort_order` (`sort_order`);

--
-- Indexes for table `event_heat_settings`
--
ALTER TABLE `event_heat_settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `event_id` (`event_id`,`heat_number`),
  ADD KEY `ix_event_heat__flow_source_heat` (`flow_source_heat`),
  ADD KEY `idx_event_heat_discipline` (`discipline`),
  ADD KEY `idx_event_heat_difficulty` (`difficulty_level`),
  ADD KEY `idx_event_heat_scoring` (`scoring_method`),
  ADD KEY `idx_event_heat_weather` (`weather_dependent`);

--
-- Indexes for table `event_notifications`
--
ALTER TABLE `event_notifications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_event_created` (`event_id`,`created_at`),
  ADD KEY `idx_event_id` (`event_id`),
  ADD KEY `idx_category` (`category`),
  ADD KEY `idx_event_category` (`event_id`,`category`);

--
-- Indexes for table `event_notification_settings`
--
ALTER TABLE `event_notification_settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_event_settings` (`event_id`),
  ADD KEY `idx_event_id` (`event_id`);

--
-- Indexes for table `event_participants`
--
ALTER TABLE `event_participants`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `event_id` (`event_id`,`heat_number`,`participant_id`),
  ADD UNIQUE KEY `unique_assignment` (`event_id`,`heat_number`,`participant_id`),
  ADD KEY `participant_id` (`participant_id`),
  ADD KEY `category_id` (`category_id`);

--
-- Indexes for table `figure_categories`
--
ALTER TABLE `figure_categories`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_sport_category` (`sport_name`,`category_name`);

--
-- Indexes for table `figure_items`
--
ALTER TABLE `figure_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_sport_category` (`sport_name`,`category_name`);

--
-- Indexes for table `figure_sports`
--
ALTER TABLE `figure_sports`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `sport_name` (`sport_name`);

--
-- Indexes for table `figure_sport_details`
--
ALTER TABLE `figure_sport_details`
  ADD PRIMARY KEY (`sport_id`),
  ADD UNIQUE KEY `slug` (`slug`);

--
-- Indexes for table `figure_sport_formats`
--
ALTER TABLE `figure_sport_formats`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `sport_id` (`sport_id`,`name`);

--
-- Indexes for table `group_event_access`
--
ALTER TABLE `group_event_access`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_group_event` (`group_id`,`event_id`),
  ADD KEY `granted_by` (`granted_by`),
  ADD KEY `idx_group_event_access_group` (`group_id`),
  ADD KEY `idx_group_event_access_event` (`event_id`);

--
-- Indexes for table `judges`
--
ALTER TABLE `judges`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `judge_assignments`
--
ALTER TABLE `judge_assignments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `judge_assignments_ibfk_2` (`judge_id`),
  ADD KEY `judge_assignments_control_point_fk` (`control_point_id`),
  ADD KEY `ix_ja_event_judge_heat` (`event_id`,`judge_id`,`heat_number`),
  ADD KEY `ix_ja_cp` (`event_control_point_id`);

--
-- Indexes for table `notification_reads`
--
ALTER TABLE `notification_reads`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_read` (`notification_id`,`user_id`);

--
-- Indexes for table `participants`
--
ALTER TABLE `participants`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `participants_event`
--
ALTER TABLE `participants_event`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_participant_event` (`participant_id`,`event_id`),
  ADD KEY `event_id` (`event_id`);

--
-- Indexes for table `result_configurations`
--
ALTER TABLE `result_configurations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_event_view` (`event_id`,`view_type`),
  ADD KEY `idx_status` (`status`),
  ADD KEY `idx_order` (`display_order`),
  ADD KEY `created_by` (`created_by`);

--
-- Indexes for table `result_styling`
--
ALTER TABLE `result_styling`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_event_config` (`event_id`,`config_id`);

--
-- Indexes for table `runs`
--
ALTER TABLE `runs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `event_participant_id` (`event_participant_id`);

--
-- Indexes for table `scores`
--
ALTER TABLE `scores`
  ADD PRIMARY KEY (`id`),
  ADD KEY `run_id` (`run_id`),
  ADD KEY `idx_approved` (`is_approved`),
  ADD KEY `fk_scores_judge_id` (`judge_id`),
  ADD KEY `scores_approved_by_fk` (`approved_by`),
  ADD KEY `ix_scores_cp` (`control_point_id`),
  ADD KEY `idx_scores_control_point_id` (`control_point_id`);

--
-- Indexes for table `scoring_formats`
--
ALTER TABLE `scoring_formats`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `format_id` (`format_id`);

--
-- Indexes for table `scoring_format_criteria`
--
ALTER TABLE `scoring_format_criteria`
  ADD PRIMARY KEY (`id`),
  ADD KEY `format_id` (`format_id`);

--
-- Indexes for table `scoring_format_diversity_rules`
--
ALTER TABLE `scoring_format_diversity_rules`
  ADD PRIMARY KEY (`id`),
  ADD KEY `format_id` (`format_id`);

--
-- Indexes for table `scoring_format_flow`
--
ALTER TABLE `scoring_format_flow`
  ADD PRIMARY KEY (`id`),
  ADD KEY `format_id` (`format_id`);

--
-- Indexes for table `scoring_format_judges`
--
ALTER TABLE `scoring_format_judges`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_format_id` (`format_id`);

--
-- Indexes for table `scoring_format_mode_config`
--
ALTER TABLE `scoring_format_mode_config`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_config` (`format_id`,`config_type`,`config_key`);

--
-- Indexes for table `scoring_format_results`
--
ALTER TABLE `scoring_format_results`
  ADD PRIMARY KEY (`id`),
  ADD KEY `format_id` (`format_id`);

--
-- Indexes for table `scoring_format_rounds`
--
ALTER TABLE `scoring_format_rounds`
  ADD PRIMARY KEY (`id`),
  ADD KEY `format_id` (`format_id`);

--
-- Indexes for table `scoring_format_tiebreak`
--
ALTER TABLE `scoring_format_tiebreak`
  ADD PRIMARY KEY (`id`),
  ADD KEY `format_id` (`format_id`);

--
-- Indexes for table `token_actions`
--
ALTER TABLE `token_actions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `action_name` (`action_name`),
  ADD KEY `created_by` (`created_by`),
  ADD KEY `idx_token_actions_name` (`action_name`),
  ADD KEY `idx_token_actions_active` (`is_active`);

--
-- Indexes for table `token_packages`
--
ALTER TABLE `token_packages`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `token_transactions`
--
ALTER TABLE `token_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_token_transactions_budget_id` (`budget_id`),
  ADD KEY `idx_token_transactions_user_id` (`user_id`),
  ADD KEY `idx_token_transactions_created_at` (`created_at`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `username` (`username`),
  ADD KEY `judge_id` (`judge_id`);

--
-- Indexes for table `user_groups`
--
ALTER TABLE `user_groups`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `name` (`name`),
  ADD KEY `created_by` (`created_by`),
  ADD KEY `budget_id` (`budget_id`);

--
-- Indexes for table `user_group_memberships`
--
ALTER TABLE `user_group_memberships`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_user_group` (`user_id`,`group_id`),
  ADD KEY `idx_group_memberships_user_id` (`user_id`),
  ADD KEY `idx_group_memberships_group_id` (`group_id`);

--
-- Indexes for table `user_permissions`
--
ALTER TABLE `user_permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_user_permission` (`user_id`,`permission`),
  ADD KEY `granted_by` (`granted_by`),
  ADD KEY `idx_user_permissions_user` (`user_id`);

--
-- Indexes for table `user_profiles`
--
ALTER TABLE `user_profiles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `email` (`email`),
  ADD KEY `idx_user_profiles_user_id` (`user_id`),
  ADD KEY `idx_user_profiles_email` (`email`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `bib_assignments`
--
ALTER TABLE `bib_assignments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=451;

--
-- AUTO_INCREMENT for table `bib_series`
--
ALTER TABLE `bib_series`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `budgets`
--
ALTER TABLE `budgets`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT for table `events`
--
ALTER TABLE `events`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `event_categories`
--
ALTER TABLE `event_categories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `event_control_points`
--
ALTER TABLE `event_control_points`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `event_heat_settings`
--
ALTER TABLE `event_heat_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=471;

--
-- AUTO_INCREMENT for table `event_notifications`
--
ALTER TABLE `event_notifications`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=538;

--
-- AUTO_INCREMENT for table `event_notification_settings`
--
ALTER TABLE `event_notification_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `event_participants`
--
ALTER TABLE `event_participants`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2071;

--
-- AUTO_INCREMENT for table `figure_categories`
--
ALTER TABLE `figure_categories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=35;

--
-- AUTO_INCREMENT for table `figure_items`
--
ALTER TABLE `figure_items`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=204;

--
-- AUTO_INCREMENT for table `figure_sports`
--
ALTER TABLE `figure_sports`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `figure_sport_formats`
--
ALTER TABLE `figure_sport_formats`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;

--
-- AUTO_INCREMENT for table `group_event_access`
--
ALTER TABLE `group_event_access`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `judges`
--
ALTER TABLE `judges`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `judge_assignments`
--
ALTER TABLE `judge_assignments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=361;

--
-- AUTO_INCREMENT for table `notification_reads`
--
ALTER TABLE `notification_reads`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=391;

--
-- AUTO_INCREMENT for table `participants`
--
ALTER TABLE `participants`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1368;

--
-- AUTO_INCREMENT for table `participants_event`
--
ALTER TABLE `participants_event`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=818;

--
-- AUTO_INCREMENT for table `result_configurations`
--
ALTER TABLE `result_configurations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;

--
-- AUTO_INCREMENT for table `result_styling`
--
ALTER TABLE `result_styling`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `runs`
--
ALTER TABLE `runs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=489;

--
-- AUTO_INCREMENT for table `scores`
--
ALTER TABLE `scores`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1007;

--
-- AUTO_INCREMENT for table `scoring_formats`
--
ALTER TABLE `scoring_formats`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT for table `scoring_format_criteria`
--
ALTER TABLE `scoring_format_criteria`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=163;

--
-- AUTO_INCREMENT for table `scoring_format_diversity_rules`
--
ALTER TABLE `scoring_format_diversity_rules`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;

--
-- AUTO_INCREMENT for table `scoring_format_flow`
--
ALTER TABLE `scoring_format_flow`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=62;

--
-- AUTO_INCREMENT for table `scoring_format_judges`
--
ALTER TABLE `scoring_format_judges`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;

--
-- AUTO_INCREMENT for table `scoring_format_mode_config`
--
ALTER TABLE `scoring_format_mode_config`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=53;

--
-- AUTO_INCREMENT for table `scoring_format_results`
--
ALTER TABLE `scoring_format_results`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=206;

--
-- AUTO_INCREMENT for table `scoring_format_rounds`
--
ALTER TABLE `scoring_format_rounds`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=51;

--
-- AUTO_INCREMENT for table `scoring_format_tiebreak`
--
ALTER TABLE `scoring_format_tiebreak`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=77;

--
-- AUTO_INCREMENT for table `token_actions`
--
ALTER TABLE `token_actions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=78;

--
-- AUTO_INCREMENT for table `token_packages`
--
ALTER TABLE `token_packages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `token_transactions`
--
ALTER TABLE `token_transactions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;

--
-- AUTO_INCREMENT for table `user_groups`
--
ALTER TABLE `user_groups`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `user_group_memberships`
--
ALTER TABLE `user_group_memberships`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `user_permissions`
--
ALTER TABLE `user_permissions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT for table `user_profiles`
--
ALTER TABLE `user_profiles`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `budgets`
--
ALTER TABLE `budgets`
  ADD CONSTRAINT `budgets_user_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `events`
--
ALTER TABLE `events`
  ADD CONSTRAINT `events_ibfk_1` FOREIGN KEY (`owner_group_id`) REFERENCES `user_groups` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `event_categories`
--
ALTER TABLE `event_categories`
  ADD CONSTRAINT `event_categories_ibfk_1` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `event_control_points`
--
ALTER TABLE `event_control_points`
  ADD CONSTRAINT `event_control_points_ibfk_1` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `event_participants`
--
ALTER TABLE `event_participants`
  ADD CONSTRAINT `event_participants_ibfk_1` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `event_participants_ibfk_2` FOREIGN KEY (`participant_id`) REFERENCES `participants` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `event_participants_ibfk_3` FOREIGN KEY (`category_id`) REFERENCES `event_categories` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `figure_categories`
--
ALTER TABLE `figure_categories`
  ADD CONSTRAINT `figure_categories_ibfk_1` FOREIGN KEY (`sport_name`) REFERENCES `figure_sports` (`sport_name`) ON DELETE CASCADE;

--
-- Constraints for table `figure_items`
--
ALTER TABLE `figure_items`
  ADD CONSTRAINT `figure_items_ibfk_1` FOREIGN KEY (`sport_name`) REFERENCES `figure_sports` (`sport_name`) ON DELETE CASCADE;

--
-- Constraints for table `figure_sport_details`
--
ALTER TABLE `figure_sport_details`
  ADD CONSTRAINT `fk_fig_details_sport` FOREIGN KEY (`sport_id`) REFERENCES `figure_sports` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `figure_sport_formats`
--
ALTER TABLE `figure_sport_formats`
  ADD CONSTRAINT `fk_fig_formats_sport` FOREIGN KEY (`sport_id`) REFERENCES `figure_sports` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `group_event_access`
--
ALTER TABLE `group_event_access`
  ADD CONSTRAINT `group_event_access_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `user_groups` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `group_event_access_ibfk_2` FOREIGN KEY (`granted_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `judge_assignments`
--
ALTER TABLE `judge_assignments`
  ADD CONSTRAINT `fk_ja_event_control_point` FOREIGN KEY (`event_control_point_id`) REFERENCES `event_control_points` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_judge_assignments_judge_id` FOREIGN KEY (`judge_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `judge_assignments_control_point_fk` FOREIGN KEY (`control_point_id`) REFERENCES `event_control_points` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `judge_assignments_ibfk_1` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `judge_assignments_ibfk_2` FOREIGN KEY (`judge_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `participants_event`
--
ALTER TABLE `participants_event`
  ADD CONSTRAINT `participants_event_ibfk_1` FOREIGN KEY (`participant_id`) REFERENCES `participants` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `participants_event_ibfk_2` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `result_configurations`
--
ALTER TABLE `result_configurations`
  ADD CONSTRAINT `result_configurations_ibfk_1` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `result_configurations_ibfk_2` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `result_styling`
--
ALTER TABLE `result_styling`
  ADD CONSTRAINT `result_styling_ibfk_1` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `runs`
--
ALTER TABLE `runs`
  ADD CONSTRAINT `runs_ibfk_1` FOREIGN KEY (`event_participant_id`) REFERENCES `event_participants` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `scores`
--
ALTER TABLE `scores`
  ADD CONSTRAINT `fk_scores_event_cp` FOREIGN KEY (`control_point_id`) REFERENCES `event_control_points` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_scores_judge_id` FOREIGN KEY (`judge_id`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `scores_approved_by_fk` FOREIGN KEY (`approved_by`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `scores_ibfk_1` FOREIGN KEY (`run_id`) REFERENCES `runs` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `scoring_format_criteria`
--
ALTER TABLE `scoring_format_criteria`
  ADD CONSTRAINT `scoring_format_criteria_ibfk_1` FOREIGN KEY (`format_id`) REFERENCES `scoring_formats` (`format_id`) ON DELETE CASCADE;

--
-- Constraints for table `scoring_format_diversity_rules`
--
ALTER TABLE `scoring_format_diversity_rules`
  ADD CONSTRAINT `scoring_format_diversity_rules_ibfk_1` FOREIGN KEY (`format_id`) REFERENCES `scoring_formats` (`format_id`) ON DELETE CASCADE;

--
-- Constraints for table `scoring_format_flow`
--
ALTER TABLE `scoring_format_flow`
  ADD CONSTRAINT `scoring_format_flow_ibfk_1` FOREIGN KEY (`format_id`) REFERENCES `scoring_formats` (`format_id`) ON DELETE CASCADE;

--
-- Constraints for table `scoring_format_judges`
--
ALTER TABLE `scoring_format_judges`
  ADD CONSTRAINT `scoring_format_judges_ibfk_1` FOREIGN KEY (`format_id`) REFERENCES `scoring_formats` (`format_id`) ON DELETE CASCADE;

--
-- Constraints for table `scoring_format_mode_config`
--
ALTER TABLE `scoring_format_mode_config`
  ADD CONSTRAINT `scoring_format_mode_config_ibfk_1` FOREIGN KEY (`format_id`) REFERENCES `scoring_formats` (`format_id`) ON DELETE CASCADE;

--
-- Constraints for table `scoring_format_results`
--
ALTER TABLE `scoring_format_results`
  ADD CONSTRAINT `scoring_format_results_ibfk_1` FOREIGN KEY (`format_id`) REFERENCES `scoring_formats` (`format_id`) ON DELETE CASCADE;

--
-- Constraints for table `scoring_format_rounds`
--
ALTER TABLE `scoring_format_rounds`
  ADD CONSTRAINT `scoring_format_rounds_ibfk_1` FOREIGN KEY (`format_id`) REFERENCES `scoring_formats` (`format_id`) ON DELETE CASCADE;

--
-- Constraints for table `scoring_format_tiebreak`
--
ALTER TABLE `scoring_format_tiebreak`
  ADD CONSTRAINT `scoring_format_tiebreak_ibfk_1` FOREIGN KEY (`format_id`) REFERENCES `scoring_formats` (`format_id`) ON DELETE CASCADE;

--
-- Constraints for table `token_actions`
--
ALTER TABLE `token_actions`
  ADD CONSTRAINT `token_actions_ibfk_1` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `user_groups`
--
ALTER TABLE `user_groups`
  ADD CONSTRAINT `user_groups_ibfk_1` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `user_groups_ibfk_2` FOREIGN KEY (`budget_id`) REFERENCES `budgets` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `user_group_memberships`
--
ALTER TABLE `user_group_memberships`
  ADD CONSTRAINT `user_group_memberships_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `user_group_memberships_ibfk_2` FOREIGN KEY (`group_id`) REFERENCES `user_groups` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `user_permissions`
--
ALTER TABLE `user_permissions`
  ADD CONSTRAINT `user_permissions_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `user_permissions_ibfk_2` FOREIGN KEY (`granted_by`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `user_profiles`
--
ALTER TABLE `user_profiles`
  ADD CONSTRAINT `user_profiles_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
COMMIT;

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