package
Version:
v1.1.0
Opens a new window with list of versions in this module.
Published: Mar 26, 2025
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type CategoryByIDResponse struct {
IsSuccess bool `json:"success"`
Message string `json:"message"`
Data CategoryDetail `json:"data"`
}
type CategoryDetail struct {
ID int64 `json:"id"`
Name string `json:"name"`
ParentID *int `json:"parent_id"`
Description string `json:"description"`
}
type CreateCategoryRequest struct {
Name string `json:"name" validate:"required"`
ParentID *int `json:"parent_id" validate:"omitempty,required"`
Description string `json:"description" validate:"required"`
}
type CreateCategoryResponse struct {
IsSuccess bool `json:"success"`
Message string `json:"message"`
Data struct {
ID int64 `json:"category_id"`
} `json:"data"`
}
type StandardResponse struct {
IsSuccess bool `json:"success"`
Message string `json:"message"`
Data interface{} `json:"data"`
}
type UpdateCategoryRequest struct {
Name string `json:"name" validate:"required"`
ParentID *int `json:"parent_id" validate:"omitempty,required"`
Description string `json:"description" validate:"required"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.