90dc-core 1.14.1 → 1.14.2
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/DietDayBlueprint.d.ts +30 -0
- package/dist/lib/dbmodels/diet/DietDayBlueprint.d.ts.map +1 -0
- package/dist/lib/dbmodels/diet/DietDayBlueprint.js +64 -0
- package/dist/lib/dbmodels/diet/DietDayBlueprint.js.map +1 -0
- package/dist/lib/dbmodels/diet/DietProgramBlueprint.d.ts +17 -0
- package/dist/lib/dbmodels/diet/DietProgramBlueprint.d.ts.map +1 -0
- package/dist/lib/dbmodels/diet/DietProgramBlueprint.js +82 -0
- package/dist/lib/dbmodels/diet/DietProgramBlueprint.js.map +1 -0
- package/dist/lib/dbmodels/program/CustomProgramBlueprint.d.ts +1 -0
- package/dist/lib/dbmodels/program/CustomProgramBlueprint.d.ts.map +1 -1
- package/dist/lib/dbmodels/program/CustomProgramBlueprint.js +7 -0
- package/dist/lib/dbmodels/program/CustomProgramBlueprint.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Model } from "sequelize-typescript";
|
|
2
|
+
export interface MealRecipeBlueprint {
|
|
3
|
+
recipeUuid: string;
|
|
4
|
+
scalingFactor: number;
|
|
5
|
+
scaledCalories: number;
|
|
6
|
+
scaledProtein: number;
|
|
7
|
+
scaledCarbs: number;
|
|
8
|
+
scaledFats: number;
|
|
9
|
+
locked: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface MealBlueprint {
|
|
12
|
+
type: "breakfast" | "lunch" | "dinner" | "snack";
|
|
13
|
+
order: number;
|
|
14
|
+
calories: number | null;
|
|
15
|
+
protein: number | null;
|
|
16
|
+
fat: number | null;
|
|
17
|
+
carbs: number | null;
|
|
18
|
+
recipes: MealRecipeBlueprint[];
|
|
19
|
+
}
|
|
20
|
+
export declare class DietDayBlueprint extends Model {
|
|
21
|
+
uuid: string;
|
|
22
|
+
blueprintUuid: string;
|
|
23
|
+
order: number;
|
|
24
|
+
calories: number | null;
|
|
25
|
+
protein: number | null;
|
|
26
|
+
fat: number | null;
|
|
27
|
+
carbs: number | null;
|
|
28
|
+
meals: MealBlueprint[];
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=DietDayBlueprint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DietDayBlueprint.d.ts","sourceRoot":"","sources":["../../../../src/lib/dbmodels/diet/DietDayBlueprint.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,EAEN,MAAM,sBAAsB,CAAC;AAG9B,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAChC;AAED,qBACa,gBAAiB,SAAQ,KAAK;IAQjC,IAAI,EAAE,MAAM,CAAC;IAIb,aAAa,EAAE,MAAM,CAAC;IAGtB,KAAK,EAAE,MAAM,CAAC;IAGd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAGvB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAGnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAGrB,KAAK,EAAE,aAAa,EAAE,CAAC;CAChC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
}
|
|
7
|
+
import { Column, DataType, Default, ForeignKey, Index, Model, Table } from "sequelize-typescript";
|
|
8
|
+
import { DietProgramBlueprint } from "./DietProgramBlueprint.js";
|
|
9
|
+
export class DietDayBlueprint extends Model {
|
|
10
|
+
}
|
|
11
|
+
_ts_decorate([
|
|
12
|
+
Default(DataType.UUIDV4),
|
|
13
|
+
Column({
|
|
14
|
+
type: DataType.UUID,
|
|
15
|
+
defaultValue: DataType.UUID,
|
|
16
|
+
allowNull: false,
|
|
17
|
+
primaryKey: true
|
|
18
|
+
})
|
|
19
|
+
], DietDayBlueprint.prototype, "uuid", void 0);
|
|
20
|
+
_ts_decorate([
|
|
21
|
+
Index,
|
|
22
|
+
ForeignKey(()=>DietProgramBlueprint)
|
|
23
|
+
], DietDayBlueprint.prototype, "blueprintUuid", void 0);
|
|
24
|
+
_ts_decorate([
|
|
25
|
+
Column({
|
|
26
|
+
type: DataType.INTEGER,
|
|
27
|
+
allowNull: false
|
|
28
|
+
})
|
|
29
|
+
], DietDayBlueprint.prototype, "order", void 0);
|
|
30
|
+
_ts_decorate([
|
|
31
|
+
Column({
|
|
32
|
+
type: DataType.INTEGER,
|
|
33
|
+
allowNull: true
|
|
34
|
+
})
|
|
35
|
+
], DietDayBlueprint.prototype, "calories", void 0);
|
|
36
|
+
_ts_decorate([
|
|
37
|
+
Column({
|
|
38
|
+
type: DataType.FLOAT,
|
|
39
|
+
allowNull: true
|
|
40
|
+
})
|
|
41
|
+
], DietDayBlueprint.prototype, "protein", void 0);
|
|
42
|
+
_ts_decorate([
|
|
43
|
+
Column({
|
|
44
|
+
type: DataType.FLOAT,
|
|
45
|
+
allowNull: true
|
|
46
|
+
})
|
|
47
|
+
], DietDayBlueprint.prototype, "fat", void 0);
|
|
48
|
+
_ts_decorate([
|
|
49
|
+
Column({
|
|
50
|
+
type: DataType.FLOAT,
|
|
51
|
+
allowNull: true
|
|
52
|
+
})
|
|
53
|
+
], DietDayBlueprint.prototype, "carbs", void 0);
|
|
54
|
+
_ts_decorate([
|
|
55
|
+
Column({
|
|
56
|
+
type: DataType.ARRAY(DataType.JSONB),
|
|
57
|
+
allowNull: false
|
|
58
|
+
})
|
|
59
|
+
], DietDayBlueprint.prototype, "meals", void 0);
|
|
60
|
+
DietDayBlueprint = _ts_decorate([
|
|
61
|
+
Table
|
|
62
|
+
], DietDayBlueprint);
|
|
63
|
+
|
|
64
|
+
//# sourceMappingURL=DietDayBlueprint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/dbmodels/diet/DietDayBlueprint.ts"],"sourcesContent":["import {\n Column,\n DataType,\n Default,\n ForeignKey,\n Index,\n Model,\n Table,\n} from \"sequelize-typescript\";\nimport { DietProgramBlueprint } from \"./DietProgramBlueprint.js\";\n\nexport interface MealRecipeBlueprint {\n recipeUuid: string;\n scalingFactor: number;\n scaledCalories: number;\n scaledProtein: number;\n scaledCarbs: number;\n scaledFats: number;\n locked: boolean;\n}\n\nexport interface MealBlueprint {\n type: \"breakfast\" | \"lunch\" | \"dinner\" | \"snack\";\n order: number;\n calories: number | null;\n protein: number | null;\n fat: number | null;\n carbs: number | null;\n recipes: MealRecipeBlueprint[];\n}\n\n@Table\nexport class DietDayBlueprint extends Model {\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 @Index\n @ForeignKey(() => DietProgramBlueprint)\n declare blueprintUuid: string;\n\n @Column({ type: DataType.INTEGER, allowNull: false })\n declare order: number;\n\n @Column({ type: DataType.INTEGER, allowNull: true })\n declare calories: number | null;\n\n @Column({ type: DataType.FLOAT, allowNull: true })\n declare protein: number | null;\n\n @Column({ type: DataType.FLOAT, allowNull: true })\n declare fat: number | null;\n\n @Column({ type: DataType.FLOAT, allowNull: true })\n declare carbs: number | null;\n\n @Column({ type: DataType.ARRAY(DataType.JSONB), allowNull: false })\n declare meals: MealBlueprint[];\n}\n"],"names":["Column","DataType","Default","ForeignKey","Index","Model","Table","DietProgramBlueprint","DietDayBlueprint","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","INTEGER","FLOAT","ARRAY","JSONB"],"mappings":";;;;;;AAAA,SACEA,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,UAAU,EACVC,KAAK,EACLC,KAAK,EACLC,KAAK,QACA,uBAAuB;AAC9B,SAASC,oBAAoB,QAAQ,4BAA4B;AAuBjE,OAAO,MAAMC,yBAAyBH;AA+BtC;;qBA9BoBI;;QAEhBC,MAAMT,SAASU,IAAI;QACnBC,cAAcX,SAASU,IAAI;QAC3BE,WAAW;QACXC,YAAY;;;;;mBAKIP;;;;QAGRG,MAAMT,SAASc,OAAO;QAAEF,WAAW;;;;;QAGnCH,MAAMT,SAASc,OAAO;QAAEF,WAAW;;;;;QAGnCH,MAAMT,SAASe,KAAK;QAAEH,WAAW;;;;;QAGjCH,MAAMT,SAASe,KAAK;QAAEH,WAAW;;;;;QAGjCH,MAAMT,SAASe,KAAK;QAAEH,WAAW;;;;;QAGjCH,MAAMT,SAASgB,KAAK,CAAChB,SAASiB,KAAK;QAAGL,WAAW"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Model } from "sequelize-typescript";
|
|
2
|
+
import { PersistedUser } from "../user/PersistedUser.js";
|
|
3
|
+
import { DietDayBlueprint } from "./DietDayBlueprint.js";
|
|
4
|
+
export declare class DietProgramBlueprint extends Model {
|
|
5
|
+
uuid: string;
|
|
6
|
+
createdBy: string;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string | null;
|
|
9
|
+
dailyCalories: number | null;
|
|
10
|
+
dailyProtein: number | null;
|
|
11
|
+
dailyCarbs: number | null;
|
|
12
|
+
dailyFats: number | null;
|
|
13
|
+
numberOfDays: number | null;
|
|
14
|
+
days: DietDayBlueprint[];
|
|
15
|
+
user: PersistedUser;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=DietProgramBlueprint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DietProgramBlueprint.d.ts","sourceRoot":"","sources":["../../../../src/lib/dbmodels/diet/DietProgramBlueprint.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,EAEN,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,qBACa,oBAAqB,SAAQ,KAAK;IAQrC,IAAI,EAAE,MAAM,CAAC;IAOb,SAAS,EAAE,MAAM,CAAC;IAGlB,KAAK,EAAE,MAAM,CAAC;IAGd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAG3B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAG7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAG5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAG1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAGzB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAG5B,IAAI,EAAE,gBAAgB,EAAE,CAAC;IAGzB,IAAI,EAAE,aAAa,CAAC;CAC7B"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
}
|
|
7
|
+
import { BelongsTo, Column, DataType, Default, ForeignKey, HasMany, Model, Table } from "sequelize-typescript";
|
|
8
|
+
import { PersistedUser } from "../user/PersistedUser.js";
|
|
9
|
+
import { DietDayBlueprint } from "./DietDayBlueprint.js";
|
|
10
|
+
export class DietProgramBlueprint extends Model {
|
|
11
|
+
}
|
|
12
|
+
_ts_decorate([
|
|
13
|
+
Default(DataType.UUIDV4),
|
|
14
|
+
Column({
|
|
15
|
+
type: DataType.UUID,
|
|
16
|
+
defaultValue: DataType.UUID,
|
|
17
|
+
allowNull: false,
|
|
18
|
+
primaryKey: true
|
|
19
|
+
})
|
|
20
|
+
], DietProgramBlueprint.prototype, "uuid", void 0);
|
|
21
|
+
_ts_decorate([
|
|
22
|
+
ForeignKey(()=>PersistedUser),
|
|
23
|
+
Column({
|
|
24
|
+
type: DataType.UUID,
|
|
25
|
+
allowNull: true
|
|
26
|
+
})
|
|
27
|
+
], DietProgramBlueprint.prototype, "createdBy", void 0);
|
|
28
|
+
_ts_decorate([
|
|
29
|
+
Column({
|
|
30
|
+
type: DataType.STRING,
|
|
31
|
+
allowNull: false
|
|
32
|
+
})
|
|
33
|
+
], DietProgramBlueprint.prototype, "title", void 0);
|
|
34
|
+
_ts_decorate([
|
|
35
|
+
Column({
|
|
36
|
+
type: DataType.TEXT,
|
|
37
|
+
allowNull: true
|
|
38
|
+
})
|
|
39
|
+
], DietProgramBlueprint.prototype, "description", void 0);
|
|
40
|
+
_ts_decorate([
|
|
41
|
+
Column({
|
|
42
|
+
type: DataType.INTEGER,
|
|
43
|
+
allowNull: true
|
|
44
|
+
})
|
|
45
|
+
], DietProgramBlueprint.prototype, "dailyCalories", void 0);
|
|
46
|
+
_ts_decorate([
|
|
47
|
+
Column({
|
|
48
|
+
type: DataType.FLOAT,
|
|
49
|
+
allowNull: true
|
|
50
|
+
})
|
|
51
|
+
], DietProgramBlueprint.prototype, "dailyProtein", void 0);
|
|
52
|
+
_ts_decorate([
|
|
53
|
+
Column({
|
|
54
|
+
type: DataType.FLOAT,
|
|
55
|
+
allowNull: true
|
|
56
|
+
})
|
|
57
|
+
], DietProgramBlueprint.prototype, "dailyCarbs", void 0);
|
|
58
|
+
_ts_decorate([
|
|
59
|
+
Column({
|
|
60
|
+
type: DataType.FLOAT,
|
|
61
|
+
allowNull: true
|
|
62
|
+
})
|
|
63
|
+
], DietProgramBlueprint.prototype, "dailyFats", void 0);
|
|
64
|
+
_ts_decorate([
|
|
65
|
+
Column({
|
|
66
|
+
type: DataType.INTEGER,
|
|
67
|
+
allowNull: true
|
|
68
|
+
})
|
|
69
|
+
], DietProgramBlueprint.prototype, "numberOfDays", void 0);
|
|
70
|
+
_ts_decorate([
|
|
71
|
+
HasMany(()=>DietDayBlueprint, {
|
|
72
|
+
foreignKey: "blueprintUuid"
|
|
73
|
+
})
|
|
74
|
+
], DietProgramBlueprint.prototype, "days", void 0);
|
|
75
|
+
_ts_decorate([
|
|
76
|
+
BelongsTo(()=>PersistedUser)
|
|
77
|
+
], DietProgramBlueprint.prototype, "user", void 0);
|
|
78
|
+
DietProgramBlueprint = _ts_decorate([
|
|
79
|
+
Table
|
|
80
|
+
], DietProgramBlueprint);
|
|
81
|
+
|
|
82
|
+
//# sourceMappingURL=DietProgramBlueprint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/dbmodels/diet/DietProgramBlueprint.ts"],"sourcesContent":["import {\n BelongsTo,\n Column,\n DataType,\n Default,\n ForeignKey,\n HasMany,\n Model,\n Table,\n} from \"sequelize-typescript\";\nimport { PersistedUser } from \"../user/PersistedUser.js\";\nimport { DietDayBlueprint } from \"./DietDayBlueprint.js\";\n\n@Table\nexport class DietProgramBlueprint extends Model {\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;\n\n @Column({ type: DataType.STRING, allowNull: false })\n declare title: string;\n\n @Column({ type: DataType.TEXT, allowNull: true })\n declare description: string | null;\n\n @Column({ type: DataType.INTEGER, allowNull: true })\n declare dailyCalories: number | null;\n\n @Column({ type: DataType.FLOAT, allowNull: true })\n declare dailyProtein: number | null;\n\n @Column({ type: DataType.FLOAT, allowNull: true })\n declare dailyCarbs: number | null;\n\n @Column({ type: DataType.FLOAT, allowNull: true })\n declare dailyFats: number | null;\n\n @Column({ type: DataType.INTEGER, allowNull: true })\n declare numberOfDays: number | null;\n\n @HasMany(() => DietDayBlueprint, { foreignKey: \"blueprintUuid\" })\n declare days: DietDayBlueprint[];\n\n @BelongsTo(() => PersistedUser)\n declare user: PersistedUser;\n}\n"],"names":["BelongsTo","Column","DataType","Default","ForeignKey","HasMany","Model","Table","PersistedUser","DietDayBlueprint","DietProgramBlueprint","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","STRING","TEXT","INTEGER","FLOAT","foreignKey"],"mappings":";;;;;;AAAA,SACEA,SAAS,EACTC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,UAAU,EACVC,OAAO,EACPC,KAAK,EACLC,KAAK,QACA,uBAAuB;AAC9B,SAASC,aAAa,QAAQ,2BAA2B;AACzD,SAASC,gBAAgB,QAAQ,wBAAwB;AAGzD,OAAO,MAAMC,6BAA6BJ;AA2C1C;;qBA1CoBK;;QAEhBC,MAAMV,SAASW,IAAI;QACnBC,cAAcZ,SAASW,IAAI;QAC3BE,WAAW;QACXC,YAAY;;;;mBAIIR;;QAEhBI,MAAMV,SAASW,IAAI;QACnBE,WAAW;;;;;QAIHH,MAAMV,SAASe,MAAM;QAAEF,WAAW;;;;;QAGlCH,MAAMV,SAASgB,IAAI;QAAEH,WAAW;;;;;QAGhCH,MAAMV,SAASiB,OAAO;QAAEJ,WAAW;;;;;QAGnCH,MAAMV,SAASkB,KAAK;QAAEL,WAAW;;;;;QAGjCH,MAAMV,SAASkB,KAAK;QAAEL,WAAW;;;;;QAGjCH,MAAMV,SAASkB,KAAK;QAAEL,WAAW;;;;;QAGjCH,MAAMV,SAASiB,OAAO;QAAEJ,WAAW;;;;gBAG9BN;QAAoBY,YAAY;;;;kBAG9Bb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomProgramBlueprint.d.ts","sourceRoot":"","sources":["../../../../src/lib/dbmodels/program/CustomProgramBlueprint.ts"],"names":[],"mappings":"AAAA,OAAO,EAMH,KAAK,EAER,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAC,sBAAsB,EAAC,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAEvD,qBACa,sBAAuB,SAAQ,KAAK;IAQrC,IAAI,EAAE,MAAM,CAAC;IAOb,SAAS,EAAE,MAAM,CAAC;IAGlB,KAAK,EAAE,MAAM,CAAC;IAGd,KAAK,EAAE,MAAM,CAAC;IAGd,YAAY,EAAE,MAAM,CAAC;IAGrB,QAAQ,EAAE,sBAAsB,EAAE,CAAC;IAGnC,QAAQ,EAAE,OAAO,EAAE,CAAC;IAGpB,UAAU,EAAE,kBAAkB,EAAE,CAAC;IAGjC,aAAa,EAAE,kBAAkB,EAAE,CAAC;IAGpC,IAAI,EAAE,aAAa,CAAC;CAC/B"}
|
|
1
|
+
{"version":3,"file":"CustomProgramBlueprint.d.ts","sourceRoot":"","sources":["../../../../src/lib/dbmodels/program/CustomProgramBlueprint.ts"],"names":[],"mappings":"AAAA,OAAO,EAMH,KAAK,EAER,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAC,sBAAsB,EAAC,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAEvD,qBACa,sBAAuB,SAAQ,KAAK;IAQrC,IAAI,EAAE,MAAM,CAAC;IAOb,SAAS,EAAE,MAAM,CAAC;IAGlB,KAAK,EAAE,MAAM,CAAC;IAGd,KAAK,EAAE,MAAM,CAAC;IAGd,YAAY,EAAE,MAAM,CAAC;IAGrB,QAAQ,EAAE,OAAO,CAAC;IAGlB,QAAQ,EAAE,sBAAsB,EAAE,CAAC;IAGnC,QAAQ,EAAE,OAAO,EAAE,CAAC;IAGpB,UAAU,EAAE,kBAAkB,EAAE,CAAC;IAGjC,aAAa,EAAE,kBAAkB,EAAE,CAAC;IAGpC,IAAI,EAAE,aAAa,CAAC;CAC/B"}
|
|
@@ -47,6 +47,13 @@ _ts_decorate([
|
|
|
47
47
|
allowNull: false
|
|
48
48
|
})
|
|
49
49
|
], CustomProgramBlueprint.prototype, "numberOfDays", void 0);
|
|
50
|
+
_ts_decorate([
|
|
51
|
+
Column({
|
|
52
|
+
type: DataType.BOOLEAN,
|
|
53
|
+
allowNull: false,
|
|
54
|
+
defaultValue: false
|
|
55
|
+
})
|
|
56
|
+
], CustomProgramBlueprint.prototype, "isPublic", void 0);
|
|
50
57
|
_ts_decorate([
|
|
51
58
|
HasMany(()=>CustomWorkoutBlueprint, {
|
|
52
59
|
foreignKey: "blueprintUuid"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/dbmodels/program/CustomProgramBlueprint.ts"],"sourcesContent":["import {\n BelongsTo,\n Column,\n DataType,\n Default, ForeignKey,\n HasMany,\n Model,\n Table,\n} from \"sequelize-typescript\";\nimport {RestDay} from \"./RestDay.js\";\nimport {ChallengeBlueprint} from \"./ChallengeBlueprint.js\";\nimport {CustomStrengthTest} from \"./CustomStrengthTest.js\";\nimport {CustomWorkoutBlueprint} from \"./CustomWorkoutBlueprint.js\";\nimport {PersistedUser} from \"../user/PersistedUser.js\";\n\n@Table\nexport class CustomProgramBlueprint extends Model {\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;\n\n @Column({ type: DataType.STRING, allowNull: false, unique: true })\n declare title: string;\n\n @Column({ type: DataType.STRING, allowNull: false })\n declare level: string;\n\n @Column({ type: DataType.INTEGER, allowNull: false })\n declare numberOfDays: number;\n\n @HasMany(() => CustomWorkoutBlueprint, { foreignKey: \"blueprintUuid\" })\n declare workouts: CustomWorkoutBlueprint[];\n\n @HasMany(() => RestDay, { foreignKey: \"blueprintUuid\" })\n declare restDays: RestDay[];\n\n @HasMany(() => ChallengeBlueprint, { foreignKey: \"blueprintUuid\" })\n declare challenges: ChallengeBlueprint[];\n\n @HasMany(() => CustomStrengthTest, { foreignKey: \"blueprintUuid\" })\n declare strengthTests: CustomStrengthTest[];\n\n @BelongsTo(() => PersistedUser)\n declare user: PersistedUser;\n}\n"],"names":["BelongsTo","Column","DataType","Default","ForeignKey","HasMany","Model","Table","RestDay","ChallengeBlueprint","CustomStrengthTest","CustomWorkoutBlueprint","PersistedUser","CustomProgramBlueprint","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","STRING","unique","INTEGER","foreignKey"],"mappings":";;;;;;AAAA,SACIA,SAAS,EACTC,MAAM,EACNC,QAAQ,EACRC,OAAO,EAAEC,UAAU,EACnBC,OAAO,EACPC,KAAK,EACLC,KAAK,QACF,uBAAuB;AAC9B,SAAQC,OAAO,QAAO,eAAe;AACrC,SAAQC,kBAAkB,QAAO,0BAA0B;AAC3D,SAAQC,kBAAkB,QAAO,0BAA0B;AAC3D,SAAQC,sBAAsB,QAAO,8BAA8B;AACnE,SAAQC,aAAa,QAAO,2BAA2B;AAGvD,OAAO,MAAMC,+BAA+BP;
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/dbmodels/program/CustomProgramBlueprint.ts"],"sourcesContent":["import {\n BelongsTo,\n Column,\n DataType,\n Default, ForeignKey,\n HasMany,\n Model,\n Table,\n} from \"sequelize-typescript\";\nimport {RestDay} from \"./RestDay.js\";\nimport {ChallengeBlueprint} from \"./ChallengeBlueprint.js\";\nimport {CustomStrengthTest} from \"./CustomStrengthTest.js\";\nimport {CustomWorkoutBlueprint} from \"./CustomWorkoutBlueprint.js\";\nimport {PersistedUser} from \"../user/PersistedUser.js\";\n\n@Table\nexport class CustomProgramBlueprint extends Model {\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;\n\n @Column({ type: DataType.STRING, allowNull: false, unique: true })\n declare title: string;\n\n @Column({ type: DataType.STRING, allowNull: false })\n declare level: string;\n\n @Column({ type: DataType.INTEGER, allowNull: false })\n declare numberOfDays: number;\n\n @Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false })\n declare isPublic: boolean;\n\n @HasMany(() => CustomWorkoutBlueprint, { foreignKey: \"blueprintUuid\" })\n declare workouts: CustomWorkoutBlueprint[];\n\n @HasMany(() => RestDay, { foreignKey: \"blueprintUuid\" })\n declare restDays: RestDay[];\n\n @HasMany(() => ChallengeBlueprint, { foreignKey: \"blueprintUuid\" })\n declare challenges: ChallengeBlueprint[];\n\n @HasMany(() => CustomStrengthTest, { foreignKey: \"blueprintUuid\" })\n declare strengthTests: CustomStrengthTest[];\n\n @BelongsTo(() => PersistedUser)\n declare user: PersistedUser;\n}\n"],"names":["BelongsTo","Column","DataType","Default","ForeignKey","HasMany","Model","Table","RestDay","ChallengeBlueprint","CustomStrengthTest","CustomWorkoutBlueprint","PersistedUser","CustomProgramBlueprint","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","STRING","unique","INTEGER","BOOLEAN","foreignKey"],"mappings":";;;;;;AAAA,SACIA,SAAS,EACTC,MAAM,EACNC,QAAQ,EACRC,OAAO,EAAEC,UAAU,EACnBC,OAAO,EACPC,KAAK,EACLC,KAAK,QACF,uBAAuB;AAC9B,SAAQC,OAAO,QAAO,eAAe;AACrC,SAAQC,kBAAkB,QAAO,0BAA0B;AAC3D,SAAQC,kBAAkB,QAAO,0BAA0B;AAC3D,SAAQC,sBAAsB,QAAO,8BAA8B;AACnE,SAAQC,aAAa,QAAO,2BAA2B;AAGvD,OAAO,MAAMC,+BAA+BP;AA2C5C;;qBA1CsBQ;;QAEdC,MAAMb,SAASc,IAAI;QACnBC,cAAcf,SAASc,IAAI;QAC3BE,WAAW;QACXC,YAAY;;;;mBAIEP;;QAEdG,MAAMb,SAASc,IAAI;QACnBE,WAAW;;;;;QAILH,MAAMb,SAASkB,MAAM;QAAEF,WAAW;QAAOG,QAAQ;;;;;QAGjDN,MAAMb,SAASkB,MAAM;QAAEF,WAAW;;;;;QAGlCH,MAAMb,SAASoB,OAAO;QAAEJ,WAAW;;;;;QAGnCH,MAAMb,SAASqB,OAAO;QAAEL,WAAW;QAAOD,cAAc;;;;gBAGnDN;QAA0Ba,YAAY;;;;gBAGtChB;QAAWgB,YAAY;;;;gBAGvBf;QAAsBe,YAAY;;;;gBAGlCd;QAAsBc,YAAY;;;;kBAGhCZ"}
|