Giter Site home page Giter Site logo

car-rental-backend's Introduction

Car Rentals Backend

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.

Setup

  1. Clone the Repository:
    git clone <repository-url>
    
  2. Install Dependencies:
    pip install -r requirements.txt
    
  3. Database Setup:
    • The SQLite database file is already included (database.db). You can find it in the data directory.
    • If you need to make changes to the database schema, you can use any SQLite client to modify the database.db file directly.

Models

Customers

  • The Customers model represents the customers who rent cars.
  • Fields:
    • id: Primary key
    • name: Name of the customer
    • email: Email address of the customer
    • phone: Phone number of the customer
    • address: Address of the customer

Bookings

  • The Bookings model represents the bookings made by customers.
  • Fields:
    • id: Primary key
    • customer_id: Foreign key referencing the Customers table
    • car_id: Foreign key referencing the Cars table
    • start_date: Start date of the booking
    • end_date: End date of the booking

Categories

  • The Categories model represents the categories of cars available for rental.
  • Fields:
    • id: Primary key
    • name: Name of the category
    • description: Description of the category

Cars

  • The Cars model represents individual cars available for rental.
  • Fields:
    • id: Primary key
    • category_id: Foreign key referencing the Categories table
    • model: Model of the car
    • brand: Brand of the car
    • year: Year of the car
    • color: Color of the car
    • license_plate: License plate number of the car
    • availability: Availability status of the car (e.g., available, rented)

Locations

  • The Locations model represents the locations where cars are available for rental.
  • Fields:
    • id: Primary key
    • name: Name of the location
    • address: Address of the location
    • city: City of the location
    • state: State of the location
    • country: Country of the location

Usage

  • 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.

API Documentation

  • Detailed API documentation can be found in the API.md file.

Contributors

License

This project is licensed under the MIT License.

car-rental-backend's People

Contributors

reagan203 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.