feat: create dialog
This commit is contained in:
23
internal/types/api.go
Normal file
23
internal/types/api.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package types
|
||||
|
||||
type Response struct {
|
||||
HTTPStatusCode int `json:"status"`
|
||||
}
|
||||
|
||||
type APIVersion struct {
|
||||
Major int `json:"major"`
|
||||
Minor int `json:"minor"`
|
||||
Patch int `json:"patch"`
|
||||
}
|
||||
|
||||
type IndexResponse struct {
|
||||
*Response
|
||||
Version APIVersion `json:"version"`
|
||||
}
|
||||
|
||||
type APIError struct {
|
||||
*Response
|
||||
Err error `json:"-"`
|
||||
|
||||
Messages []string `json:"messages"`
|
||||
}
|
||||
@@ -5,10 +5,12 @@ import (
|
||||
)
|
||||
|
||||
type AssetResponse struct {
|
||||
*Response
|
||||
Asset *Asset `json:"asset"`
|
||||
}
|
||||
|
||||
type MultipleAssetsResponse struct {
|
||||
*Response
|
||||
Assets []*Asset `json:"assets"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
@@ -9,3 +9,14 @@ type Category struct {
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
DeletedAt *time.Time `json:"deleted_at,omitempty"`
|
||||
}
|
||||
|
||||
type CategoryResponse struct {
|
||||
*Response
|
||||
Category *Category `json:"category"`
|
||||
}
|
||||
|
||||
type MultipleCategoryResponse struct {
|
||||
*Response
|
||||
Categories []*Category `json:"categories"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
|
||||
@@ -3,10 +3,12 @@ package types
|
||||
import "time"
|
||||
|
||||
type ShelfResponse struct {
|
||||
*Response
|
||||
ShelfLocation *ShelfLocation `json:"shelf"`
|
||||
}
|
||||
|
||||
type MultipleShelfResponse struct {
|
||||
*Response
|
||||
ShelfLocations []*ShelfLocation `json:"shelves"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user