Initial Version

This commit is contained in:
2025-05-23 20:44:23 +02:00
parent d6ce2cbcec
commit 00f18baa2d
27 changed files with 21261 additions and 0 deletions

View File

@@ -0,0 +1,72 @@
export interface Grocery {
id: number;
name: string;
price: number;
category: string;
organic: boolean;
weight?: number;
weight_unit: string;
created_at: string;
updated_at?: string;
}
export interface GroceryCreate {
name: string;
price: number;
category: string;
organic: boolean;
weight?: number;
weight_unit: string;
}
export interface Shop {
id: number;
name: string;
city: string;
address?: string;
created_at: string;
}
export interface ShopCreate {
name: string;
city: string;
address?: string;
}
export interface GroceryInEvent {
grocery_id: number;
amount: number;
}
export interface ShoppingEvent {
id: number;
shop_id: number;
date: string;
total_amount?: number;
notes?: string;
created_at: string;
shop: Shop;
groceries: Grocery[];
}
export interface ShoppingEventCreate {
shop_id: number;
date?: string;
total_amount?: number;
notes?: string;
groceries: GroceryInEvent[];
}
export interface CategoryStats {
category: string;
total_spent: number;
item_count: number;
avg_price: number;
}
export interface ShopStats {
shop_name: string;
total_spent: number;
visit_count: number;
avg_per_visit: number;
}