90dc-core 1.12.20 → 1.12.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/dbmodels/diet/DietMealRecipe.d.ts +1 -0
- package/dist/lib/dbmodels/diet/DietMealRecipe.d.ts.map +1 -1
- package/dist/lib/dbmodels/diet/DietMealRecipe.js +5 -0
- package/dist/lib/dbmodels/diet/DietMealRecipe.js.map +1 -1
- package/dist/lib/dbmodels/diet/Ingredient.d.ts +1 -3
- package/dist/lib/dbmodels/diet/Ingredient.d.ts.map +1 -1
- package/dist/lib/dbmodels/diet/Ingredient.js +0 -6
- package/dist/lib/dbmodels/diet/Ingredient.js.map +1 -1
- package/dist/lib/dbmodels/diet/Recipe.d.ts +0 -7
- package/dist/lib/dbmodels/diet/Recipe.d.ts.map +1 -1
- package/dist/lib/dbmodels/diet/Recipe.js +0 -42
- package/dist/lib/dbmodels/diet/Recipe.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DietMealRecipe.d.ts","sourceRoot":"","sources":["../../../../src/lib/dbmodels/diet/DietMealRecipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EASN,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE;;;;;;;;;;;;;;GAcG;AACH,qBACa,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC;IAI/C,IAAI,EAAE,MAAM,CAAC;IAKb,YAAY,EAAE,MAAM,CAAC;IAGrB,IAAI,EAAE,QAAQ,CAAC;IAMf,UAAU,EAAE,MAAM,CAAC;IAGnB,MAAM,EAAE,MAAM,CAAC;IAKf,aAAa,EAAE,MAAM,CAAC;IAItB,cAAc,EAAE,MAAM,CAAC;IAGvB,aAAa,EAAE,MAAM,CAAC;IAGtB,WAAW,EAAE,MAAM,CAAC;IAGpB,UAAU,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"DietMealRecipe.d.ts","sourceRoot":"","sources":["../../../../src/lib/dbmodels/diet/DietMealRecipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EASN,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE;;;;;;;;;;;;;;GAcG;AACH,qBACa,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC;IAI/C,IAAI,EAAE,MAAM,CAAC;IAKb,YAAY,EAAE,MAAM,CAAC;IAGrB,IAAI,EAAE,QAAQ,CAAC;IAMf,UAAU,EAAE,MAAM,CAAC;IAGnB,MAAM,EAAE,MAAM,CAAC;IAKf,aAAa,EAAE,MAAM,CAAC;IAItB,cAAc,EAAE,MAAM,CAAC;IAGvB,aAAa,EAAE,MAAM,CAAC;IAGtB,WAAW,EAAE,MAAM,CAAC;IAGpB,UAAU,EAAE,MAAM,CAAC;IAMnB,MAAM,EAAE,OAAO,CAAC;IAOhB,WAAW,EAAE,wBAAwB,EAAE,CAAC;CACjD"}
|
|
@@ -49,6 +49,11 @@ _ts_decorate([
|
|
|
49
49
|
_ts_decorate([
|
|
50
50
|
Column(DataType.FLOAT)
|
|
51
51
|
], DietMealRecipe.prototype, "scaledFats", void 0);
|
|
52
|
+
_ts_decorate([
|
|
53
|
+
Default(false),
|
|
54
|
+
Index,
|
|
55
|
+
Column(DataType.BOOLEAN)
|
|
56
|
+
], DietMealRecipe.prototype, "locked", void 0);
|
|
52
57
|
_ts_decorate([
|
|
53
58
|
HasMany(()=>DietMealRecipeIngredient, {
|
|
54
59
|
foreignKey: "dietMealRecipeUuid",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/dbmodels/diet/DietMealRecipe.ts"],"sourcesContent":["import {\n Table,\n Model,\n Column,\n DataType,\n Default,\n PrimaryKey,\n ForeignKey,\n BelongsTo,\n HasMany,\n Index,\n} from \"sequelize-typescript\";\nimport { DietMeal } from \"./DietMeal.js\";\nimport { Recipe } from \"./Recipe.js\";\nimport { DietMealRecipeIngredient } from \"./DietMealRecipeIngredient.js\";\n\n/**\n * DietMealRecipe\n *\n * Links a recipe to a meal in a diet program, with scaling information.\n * This is the \"instance\" of a recipe in a diet plan.\n *\n * OLD APPROACH (deprecated):\n * - recipeJson: JSONB with full recipe data\n *\n * NEW APPROACH:\n * - recipeUuid: FK to Recipe table\n * - scalingFactor: How much the recipe was scaled (1.0 = no scaling, 1.5 = 150%)\n * - scaled macros: Pre-computed macro values after scaling\n * - ingredients: Related DietMealRecipeIngredient rows with scaled amounts\n */\n@Table\nexport class DietMealRecipe extends Model<DietMealRecipe> {\n @PrimaryKey\n @Default(DataType.UUIDV4)\n @Column(DataType.UUID)\n declare uuid: string;\n\n @Index\n @ForeignKey(() => DietMeal)\n @Column(DataType.UUID)\n declare dietMealUuid: string;\n\n @BelongsTo(() => DietMeal, { onDelete: \"CASCADE\" })\n declare meal: DietMeal;\n\n // NEW: Reference to the actual Recipe\n @Index\n @ForeignKey(() => Recipe)\n @Column(DataType.UUID)\n declare recipeUuid: string;\n\n @BelongsTo(() => Recipe)\n declare recipe: Recipe;\n\n // NEW: Scaling information\n @Default(1.0)\n @Column(DataType.FLOAT)\n declare scalingFactor: number;\n\n // NEW: Pre-computed scaled macros\n @Column(DataType.INTEGER)\n declare scaledCalories: number;\n\n @Column(DataType.FLOAT)\n declare scaledProtein: number;\n\n @Column(DataType.FLOAT)\n declare scaledCarbs: number;\n\n @Column(DataType.FLOAT)\n declare scaledFats: number;\n\n // NEW: Scaled ingredients\n @HasMany(() => DietMealRecipeIngredient, {\n foreignKey: \"dietMealRecipeUuid\",\n onDelete: \"CASCADE\",\n })\n declare ingredients: DietMealRecipeIngredient[];\n}\n"],"names":["Table","Model","Column","DataType","Default","PrimaryKey","ForeignKey","BelongsTo","HasMany","Index","DietMeal","Recipe","DietMealRecipeIngredient","DietMealRecipe","UUIDV4","UUID","onDelete","FLOAT","INTEGER","foreignKey"],"mappings":";;;;;;AAAA,SACEA,KAAK,EACLC,KAAK,EACLC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,UAAU,EACVC,UAAU,EACVC,SAAS,EACTC,OAAO,EACPC,KAAK,QACA,uBAAuB;AAC9B,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,MAAM,QAAQ,cAAc;AACrC,SAASC,wBAAwB,QAAQ,gCAAgC;AAkBzE,OAAO,MAAMC,uBAAuBZ;
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/dbmodels/diet/DietMealRecipe.ts"],"sourcesContent":["import {\n Table,\n Model,\n Column,\n DataType,\n Default,\n PrimaryKey,\n ForeignKey,\n BelongsTo,\n HasMany,\n Index,\n} from \"sequelize-typescript\";\nimport { DietMeal } from \"./DietMeal.js\";\nimport { Recipe } from \"./Recipe.js\";\nimport { DietMealRecipeIngredient } from \"./DietMealRecipeIngredient.js\";\n\n/**\n * DietMealRecipe\n *\n * Links a recipe to a meal in a diet program, with scaling information.\n * This is the \"instance\" of a recipe in a diet plan.\n *\n * OLD APPROACH (deprecated):\n * - recipeJson: JSONB with full recipe data\n *\n * NEW APPROACH:\n * - recipeUuid: FK to Recipe table\n * - scalingFactor: How much the recipe was scaled (1.0 = no scaling, 1.5 = 150%)\n * - scaled macros: Pre-computed macro values after scaling\n * - ingredients: Related DietMealRecipeIngredient rows with scaled amounts\n */\n@Table\nexport class DietMealRecipe extends Model<DietMealRecipe> {\n @PrimaryKey\n @Default(DataType.UUIDV4)\n @Column(DataType.UUID)\n declare uuid: string;\n\n @Index\n @ForeignKey(() => DietMeal)\n @Column(DataType.UUID)\n declare dietMealUuid: string;\n\n @BelongsTo(() => DietMeal, { onDelete: \"CASCADE\" })\n declare meal: DietMeal;\n\n // NEW: Reference to the actual Recipe\n @Index\n @ForeignKey(() => Recipe)\n @Column(DataType.UUID)\n declare recipeUuid: string;\n\n @BelongsTo(() => Recipe)\n declare recipe: Recipe;\n\n // NEW: Scaling information\n @Default(1.0)\n @Column(DataType.FLOAT)\n declare scalingFactor: number;\n\n // NEW: Pre-computed scaled macros\n @Column(DataType.INTEGER)\n declare scaledCalories: number;\n\n @Column(DataType.FLOAT)\n declare scaledProtein: number;\n\n @Column(DataType.FLOAT)\n declare scaledCarbs: number;\n\n @Column(DataType.FLOAT)\n declare scaledFats: number;\n\n // Recipe locking: When true, this recipe will be preserved during diet program regeneration\n @Default(false)\n @Index\n @Column(DataType.BOOLEAN)\n declare locked: boolean;\n\n // NEW: Scaled ingredients\n @HasMany(() => DietMealRecipeIngredient, {\n foreignKey: \"dietMealRecipeUuid\",\n onDelete: \"CASCADE\",\n })\n declare ingredients: DietMealRecipeIngredient[];\n}\n"],"names":["Table","Model","Column","DataType","Default","PrimaryKey","ForeignKey","BelongsTo","HasMany","Index","DietMeal","Recipe","DietMealRecipeIngredient","DietMealRecipe","UUIDV4","UUID","onDelete","FLOAT","INTEGER","BOOLEAN","foreignKey"],"mappings":";;;;;;AAAA,SACEA,KAAK,EACLC,KAAK,EACLC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,UAAU,EACVC,UAAU,EACVC,SAAS,EACTC,OAAO,EACPC,KAAK,QACA,uBAAuB;AAC9B,SAASC,QAAQ,QAAQ,gBAAgB;AACzC,SAASC,MAAM,QAAQ,cAAc;AACrC,SAASC,wBAAwB,QAAQ,gCAAgC;AAkBzE,OAAO,MAAMC,uBAAuBZ;AAqDpC;;;qBAnDoBa;oBACDC;;;;mBAICL;oBACDK;;;kBAGAL;QAAYM,UAAU;;;;;mBAKrBL;oBACDI;;;kBAGAJ;;;;oBAKAM;;;oBAIAC;;;oBAGAD;;;oBAGAA;;;oBAGAA;;;;;oBAMAE;;;gBAIFP;QACbQ,YAAY;QACZJ,UAAU"}
|
|
@@ -10,11 +10,10 @@ interface IngredientAttributes {
|
|
|
10
10
|
carbsPer100g: number;
|
|
11
11
|
fatsPer100g: number;
|
|
12
12
|
category?: string;
|
|
13
|
-
carbType?: string;
|
|
14
13
|
createdAt?: Date;
|
|
15
14
|
updatedAt?: Date;
|
|
16
15
|
}
|
|
17
|
-
interface IngredientCreationAttributes extends Optional<IngredientAttributes, "uuid" | "category" | "
|
|
16
|
+
interface IngredientCreationAttributes extends Optional<IngredientAttributes, "uuid" | "category" | "createdAt" | "updatedAt"> {
|
|
18
17
|
}
|
|
19
18
|
export declare class Ingredient extends Model<IngredientAttributes, IngredientCreationAttributes> {
|
|
20
19
|
uuid: string;
|
|
@@ -24,7 +23,6 @@ export declare class Ingredient extends Model<IngredientAttributes, IngredientCr
|
|
|
24
23
|
carbsPer100g: number;
|
|
25
24
|
fatsPer100g: number;
|
|
26
25
|
category: string;
|
|
27
|
-
carbType: string;
|
|
28
26
|
recipeIngredients: RecipeIngredient[];
|
|
29
27
|
tags: IngredientTag[];
|
|
30
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ingredient.d.ts","sourceRoot":"","sources":["../../../../src/lib/dbmodels/diet/Ingredient.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,EAON,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,UAAU,oBAAoB;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,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true
|
|
53
53
|
})
|
|
54
54
|
], Ingredient.prototype, "category", void 0);
|
|
55
|
-
_ts_decorate([
|
|
56
|
-
Column({
|
|
57
|
-
type: DataType.STRING,
|
|
58
|
-
allowNull: true
|
|
59
|
-
})
|
|
60
|
-
], Ingredient.prototype, "carbType", void 0);
|
|
61
55
|
_ts_decorate([
|
|
62
56
|
HasMany(()=>RecipeIngredient, {
|
|
63
57
|
foreignKey: "ingredientUuid",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/dbmodels/diet/Ingredient.ts"],"sourcesContent":["import {\n Table,\n Model,\n Column,\n DataType,\n Default,\n PrimaryKey,\n HasMany,\n BelongsToMany,\n} from \"sequelize-typescript\";\nimport type { Optional } from \"sequelize\";\nimport { RecipeIngredient } from \"./RecipeIngredient.js\";\nimport { IngredientTag } from \"./IngredientTag.js\";\nimport { IngredientTags } from \"./IngredientTags.js\";\n\ninterface IngredientAttributes {\n uuid: string;\n name: string;\n caloriesPer100g: number;\n proteinPer100g: number;\n carbsPer100g: number;\n fatsPer100g: number;\n category?: string;\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/dbmodels/diet/Ingredient.ts"],"sourcesContent":["import {\n Table,\n Model,\n Column,\n DataType,\n Default,\n PrimaryKey,\n HasMany,\n BelongsToMany,\n} from \"sequelize-typescript\";\nimport type { Optional } from \"sequelize\";\nimport { RecipeIngredient } from \"./RecipeIngredient.js\";\nimport { IngredientTag } from \"./IngredientTag.js\";\nimport { IngredientTags } from \"./IngredientTags.js\";\n\ninterface IngredientAttributes {\n uuid: string;\n name: string;\n caloriesPer100g: number;\n proteinPer100g: number;\n carbsPer100g: number;\n fatsPer100g: number;\n category?: string;\n createdAt?: Date;\n updatedAt?: Date;\n}\n\ninterface IngredientCreationAttributes\n extends Optional<IngredientAttributes, \"uuid\" | \"category\" | \"createdAt\" | \"updatedAt\"> {}\n\n@Table({\n timestamps: true,\n indexes: [\n {\n fields: [\"name\"],\n unique: true,\n },\n {\n fields: [\"category\"],\n },\n ],\n})\nexport class Ingredient extends Model<IngredientAttributes, IngredientCreationAttributes> {\n @PrimaryKey\n @Default(DataType.UUIDV4)\n @Column(DataType.UUID)\n declare uuid: string;\n\n @Column({ type: DataType.STRING, allowNull: false, unique: true })\n declare name: string;\n\n @Column({ type: DataType.FLOAT, allowNull: false })\n declare caloriesPer100g: number;\n\n @Column({ type: DataType.FLOAT, allowNull: false })\n declare proteinPer100g: number;\n\n @Column({ type: DataType.FLOAT, allowNull: false })\n declare carbsPer100g: number;\n\n @Column({ type: DataType.FLOAT, allowNull: false })\n declare fatsPer100g: number;\n\n @Column({ type: DataType.STRING, allowNull: true })\n declare category: string;\n\n @HasMany(() => RecipeIngredient, { foreignKey: \"ingredientUuid\", onDelete: \"CASCADE\" })\n declare recipeIngredients: RecipeIngredient[];\n\n @BelongsToMany(() => IngredientTag, {\n through: () => IngredientTags,\n foreignKey: \"ingredientUuid\",\n otherKey: \"ingredientTagUuid\",\n as: \"tags\",\n })\n declare tags: IngredientTag[];\n}\n"],"names":["Table","Model","Column","DataType","Default","PrimaryKey","HasMany","BelongsToMany","RecipeIngredient","IngredientTag","IngredientTags","Ingredient","UUIDV4","UUID","type","STRING","allowNull","unique","FLOAT","foreignKey","onDelete","through","otherKey","as","timestamps","indexes","fields"],"mappings":";;;;;;AAAA,SACEA,KAAK,EACLC,KAAK,EACLC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,UAAU,EACVC,OAAO,EACPC,aAAa,QACR,uBAAuB;AAE9B,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SAASC,aAAa,QAAQ,qBAAqB;AACnD,SAASC,cAAc,QAAQ,sBAAsB;AA6BrD,OAAO,MAAMC,mBAAmBV;AAkChC;;;qBAhCoBW;oBACDC;;;;QAGPC,MAAMX,SAASY,MAAM;QAAEC,WAAW;QAAOC,QAAQ;;;;;QAGjDH,MAAMX,SAASe,KAAK;QAAEF,WAAW;;;;;QAGjCF,MAAMX,SAASe,KAAK;QAAEF,WAAW;;;;;QAGjCF,MAAMX,SAASe,KAAK;QAAEF,WAAW;;;;;QAGjCF,MAAMX,SAASe,KAAK;QAAEF,WAAW;;;;;QAGjCF,MAAMX,SAASY,MAAM;QAAEC,WAAW;;;;gBAG7BR;QAAoBW,YAAY;QAAkBC,UAAU;;;;sBAGtDX;QACnBY,SAAS,IAAMX;QACfS,YAAY;QACZG,UAAU;QACVC,IAAI;;;;;QA1CNC,YAAY;QACZC,SAAS;YACP;gBACEC,QAAQ;oBAAC;iBAAO;gBAChBT,QAAQ;YACV;YACA;gBACES,QAAQ;oBAAC;iBAAW;YACtB;SACD"}
|
|
@@ -23,13 +23,6 @@ export declare class Recipe extends Model<Recipe> {
|
|
|
23
23
|
ingredientsImageUrl?: string;
|
|
24
24
|
methodImageUrl?: string;
|
|
25
25
|
imageUploadedAt?: Date;
|
|
26
|
-
role?: string;
|
|
27
|
-
proteinDensity?: number;
|
|
28
|
-
proteinPercent?: number;
|
|
29
|
-
carbsPercent?: number;
|
|
30
|
-
fatsPercent?: number;
|
|
31
|
-
roleClassifiedAt?: Date;
|
|
32
|
-
mealForm?: string;
|
|
33
26
|
translatedRecipes: TranslatedRecipe[];
|
|
34
27
|
recipeIngredients: RecipeIngredient[];
|
|
35
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Recipe.d.ts","sourceRoot":"","sources":["../../../../src/lib/dbmodels/diet/Recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,EAEN,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,qBACa,MAAO,SAAQ,KAAK,CAAC,MAAM,CAAC;IAQ/B,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,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AW,EAAE,MAAM,CAAC;IAGpB,MAAM,EAAE,MAAM,CAAC;IAGf,aAAa,EAAE,MAAM,CAAC;IAGtB,kBAAkB,EAAE,OAAO,CAAC;IAG5B,kBAAkB,EAAE,OAAO,CAAC;IAI5B,gBAAgB,EAAE,OAAO,CAAC;IAG1B,IAAI,EAAE,SAAS,EAAE,CAAC;IAGlB,KAAK,EAAE,MAAM,CAAC;IAGd,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAG7B,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,eAAe,CAAC,EAAE,IAAI,CAAC;IAGvB,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;IAGtC,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;CAC/C"}
|
|
@@ -139,48 +139,6 @@ _ts_decorate([
|
|
|
139
139
|
allowNull: true
|
|
140
140
|
})
|
|
141
141
|
], Recipe.prototype, "imageUploadedAt", void 0);
|
|
142
|
-
_ts_decorate([
|
|
143
|
-
Column({
|
|
144
|
-
type: DataType.STRING(20),
|
|
145
|
-
allowNull: true
|
|
146
|
-
})
|
|
147
|
-
], Recipe.prototype, "role", void 0);
|
|
148
|
-
_ts_decorate([
|
|
149
|
-
Column({
|
|
150
|
-
type: DataType.FLOAT,
|
|
151
|
-
allowNull: true
|
|
152
|
-
})
|
|
153
|
-
], Recipe.prototype, "proteinDensity", void 0);
|
|
154
|
-
_ts_decorate([
|
|
155
|
-
Column({
|
|
156
|
-
type: DataType.FLOAT,
|
|
157
|
-
allowNull: true
|
|
158
|
-
})
|
|
159
|
-
], Recipe.prototype, "proteinPercent", void 0);
|
|
160
|
-
_ts_decorate([
|
|
161
|
-
Column({
|
|
162
|
-
type: DataType.FLOAT,
|
|
163
|
-
allowNull: true
|
|
164
|
-
})
|
|
165
|
-
], Recipe.prototype, "carbsPercent", void 0);
|
|
166
|
-
_ts_decorate([
|
|
167
|
-
Column({
|
|
168
|
-
type: DataType.FLOAT,
|
|
169
|
-
allowNull: true
|
|
170
|
-
})
|
|
171
|
-
], Recipe.prototype, "fatsPercent", void 0);
|
|
172
|
-
_ts_decorate([
|
|
173
|
-
Column({
|
|
174
|
-
type: DataType.DATE,
|
|
175
|
-
allowNull: true
|
|
176
|
-
})
|
|
177
|
-
], Recipe.prototype, "roleClassifiedAt", void 0);
|
|
178
|
-
_ts_decorate([
|
|
179
|
-
Column({
|
|
180
|
-
type: DataType.STRING(20),
|
|
181
|
-
allowNull: true
|
|
182
|
-
})
|
|
183
|
-
], Recipe.prototype, "mealForm", void 0);
|
|
184
142
|
_ts_decorate([
|
|
185
143
|
HasMany(()=>TranslatedRecipe)
|
|
186
144
|
], Recipe.prototype, "translatedRecipes", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/dbmodels/diet/Recipe.ts"],"sourcesContent":["import {\n BelongsToMany,\n Column,\n DataType,\n Default,\n HasMany,\n Model,\n Table,\n} from \"sequelize-typescript\";\nimport { TranslatedRecipe } from \"./TranslatedRecipe.js\";\nimport { RecipeTag } from \"./RecipeTag.js\";\nimport { RecipeTags } from \"./RecipeTags.js\";\nimport { RecipeIngredient } from \"./RecipeIngredient.js\";\n\n@Table\nexport class Recipe extends Model<Recipe> {\n @Default(DataType.UUIDV4)\n @Column({\n type: DataType.UUID,\n defaultValue: DataType.UUID,\n allowNull: false,\n primaryKey: true,\n })\n declare uuid: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare title: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare duration: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare content: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare kcal: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare fat: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare carbs: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare protein: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare ingredients: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare method: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare tipsAndTricks: string;\n\n @Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false })\n declare ShowForFreeVersion: boolean;\n\n @Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false })\n declare LockForFreeVersion: boolean;\n\n @Default(true)\n @Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false })\n declare isCoachingRecipe: boolean;\n\n @BelongsToMany(() => RecipeTag, { through: () => RecipeTags, as: \"tags\" })\n declare tags: RecipeTag[];\n\n @Column({ type: DataType.INTEGER, allowNull: false, defaultValue: 0 })\n declare order: number;\n\n @Column({ type: DataType.STRING(500), allowNull: true })\n declare coverImageUrl?: string;\n\n @Column({ type: DataType.STRING(500), allowNull: true })\n declare ingredientsImageUrl?: string;\n\n @Column({ type: DataType.STRING(500), allowNull: true })\n declare methodImageUrl?: string;\n\n @Column({ type: DataType.DATE, allowNull: true })\n declare imageUploadedAt?: Date;\n\n @
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/dbmodels/diet/Recipe.ts"],"sourcesContent":["import {\n BelongsToMany,\n Column,\n DataType,\n Default,\n HasMany,\n Model,\n Table,\n} from \"sequelize-typescript\";\nimport { TranslatedRecipe } from \"./TranslatedRecipe.js\";\nimport { RecipeTag } from \"./RecipeTag.js\";\nimport { RecipeTags } from \"./RecipeTags.js\";\nimport { RecipeIngredient } from \"./RecipeIngredient.js\";\n\n@Table\nexport class Recipe extends Model<Recipe> {\n @Default(DataType.UUIDV4)\n @Column({\n type: DataType.UUID,\n defaultValue: DataType.UUID,\n allowNull: false,\n primaryKey: true,\n })\n declare uuid: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare title: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare duration: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare content: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare kcal: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare fat: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare carbs: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare protein: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare ingredients: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare method: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare tipsAndTricks: string;\n\n @Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false })\n declare ShowForFreeVersion: boolean;\n\n @Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false })\n declare LockForFreeVersion: boolean;\n\n @Default(true)\n @Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false })\n declare isCoachingRecipe: boolean;\n\n @BelongsToMany(() => RecipeTag, { through: () => RecipeTags, as: \"tags\" })\n declare tags: RecipeTag[];\n\n @Column({ type: DataType.INTEGER, allowNull: false, defaultValue: 0 })\n declare order: number;\n\n @Column({ type: DataType.STRING(500), allowNull: true })\n declare coverImageUrl?: string;\n\n @Column({ type: DataType.STRING(500), allowNull: true })\n declare ingredientsImageUrl?: string;\n\n @Column({ type: DataType.STRING(500), allowNull: true })\n declare methodImageUrl?: string;\n\n @Column({ type: DataType.DATE, allowNull: true })\n declare imageUploadedAt?: Date;\n\n @HasMany(() => TranslatedRecipe)\n declare translatedRecipes: TranslatedRecipe[];\n\n @HasMany(() => RecipeIngredient, { foreignKey: \"recipeUuid\", onDelete: \"CASCADE\" })\n declare recipeIngredients: RecipeIngredient[];\n}\n"],"names":["BelongsToMany","Column","DataType","Default","HasMany","Model","Table","TranslatedRecipe","RecipeTag","RecipeTags","RecipeIngredient","Recipe","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","TEXT","BOOLEAN","through","as","INTEGER","STRING","DATE","foreignKey","onDelete"],"mappings":";;;;;;AAAA,SACEA,aAAa,EACbC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC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