Load all 12 groups' schedule (72 matches) + Naver-style schedule UI
Backend
- teams_data.py: 48-team data (ko/short/en), TLA→FIFA code remap
- config: schedule_all_groups, featured_group("A") — only featured group is votable/AI-predicted
- schedule_fetch: fetch all GROUP_STAGE matches from football-data, KST serialize
- schedule_sync: ingest all groups, unordered-pair match to avoid Group A dup, derive votable from group
- worker: AI generation limited to featured group; settle still covers all
- domain/predictions: is_votable() + MatchOut.votable; reject non-votable submits with 403 MATCH_NOT_VOTABLE
Frontend
- types: Match.votable
- ScheduleBoard: Naver-style date/group tabs + chips; votable(A) cards link to detail with AI split + 참여수, others display-only
Verified: 72 matches (12×6), Group A not duplicated, votable A=6/others=66; A submit 200, B submit 403
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
c9244bc42d
commit
deb1332440
10 files changed
+366
-99
No files matched your search
@@ -0,0 +1,76 @@
|
||||
"""2026 월드컵 48개국 팀 데이터 — 코드(대문자 FIFA) → 한글/약식/영문.
|
||||
|
||||
국기는 frontend /assets/flags/{code소문자}.svg 를 사용(48개 자산 보유).
|
||||
football-data tla → 코드 변환은 TLA_REMAP(대부분 동일, CUR/URY만 예외).
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
# football-data tla → 내부 코드(=FIFA 국기 코드). 대부분 동일, 예외만 매핑.
|
||||
TLA_REMAP = {"CUR": "CUW", "URY": "URU"}
|
||||
|
||||
|
||||
def code_for_tla(tla: str) -> str:
|
||||
tla = (tla or "").strip().upper()
|
||||
return TLA_REMAP.get(tla, tla)
|
||||
|
||||
|
||||
# 코드 → {ko(전체명), short(약식), en}
|
||||
TEAMS: dict[str, dict] = {
|
||||
"ALG": {"ko": "알제리", "short": "알제리", "en": "Algeria"},
|
||||
"ARG": {"ko": "아르헨티나", "short": "아르헨티나", "en": "Argentina"},
|
||||
"AUS": {"ko": "호주", "short": "호주", "en": "Australia"},
|
||||
"AUT": {"ko": "오스트리아", "short": "오스트리아", "en": "Austria"},
|
||||
"BEL": {"ko": "벨기에", "short": "벨기에", "en": "Belgium"},
|
||||
"BIH": {"ko": "보스니아 헤르체고비나", "short": "보스니아", "en": "Bosnia-Herzegovina"},
|
||||
"BRA": {"ko": "브라질", "short": "브라질", "en": "Brazil"},
|
||||
"CAN": {"ko": "캐나다", "short": "캐나다", "en": "Canada"},
|
||||
"CIV": {"ko": "코트디부아르", "short": "코트디부아르", "en": "Ivory Coast"},
|
||||
"COD": {"ko": "콩고민주공화국", "short": "콩고DR", "en": "Congo DR"},
|
||||
"COL": {"ko": "콜롬비아", "short": "콜롬비아", "en": "Colombia"},
|
||||
"CPV": {"ko": "카보베르데", "short": "카보베르데", "en": "Cape Verde"},
|
||||
"CRO": {"ko": "크로아티아", "short": "크로아티아", "en": "Croatia"},
|
||||
"CUW": {"ko": "퀴라소", "short": "퀴라소", "en": "Curaçao"},
|
||||
"CZE": {"ko": "체코", "short": "체코", "en": "Czechia"},
|
||||
"ECU": {"ko": "에콰도르", "short": "에콰도르", "en": "Ecuador"},
|
||||
"EGY": {"ko": "이집트", "short": "이집트", "en": "Egypt"},
|
||||
"ENG": {"ko": "잉글랜드", "short": "잉글랜드", "en": "England"},
|
||||
"ESP": {"ko": "스페인", "short": "스페인", "en": "Spain"},
|
||||
"FRA": {"ko": "프랑스", "short": "프랑스", "en": "France"},
|
||||
"GER": {"ko": "독일", "short": "독일", "en": "Germany"},
|
||||
"GHA": {"ko": "가나", "short": "가나", "en": "Ghana"},
|
||||
"HAI": {"ko": "아이티", "short": "아이티", "en": "Haiti"},
|
||||
"IRN": {"ko": "이란", "short": "이란", "en": "Iran"},
|
||||
"IRQ": {"ko": "이라크", "short": "이라크", "en": "Iraq"},
|
||||
"JOR": {"ko": "요르단", "short": "요르단", "en": "Jordan"},
|
||||
"JPN": {"ko": "일본", "short": "일본", "en": "Japan"},
|
||||
"KOR": {"ko": "대한민국", "short": "한국", "en": "Korea Republic"},
|
||||
"KSA": {"ko": "사우디아라비아", "short": "사우디", "en": "Saudi Arabia"},
|
||||
"MAR": {"ko": "모로코", "short": "모로코", "en": "Morocco"},
|
||||
"MEX": {"ko": "멕시코", "short": "멕시코", "en": "Mexico"},
|
||||
"NED": {"ko": "네덜란드", "short": "네덜란드", "en": "Netherlands"},
|
||||
"NOR": {"ko": "노르웨이", "short": "노르웨이", "en": "Norway"},
|
||||
"NZL": {"ko": "뉴질랜드", "short": "뉴질랜드", "en": "New Zealand"},
|
||||
"PAN": {"ko": "파나마", "short": "파나마", "en": "Panama"},
|
||||
"PAR": {"ko": "파라과이", "short": "파라과이", "en": "Paraguay"},
|
||||
"POR": {"ko": "포르투갈", "short": "포르투갈", "en": "Portugal"},
|
||||
"QAT": {"ko": "카타르", "short": "카타르", "en": "Qatar"},
|
||||
"RSA": {"ko": "남아프리카 공화국", "short": "남아공", "en": "South Africa"},
|
||||
"SCO": {"ko": "스코틀랜드", "short": "스코틀랜드", "en": "Scotland"},
|
||||
"SEN": {"ko": "세네갈", "short": "세네갈", "en": "Senegal"},
|
||||
"SUI": {"ko": "스위스", "short": "스위스", "en": "Switzerland"},
|
||||
"SWE": {"ko": "스웨덴", "short": "스웨덴", "en": "Sweden"},
|
||||
"TUN": {"ko": "튀니지", "short": "튀니지", "en": "Tunisia"},
|
||||
"TUR": {"ko": "튀르키예", "short": "튀르키예", "en": "Turkey"},
|
||||
"URU": {"ko": "우루과이", "short": "우루과이", "en": "Uruguay"},
|
||||
"USA": {"ko": "미국", "short": "미국", "en": "United States"},
|
||||
"UZB": {"ko": "우즈베키스탄", "short": "우즈벡", "en": "Uzbekistan"},
|
||||
}
|
||||
|
||||
|
||||
def team_info(code: str) -> dict:
|
||||
c = (code or "").strip().upper()
|
||||
t = TEAMS.get(c)
|
||||
if t:
|
||||
return {"name": t["ko"], "shortName": t["short"], "code": c, "flag": ""}
|
||||
# 미등록 코드 폴백
|
||||
return {"name": c, "shortName": c, "code": c, "flag": ""}
|
||||
Reference in new issue
Block a user