feat: product recipes

This commit is contained in:
ferdiansyah783
2025-08-11 13:48:24 +07:00
parent b648349ebd
commit c3780af341
13 changed files with 1162 additions and 420 deletions
+56
View File
@@ -0,0 +1,56 @@
export interface Product {
ID: string;
OrganizationID: string;
CategoryID: string;
SKU: string;
Name: string;
Description: string | null;
Price: number;
Cost: number;
BusinessType: string;
ImageURL: string;
PrinterType: string;
UnitID: string | null;
HasIngredients: boolean;
Metadata: Record<string, any>;
IsActive: boolean;
CreatedAt: string; // ISO date string
UpdatedAt: string; // ISO date string
}
export interface Ingredient {
id: string;
organization_id: string;
outlet_id: string | null;
name: string;
unit_id: string;
cost: number;
stock: number;
is_semi_finished: boolean;
is_active: boolean;
metadata: Record<string, any>;
created_at: string;
updated_at: string;
}
export interface ProductRecipe {
id: string;
organization_id: string;
outlet_id: string | null;
product_id: string;
variant_id: string | null;
ingredient_id: string;
quantity: number;
created_at: string;
updated_at: string;
product: Product;
ingredient: Ingredient;
}
export interface ProductRecipeRequest {
product_id: string;
variant_id: string | null;
ingredient_id: string;
quantity: number;
outlet_id: string | null;
}