Java back-end of a web-based electronics store’s checkout system
- How to build : maven install
- How to test : ./mvnw -Dtest="com.example.assignments.checkoutsystem.**" test Two type os Users :
-
Admin
-
Customer
Model : User
- id
- password
- Role : Admin Customer
Product
- id
- name
- price
- description
- Deal
Deal
- id
- DealType : Discount
- name
Basket
- id
- name
- List products
- user_id
Receipt
- id
- List products
- List
- total_price
{EndPoints} //Design Rest API for Electronic Checkout System
-
Users REST API
- Reterive all Users
- GET /users
- Create a Users
- POST /users
- Reterive one User
- GET /users/{id}
- Delete a User
- DELETE /user/{id}
- Reterive all Users
-
Bucket REST API
- Reterive all Buckets
- GET /buckets
- Create an Empty Bucket
- POST /buckets
- Reterive one Bucket
- GET /buckets/{id}
- Reterive Bucket for a user/
- GET /buckets/user/id
- Add Product to a Bucket
- POST /buckets/{id}/items
- Delete a Product from the Bucket
- DELET /buckets/{id}/items/{id}
- Reterive all Buckets
-
Product REST API
- Reterive all Products
- GET /products
- Create a new Product
- POST /products
- Reterive one Product
- GET /products/{id}
- Delete one product
- DELET /products/{id}
- Reterive all Products
-
Discount REST API
- Reterive all Discounts
- GET /discounts
- Reterive one discount
- GET /discounts/{id}
- Create a new Discount
- POST /discounts
- Reterive all Discounts
-
Receipt REST API
- Get all receipts
- GET /receipts
- Create a receipt
- POST /receipts/buckets/{id}
- Get all receipts