30 lines
886 B
Go
30 lines
886 B
Go
package model
|
|
|
|
type Category struct {
|
|
ID int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
Type string `json:"type"`
|
|
ParentID *int64 `json:"parent_id"`
|
|
SortOrder int `json:"sort_order"`
|
|
Keywords string `json:"keywords"`
|
|
IsActive bool `json:"is_active"`
|
|
CreatedAt string `json:"created_at"`
|
|
UpdatedAt string `json:"updated_at"`
|
|
}
|
|
|
|
type CreateCategoryRequest struct {
|
|
Name string `json:"name"`
|
|
Type string `json:"type"`
|
|
ParentID *int64 `json:"parent_id,omitempty"`
|
|
SortOrder int `json:"sort_order"`
|
|
Keywords string `json:"keywords"`
|
|
}
|
|
|
|
type UpdateCategoryRequest struct {
|
|
Name *string `json:"name,omitempty"`
|
|
ParentID NullableInt64 `json:"parent_id,omitempty"`
|
|
SortOrder *int `json:"sort_order,omitempty"`
|
|
Keywords *string `json:"keywords,omitempty"`
|
|
IsActive *bool `json:"is_active,omitempty"`
|
|
}
|