regular routes journeys, persistent KV to store return states, ...

This commit is contained in:
2023-04-03 20:35:12 +02:00
parent 0ae5730e7f
commit 2f536dfb19
21 changed files with 1722 additions and 1070 deletions

View File

@@ -6,11 +6,13 @@ import (
"strings"
"time"
"github.com/google/uuid"
"github.com/paulmach/orb/geojson"
"github.com/rs/zerolog/log"
)
type PlannedRouteSchedule struct {
ID string `bson:"_id"`
Route RegularRoute
DepartureDate time.Time
}
@@ -43,6 +45,7 @@ func (rr RegularRoute) PlannedJourneySchedules(mindate time.Time, maxdate time.T
m, _ := strconv.Atoi(splitted[1])
t := time.Date(current_date.Year(), current_date.Month(), current_date.Day(), h, m, 0, 0, time.Local)
results = append(results, PlannedRouteSchedule{
ID: uuid.NewString(),
Route: rr,
DepartureDate: t,
})