wiki:SearchRoutesUseCase

Version 2 (modified by 222077, 3 days ago) ( diff )

--

Actors

  • Everyone

Steps

  1. (Optional) The user logs into the system.
  2. The user selects the ‘From destination’ input and chooses a location.
  3. The user selects the ‘To destination’ input and chooses a location.
  4. The user clicks on the ‘Search’ button. 1.1. If routes matching the search criteria exist, they are displayed and can be reviewed.
    • The user may click on a route and view upcoming trips for that route.
    1.2. If no routes match the search criteria, the user is notified accordingly.
    SELECT r.route_id, l1.name AS from_location, l2.name AS to_location, tr.company_name AS organizer_name
    FROM route r
             JOIN location l1 ON r.from_location_id = l1.location_id
             JOIN location l2 ON r.to_location_id = l2.location_id
             JOIN transport_organizer tr ON r.transport_organizer_id = tr.transport_organizer_id
    WHERE l1.name ILIKE '%from_location%'
      AND l2.name ILIKE '%to_location%'
    
Note: See TracWiki for help on using the wiki.