Discover Packages
github.com/chanioxaris/reservation-system
module
Version:
v0.0.0-...-e6b7f3d
Opens a new window with list of versions in this module.
Published: Apr 25, 2020
License: MIT
Opens a new window with license information.
README
README
¶
1. Brief introduction
2. Errors
The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format:
{
"message": "page not found"
}
The status codes that are returned for each endpoint are specified in the endpoint documentation below.
3. Endpoints
POST /api/v1/login
GET /api/v1/email/confirm?token=<token>
GET /api/v1/password/reset
POST /api/v1/password/reset?token={token}
GET /api/v1/users
GET /api/v1/users/{id}
POST /api/v1/users
POST /api/v1/users/{id}/email/confirm/resend
PUT /api/v1/users/{id}/info
PUT /api/v1/users/{id}/email
PUT /api/v1/users/{id}/password
DELETE /api/v1/users/{id}
GET /api/v1/reservations
GET /api/v1/reservations/booked
GET /api/v1/reservations?uid={id}
GET /api/v1/reservations?cid={id}
POST /api/v1/reservations
GET /api/v1/slots
PATCH /api/v1/slots/{id}/active/{true | false}
GET /api/v1/courts
PATCH /api/v1/courts/{id}/active/{true | false}
PUT /api/v1/courts/{id}
DELETE /api/v1/courts/{id}
4. Database Schema
USERS
NAME
TYPE
KEY
NULL
DEFAULT
ID
INT
PK
✗
-
FIRST_NAME
VARCHAR
-
✗
-
LAST_NAME
VARCHAR
-
✗
-
EMAIL
VARCHAR
-
✗
-
PASSWORD
VARCHAR
-
✗
-
COUNTRY
VARCHAR
-
✗
-
ROLE
VARCHAR
-
✗
-
MOBILE_PHONE
VARCHAR
-
✗
-
CONFIRM_TOKEN
VARCHAR
-
✓
-
RESET_TOKEN
VARCHAR
-
✓
-
IS_CONFIRMED
BOOLEAN
-
✗
FALSE
CREATED_AT
TIMESTAMP
-
✗
NOW()
UPDATED_AT
TIMESTAMP
-
✗
NOW()
RESERVATIONS
NAME
TYPE
KEY
NULL
DEFAULT
ID
INT
PK
✗
-
USER_ID
INT
FK (USERS.ID)
✗
-
SLOT_ID
INT
FK (SLOTS.ID)
✗
-
COURT_ID
INT
FK (COURTS.ID)
✗
-
DATE
TIMESTAMP
-
✗
-
CREATED_AT
TIMESTAMP
-
✗
NOW()
COURTS
NAME
TYPE
KEY
NULL
DEFAULT
ID
INT
PK
✗
-
NAME
VARCHAR
-
✗
-
IS_ACTIVE
BOOLEAN
-
✗
FALSE
IS_DELETED
BOOLEAN
-
✗
FALSE
CREATED_AT
TIMESTAMP
-
✗
NOW()
UPDATED_AT
TIMESTAMP
-
✗
NOW()
DELETED_AT
TIMESTAMP
-
✓
-
SLOTS
NAME
TYPE
KEY
NULL
DEFAULT
ID
INT
PK
✗
-
HOURS
VARCHAR
-
✗
-
IS_ACTIVE
BOOLEAN
-
✗
FALSE
CREATED_AT
TIMESTAMP
-
✗
NOW()
UPDATED_AT
TIMESTAMP
-
✗
NOW()
Expand ▾
Collapse ▴
Directories
¶
internal
pkg
Click to show internal directories.
Click to hide internal directories.