обновление для Кубка России

переделаны все парсеры на ссылки из базы
This commit is contained in:
2026-07-02 12:46:29 +03:00
parent b0fe3ad5a4
commit 57907fd86b
29 changed files with 1838 additions and 240 deletions

83
wfl.sql
View File

@@ -55,12 +55,14 @@ CREATE TABLE matches (
away_score INTEGER,
tour VARCHAR(100),
season VARCHAR(50),
source_key VARCHAR(50),
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP NOT NULL DEFAULT NOW()
);
CREATE INDEX idx_matches_external_id ON matches(external_id);
CREATE INDEX idx_matches_season ON matches(season);
CREATE INDEX idx_matches_source_key ON matches(source_key);
CREATE INDEX idx_matches_date ON matches(match_date);
@@ -85,3 +87,84 @@ CREATE TABLE standings (
);
CREATE INDEX idx_standings_season ON standings(season);
-- =========================
-- PROJECT SETTINGS / PARSER SOURCES
-- =========================
CREATE TABLE IF NOT EXISTS app_settings (
key VARCHAR(100) PRIMARY KEY,
value TEXT NOT NULL DEFAULT '',
updated_at TIMESTAMP NOT NULL DEFAULT NOW()
);
CREATE TABLE IF NOT EXISTS parser_sources (
key VARCHAR(50) PRIMARY KEY,
title VARCHAR(255) NOT NULL,
tournament_id VARCHAR(100),
round_id VARCHAR(100),
season VARCHAR(50),
calendar_type VARCHAR(50) NOT NULL DEFAULT 'tours',
logo_base_path TEXT,
photo_base_path TEXT,
teams_url TEXT,
schedule_url TEXT,
standings_url TEXT,
match_base_url TEXT,
base_url TEXT NOT NULL DEFAULT 'https://wfl.rfs.ru',
sort_order INTEGER NOT NULL DEFAULT 100,
is_active BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP NOT NULL DEFAULT NOW()
);
INSERT INTO app_settings (key, value, updated_at)
VALUES
('default_parser_source_key', 'SUPERLEAGUE', NOW()),
('rfs_base_url', 'https://wfl.rfs.ru', NOW())
ON CONFLICT (key) DO NOTHING;
INSERT INTO parser_sources (
key, title, tournament_id, round_id, season, calendar_type, logo_base_path, photo_base_path,
teams_url, schedule_url, standings_url, match_base_url, base_url,
sort_order, is_active, created_at, updated_at
)
VALUES
(
'SUPERLEAGUE',
'Суперлига 2026',
'1061879',
'1117550',
'2025/2026',
'tours',
'D:\Графика\ФУТБОЛ\Женская Суперлига 2026\Teams Logos',
'D:\Графика\ФУТБОЛ\Женская Суперлига 2026\Photo',
'https://wfl.rfs.ru/tournament/1061879/teams',
'https://wfl.rfs.ru/tournament/1061879/calendar?round_id=1117550&type=tours',
'https://wfl.rfs.ru/tournament/1061879/tables',
'https://wfl.rfs.ru/match/',
'https://wfl.rfs.ru',
10,
TRUE,
NOW(),
NOW()
),
(
'RUSSIAN_CUP',
'Кубок России 2026',
'1064908',
'1125159',
'2026',
'stages',
'D:\Графика\ФУТБОЛ\Кубок России 2026\Teams Logos',
'D:\Графика\ФУТБОЛ\Кубок России 2026\Photo',
'https://wfl.rfs.ru/tournament/1064908/teams',
'https://wfl.rfs.ru/tournament/1064908/calendar?round_id=1125159&type=stages',
'https://wfl.rfs.ru/tournament/1064908/tables',
'https://wfl.rfs.ru/match/',
'https://wfl.rfs.ru',
20,
TRUE,
NOW(),
NOW()
)
ON CONFLICT (key) DO NOTHING;