We need the endpoints that will be used from the Frontend to Create, Edit and Delete a Product.
Acceptance Criteria
[x] Endpoint to Create a new Product
[x] Endpoint to Edit an existing Product
[x] Endpoint to Delete an existing Product
[x] When a product is deleted, it should disappear from the list, but not from the database since it can be used by other orders, and we should keep those details.
[x] If we try to delete a product that is already with active:false we should return an error message
[x] We leave the possibility to restablish the product in the future.
[x] Endpoint that retrieve the products, should only send the product with the active flag in true.
Important Details
Notes: [Any additional and important detail to clarify]
url: string (url of the picture, consider in using UUID for the filename)
platform: ObjectId of the selected platform
releaseDate: string
screenshots: array of urls (previously it was being managed with upload_file collection, now we need to store pictures in AWS S3, and get the urls from there)
updateAt: Date
created_by: ObjectId of the user creating the product
updated_by: bjectId of the user updating the product (same of the creator since it is the first insert)
price: Decimal128 (figure it out how to insert this value without issues from the backend)
published_at: it should be Date.now by default since that is how it's declared at the model in the backend
createdAt: Date of the creation, it is Date.now by default
active: We will use this field to know if the product can be use in transactions or it was deleted from the system
Description
We need the endpoints that will be used from the Frontend to Create, Edit and Delete a Product.
Acceptance Criteria
Important Details
Attachments
Tasks
-