mirror of
https://github.com/InsanusMokrassar/PlaguPoster.git
synced 2024-06-09 03:15:23 +00:00
28 lines
854 B
Kotlin
28 lines
854 B
Kotlin
package dev.inmo.plaguposter.ratings.repo
|
|
|
|
import dev.inmo.micro_utils.repos.ReadKeyValueRepo
|
|
import dev.inmo.plaguposter.posts.models.PostId
|
|
import dev.inmo.plaguposter.ratings.models.Rating
|
|
|
|
interface ReadRatingsRepo : ReadKeyValueRepo<PostId, Rating> {
|
|
suspend fun getPosts(
|
|
range: ClosedRange<Rating>,
|
|
reversed: Boolean = false,
|
|
count: Int? = null,
|
|
exclude: List<PostId> = emptyList()
|
|
): Map<PostId, Rating>
|
|
|
|
suspend fun getPostsWithRatingGreaterEq(
|
|
then: Rating,
|
|
reversed: Boolean = false,
|
|
count: Int? = null,
|
|
exclude: List<PostId> = emptyList()
|
|
): Map<PostId, Rating>
|
|
suspend fun getPostsWithRatingLessEq(
|
|
then: Rating,
|
|
reversed: Boolean = false,
|
|
count: Int? = null,
|
|
exclude: List<PostId> = emptyList()
|
|
): Map<PostId, Rating>
|
|
}
|