order struct

This commit is contained in:
Daniel Goc
2026-04-10 11:06:43 +02:00
parent dfdf8b4db9
commit 4f4b32b131
2 changed files with 31 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ func (h *OrdersHandler) ListOrders(c fiber.Ctx) error {
JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(c, responseErrors.ErrInvalidBody)))
}
paging, filters, err := query_params.ParseFilters[model.Order](c, columnMappingListOrders)
paging, filters, err := query_params.ParseFilters[model.CustomerOrder](c, columnMappingListOrders)
if err != nil {
return c.Status(responseErrors.GetErrorStatus(err)).
JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(c, err)))
@@ -55,7 +55,10 @@ func (h *OrdersHandler) ListOrders(c fiber.Ctx) error {
}
var columnMappingListOrders map[string]string = map[string]string{
"order_id": "?",
"order_id": "co.id",
"user_id": "co.user_id",
"country_id": "co.country_id",
"status": "co.status",
}
func (h *OrdersHandler) PlaceNewOrder(c fiber.Ctx) error {