Skip to content

Commit f74bed0

Browse files
committed
feat: RankingRepository 인터페이스 추가
1 parent ee7df8b commit f74bed0

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.loopers.domain.ranking;
2+
3+
import java.time.LocalDate;
4+
import java.time.YearMonth;
5+
import java.util.List;
6+
import java.util.Optional;
7+
8+
public interface RankingRepository {
9+
10+
// Weekly
11+
List<WeeklyRanking> findWeeklyByDateOrderByRank(LocalDate weekStart, LocalDate weekEnd, int limit, int offset);
12+
13+
Optional<WeeklyRanking> findWeeklyByProductIdAndDate(Long productId, LocalDate weekStart, LocalDate weekEnd);
14+
15+
long countWeeklyByDate(LocalDate weekStart, LocalDate weekEnd);
16+
17+
// Monthly
18+
List<MonthlyRanking> findMonthlyByPeriodOrderByRank(YearMonth period, int limit, int offset);
19+
20+
Optional<MonthlyRanking> findMonthlyByProductIdAndPeriod(Long productId, YearMonth period);
21+
22+
long countMonthlyByPeriod(YearMonth period);
23+
}

0 commit comments

Comments
 (0)