model

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CategoryByIDResponse

type CategoryByIDResponse struct {
	IsSuccess bool           `json:"success"`
	Message   string         `json:"message"`
	Data      CategoryDetail `json:"data"`
}

type CategoryDetail

type CategoryDetail struct {
	ID          int64  `json:"id"`
	Name        string `json:"name"`
	ParentID    *int   `json:"parent_id"`
	Description string `json:"description"`
}

type CreateCategoryRequest

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

type CreateCategoryResponse struct {
	IsSuccess bool   `json:"success"`
	Message   string `json:"message"`
	Data      struct {
		ID int64 `json:"category_id"`
	} `json:"data"`
}

type StandardResponse

type StandardResponse struct {
	IsSuccess bool        `json:"success"`
	Message   string      `json:"message"`
	Data      interface{} `json:"data"`
}

type UpdateCategoryRequest

type UpdateCategoryRequest struct {
	Name        string `json:"name" validate:"required"`
	ParentID    *int   `json:"parent_id" validate:"omitempty,required"`
	Description string `json:"description" validate:"required"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL