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 thedata
directory. - If you need to make changes to the database schema, you can use any SQLite client to modify the
database.db
file directly.
- The SQLite database file is already included (
- The
Customers
model 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
Bookings
model represents the bookings made by customers. - Fields:
id
: Primary keycustomer_id
: Foreign key referencing theCustomers
tablecar_id
: Foreign key referencing theCars
tablestart_date
: Start date of the bookingend_date
: End date of the booking
- The
Categories
model represents the categories of cars available for rental. - Fields:
id
: Primary keyname
: Name of the categorydescription
: Description of the category
- The
Cars
model represents individual cars available for rental. - Fields:
id
: Primary keycategory_id
: Foreign key referencing theCategories
tablemodel
: 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
Locations
model 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.md
file.
This project is licensed under the MIT License.