feat: 오늘 탭 아이콘 줄 — 오늘 타로·오늘 코디는 창으로, 단풍 지도·쇼츠·동네 이야기는 페이지로, 내 각은 그 줄로
- 오늘 한 장 칸을 오늘 타로 창으로 옮김. 안 뽑았으면 빨간 점, 뽑았으면 n일째 (로그인 안 하면 기기 기록으로 계산) - 오늘 코디: 오늘 피드에 올린 코디 카드를 창으로 (GET /v1/card/latest?template=ootd), 오늘 처음 보면 빨간 점 - 단풍 지도 아이콘은 단풍철에만, 아이콘 4개 추가 (Fluent 3D) - GA4 today_icon
This commit is contained in:
1 parent
c37773f48f
commit
045d8d6cf0
20 files changed
+347
-70
No files matched your search
@@ -26,6 +26,13 @@ class CardCRUD:
|
||||
"""만든 순서 역순. 올린 것·승인 대기·반려 모두."""
|
||||
return list((await s.scalars(select(CardSet).order_by(CardSet.card_id.desc()).limit(limit))).all())
|
||||
|
||||
async def latest_published(self, s: AsyncSession, template: str) -> Optional[CardSet]:
|
||||
"""그 틀로 가장 최근에 피드에 올린 카드뉴스"""
|
||||
return await s.scalar(
|
||||
select(CardSet).where(CardSet.template == template, CardSet.status == CardStatus.PUBLISHED.value, CardSet.post_id.is_not(None))
|
||||
.order_by(CardSet.published_at.desc()).limit(1)
|
||||
)
|
||||
|
||||
async def many(self, s: AsyncSession, card_ids: list[int]) -> list[CardSet]:
|
||||
if not card_ids:
|
||||
return []
|
||||
|
||||
Reference in new issue
Block a user