Understanding Application Requirement
We need to setup the RASP platform as shown earlier and create a sample springboot application like the one below.
Features of the Application -
Let us identify the primary functions of the flight booking system by examining the JSON files provided. These JSON files define key entities such as bookings, flights, airlines, passports, and locations. From this, we can generate the primary functions of the application. Using the RASP-Platform to generate boilerplate code for the above entities, we can identify a set of core functionalities that would be necessary for a flight booking system. Each of these functions will map to operations (CRUD) and possibly more specific use cases like searching or filtering data.
Features of the Application
This flight booking system application is designed to perform CRUD (Create, Read, Update, Delete) operations for key entities such as Bookings, Flights, Airlines, Passports, and Locations. It also supports advanced functionalities like searching and filtering.
Booking Management
Allows users to create, view, update, or delete bookings in the system.
-
Create Booking:
Generate a new booking with references to a flight and a traveler (passport).
Required fields: flight_id, traveler_id, and other booking details. -
View Booking:
Retrieve booking details by id, traveler_id, or flight_id.
Supports filtering by date, traveler, or flight. -
Update Booking:
Modify existing booking details, such as updating the flight, traveler information, or status. -
Delete Booking:
Remove a booking from the system, ensuring that any dependencies (like associated flights or traveler records) are handled.
Flight Management
Manage flight details such as destination, airline, and departure/arrival times.
-
Create Flight:
Add new flight details including airline, destination, departure, and arrival times.
Required fields: airline_id, departure_location, arrival_location, departure_time, arrival_time. -
View Flights:
Retrieve flight details, with the ability to filter by airline, departure time, or destination. -
Update Flight:
Modify flight details, such as time, status (e.g., delayed or on time), and locations. -
Delete Flight:
Remove a flight from the system, ensuring associated bookings or airline references are handled.
Airline Management
Manage airlines with details such as the airline name and code.
-
Create Airline:
Add a new airline with the required details like name and code.
Required fields: name, code. -
View Airlines:
Retrieve a list of airlines or a specific airline by id. -
Update Airline:
Modify airline details like the name or code. -
Delete Airline:
Remove an airline from the system and handle relationships with flights linked to the airline.
Location Management
Manage location data used in flights (for departure and destination).
-
Create Location:
Add new locations (e.g., airport names, city names).
Required fields: name, code. -
View Locations:
Retrieve location details by id or filter by name or code. -
Update Location:
Modify details of an existing location. -
Delete Location:
Remove a location from the system and ensure any associated flights or bookings are adjusted.
Passport Management
Manage travelers' passport data, which will be linked to bookings.
-
Create Passport:
Add a new passport record, including the traveler’s full name, passport number, and nationality.
Required fields: full_name, passport_number, nationality. -
View Passport:
Retrieve passport details by id or by associated traveler. -
Update Passport:
Modify passport details, such as updating a traveler’s name or passport number. -
Delete Passport:
Remove a passport from the system, ensuring it's not associated with active bookings.