feat: enhance product model with subcategory, brand, tags, and nutrition; update related DTOs and services

This commit is contained in:
Nils-Johan Gynther
2026-04-17 18:11:06 +02:00
parent a05d907608
commit a4ea9be7a1
10 changed files with 517 additions and 33 deletions
+27
View File
@@ -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 = {