feat: categories endpoints
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user