- User schema: This schema would include fields such as user ID, username, email, password, and user role (buyer, seller, or admin).
- Store schema: This schema would include fields such as store ID, storeName, ownerEmail, storeOwner Id, and address.
- Review schema: This schema would include fields such as productID, productName, reviewerID, userReview, and reviewerName.
- Product schema: This schema would include fields such as product ID, storeID, storeName, productName, description, price, unit, and genre.
- OrderProduct schema: This schema would include fields such as orderID, productID, storeID, productName, productPrice, orderProductStatus.
- Order schema: This schema would include fields such as customerID, customerName, deliverTo, orderStatus.
https://github.com/HuyTran0996/Marketplace/blob/main/marketplacediagram2024-02-21.pdf
Sign Up user, role default is user, must login to DataBase to promote a user to admin
Login to the app
User can update password
User can get new password if they forgot
fetch all users (for admin dashboard)
fetch a user by user ID
fetch info of user currently login
update user information by user ID
update user currently login
user can delete their own account
Admin can delete any user
Admin can re-activate a user if they are deleted
fetch all stores
user can create their store, (a user can have only one store)
fetch a store by store ID
update store informations by store ID
Admin can delete any store by store ID
Admin can re-activate a store that was deleted by store ID
fetch all reviews of a product
create a review for a product by product ID
update a review by review ID
only admin can delete review by review ID
only admin can re-activate review that was deleted by review ID
fetch all products, fetch all product of a store
create a product
get a product by product ID
update a product by product ID
admin can delete any product store owner can delete their products
getAllOrders
createOrder
getOrder by order ID
updateOrder by order ID
cancel order by order ID
adminDeleteOrder by order ID
//only admin can delete Order
getAllOrderProducts
createOrderProduct
updateOrderProduct
deleteOrderProduct