feat: Implement friendly match management features
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 44s

- Added backend support for managing friendly matches including listing, creating, updating, and deleting matches.
- Introduced a new database table `friendly_match` with relevant fields for match details.
- Created a service layer to handle business logic related to friendly matches.
- Developed API routes for friendly match operations with appropriate authentication and authorization.
- Added a Vue component for managing participants in friendly matches, allowing selection of members and manual entry of names.
- Updated existing tournament editor screens to integrate friendly match functionalities.
This commit is contained in:
Torsten Schulz (local)
2026-05-18 00:43:42 +02:00
parent 040e758044
commit 5dfdcb63bc
16 changed files with 1551 additions and 87 deletions

View File

@@ -0,0 +1,2 @@
ALTER TABLE `friendly_match`
ADD COLUMN IF NOT EXISTS `result_details` JSON NULL AFTER `guest_participants`;

View File

@@ -0,0 +1,30 @@
CREATE TABLE IF NOT EXISTS `friendly_match` (
`id` INT NOT NULL AUTO_INCREMENT,
`club_id` INT NOT NULL,
`date` DATE NOT NULL,
`time` TIME NULL,
`home_team_name` VARCHAR(255) NOT NULL,
`guest_team_name` VARCHAR(255) NOT NULL,
`location_name` VARCHAR(255) NULL,
`location_address` VARCHAR(255) NULL,
`location_city` VARCHAR(255) NULL,
`location_zip` VARCHAR(32) NULL,
`match_system` VARCHAR(120) NOT NULL DEFAULT 'Braunschweiger System',
`singles_count` INT NOT NULL DEFAULT 12,
`doubles_count` INT NOT NULL DEFAULT 4,
`winning_sets` INT NOT NULL DEFAULT 3,
`home_match_points` INT NOT NULL DEFAULT 0,
`guest_match_points` INT NOT NULL DEFAULT 0,
`is_completed` TINYINT(1) NOT NULL DEFAULT 0,
`home_participants` JSON NULL,
`guest_participants` JSON NULL,
`result_details` JSON NULL,
`players_ready` JSON NULL,
`players_planned` JSON NULL,
`players_played` JSON NULL,
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_friendly_match_club_date` (`club_id`, `date`),
KEY `idx_friendly_match_completed` (`club_id`, `is_completed`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;