mirror of
https://github.com/2martens/tsw-timetable.git
synced 2026-10-17 16:06:51 +02:00
feat: Process fetched timetables and combine stops into services
This commit is contained in:
+5
@@ -4,6 +4,8 @@ import de.twomartens.timetable.bahnApi.model.Eva
|
||||
import de.twomartens.timetable.bahnApi.model.db.BahnTimetable
|
||||
import org.bson.types.ObjectId
|
||||
import org.springframework.data.domain.ExampleMatcher
|
||||
import org.springframework.data.domain.Page
|
||||
import org.springframework.data.domain.Pageable
|
||||
import org.springframework.data.mongodb.repository.MongoRepository
|
||||
import java.time.ZonedDateTime
|
||||
|
||||
@@ -18,4 +20,7 @@ interface BahnTimetableRepository : MongoRepository<BahnTimetable, ObjectId> {
|
||||
.withMatcher("eva", ExampleMatcher.GenericPropertyMatchers.exact())
|
||||
.withMatcher("hourAtDay", ExampleMatcher.GenericPropertyMatchers.exact())
|
||||
}
|
||||
|
||||
fun getBahnTimetablesByUserIdAndTswTimetableId(userId: String, tswTimetableId: String,
|
||||
pageable: Pageable): Page<BahnTimetable>
|
||||
}
|
||||
+4
@@ -2,6 +2,8 @@ package de.twomartens.timetable.bahnApi.repository
|
||||
|
||||
import de.twomartens.timetable.bahnApi.model.Eva
|
||||
import de.twomartens.timetable.bahnApi.model.db.ScheduledFetchTask
|
||||
import de.twomartens.timetable.model.common.TimetableId
|
||||
import de.twomartens.timetable.model.common.UserId
|
||||
import de.twomartens.timetable.types.HourAtDay
|
||||
import org.bson.types.ObjectId
|
||||
import org.springframework.data.mongodb.repository.MongoRepository
|
||||
@@ -11,4 +13,6 @@ interface ScheduledFetchTaskRepository : MongoRepository<ScheduledFetchTask, Obj
|
||||
fun findByEvaAndFetchedDateTime(eva: Eva, fetchedDateTime: HourAtDay): ScheduledFetchTask?
|
||||
|
||||
fun findAllByCreatedAfter(createdAt: Instant): List<ScheduledFetchTask>
|
||||
|
||||
fun findScheduledFetchTaskByUserIdAndTswTimetableId(userId: UserId, tswTimetableId: TimetableId): List<ScheduledFetchTask>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user