feat: categories endpoints

This commit is contained in:
2024-01-20 21:59:06 -06:00
parent de2c08ad09
commit a8ee837dee
4 changed files with 172 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
package types
import (
"net/http"
"time"
"gorm.io/gorm"
@@ -23,6 +24,23 @@ type Category struct {
Requests
*/
type CreateCategoryRequest struct {
Name string `json:"name"`
}
func (c CreateCategoryRequest) Bind(r *http.Request) error { return nil }
/*
Responses
Responses
*/
type CategoryResponse struct {
*Response
Category *Category `json:"category"`
}
type MultipleCategoryResponse struct {
*Response
Categories []*Category `json:"categories"`
Total int64 `json:"total"`
}