remove intermediate grocery table and add related_products feature

This commit is contained in:
2025-05-28 09:22:47 +02:00
parent 3ea5db4214
commit 112ea41e88
16 changed files with 1140 additions and 1532 deletions

View File

@@ -20,25 +20,11 @@ export interface GroceryCategoryCreate {
name: string;
}
export interface Grocery {
id: number;
name: string;
category_id: number;
created_at: string;
updated_at?: string;
category: GroceryCategory;
}
export interface GroceryCreate {
name: string;
category_id: number;
}
export interface Product {
id: number;
name: string;
grocery_id: number;
grocery: Grocery;
category_id: number;
category: GroceryCategory;
brand_id?: number;
brand?: Brand;
organic: boolean;
@@ -50,7 +36,7 @@ export interface Product {
export interface ProductCreate {
name: string;
grocery_id: number;
category_id: number;
brand_id?: number;
organic: boolean;
weight?: number;
@@ -81,7 +67,7 @@ export interface ProductInEvent {
export interface ProductWithEventData {
id: number;
name: string;
grocery: Grocery;
category: GroceryCategory;
brand?: Brand;
organic: boolean;
weight?: number;