96 lines
2.5 KiB
Python
96 lines
2.5 KiB
Python
from services.teams_service import sync_teams
|
|
from services.schedule_service import sync_matches
|
|
from services.standings_service import sync_standings
|
|
from services.players_service import sync_players
|
|
|
|
|
|
def run_demo():
|
|
sync_teams([
|
|
{
|
|
"external_id": "team_001",
|
|
"name": "West Football Club",
|
|
"short_name": "WFC",
|
|
"logo_url": None,
|
|
},
|
|
{
|
|
"external_id": "team_002",
|
|
"name": "East Football Club",
|
|
"short_name": "EFC",
|
|
"logo_url": None,
|
|
},
|
|
])
|
|
|
|
sync_matches([
|
|
{
|
|
"external_id": "match_100",
|
|
"home_team_external_id": "team_001",
|
|
"away_team_external_id": "team_002",
|
|
"match_date": "2026-03-18 20:00:00",
|
|
"status": "scheduled",
|
|
"home_score": None,
|
|
"away_score": None,
|
|
"tour": "1",
|
|
"season": "2025/2026",
|
|
}
|
|
])
|
|
|
|
sync_players([
|
|
{
|
|
"external_id": "player_001",
|
|
"team_external_id": "team_001",
|
|
"full_name": "John Smith",
|
|
"first_name": "John",
|
|
"last_name": "Smith",
|
|
"number": "10",
|
|
"position": "FW",
|
|
"birth_date": "2000-05-12",
|
|
"height_cm": 182,
|
|
"weight_kg": 76,
|
|
"is_active": True,
|
|
},
|
|
{
|
|
"external_id": "player_002",
|
|
"team_external_id": "team_002",
|
|
"full_name": "Mike Brown",
|
|
"first_name": "Mike",
|
|
"last_name": "Brown",
|
|
"number": "8",
|
|
"position": "MF",
|
|
"birth_date": "1999-09-20",
|
|
"height_cm": 178,
|
|
"weight_kg": 73,
|
|
"is_active": True,
|
|
},
|
|
])
|
|
|
|
sync_standings(
|
|
season="2025/2026",
|
|
standings_rows=[
|
|
{
|
|
"team_external_id": "team_001",
|
|
"played": 10,
|
|
"wins": 7,
|
|
"losses": 2,
|
|
"draws": 1,
|
|
"points_for": 22,
|
|
"points_against": 11,
|
|
"points": 22,
|
|
"position": 1,
|
|
},
|
|
{
|
|
"team_external_id": "team_002",
|
|
"played": 10,
|
|
"wins": 6,
|
|
"losses": 3,
|
|
"draws": 1,
|
|
"points_for": 19,
|
|
"points_against": 12,
|
|
"points": 19,
|
|
"position": 2,
|
|
},
|
|
],
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
run_demo() |