add grocery to product

This commit is contained in:
2025-05-26 21:05:15 +02:00
parent 25c09dfecc
commit 7e24d58a94
11 changed files with 661 additions and 84 deletions

View File

@@ -9,10 +9,24 @@ export interface BrandCreate {
name: string;
}
export interface Product {
export interface Grocery {
id: number;
name: string;
category: string;
created_at: string;
updated_at?: string;
}
export interface GroceryCreate {
name: string;
category: string;
}
export interface Product {
id: number;
name: string;
grocery_id: number;
grocery: Grocery;
brand_id?: number;
brand?: Brand;
organic: boolean;
@@ -24,7 +38,7 @@ export interface Product {
export interface ProductCreate {
name: string;
category: string;
grocery_id: number;
brand_id?: number;
organic: boolean;
weight?: number;
@@ -55,7 +69,7 @@ export interface ProductInEvent {
export interface ProductWithEventData {
id: number;
name: string;
category: string;
grocery: Grocery;
brand?: Brand;
organic: boolean;
weight?: number;