feat: 날씨각 백엔드 API (날씨·노을·지수·주말·계절·피드·로그인·반응)
- FastAPI + PostgreSQL + Redis, web·worker 분리, compose 에 backend·worker·postgres·redis 추가 - 기상청 단기·초단기·중기·특보, 에어코리아, Open-Meteo, TourAPI, 특일정보 연동 (첫 조회 때 받고 캐시) - 매일 03:00 worker 가 전국 공통 피드 칸을 정하고 지난 데이터를 정리 - 시드: 시군구 256곳, 지수 23개, 노을 대표 지점·명소, 데이트 명소, 읽을거리 - pytest 66개 (테스트 전용 DB·Redis 사용) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9cdc0d8fea
commit
e134295ce5
135 files changed
+9123
No files matched your search
@@ -0,0 +1,57 @@
|
||||
from datetime import date
|
||||
from typing import Optional
|
||||
|
||||
from common.models.gmodel import Res_WebPacketProtocol, WebPacketProtocol
|
||||
|
||||
|
||||
class DayData(WebPacketProtocol):
|
||||
day: date
|
||||
weekday: str
|
||||
holiday: Optional[str] = None
|
||||
icon: str
|
||||
temp_min_c: Optional[float] = None
|
||||
temp_max_c: Optional[float] = None
|
||||
headline: str
|
||||
summary: str
|
||||
pick: str
|
||||
rain_hours: Optional[list[int]] = None
|
||||
is_rainy: bool
|
||||
|
||||
|
||||
class Res_Week(Res_WebPacketProtocol):
|
||||
region_code: Optional[str] = None
|
||||
days: list[DayData] = []
|
||||
|
||||
|
||||
class PlaceData(WebPacketProtocol):
|
||||
place_id: int
|
||||
area: str
|
||||
name: str
|
||||
is_outdoor: bool
|
||||
icon: str
|
||||
reason: str
|
||||
best_time: str
|
||||
is_good: bool
|
||||
|
||||
|
||||
class Res_PlaceList(Res_WebPacketProtocol):
|
||||
areas: list[str] = []
|
||||
rainy: Optional[bool] = None
|
||||
places: list[PlaceData] = []
|
||||
|
||||
|
||||
class EventData(WebPacketProtocol):
|
||||
event_id: int
|
||||
name: str
|
||||
place_name: str
|
||||
icon: str
|
||||
start_date: date
|
||||
end_date: date
|
||||
is_confirmed: bool
|
||||
status: str
|
||||
status_label: str
|
||||
fit: Optional[str] = None
|
||||
|
||||
|
||||
class Res_EventList(Res_WebPacketProtocol):
|
||||
events: list[EventData] = []
|
||||
Reference in new issue
Block a user