Skip to content

Event 정렬 방식 결정 #122

Open
@junha-ahn

Description

@junha-ahn

Description

https://festa.io/explore 는 이벤트를 다음과 같은 방식으로 정렬한다.

최신 등록순

ORDER BY created_at DESC

-- 또는 ORDER BY id DESC
-- 다만 이벤트 정보를 "외부에서 과거의 여러 이벤트 정보를 scrape 후 등록하는 경우" 등을 생각하면 ID는 날짜순 정렬이 아니다.

마감 인박순

WHERE NOW() < reservation_end_time  
ORDER BY reservation_end_time ASC

이벤트 진행일순

  • https://festa.io/events 페이지는 이벤트 진행일순으로 정렬
  • https://festa.io/api/v1/events?page=1&pageSize=24&order=startDate&excludeExternalEvents=false
WHERE start_date < NOW() + 2_MONTH -- 너무 먼 미래에 진행되는 이벤트는 보여주지 않는다.
ORDER BY start_date DESC

참고 링크

To do

  • 위 3가지 정렬 방식을 지원하기 위한 API 설계
  • API에서 어떠한 Query를 입력받아서 Service layer에서 처리할 수 있을지 논의

Test Checklist

  • 최신 등록순
  • 마감 인박순
  • 이벤트 진행일순

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or requestmajorMajor topic

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions