Skip to content

feat(stop_events): add Model.StopEvent#978

Open
runkelcorey wants to merge 3 commits intomasterfrom
feat-stop-event-model
Open

feat(stop_events): add Model.StopEvent#978
runkelcorey wants to merge 3 commits intomasterfrom
feat-stop-event-model

Conversation

@runkelcorey
Copy link

@runkelcorey runkelcorey commented Mar 16, 2026

Part 1 following decision to disaggregate #973

Summary of changes

  1. Adds Model.StopEvent with fields to
    • uniquely identify the event; I think that a stop should be unique per start_date, trip_id, route_id, vehicle_id, and stop_sequence regardless of mode
    • filter (direction and revenue)
    • name the event (id)
    • describe the actual arrival and departure time
  2. Adds stop_sequence type to Model.Schedule so that Model.StopEvent can reference it and make explicit the relationship between these fields.

What questions should reviewers consider?

  1. Are there instances where a rider would experience multiple different stops while VehiclePositions shows the same start_date, trip_id, route_id, vehicle_id, and stop_sequence?
  2. Should this model have an id field? I don't expect events will often be looked up directly—instead, I expect it will be queried like predictions is queried—but I like to have a descriptive identifier for reference.

@runkelcorey runkelcorey added enhancement New feature or request elixir Pull requests that update Elixir code labels Mar 16, 2026
@runkelcorey runkelcorey self-assigned this Mar 16, 2026
@runkelcorey runkelcorey requested a review from huangh March 16, 2026 18:51
@runkelcorey runkelcorey marked this pull request as ready for review March 16, 2026 18:51
@runkelcorey runkelcorey requested a review from a team as a code owner March 16, 2026 18:51
@runkelcorey runkelcorey requested review from rudiejd and removed request for a team March 16, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

elixir Pull requests that update Elixir code enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant