rename grocery to product
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user