feat: enhance product model with subcategory, brand, tags, and nutrition; update related DTOs and services
This commit is contained in:
@@ -1,13 +1,40 @@
|
||||
export type Tag = {
|
||||
id: number;
|
||||
name: string;
|
||||
};
|
||||
|
||||
export type ProductTag = {
|
||||
productId: number;
|
||||
tagId: number;
|
||||
tag: Tag;
|
||||
};
|
||||
|
||||
export type Nutrition = {
|
||||
id: number;
|
||||
productId: number;
|
||||
calories: number | null;
|
||||
protein: number | null;
|
||||
fat: number | null;
|
||||
carbohydrates: number | null;
|
||||
salt: number | null;
|
||||
sugar: number | null;
|
||||
fiber: number | null;
|
||||
};
|
||||
|
||||
export type Product = {
|
||||
id: number;
|
||||
name: string;
|
||||
normalizedName: string;
|
||||
category: string | null;
|
||||
subcategory: string | null;
|
||||
brand: string | null;
|
||||
canonicalName: string | null;
|
||||
isActive: boolean;
|
||||
deletedAt: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
tags?: ProductTag[];
|
||||
nutrition?: Nutrition | null;
|
||||
};
|
||||
|
||||
export type InventoryItem = {
|
||||
|
||||
Reference in New Issue
Block a user