1.0.0 • Published 3 months ago

api-gp-remake v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

��# API GP REMAKE

Overview

API n�y �ng vai tr� l� ph�n ph� tr� cho d� �n t�t nghi�p �t 2

USER - Ng��i d�ng

  • ng k� - ch� d�nh cho Quarn lys
  POST /user/register
BodyTypeDescription
nameTEXTT�n nh�n vi�n
emailTEXTEmail ng k�
role_IDVARCHARVai tr�
N�u role c� gi� tr� l� l� Nh�n vi�n th� c� th�m:
jobVARCHARCh�c v�
  • ng nh�p
  POST /user/login
BodyTypeDescription
emailTEXTEmail
passwordTEXTM�t kh�u
  • ng xu�t
  GET /user/logout/${id} = session id login
ParameterTypeDescription
idVARCHARId session ng��i d�ng ng nh�p
  • C�p nh�p ng��i d�ng
  PUT /user/update/${id} = id c�a ng��i d�ng
ParameterTypeDescription
idstringId ng��i d�ng
BodyTypeDescription
namestringT�n
emailstringEmail
addressstring�a ch�
phonestringS� i�n tho�i
birthdaystringNg�y sinh
citizenIdentityCardstringCn c��c c�ng d�n
genderstringGi�i t�nh
rolestringVai tr�
jobstringCh�c v�
avatarBlob�nh �i di�n
statusBooleanTr�ng th�i
  • �i m�t kh�u
  PUT /user/change-password/${id} = id c�a ng��i d�ng
BodyTypeDescription
oldpasswordstringM�t kh�u ci
passwordstringM�t kh�u m�i
  • Qu�n m�t kh�u
  GET /user/forgot-password
QUERYTypeDescription
emailstringEmail
  • Verify Email
  POST /user/verify-confirmation-code
BodyTypeDescription
emailstringemail � ph�n qu�n m�t kh�u
confirmationCodestringm� x�c th�c � trong mail
  • Verify Email
  PUT /user/reset-password
BodyTypeDescription
emailstringemail � ph�n qu�n m�t kh�u
newPasswordstringM�t kh�u m�i
  • Xo� ng��i d�ng
  DELETE /user/delete/:id
BodyTypeDescription
idstringId ng��i d�ng
  • G�i danh s�ch ng��i d�ng
  GET /user/list
  • Th�m l��ng cho ng��i d�ng
  POST /user/salary/:id
BodyTypeDescription
yearstringNm l��ng
monthstringTh�ng l��ng
salarynumberL��ng c�a th�ng
bonusnumberTh��ng c�a th�ng
  • G�i danh s�ch l��ng ng��i d�ng
  GET /user/salary/:id
ParameterTypeDescription
idstringId ng��i d�ng
QUERYTypeDescription
yearstringNm l��ng
monthstringTh�ng l��ng, c� th� kh�ng th�m
  • C�p nh�p l��ng ng��i d�ng
  PUT /user/salary/:id
ParameterTypeDescription
idstringId ng��i d�ng
QUERYTypeDescription
yearstringNm l��ng
monthstringTh�ng l��ng
BodyTypeDescription
salarynumberL��ng
bonusnumberTh��ng
  • Xo� l��ng ng��i d�ng
  DELETE /user/salary/:id
ParameterTypeDescription
idstringId ng��i d�ng
QUERYTypeDescription
yearstringNm l��ng
monthstringTh�ng l��ng

CLIENT - Kh�ch h�ng

  • Th�m kh�ch h�ng m�i
  POST /client/create
BodyTypeDescription
namestringT�n kh�ch h�ng
addressstring�a ch�
phonestringS� i�n tho�i
phone2stringS� i�n tho�i ph�
genderstringGi�i t�nh
creatorIDnumberId ng��i t�o
  • G�i danh s�ch kh�ch h�ng
  GET /client/list
  • G�i chi ti�t kh�ch h�ng
  GET /client/detail/:id
ParameterTypeDescription
idstringId c�a kh�ch h�ng
  • C�p nh�p kh�ch h�ng
  PUT /client/update/${id} = id c�a kh�ch h�ng
ParameterTypeDescription
idstringId c�a kh�ch h�ng
BodyTypeDescription
namestringT�n kh�ch h�ng
addressstring�a ch�
phonestringS� i�n tho�i
phone2stringS� i�n tho�i ph�
genderstringGi�i t�nh
  • Xo� kh�ch h�ng
  DELETE /client/delete/:id
ParameterTypeDescription
idstringid c�a kh�ch h�ng

SERVICE - D�ch v�

  • T�o d�ch v�
  POST /service/create
BodyTypeDescription
namestringT�n d�ch v�
descriptionstringM� t�
pricestringGi�
imageBlob�nh d�ch v�
  • C�p nh�p d�ch v�
  PUT /service/update/:id
ParameterTypeDescription
idstringId d�ch v�
BodyTypeDescription
namestringT�n d�ch v�
descriptionstringM� t�
pricestringGi�
imageBlob�nh d�ch v�
  • Xo� d�ch v�
  DELETE /service/delete/:id
ParameterTypeDescription
idstringId d�ch v�
  • Danh s�ch d�ch v�
  GET /service/list/:id
ParameterTypeDescription
idstringId d�ch v�
  • Chi ti�t d�ch v�
  GET /service/detail/:id
ParameterTypeDescription
idstringId d�ch v�

Wedding Outfit - �o c��i

  • Th�m �o c��i
  POST /WeddingOutfit/create
BodyTypeDescription
namestringT�n �o c��i
descriptionstringM� t�
sizestringSize
pricestringGi�
colorstringM�u s�c
imageBlobH�nh �nh
  • C�p nh�p �o c��i
  PUT /WeddingOutfit/update/:id
ParameterTypeDescription
idstringId �o c��i
BodyTypeDescription
namestringT�n �o c��i
descriptionstringM� t�
sizestringSize
pricestringGi�
colorstringM�u s�c
imageBlobH�nh �nh
statusBlobTr�ng th�i
  • Xo� �o c��i
  DELETE /WeddingOutfit/delete/:id
ParameterTypeDescription
idstringId �o c��i
  • Danh s�ch �o c��i
  GET /WeddingOutfit/list/
  • Chi ti�t �o c��i
  GET /WeddingOutfit/detail/:id
ParameterTypeDescription
idstringId �o c��i

Contract - H�p �ng

  • T�o h�p �ng
  POST /contract/create
BodyTypeDescription
userIdstringId ng��i t�o h�p �ng
clientIdstringId kh�ch h�ng
servicesstringDanh s�ch d�ch v�
weddingOutfitstringDanh s�ch �o c��i
notestringGhi ch�
deliveryDatestringNg�y tr� �nh
locationstring�a ch�
prepaymentstringTi�n �t c�c
additionalCostsstringChi phi ph�t sinh
priceTotalstringT�ng ti�n
servicesTypeDescription
userIdstringId ng��i t�o h�p �ng
serviceIdstringId d�ch v�
weddingOutfitTypeDescription
userIdstringId ng��i t�o h�p �ng
weddingOutfitIdstringId �o c��i
rentalDateDATENg�y thu�
returnDateDATENg�y tr�
descriptionstringM� t�
additionalCostsTypeDescription
descriptionstringM� t�
pricestringTi�n ph�t sinh
  • Danh s�ch h�p �ng
  GET /contract/list/
  • Danh s�ch h�p �ng theo ng��i d�ng
  GET /contract/list/:id
ParamsTypeDescription
userIdstringId ng��i d�ng
  • Chi ti�t h�p �ng
  GET /contract/detail/:id
ParamsTypeDescription
contract IDstringId h�p �ng
  • Xo� h�p �ng
  GET /contract/delete/:id
ParamsTypeDescription
contract IDstringId h�p �ng

Work - C�ng vi�c

  • Th�m lo�i c�ng vi�c
  POST /work/create
BODYTypeDescription
namestringT�n lo�i c�ng vi�c
  • Danh s�ch lo�i c�ng vi�c
  GET /work/list
  • S�a lo�i c�ng vi�c
  PUT /work/update/:id
PARAMSTypeDescription
idstringId lo�i c�ng vi�c mu�n s�a
BODYTypeDescription
namestringT�n lo�i c�ng vi�c
  • Xo� lo�i c�ng vi�c
  DELETE /work/delete/:id
PARAMSTypeDescription
idstringId lo�i c�ng vi�c mu�n xo�
  • Th�m c�ng vi�c cho nh�n vi�n
  POST /work/add-work
BODYTypeDescription
workType_IDstringId lo�i c�ng vi�c
user_IDstringId nh�n vi�n
workDatestringNg�y l�m vi�c
addressstring�a ch�
notestringGhi ch�
  • Danh s�ch c�ng vi�c c�a t�t c� nh�n vi�n
  GET /work/list-work
  • Danh s�ch c�ng vi�c c�a nh�n vi�n
  GET /work/user-work/:id?date=DD/MM/YYYY
PARAMSTypeDescription
idstringId nh�n vi�n
QUERYTypeDescription
dateDATE�n n�u mu�n hi�n th� t�t c� ng�y l�m
  • Danh s�ch nh�n vi�n c� th� th�m c�ng vi�c trong n�y
  GET /work/list-user-add-work?date=DD/MM/YYYY
QUERYTypeDescription
dateDATE�n n�u mu�n hi�n th� t�t c�
  • Chi ti�t c�ng vi�c
  GET /work/detail-work/:id
PARAMSTypeDescription
idstringId c�ng vi�c
  • S�a c�ng vi�c
  PUT /work/update-work/:id
PARAMSTypeDescription
idstringId c�ng vi�c
BODYTypeDescription
workType_IDstringId lo�i c�ng vi�c
user_IDstringId nh�n vi�n
workDatestringNg�y l�m
addressstring�a ch�
notestringGhi ch�
statusstringTr�ng th�i
  • Xo� c�ng vi�c
  DELETE /work/delete-work/:id
PARAMSTypeDescription
idstringId c�ng vi�c