feat: update product entity and request to include nutritional values

This commit is contained in:
ilhamtahir committed 2025-02-17 05:28:49 +08:00
1 parent 73ac0f8049
commit 99a37cd2ff
5 files changed
+77 -17

No files matched your search

+20 -3
View File
@@ -23,12 +23,29 @@ export class Product extends BaseEntity {
})
tags: string[];
@Column()
totalCalories: number;
@Column()
totalWeight: number;
//蛋白质
@Column()
protein: number;
// 脂肪
@Column()
fat: number;
// 粗纤维
@Column()
fiber: number;
// 粗灰分
@Column()
ash: number;
// 水分
@Column()
moisture: number;
@OneToMany(
() => FeedingPlanProduct,
(feedingPlanProduct) => feedingPlanProduct.feedingPlan,