44 lines
976 B
Go
44 lines
976 B
Go
package main
|
|
|
|
import "time"
|
|
|
|
type (
|
|
// Wails doesn't rlike generics... Fuck...
|
|
// WailsReturn[T interface{}] struct {
|
|
// Data T `json:'data'`
|
|
// Success bool `json:'success'`
|
|
// Error string `json:'error'`
|
|
// }
|
|
|
|
WailsFood struct {
|
|
Data []Food `json:"data"`
|
|
Success bool `json:"success"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|
|
WailsFood1 struct {
|
|
Data Food `json:"data"`
|
|
Success bool `json:"success"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|
|
WailsPer100 struct {
|
|
Data float32 `json:"data"`
|
|
Success bool `json:"success"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|
|
WailsAggregateFood struct {
|
|
Data []AggregatedFood `json:"data"`
|
|
Success bool `json:"success"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|
|
|
|
Weight struct {
|
|
rowid int
|
|
date time.Time
|
|
weight float32
|
|
}
|
|
AggregatedWeight struct {
|
|
period string
|
|
amount float32
|
|
}
|
|
)
|