package
0.0.0-20240926010618-b1d94d24917e
Repository: https://github.com/thiagoluis88git/tech1.git
Documentation: pkg.go.dev

# Functions

@Summary Create new customer @Description Create new customer.
@Summary Create new order @Description Create new order.
@Summary Create new payment @Description Create a payment and return its ID.
@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 Create new user admin @Description Create new customer.
@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 Generate a QR Code @Description Generate a QR Code.
@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 customer by CPF @Description Get customer by CPF.
@Summary Get customer by ID @Description Get customer by ID @Tags Customer @Accept json @Produce json @Param Id path string true "12" @Success 200 {object} dto.Customer @Failure 404 "Customer not found" @Router /api/customers/{id} [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].
No description provided by the author
@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 Get payment types @Description Get payment type, like [DEBIT, CREDIT, QR Code (Mercado Pago)] @Tags Payment @Accept json @Produce json @Success 200 {object} []string @Router /api/payments/type [get].
@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 Get user by CPF @Description Get user by CPF.
@Summary Get user by ID @Description Get user by ID @Tags UserAdmin @Accept json @Produce json @Param Id path string true "12" @Success 200 {object} dto.UserAdmin @Failure 404 "User not found" @Router /api/users/{id} [get].
@Summary Login @Description Login the customer by its CPF @Tags Customer @Accept json @Produce json @Param customer body dto.CustomerForm true "customer form" @Success 200 {object} dto.Token @Failure 404 "Customer not found" @Router /auth/login [post].
@Summary Login with unknown user @Description Login with unknown user.
@Summary Login @Description Login the user by its CPF @Tags UserAdmin @Accept json @Produce json @Param customer body dto.UserAdminForm true "user form" @Success 200 {object} dto.Token @Failure 404 "User not found" @Router /auth/admin/login [post].
@Summary Update customer @Description Update customer @Tags Customer @Accept json @Produce json @Param id path int true "12" @Param product body dto.Customer true "customer" @Success 204 @Failure 400 "Customer has required fields" @Failure 404 "Customer not found" @Router /api/admin/customers/{id} [put].
@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].
@Summary Update user @Description Update user @Tags UserAdmin @Accept json @Produce json @Param id path int true "12" @Param product body dto.Customer true "customer" @Success 204 @Failure 400 "User has required fields" @Failure 404 "User not found" @Router /api/users/{id} [put].