order api:implement pagination system

This commit is contained in:
2026-04-17 23:36:01 +06:00
parent 164951321b
commit 1bc1fae274
3 changed files with 142 additions and 74 deletions
+24 -21
View File
@@ -1,4 +1,3 @@
export const orderSwaggerDocs = {
"/api/order": {
post: {
@@ -10,16 +9,16 @@ export const orderSwaggerDocs = {
content: {
"application/json": {
example: JSON.stringify({
"shopAccountId": "",
"productPrice": 1500,
"productQuantity": 2,
"productName": "Wireless Mouse",
"customerName": "Rahim Uddin",
"customerPhone": "+8801712345678",
"customerEmail": "softvence.abumahid@gmail.com",
"customerAddress": "Rangpur, Bangladesh",
"customerNote": "Please deliver between 3-5 PM"
})
shopAccountId: "",
productPrice: 1500,
productQuantity: 2,
productName: "Wireless Mouse",
customerName: "Rahim Uddin",
customerPhone: "+8801712345678",
customerEmail: "softvence.abumahid@gmail.com",
customerAddress: "Rangpur, Bangladesh",
customerNote: "Please deliver between 3-5 PM",
}),
},
},
},
@@ -63,6 +62,12 @@ export const orderSwaggerDocs = {
required: false,
schema: { type: "string" },
},
{
name: "status",
in: "query",
required: false,
schema: { type: "string" },
},
],
responses: {
200: { description: "order fetched successfully" },
@@ -106,14 +111,14 @@ export const orderSwaggerDocs = {
content: {
"application/json": {
example: JSON.stringify({
"shopAccountId": "",
"productPrice": 1500,
"productQuantity": 2,
"productName": "Wireless Mouse",
"customerName": "Rahim Uddin",
"customerPhone": "+8801712345678",
"customerAddress": "Rangpur, Bangladesh",
"customerNote": "Please deliver between 3-5 PM"
shopAccountId: "",
productPrice: 1500,
productQuantity: 2,
productName: "Wireless Mouse",
customerName: "Rahim Uddin",
customerPhone: "+8801712345678",
customerAddress: "Rangpur, Bangladesh",
customerNote: "Please deliver between 3-5 PM",
}), // put your request body
},
},
@@ -142,5 +147,3 @@ export const orderSwaggerDocs = {
},
},
};