This is a backend system for managing car rentals, implemented in Python. It includes models for customers, bookings, categories, cars, and locations, and uses SQLite as the database.
- Clone the Repository:
git clone <repository-url> - Install Dependencies:
pip install -r requirements.txt - Database Setup:
- The SQLite database file is already included (
database.db). You can find it in thedatadirectory. - If you need to make changes to the database schema, you can use any SQLite client to modify the
database.dbfile directly.
- The SQLite database file is already included (
- The
Customersmodel represents the customers who rent cars. - Fields:
id: Primary keyname: Name of the customeremail: Email address of the customerphone: Phone number of the customeraddress: Address of the customer
- The
Bookingsmodel represents the bookings made by customers. - Fields:
id: Primary keycustomer_id: Foreign key referencing theCustomerstablecar_id: Foreign key referencing theCarstablestart_date: Start date of the bookingend_date: End date of the booking
- The
Categoriesmodel represents the categories of cars available for rental. - Fields:
id: Primary keyname: Name of the categorydescription: Description of the category
- The
Carsmodel represents individual cars available for rental. - Fields:
id: Primary keycategory_id: Foreign key referencing theCategoriestablemodel: Model of the carbrand: Brand of the caryear: Year of the carcolor: Color of the carlicense_plate: License plate number of the caravailability: Availability status of the car (e.g., available, rented)
- The
Locationsmodel represents the locations where cars are available for rental. - Fields:
id: Primary keyname: Name of the locationaddress: Address of the locationcity: City of the locationstate: State of the locationcountry: Country of the location
- This backend provides APIs for managing customers, bookings, categories, cars, and locations.
- You can explore and test the APIs using tools like Postman or any HTTP client library in Python.
- Refer to the API documentation for detailed information on available endpoints and their usage.
- Detailed API documentation can be found in the
API.mdfile.
This project is licensed under the MIT License.