Git Product home page Git Product logo

booking-api's Introduction

Booking-API (Booking appointment is now easier)

Thank to Django and Django REST Framework. This API is created using these two Python Frameworks. DRF Spectacular allows Frontend Developers to understand the documentation of the Booking-API

Booking-API help to book from the following services
  • Booking Appointment in a hospital
  • Booking tickets to airlines
  • Booking tickets to concerts
  • Request a taxi
  • Food Delivery
  • Booking Hotel

How to start

  1. Clone the Repository from GitHub and enter into repo from command line
git clone https://github.com/dev-yusupov/booking-api.git
cd booking-api
  1. Install requirements
pip install -r requirements.txt
  1. Make migrations
python manage.py makemigrations
python manage.py migrate
  1. Run server
python manage.py runserver

Accounts App

Contain User model inherited from AbstractUser

Also contains two forms: CustomUserCreationForm(UserCreationForm) and CustomUserChange(UserChangeForm)

Contains following lines - for Bookers (create_user)
first_name      CharField (max_length - 50)
last_name       CharField (max_length - 50)
phone_number    PhoneNumber (max_length - 17)
email           Email
password        Password
is_user         Boolean (default=True)
Contains following lines - for Taxi drivers (create_user_taxi)
first_name      CharField (max_length - 50)
last_name       CharField (max_length - 50)
phone_number    PhoneNumber
email           EmailField
password        PasswordField
is_taxi         Bool (default=True)
car_size        Charfield(choices=['small', 'medium', 'big'])

Taxi app

This app allows to make orders to the users of Booking-API app

user            ForeignKey
user_name       Charfield
user_phone_number   Phone number
user_email      Email
location        CharField(max_length = 200)
destination        CharField(max_length = 200)
is_econom       Boolean
is_business     Boolean
is_premium      Boolean

This app also has a calculator which help to calculate price of order using geopy library.

To install geopy type the following command to CMD:

pip install geopy

Models of other apps will be ready after the release of first version

Hotel App

This app helps to book a room from hotels for the users of the Booking-API.

Models:
  • Hotel
  • HotelRoomOrder
Hotel
  • Hotel ID (automatically generates the 6-digit ID)
  • Hotel name
  • Hotel Location - (this field is URLField, while registring new hotel it will be required to paste the url of location of the hotel from Google Maps)
  • Minimum Price - it is required field
  • Phone number - this field takes the number of phone of hotel
  • Optional Fields are - Hotel email and website (both will be URL Fields)
  • Start of the work - TimeField
  • End of the working hours - TimeField
  • !!! All BOTH FIELDS ABOVE REQUIRED BECAUSE BOOKERS SHOULD KNOW THE OPEN HOURS OF RECEPTION AT HOTELS.!!!
  • 3 image fields will be required.
HotelRoomOrder model
  • OrderID - UUID4
  • Number of Rooms - this field is required because hotel reception should know how many rooms are booked by app user.
  • Number of people.
  • date_start
  • date_to
  • additional_points - TextField() the following field is added because some customers may need additional things from hotel for example a conference room or a fitness club from hotel. Therefore this field is added.

booking-api's People

Contributors

dev-yusupov avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

booking-api's Issues

Split database

Split the Settings.py file into module.

And also change the database directory.

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.