first commit

This commit is contained in:
2026-04-20 11:56:11 +03:00
commit 8d80fadb56
103 changed files with 19756 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
from repositories.match_repository import upsert_match_by_team_external_ids
def sync_matches(matches_data: list[dict]) -> None:
for match in matches_data:
upsert_match_by_team_external_ids(
external_id=match["external_id"],
home_team_external_id=match["home_team_external_id"],
away_team_external_id=match["away_team_external_id"],
match_date=match.get("match_date"),
status=match.get("status", "scheduled"),
home_score=match.get("home_score"),
away_score=match.get("away_score"),
tour=match.get("tour"),
season=match.get("season"),
place=match.get("place"),
date_raw=match.get("date_raw"),
score_add=match.get("score_add"),
)