rename grocery to product

This commit is contained in:
2025-05-26 20:20:21 +02:00
parent 1b984d18d9
commit d27871160e
26 changed files with 1114 additions and 498 deletions

View File

@@ -1,4 +1,4 @@
export interface Grocery {
export interface Product {
id: number;
name: string;
category: string;
@@ -9,7 +9,7 @@ export interface Grocery {
updated_at?: string;
}
export interface GroceryCreate {
export interface ProductCreate {
name: string;
category: string;
organic: boolean;
@@ -32,13 +32,13 @@ export interface ShopCreate {
address?: string | null;
}
export interface GroceryInEvent {
grocery_id: number;
export interface ProductInEvent {
product_id: number;
amount: number;
price: number;
}
export interface GroceryWithEventData {
export interface ProductWithEventData {
id: number;
name: string;
category: string;
@@ -58,7 +58,7 @@ export interface ShoppingEvent {
created_at: string;
updated_at?: string;
shop: Shop;
groceries: GroceryWithEventData[];
products: ProductWithEventData[];
}
export interface ShoppingEventCreate {
@@ -66,7 +66,7 @@ export interface ShoppingEventCreate {
date?: string;
total_amount?: number;
notes?: string;
groceries: GroceryInEvent[];
products: ProductInEvent[];
}
export interface CategoryStats {