Send last read chapter in Mangas in Category API (#507)

* Send last read chapter with manga

* optimize query

* introduce new field for better performance
This commit is contained in:
akabhirav
2023-02-21 04:47:45 +05:30
committed by GitHub
parent ac99dd55a2
commit 783787e514
2 changed files with 31 additions and 34 deletions

View File

@@ -45,6 +45,7 @@ data class MangaDataClass(
var unreadCount: Long? = null,
var downloadCount: Long? = null,
var chapterCount: Long? = null,
var lastReadAt: Long? = null,
var lastChapterRead: ChapterDataClass? = null,
val age: Long? = if (lastFetchedAt == null) 0 else Instant.now().epochSecond.minus(lastFetchedAt),