Files
internship_node/day_1
ryanwong 9ec9c8a4f7 day 3
2022-02-06 20:45:55 -05:00
..
2022-02-06 20:17:46 -05:00
2022-02-06 20:45:55 -05:00
2022-02-06 20:17:46 -05:00
2022-02-06 20:17:46 -05:00
2022-02-06 20:17:46 -05:00
2022-02-06 20:17:46 -05:00
2022-02-06 20:17:46 -05:00
2022-02-06 20:33:09 -05:00

day 1

Instructions

shipping_dock
- id
- name
-status ENUM(active, inactive) (integer mapping)

transaction
- id
- order_id
- user_id
- shipping_dock_id
- amount
- notes

order
- id
- user_id
- amount
- tax
- notes
- status (paid, not paid) (integer mapping)
  • Make the CRUD API for these tables
GET /api/v1/shipping_dock (get all)
GET /api/v1/shipping_dock/:id (get one)
POST /api/v1/shipping_dock/:id (add one)
PUT /api/v1/shipping_dock/:id (update one)
DELETE /api/v1/shipping_dock/:id (delete one)

GET /api/v1/order (get all)
GET /api/v1/order/:id (get one)
POST /api/v1/order/:id (add one)
PUT /api/v1/order/:id (update one)
DELETE /api/v1/order/:id (delete one)

GET /api/v1/transaction (get all)
GET /api/v1/transaction/:id (get one)
POST /api/v1/transaction/:id (add one)
PUT /api/v1/transaction/:id (update one)
DELETE /api/v1/transaction/:id (delete one)
  • Everything must be done by end of date