90dc-core 1.14.2 → 1.14.3
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.
|
@@ -3,8 +3,10 @@ import type { Optional } from "sequelize";
|
|
|
3
3
|
import { TranslatedRecipe } from "./TranslatedRecipe.js";
|
|
4
4
|
import { RecipeTag } from "./RecipeTag.js";
|
|
5
5
|
import { RecipeIngredient } from "./RecipeIngredient.js";
|
|
6
|
+
import { PersistedUser } from "../user/PersistedUser.js";
|
|
6
7
|
export interface RecipeAttributes {
|
|
7
8
|
uuid: string;
|
|
9
|
+
createdBy?: string | null;
|
|
8
10
|
title: string;
|
|
9
11
|
duration: string;
|
|
10
12
|
content: string;
|
|
@@ -26,10 +28,11 @@ export interface RecipeAttributes {
|
|
|
26
28
|
createdAt?: Date;
|
|
27
29
|
updatedAt?: Date;
|
|
28
30
|
}
|
|
29
|
-
export interface RecipeCreationAttributes extends Optional<RecipeAttributes, "uuid" | "createdAt" | "updatedAt" | "coverImageUrl" | "ingredientsImageUrl" | "methodImageUrl" | "imageUploadedAt"> {
|
|
31
|
+
export interface RecipeCreationAttributes extends Optional<RecipeAttributes, "uuid" | "createdBy" | "createdAt" | "updatedAt" | "coverImageUrl" | "ingredientsImageUrl" | "methodImageUrl" | "imageUploadedAt"> {
|
|
30
32
|
}
|
|
31
33
|
export declare class Recipe extends Model<RecipeAttributes, RecipeCreationAttributes> {
|
|
32
34
|
uuid: string;
|
|
35
|
+
createdBy: string | null;
|
|
33
36
|
title: string;
|
|
34
37
|
duration: string;
|
|
35
38
|
content: string;
|
|
@@ -51,5 +54,6 @@ export declare class Recipe extends Model<RecipeAttributes, RecipeCreationAttrib
|
|
|
51
54
|
imageUploadedAt?: Date | null;
|
|
52
55
|
translatedRecipes: TranslatedRecipe[];
|
|
53
56
|
recipeIngredients: RecipeIngredient[];
|
|
57
|
+
creator: PersistedUser;
|
|
54
58
|
}
|
|
55
59
|
//# sourceMappingURL=Recipe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Recipe.d.ts","sourceRoot":"","sources":["../../../../src/lib/dbmodels/diet/Recipe.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Recipe.d.ts","sourceRoot":"","sources":["../../../../src/lib/dbmodels/diet/Recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,EAEN,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;I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ChC"}
|
|
@@ -4,11 +4,12 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
4
4
|
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
}
|
|
7
|
-
import { BelongsToMany, Column, DataType, Default, HasMany, Model, Table } from "sequelize-typescript";
|
|
7
|
+
import { BelongsTo, BelongsToMany, Column, DataType, Default, ForeignKey, HasMany, Model, Table } from "sequelize-typescript";
|
|
8
8
|
import { TranslatedRecipe } from "./TranslatedRecipe.js";
|
|
9
9
|
import { RecipeTag } from "./RecipeTag.js";
|
|
10
10
|
import { RecipeTags } from "./RecipeTags.js";
|
|
11
11
|
import { RecipeIngredient } from "./RecipeIngredient.js";
|
|
12
|
+
import { PersistedUser } from "../user/PersistedUser.js";
|
|
12
13
|
export class Recipe extends Model {
|
|
13
14
|
}
|
|
14
15
|
_ts_decorate([
|
|
@@ -20,6 +21,13 @@ _ts_decorate([
|
|
|
20
21
|
primaryKey: true
|
|
21
22
|
})
|
|
22
23
|
], Recipe.prototype, "uuid", void 0);
|
|
24
|
+
_ts_decorate([
|
|
25
|
+
ForeignKey(()=>PersistedUser),
|
|
26
|
+
Column({
|
|
27
|
+
type: DataType.UUID,
|
|
28
|
+
allowNull: true
|
|
29
|
+
})
|
|
30
|
+
], Recipe.prototype, "createdBy", void 0);
|
|
23
31
|
_ts_decorate([
|
|
24
32
|
Column({
|
|
25
33
|
type: DataType.TEXT,
|
|
@@ -148,6 +156,9 @@ _ts_decorate([
|
|
|
148
156
|
onDelete: "CASCADE"
|
|
149
157
|
})
|
|
150
158
|
], Recipe.prototype, "recipeIngredients", void 0);
|
|
159
|
+
_ts_decorate([
|
|
160
|
+
BelongsTo(()=>PersistedUser)
|
|
161
|
+
], Recipe.prototype, "creator", void 0);
|
|
151
162
|
Recipe = _ts_decorate([
|
|
152
163
|
Table
|
|
153
164
|
], Recipe);
|
|
@@ -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 type { Optional } from \"sequelize\";\nimport { TranslatedRecipe } from \"./TranslatedRecipe.js\";\nimport { RecipeTag } from \"./RecipeTag.js\";\nimport { RecipeTags } from \"./RecipeTags.js\";\nimport { RecipeIngredient } from \"./RecipeIngredient.js\";\n\nexport interface RecipeAttributes {\n uuid: string;\n title: string;\n duration: string;\n content: string;\n kcal: string;\n fat: string;\n carbs: string;\n protein: string;\n ingredients: string;\n method: string;\n tipsAndTricks: string;\n ShowForFreeVersion: boolean;\n LockForFreeVersion: boolean;\n isCoachingRecipe: boolean;\n order: number;\n coverImageUrl?: string | null;\n ingredientsImageUrl?: string | null;\n methodImageUrl?: string | null;\n imageUploadedAt?: Date | null;\n createdAt?: Date;\n updatedAt?: Date;\n}\n\nexport interface RecipeCreationAttributes extends Optional<RecipeAttributes, \"uuid\" | \"createdAt\" | \"updatedAt\" | \"coverImageUrl\" | \"ingredientsImageUrl\" | \"methodImageUrl\" | \"imageUploadedAt\"> {\n}\n\n@Table\nexport class Recipe extends Model<RecipeAttributes, RecipeCreationAttributes> {\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 | null;\n\n @Column({ type: DataType.STRING(500), allowNull: true })\n declare ingredientsImageUrl?: string | null;\n\n @Column({ type: DataType.STRING(500), allowNull: true })\n declare methodImageUrl?: string | null;\n\n @Column({ type: DataType.DATE, allowNull: true })\n declare imageUploadedAt?: Date | null;\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,OAAO,EACPC,KAAK,EACLC,KAAK,QACA,uBAAuB;AAE9B,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,gBAAgB,QAAQ,wBAAwB;
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/dbmodels/diet/Recipe.ts"],"sourcesContent":["import {\n BelongsTo,\n BelongsToMany,\n Column,\n DataType,\n Default,\n ForeignKey,\n HasMany,\n Model,\n Table,\n} from \"sequelize-typescript\";\nimport type { Optional } from \"sequelize\";\nimport { TranslatedRecipe } from \"./TranslatedRecipe.js\";\nimport { RecipeTag } from \"./RecipeTag.js\";\nimport { RecipeTags } from \"./RecipeTags.js\";\nimport { RecipeIngredient } from \"./RecipeIngredient.js\";\nimport { PersistedUser } from \"../user/PersistedUser.js\";\n\nexport interface RecipeAttributes {\n uuid: string;\n createdBy?: string | null;\n title: string;\n duration: string;\n content: string;\n kcal: string;\n fat: string;\n carbs: string;\n protein: string;\n ingredients: string;\n method: string;\n tipsAndTricks: string;\n ShowForFreeVersion: boolean;\n LockForFreeVersion: boolean;\n isCoachingRecipe: boolean;\n order: number;\n coverImageUrl?: string | null;\n ingredientsImageUrl?: string | null;\n methodImageUrl?: string | null;\n imageUploadedAt?: Date | null;\n createdAt?: Date;\n updatedAt?: Date;\n}\n\nexport interface RecipeCreationAttributes extends Optional<RecipeAttributes, \"uuid\" | \"createdBy\" | \"createdAt\" | \"updatedAt\" | \"coverImageUrl\" | \"ingredientsImageUrl\" | \"methodImageUrl\" | \"imageUploadedAt\"> {\n}\n\n@Table\nexport class Recipe extends Model<RecipeAttributes, RecipeCreationAttributes> {\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 @ForeignKey(() => PersistedUser)\n @Column({\n type: DataType.UUID,\n allowNull: true,\n })\n declare createdBy: string | null;\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 | null;\n\n @Column({ type: DataType.STRING(500), allowNull: true })\n declare ingredientsImageUrl?: string | null;\n\n @Column({ type: DataType.STRING(500), allowNull: true })\n declare methodImageUrl?: string | null;\n\n @Column({ type: DataType.DATE, allowNull: true })\n declare imageUploadedAt?: Date | null;\n\n @HasMany(() => TranslatedRecipe)\n declare translatedRecipes: TranslatedRecipe[];\n\n @HasMany(() => RecipeIngredient, { foreignKey: \"recipeUuid\", onDelete: \"CASCADE\" })\n declare recipeIngredients: RecipeIngredient[];\n\n @BelongsTo(() => PersistedUser)\n declare creator: PersistedUser;\n}\n"],"names":["BelongsTo","BelongsToMany","Column","DataType","Default","ForeignKey","HasMany","Model","Table","TranslatedRecipe","RecipeTag","RecipeTags","RecipeIngredient","PersistedUser","Recipe","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","TEXT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