Pocro Vento Documentation

Backend: Adding new reservation

GitHub Issue: #189

Last modified with commit 7a580a0 on by Aljaž.

Backend task for creating a Vozni park reservation (POST /drivepark/reservations) – check the API spec and DB structure, apply the drive park schema, set up drivepark.access checks, lock the vehicle and check overlaps with other reservations and events, fill the vehicle usage overview, implement, and verify against the spec.

Docs: Adding new reservation Spec: POST /drivepark/reservations (createDriveParkReservation), DriveParkReservationNewRequest, DriveParkReservation, DriveParkReservationConflict in api-docs/openapi.yaml DB: DriveParkReservations, VehicleReservations (DriveParkReservationId) in api/database/pending_schema.sql (-- DRIVE PARK --)

This is the first Vozni park endpoint, so it also includes the shared setup for the section: the schema, the permission check, the vehicle lock and the overlap check.

1. Double check API spec and DB structure

2. Implementation

3. Verify implementation against spec

Done when

A Manager of Vozni park can add a reservation; it can’t overlap any other booking of the vehicle, and it shows on the calendar and in the vehicle’s usage overview.