feat: create dialog

This commit is contained in:
2024-01-20 21:58:49 -06:00
parent c24251cfbf
commit 639788d37b
11 changed files with 715 additions and 62 deletions

23
internal/types/api.go Normal file
View 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"`
}

View File

@@ -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"`
}

View File

@@ -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"`
}

View File

@@ -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"`
}