Version 2 (modified by 2 days ago) ( diff ) | ,
---|
Actors
- Transport Organizer
Steps
- The transport organizer logs into the system.
- The transport organizer selects the ‘Our Routes’ tab.
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%'
- The transport organizer selects a Route they want to add trip to.
- The transport organizer clicks on the ‘Add Trip’ button.
- The transport organizer fills out a form with the following details:
- Time for the trip.
- Stop locations along the route, including estimated time of arrival (ETA) for each stop.
- The transport organizer submits the form.
INSERT INTO trip (route_id, transport_organizer_id, free_seats, date, status) VALUES (selected_route_id, logged_in_transport_organizer_id, total_seats, 'trip_date', 'NOT_STARTED') RETURNING trip_id
INSERT INTO trip_stops (trip_id, location_id, stop_time) VALUES (returned_trip_id, stop_location_id, 'stop_time')
- The transport organizer is redirected to the route page.
Note:
See TracWiki
for help on using the wiki.