summaryrefslogtreecommitdiff
path: root/internal/models/types.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/models/types.go')
-rw-r--r--internal/models/types.go33
1 files changed, 33 insertions, 0 deletions
diff --git a/internal/models/types.go b/internal/models/types.go
index a604b28..f45e346 100644
--- a/internal/models/types.go
+++ b/internal/models/types.go
@@ -26,6 +26,39 @@ type Meal struct {
RecipeURL string `json:"recipe_url"`
}
+// ShoppingItem represents an item on the PlanToEat shopping list
+type ShoppingItem struct {
+ ID string `json:"id"`
+ Name string `json:"name"`
+ Quantity string `json:"quantity"`
+ Category string `json:"category"`
+ Store string `json:"store"`
+ Checked bool `json:"checked"`
+}
+
+// UnifiedShoppingItem combines Trello cards and PlanToEat items
+type UnifiedShoppingItem struct {
+ ID string `json:"id"`
+ Name string `json:"name"`
+ Quantity string `json:"quantity,omitempty"`
+ Category string `json:"category,omitempty"`
+ Store string `json:"store"`
+ Source string `json:"source"` // "trello" or "plantoeat"
+ Checked bool `json:"checked"`
+}
+
+// ShoppingStore groups items by store
+type ShoppingStore struct {
+ Name string
+ Categories []ShoppingCategory
+}
+
+// ShoppingCategory groups items within a store
+type ShoppingCategory struct {
+ Name string
+ Items []UnifiedShoppingItem
+}
+
// List represents a Trello list
type List struct {
ID string `json:"id"`