package
0.0.0-20241201171416-6d244f26a5c1
Repository: https://github.com/thiagoluis88git/tech1-orders.git
Documentation: pkg.go.dev

# Functions

@Summary Create new order @Description Create new order.
@Summary Create new product @Description Create new product @Tags Product @Accept json @Produce json @Param product body dto.ProductForm true "product" @Success 200 {object} dto.ProductResponse @Failure 400 "Product has required fields" @Failure 409 "This Product is already added" @Router /api/admin/products [post].
@Summary Delete a product @Description Delete a product by ID @Tags Product @Param id path int true "12" @Accept json @Produce json @Success 204 @Router /api/admin/products/{id} [delete].
@Summary Get all categories @Description Get all categories to filter in products by category @Tags Product @Param id path int true "12" @Accept json @Produce json @Success 200 {object} []string @Router /api/products/categories [get].
@Summary Get order by Id @Description Get an order by Id @Tags Order @Accept json @Produce json @Param id path int true "12" @Success 200 {object} dto.OrderResponse @Failure 400 "Order has required fields" @Router /api/orders/{id} [get].
@Summary Get all orders status different to prepare @Description Get all orders status by the waiter and the customer.
@Summary Get all orders to prepare @Description Get all orders already payed that needs to be prepared.
@Summary Get all orders with waiting payment status @Description Get all orders with waiting payment by the owner.
@Summary List all products by a category @Description List all products by a category @Tags Product @Param category path string true "Lanches" @Accept json @Produce json @Success 200 {object} []dto.ProductResponse @Router /api/products/categories/{category} [get].
@Summary Get product by ID @Description Get product by ID @Tags Product @Param id path int true "12" @Accept json @Produce json @Success 200 {object} dto.ProductResponse @Router /api/products/{id} [get].
@Summary Update an order to DELIVERED @Description Update an order.
@Summary Update an order to DONE @Description Update an order.
@Summary Update an order to NOT_DELIVERED @Description Update an order.
@Summary Update an order to PREPARING @Description Update an order.
@Summary Update a product @Description Update a product by ID @Tags Product @Param id path int true "12" @Accept json @Produce json @Success 204 @Router /api/admin/products/{id} [put].