90dc-core 1.5.21 → 1.6.0
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/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/lib/dbmodels/TranslatedBadge.d.ts +0 -1
- package/dist/lib/dbmodels/TranslatedBadge.js +0 -6
- package/dist/lib/dbmodels/TranslatedBadge.js.map +1 -1
- package/dist/lib/dbmodels/UserBadges.d.ts +1 -1
- package/dist/lib/dbmodels/UserBadges.js +1 -1
- package/dist/lib/dbmodels/UserBadges.js.map +1 -1
- package/dist/lib/dbmodels/program/Challenge.d.ts +12 -0
- package/dist/lib/dbmodels/program/Challenge.js +63 -0
- package/dist/lib/dbmodels/program/Challenge.js.map +1 -0
- package/dist/lib/dbmodels/program/Exercise.d.ts +14 -0
- package/dist/lib/dbmodels/program/Exercise.js +71 -0
- package/dist/lib/dbmodels/program/Exercise.js.map +1 -0
- package/dist/lib/dbmodels/program/Program.d.ts +11 -0
- package/dist/lib/dbmodels/program/Program.js +65 -0
- package/dist/lib/dbmodels/program/Program.js.map +1 -0
- package/dist/lib/dbmodels/program/StrengthTest.d.ts +9 -0
- package/dist/lib/dbmodels/program/StrengthTest.js +39 -0
- package/dist/lib/dbmodels/program/StrengthTest.js.map +1 -0
- package/dist/lib/dbmodels/program/StrengthTestExercise.d.ts +14 -0
- package/dist/lib/dbmodels/program/StrengthTestExercise.js +72 -0
- package/dist/lib/dbmodels/program/StrengthTestExercise.js.map +1 -0
- package/dist/lib/dbmodels/program/Superset.d.ts +8 -0
- package/dist/lib/dbmodels/program/Superset.js +40 -0
- package/dist/lib/dbmodels/program/Superset.js.map +1 -0
- package/dist/lib/dbmodels/program/TranslatedChallenge.d.ts +14 -0
- package/dist/lib/dbmodels/program/TranslatedChallenge.js +69 -0
- package/dist/lib/dbmodels/program/TranslatedChallenge.js.map +1 -0
- package/dist/lib/dbmodels/program/TranslatedStrengthTest.d.ts +11 -0
- package/dist/lib/dbmodels/program/TranslatedStrengthTest.js +45 -0
- package/dist/lib/dbmodels/program/TranslatedStrengthTest.js.map +1 -0
- package/dist/lib/dbmodels/program/TranslatedStrengthTestExercise.d.ts +15 -0
- package/dist/lib/dbmodels/program/TranslatedStrengthTestExercise.js +78 -0
- package/dist/lib/dbmodels/program/TranslatedStrengthTestExercise.js.map +1 -0
- package/dist/lib/dbmodels/program/UserChallenge.d.ts +9 -0
- package/dist/lib/dbmodels/program/UserChallenge.js +47 -0
- package/dist/lib/dbmodels/program/UserChallenge.js.map +1 -0
- package/dist/lib/dbmodels/program/UserStrengthTests.d.ts +10 -0
- package/dist/lib/dbmodels/program/UserStrengthTests.js +54 -0
- package/dist/lib/dbmodels/program/UserStrengthTests.js.map +1 -0
- package/dist/lib/dbmodels/program/Workout.d.ts +13 -0
- package/dist/lib/dbmodels/program/Workout.js +66 -0
- package/dist/lib/dbmodels/program/Workout.js.map +1 -0
- package/dist/lib/models/WorkoutInterfaces.d.ts +22 -0
- package/dist/lib/models/WorkoutInterfaces.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +4 -4
- package/src/lib/dbmodels/TranslatedBadge.ts +0 -3
- package/src/lib/dbmodels/UserBadges.ts +1 -1
- package/src/lib/dbmodels/program/Challenge.ts +35 -0
- package/src/lib/dbmodels/{Exercise.ts → program/Exercise.ts} +1 -1
- package/src/lib/dbmodels/program/StrengthTest.ts +30 -0
- package/src/lib/dbmodels/program/StrengthTestExercise.ts +45 -0
- package/src/lib/dbmodels/{Superset.ts → program/Superset.ts} +1 -1
- package/src/lib/dbmodels/program/TranslatedChallenge.ts +38 -0
- package/src/lib/dbmodels/program/TranslatedStrengthTest.ts +42 -0
- package/src/lib/dbmodels/program/TranslatedStrengthTestExercise.ts +47 -0
- package/src/lib/dbmodels/program/UserChallenge.ts +29 -0
- package/src/lib/dbmodels/program/UserStrengthTests.ts +44 -0
- package/src/lib/models/WorkoutInterfaces.ts +29 -1
- /package/src/lib/dbmodels/{Program.ts → program/Program.ts} +0 -0
- /package/src/lib/dbmodels/{Workout.ts → program/Workout.ts} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ export * from "./lib/dbmodels/PersistedUser";
|
|
|
7
7
|
export * from "./lib/dbmodels/UserBadges";
|
|
8
8
|
export * from "./lib/dbmodels/UserStreaks";
|
|
9
9
|
export * from "./lib/dbmodels/Badge";
|
|
10
|
-
export * from "./lib/dbmodels/Program";
|
|
11
|
-
export * from "./lib/dbmodels/Workout";
|
|
12
|
-
export * from "./lib/dbmodels/Exercise";
|
|
13
|
-
export * from "./lib/dbmodels/Superset";
|
|
10
|
+
export * from "./lib/dbmodels/program/Program";
|
|
11
|
+
export * from "./lib/dbmodels/program/Workout";
|
|
12
|
+
export * from "./lib/dbmodels/program/Exercise";
|
|
13
|
+
export * from "./lib/dbmodels/program/Superset";
|
|
14
14
|
export * from "./lib/utils/Logger";
|
package/dist/index.js
CHANGED
|
@@ -9,10 +9,10 @@ export * from "./lib/dbmodels/PersistedUser";
|
|
|
9
9
|
export * from "./lib/dbmodels/UserBadges";
|
|
10
10
|
export * from "./lib/dbmodels/UserStreaks";
|
|
11
11
|
export * from "./lib/dbmodels/Badge";
|
|
12
|
-
export * from "./lib/dbmodels/Program";
|
|
13
|
-
export * from "./lib/dbmodels/Workout";
|
|
14
|
-
export * from "./lib/dbmodels/Exercise";
|
|
15
|
-
export * from "./lib/dbmodels/Superset";
|
|
12
|
+
export * from "./lib/dbmodels/program/Program";
|
|
13
|
+
export * from "./lib/dbmodels/program/Workout";
|
|
14
|
+
export * from "./lib/dbmodels/program/Exercise";
|
|
15
|
+
export * from "./lib/dbmodels/program/Superset";
|
|
16
16
|
//Utils
|
|
17
17
|
export * from "./lib/utils/Logger";
|
|
18
18
|
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["//Interfaces\nexport * from \"./lib/models/ProgramInterfaces\";\nexport * from \"./lib/models/ExerciseInterfaces\";\nexport * from \"./lib/models/WorkoutInterfaces\";\nexport * from \"./lib/models/UserInterfaces\";\n\n//DB Models\nexport * from \"./lib/dbmodels/UsersFriends\"\nexport * from \"./lib/dbmodels/PersistedUser\"\nexport * from \"./lib/dbmodels/UserBadges\"\nexport * from \"./lib/dbmodels/UserStreaks\"\nexport * from \"./lib/dbmodels/Badge\"\nexport * from \"./lib/dbmodels/Program\"\nexport * from \"./lib/dbmodels/Workout\"\nexport * from \"./lib/dbmodels/Exercise\"\nexport * from \"./lib/dbmodels/Superset\"\n\n//Utils\nexport * from \"./lib/utils/Logger\"\n"],"names":[],"mappings":"AAAA,YAAY;AACZ,cAAc,iCAAiC;AAC/C,cAAc,kCAAkC;AAChD,cAAc,iCAAiC;AAC/C,cAAc,8BAA8B;AAE5C,WAAW;AACX,cAAc,8BAA6B;AAC3C,cAAc,+BAA8B;AAC5C,cAAc,4BAA2B;AACzC,cAAc,6BAA4B;AAC1C,cAAc,uBAAsB;AACpC,cAAc,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["//Interfaces\nexport * from \"./lib/models/ProgramInterfaces\";\nexport * from \"./lib/models/ExerciseInterfaces\";\nexport * from \"./lib/models/WorkoutInterfaces\";\nexport * from \"./lib/models/UserInterfaces\";\n\n//DB Models\nexport * from \"./lib/dbmodels/UsersFriends\"\nexport * from \"./lib/dbmodels/PersistedUser\"\nexport * from \"./lib/dbmodels/UserBadges\"\nexport * from \"./lib/dbmodels/UserStreaks\"\nexport * from \"./lib/dbmodels/Badge\"\nexport * from \"./lib/dbmodels/program/Program\"\nexport * from \"./lib/dbmodels/program/Workout\"\nexport * from \"./lib/dbmodels/program/Exercise\"\nexport * from \"./lib/dbmodels/program/Superset\"\n\n//Utils\nexport * from \"./lib/utils/Logger\"\n"],"names":[],"mappings":"AAAA,YAAY;AACZ,cAAc,iCAAiC;AAC/C,cAAc,kCAAkC;AAChD,cAAc,iCAAiC;AAC/C,cAAc,8BAA8B;AAE5C,WAAW;AACX,cAAc,8BAA6B;AAC3C,cAAc,+BAA8B;AAC5C,cAAc,4BAA2B;AACzC,cAAc,6BAA4B;AAC1C,cAAc,uBAAsB;AACpC,cAAc,iCAAgC;AAC9C,cAAc,iCAAgC;AAC9C,cAAc,kCAAiC;AAC/C,cAAc,kCAAiC;AAE/C,OAAO;AACP,cAAc,qBAAoB"}
|
|
@@ -29,12 +29,6 @@ __decorate([
|
|
|
29
29
|
allowNull: false
|
|
30
30
|
})
|
|
31
31
|
], TranslatedBadge.prototype, "language", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
Column({
|
|
34
|
-
type: DataType.ARRAY(DataType.TEXT),
|
|
35
|
-
allowNull: false
|
|
36
|
-
})
|
|
37
|
-
], TranslatedBadge.prototype, "tags", void 0);
|
|
38
32
|
__decorate([
|
|
39
33
|
Column({
|
|
40
34
|
type: DataType.TEXT,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/dbmodels/TranslatedBadge.ts"],"sourcesContent":["import {\n BelongsTo,\n Column,\n DataType,\n Default,\n ForeignKey,\n Model,\n PrimaryKey,\n Table,\n} from \"sequelize-typescript\";\nimport {Badge} from \"./Badge\";\n\n@Table\nexport class TranslatedBadge extends Model {\n @PrimaryKey\n @Default(DataType.UUIDV4)\n @Column(DataType.UUID)\n declare uuid: string;\n\n @ForeignKey(() => Badge)\n @Column(DataType.UUID)\n declare badgeUuid: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare title: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare language: string;\n\n @Column({ type: DataType.
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/dbmodels/TranslatedBadge.ts"],"sourcesContent":["import {\n BelongsTo,\n Column,\n DataType,\n Default,\n ForeignKey,\n Model,\n PrimaryKey,\n Table,\n} from \"sequelize-typescript\";\nimport {Badge} from \"./Badge\";\n\n@Table\nexport class TranslatedBadge extends Model {\n @PrimaryKey\n @Default(DataType.UUIDV4)\n @Column(DataType.UUID)\n declare uuid: string;\n\n @ForeignKey(() => Badge)\n @Column(DataType.UUID)\n declare badgeUuid: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare title: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare language: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare description: string;\n\n @BelongsTo(() => Badge)\n declare badge: Badge;\n}\n"],"names":["BelongsTo","Column","DataType","Default","ForeignKey","Model","PrimaryKey","Table","Badge","TranslatedBadge","UUIDV4","UUID","type","TEXT","allowNull"],"mappings":";;;;;;AAAA,SACIA,SAAS,EACTC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,UAAU,EACVC,KAAK,EACLC,UAAU,EACVC,KAAK,QACF,uBAAuB;AAC9B,SAAQC,KAAK,QAAO,UAAU;AAG9B,WAAaC,kBAAN,8BAA8BJ;AAqBrC,EAAC;;IApBIC;IACAH,QAAQD,SAASQ,MAAM;IACvBT,OAAOC,SAASS,IAAI;GAHZF;;IAMRL,WAAW,IAAMI;IACjBP,OAAOC,SAASS,IAAI;GAPZF;;IAURR,OAAO;QAAEW,MAAMV,SAASW,IAAI;QAAEC,WAAW,KAAK;IAAC;GAVvCL;;IAaRR,OAAO;QAAEW,MAAMV,SAASW,IAAI;QAAEC,WAAW,KAAK;IAAC;GAbvCL;;IAgBRR,OAAO;QAAEW,MAAMV,SAASW,IAAI;QAAEC,WAAW,KAAK;IAAC;GAhBvCL;;IAmBRT,UAAU,IAAMQ;GAnBRC;AAAAA;IADZF;GACYE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Model } from "sequelize-typescript";
|
|
2
2
|
import { Badge } from "./Badge";
|
|
3
3
|
import { PersistedUser } from "./PersistedUser";
|
|
4
|
-
import { Program } from "./Program";
|
|
4
|
+
import { Program } from "./program/Program";
|
|
5
5
|
export declare class UserBadges extends Model {
|
|
6
6
|
userUuid: string;
|
|
7
7
|
badgeUuid: string;
|
|
@@ -7,7 +7,7 @@ var __decorate = this && this.__decorate || function(decorators, target, key, de
|
|
|
7
7
|
import { BelongsTo, Column, DataType, ForeignKey, Model, Table } from "sequelize-typescript";
|
|
8
8
|
import { Badge } from "./Badge";
|
|
9
9
|
import { PersistedUser } from "./PersistedUser";
|
|
10
|
-
import { Program } from "./Program";
|
|
10
|
+
import { Program } from "./program/Program";
|
|
11
11
|
export let UserBadges = class UserBadges extends Model {
|
|
12
12
|
};
|
|
13
13
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/dbmodels/UserBadges.ts"],"sourcesContent":["import { BelongsTo, Column, DataType, ForeignKey, Model, Table } from \"sequelize-typescript\";\nimport { Badge } from \"./Badge\";\nimport { PersistedUser } from \"./PersistedUser\";\nimport {Program} from \"./Program\";\n\n@Table({\n timestamps: true,\n})export class UserBadges extends Model {\n @ForeignKey(() => PersistedUser)\n @Column({\n type: DataType.UUID,\n allowNull: false,\n })\n declare userUuid: string;\n\n @ForeignKey(() => Badge)\n @Column({\n type: DataType.UUID,\n allowNull: false,\n })\n declare badgeUuid: string;\n\n @ForeignKey(() => Program)\n @Column({\n type: DataType.UUID,\n allowNull: true,\n })\n declare programInstanceUuid?: string;\n\n\n @Column({ type: DataType.INTEGER, allowNull: false, defaultValue: 1})\n declare timesEarned: number;\n\n @Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false})\n declare hasBeenShown: boolean;\n\n @BelongsTo(() => PersistedUser)\n declare user: PersistedUser;\n\n @BelongsTo(() => Badge)\n declare badge: Badge;\n\n @BelongsTo(() => Program)\n declare programInstance?: Program;\n}\n"],"names":["BelongsTo","Column","DataType","ForeignKey","Model","Table","Badge","PersistedUser","Program","UserBadges","type","UUID","allowNull","INTEGER","defaultValue","BOOLEAN","timestamps"],"mappings":";;;;;;AAAA,SAASA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,KAAK,EAAEC,KAAK,QAAQ,uBAAuB;AAC7F,SAASC,KAAK,QAAQ,UAAU;AAChC,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAAQC,OAAO,QAAO,
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/dbmodels/UserBadges.ts"],"sourcesContent":["import { BelongsTo, Column, DataType, ForeignKey, Model, Table } from \"sequelize-typescript\";\nimport { Badge } from \"./Badge\";\nimport { PersistedUser } from \"./PersistedUser\";\nimport {Program} from \"./program/Program\";\n\n@Table({\n timestamps: true,\n})export class UserBadges extends Model {\n @ForeignKey(() => PersistedUser)\n @Column({\n type: DataType.UUID,\n allowNull: false,\n })\n declare userUuid: string;\n\n @ForeignKey(() => Badge)\n @Column({\n type: DataType.UUID,\n allowNull: false,\n })\n declare badgeUuid: string;\n\n @ForeignKey(() => Program)\n @Column({\n type: DataType.UUID,\n allowNull: true,\n })\n declare programInstanceUuid?: string;\n\n\n @Column({ type: DataType.INTEGER, allowNull: false, defaultValue: 1})\n declare timesEarned: number;\n\n @Column({ type: DataType.BOOLEAN, allowNull: false, defaultValue: false})\n declare hasBeenShown: boolean;\n\n @BelongsTo(() => PersistedUser)\n declare user: PersistedUser;\n\n @BelongsTo(() => Badge)\n declare badge: Badge;\n\n @BelongsTo(() => Program)\n declare programInstance?: Program;\n}\n"],"names":["BelongsTo","Column","DataType","ForeignKey","Model","Table","Badge","PersistedUser","Program","UserBadges","type","UUID","allowNull","INTEGER","defaultValue","BOOLEAN","timestamps"],"mappings":";;;;;;AAAA,SAASA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,KAAK,EAAEC,KAAK,QAAQ,uBAAuB;AAC7F,SAASC,KAAK,QAAQ,UAAU;AAChC,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAAQC,OAAO,QAAO,oBAAoB;AAIxC,WAAaC,aAAN,yBAAyBL;AAqClC,EAAC;;IApCID,WAAW,IAAMI;IACjBN,OAAO;QACJS,MAAMR,SAASS,IAAI;QACnBC,WAAW,KAAK;IACpB;GALWH;;IAQVN,WAAW,IAAMG;IACjBL,OAAO;QACJS,MAAMR,SAASS,IAAI;QACnBC,WAAW,KAAK;IACpB;GAZWH;;IAeVN,WAAW,IAAMK;IACjBP,OAAO;QACJS,MAAMR,SAASS,IAAI;QACnBC,WAAW,IAAI;IACnB;GAnBWH;;IAuBVR,OAAO;QAAES,MAAMR,SAASW,OAAO;QAAED,WAAW,KAAK;QAAEE,cAAc;IAAC;GAvBxDL;;IA0BVR,OAAO;QAAES,MAAMR,SAASa,OAAO;QAAEH,WAAW,KAAK;QAAEE,cAAc,KAAK;IAAA;GA1B5DL;;IA6BVT,UAAU,IAAMO;GA7BNE;;IAgCVT,UAAU,IAAMM;GAhCNG;;IAmCVT,UAAU,IAAMQ;GAnCNC;AAAAA;IAFdJ,MAAM;QACHW,YAAY,IAAI;IACpB;GAAeP"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { TranslatedChallenge } from './TranslatedChallenge';
|
|
3
|
+
export declare class Challenge extends Model<Challenge> {
|
|
4
|
+
uuid: string;
|
|
5
|
+
title: string;
|
|
6
|
+
url: string;
|
|
7
|
+
pointer: string;
|
|
8
|
+
timerTime: string;
|
|
9
|
+
showStopwatch: boolean;
|
|
10
|
+
progress: object;
|
|
11
|
+
translatedChallenges: TranslatedChallenge[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var __decorate = this && this.__decorate || function(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, HasMany, Model, Table } from "sequelize-typescript";
|
|
8
|
+
import { TranslatedChallenge } from "./TranslatedChallenge";
|
|
9
|
+
export let Challenge = class Challenge extends Model {
|
|
10
|
+
};
|
|
11
|
+
__decorate([
|
|
12
|
+
Default(DataType.UUIDV4),
|
|
13
|
+
Column({
|
|
14
|
+
type: DataType.UUID,
|
|
15
|
+
defaultValue: DataType.UUID,
|
|
16
|
+
allowNull: false,
|
|
17
|
+
primaryKey: true
|
|
18
|
+
})
|
|
19
|
+
], Challenge.prototype, "uuid", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
Column({
|
|
22
|
+
type: DataType.TEXT,
|
|
23
|
+
allowNull: false
|
|
24
|
+
})
|
|
25
|
+
], Challenge.prototype, "title", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
Column({
|
|
28
|
+
type: DataType.TEXT,
|
|
29
|
+
allowNull: false
|
|
30
|
+
})
|
|
31
|
+
], Challenge.prototype, "url", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
Column({
|
|
34
|
+
type: DataType.TEXT,
|
|
35
|
+
allowNull: false
|
|
36
|
+
})
|
|
37
|
+
], Challenge.prototype, "pointer", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
Column({
|
|
40
|
+
type: DataType.TEXT,
|
|
41
|
+
allowNull: false
|
|
42
|
+
})
|
|
43
|
+
], Challenge.prototype, "timerTime", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
Column({
|
|
46
|
+
type: DataType.BOOLEAN,
|
|
47
|
+
allowNull: false
|
|
48
|
+
})
|
|
49
|
+
], Challenge.prototype, "showStopwatch", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
Column({
|
|
52
|
+
type: DataType.JSONB,
|
|
53
|
+
allowNull: true
|
|
54
|
+
})
|
|
55
|
+
], Challenge.prototype, "progress", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
HasMany(()=>TranslatedChallenge)
|
|
58
|
+
], Challenge.prototype, "translatedChallenges", void 0);
|
|
59
|
+
Challenge = __decorate([
|
|
60
|
+
Table
|
|
61
|
+
], Challenge);
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=Challenge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/dbmodels/program/Challenge.ts"],"sourcesContent":["import { Column, DataType, Default, HasMany, Model, Table } from 'sequelize-typescript';\nimport { TranslatedChallenge } from './TranslatedChallenge';\n\n@Table\nexport class Challenge extends Model<Challenge> {\n\t@Default(DataType.UUIDV4)\n\t@Column({\n\t\ttype: DataType.UUID,\n\t\tdefaultValue: DataType.UUID,\n\t\tallowNull: false,\n\t\tprimaryKey: true\n\t})\n\tdeclare uuid: string;\n\n\t@Column({ type: DataType.TEXT, allowNull: false })\n\tdeclare title: string;\n\n\t@Column({ type: DataType.TEXT, allowNull: false })\n\tdeclare url: string;\n\n\t@Column({ type: DataType.TEXT, allowNull: false })\n\tdeclare pointer: string;\n\n\t@Column({ type: DataType.TEXT, allowNull: false })\n\tdeclare timerTime: string;\n\n\t@Column({ type: DataType.BOOLEAN, allowNull: false })\n\tdeclare showStopwatch: boolean;\n\n\t@Column({ type: DataType.JSONB, allowNull: true })\n\tdeclare progress: object;\n\n\t@HasMany(() => TranslatedChallenge)\n\tdeclare translatedChallenges: TranslatedChallenge[];\n}\n"],"names":["Column","DataType","Default","HasMany","Model","Table","TranslatedChallenge","Challenge","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","TEXT","BOOLEAN","JSONB"],"mappings":";;;;;;AAAA,SAASA,MAAM,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,EAAEC,KAAK,EAAEC,KAAK,QAAQ,uBAAuB;AACxF,SAASC,mBAAmB,QAAQ,wBAAwB;AAG5D,WAAaC,YAAN,wBAAwBH;AA8B/B,EAAC;;IA7BCF,QAAQD,SAASO,MAAM;IACvBR,OAAO;QACPS,MAAMR,SAASS,IAAI;QACnBC,cAAcV,SAASS,IAAI;QAC3BE,WAAW,KAAK;QAChBC,YAAY,IAAI;IACjB;GAPYN;;IAUXP,OAAO;QAAES,MAAMR,SAASa,IAAI;QAAEF,WAAW,KAAK;IAAC;GAVpCL;;IAaXP,OAAO;QAAES,MAAMR,SAASa,IAAI;QAAEF,WAAW,KAAK;IAAC;GAbpCL;;IAgBXP,OAAO;QAAES,MAAMR,SAASa,IAAI;QAAEF,WAAW,KAAK;IAAC;GAhBpCL;;IAmBXP,OAAO;QAAES,MAAMR,SAASa,IAAI;QAAEF,WAAW,KAAK;IAAC;GAnBpCL;;IAsBXP,OAAO;QAAES,MAAMR,SAASc,OAAO;QAAEH,WAAW,KAAK;IAAC;GAtBvCL;;IAyBXP,OAAO;QAAES,MAAMR,SAASe,KAAK;QAAEJ,WAAW,IAAI;IAAC;GAzBpCL;;IA4BXJ,QAAQ,IAAMG;GA5BHC;AAAAA;IADZF;GACYE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Model } from "sequelize-typescript";
|
|
2
|
+
import { Workout } from "./Workout";
|
|
3
|
+
import type { Progress, ReducedExercise } from "../../models/ExerciseInterfaces";
|
|
4
|
+
export declare class Exercise extends Model<Exercise> implements ReducedExercise {
|
|
5
|
+
uuid: string;
|
|
6
|
+
name: string;
|
|
7
|
+
order: number;
|
|
8
|
+
progress: Progress[];
|
|
9
|
+
reps: string;
|
|
10
|
+
sets: string;
|
|
11
|
+
restTime: string;
|
|
12
|
+
workoutUuid: string;
|
|
13
|
+
workout: Workout;
|
|
14
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var __decorate = this && this.__decorate || function(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, Index, Model, Table } from "sequelize-typescript";
|
|
8
|
+
import { Workout } from "./Workout";
|
|
9
|
+
export let Exercise = class Exercise extends Model {
|
|
10
|
+
};
|
|
11
|
+
__decorate([
|
|
12
|
+
Default(DataType.UUIDV4),
|
|
13
|
+
Column({
|
|
14
|
+
type: DataType.UUID,
|
|
15
|
+
defaultValue: DataType.UUID,
|
|
16
|
+
allowNull: false,
|
|
17
|
+
primaryKey: true
|
|
18
|
+
})
|
|
19
|
+
], Exercise.prototype, "uuid", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
Column({
|
|
22
|
+
type: DataType.STRING,
|
|
23
|
+
allowNull: false
|
|
24
|
+
})
|
|
25
|
+
], Exercise.prototype, "name", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
Column({
|
|
28
|
+
type: DataType.INTEGER,
|
|
29
|
+
allowNull: false
|
|
30
|
+
})
|
|
31
|
+
], Exercise.prototype, "order", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
Column({
|
|
34
|
+
type: DataType.ARRAY(DataType.JSONB),
|
|
35
|
+
allowNull: true
|
|
36
|
+
})
|
|
37
|
+
], Exercise.prototype, "progress", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
Column({
|
|
40
|
+
type: DataType.TEXT,
|
|
41
|
+
allowNull: false
|
|
42
|
+
})
|
|
43
|
+
], Exercise.prototype, "reps", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
Column({
|
|
46
|
+
type: DataType.TEXT,
|
|
47
|
+
allowNull: false
|
|
48
|
+
})
|
|
49
|
+
], Exercise.prototype, "sets", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
Column({
|
|
52
|
+
type: DataType.TEXT,
|
|
53
|
+
allowNull: true
|
|
54
|
+
})
|
|
55
|
+
], Exercise.prototype, "restTime", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
ForeignKey(()=>Workout),
|
|
58
|
+
Index,
|
|
59
|
+
Column({
|
|
60
|
+
type: DataType.UUID,
|
|
61
|
+
allowNull: true
|
|
62
|
+
})
|
|
63
|
+
], Exercise.prototype, "workoutUuid", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
BelongsTo(()=>Workout)
|
|
66
|
+
], Exercise.prototype, "workout", void 0);
|
|
67
|
+
Exercise = __decorate([
|
|
68
|
+
Table
|
|
69
|
+
], Exercise);
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=Exercise.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/dbmodels/program/Exercise.ts"],"sourcesContent":["import {\n BelongsTo,\n Column,\n DataType,\n Default,\n ForeignKey,\n Index,\n Model,\n Table,\n} from \"sequelize-typescript\";\nimport { Workout } from \"./Workout\";\nimport type {Progress, ReducedExercise} from \"../../models/ExerciseInterfaces\";\n\n@Table\nexport class Exercise extends Model<Exercise> implements ReducedExercise {\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.STRING, allowNull: false })\n declare name: string;\n\n @Column({ type: DataType.INTEGER, allowNull: false })\n declare order: number;\n\n @Column({ type: DataType.ARRAY(DataType.JSONB), allowNull: true })\n declare progress: Progress[];\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare reps: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare sets: string;\n\n @Column({ type: DataType.TEXT, allowNull: true })\n declare restTime: string;\n\n @ForeignKey(() => Workout)\n @Index\n @Column({\n type: DataType.UUID,\n allowNull: true,\n })\n declare workoutUuid: string;\n\n @BelongsTo(() => Workout)\n declare workout: Workout;\n}\n"],"names":["BelongsTo","Column","DataType","Default","ForeignKey","Index","Model","Table","Workout","Exercise","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","STRING","INTEGER","ARRAY","JSONB","TEXT"],"mappings":";;;;;;AAAA,SACEA,SAAS,EACTC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,UAAU,EACVC,KAAK,EACLC,KAAK,EACLC,KAAK,QACA,uBAAuB;AAC9B,SAASC,OAAO,QAAQ,YAAY;AAIpC,WAAaC,WAAN,uBAAuBH;AAsC9B,EAAC;;IArCEH,QAAQD,SAASQ,MAAM;IACvBT,OAAO;QACNU,MAAMT,SAASU,IAAI;QACnBC,cAAcX,SAASU,IAAI;QAC3BE,WAAW,KAAK;QAChBC,YAAY,IAAI;IAClB;GAPWN;;IAUVR,OAAO;QAAEU,MAAMT,SAASc,MAAM;QAAEF,WAAW,KAAK;IAAC;GAVvCL;;IAaVR,OAAO;QAAEU,MAAMT,SAASe,OAAO;QAAEH,WAAW,KAAK;IAAC;GAbxCL;;IAgBVR,OAAO;QAAEU,MAAMT,SAASgB,KAAK,CAAChB,SAASiB,KAAK;QAAGL,WAAW,IAAI;IAAC;GAhBrDL;;IAmBVR,OAAO;QAAEU,MAAMT,SAASkB,IAAI;QAAEN,WAAW,KAAK;IAAC;GAnBrCL;;IAsBVR,OAAO;QAAEU,MAAMT,SAASkB,IAAI;QAAEN,WAAW,KAAK;IAAC;GAtBrCL;;IAyBVR,OAAO;QAAEU,MAAMT,SAASkB,IAAI;QAAEN,WAAW,IAAI;IAAC;GAzBpCL;;IA4BVL,WAAW,IAAMI;IACjBH;IACAJ,OAAO;QACNU,MAAMT,SAASU,IAAI;QACnBE,WAAW,IAAI;IACjB;GAjCWL;;IAoCVT,UAAU,IAAMQ;GApCNC;AAAAA;IADZF;GACYE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Workout } from "./Workout";
|
|
2
|
+
import { Model } from "sequelize-typescript";
|
|
3
|
+
export declare class Program extends Model<Program> {
|
|
4
|
+
programId: string;
|
|
5
|
+
userUuid: string;
|
|
6
|
+
workout: Workout[];
|
|
7
|
+
startDate: string;
|
|
8
|
+
programType: string;
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
static deleteRelatedWorkouts(instance: Program): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var __decorate = this && this.__decorate || function(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 { Workout } from "./Workout";
|
|
8
|
+
import { BeforeDestroy, Column, DataType, Default, HasMany, Model, Table } from "sequelize-typescript";
|
|
9
|
+
export let Program = class Program extends Model {
|
|
10
|
+
static async deleteRelatedWorkouts(instance) {
|
|
11
|
+
const workouts = await instance.$get("workout", {
|
|
12
|
+
scope: "workout"
|
|
13
|
+
});
|
|
14
|
+
for (const workout of workouts){
|
|
15
|
+
await workout.destroy();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
__decorate([
|
|
20
|
+
Default(DataType.UUIDV4),
|
|
21
|
+
Column({
|
|
22
|
+
type: DataType.UUID,
|
|
23
|
+
defaultValue: DataType.UUID,
|
|
24
|
+
allowNull: false,
|
|
25
|
+
primaryKey: true
|
|
26
|
+
})
|
|
27
|
+
], Program.prototype, "programId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
Column({
|
|
30
|
+
type: DataType.UUID,
|
|
31
|
+
allowNull: false
|
|
32
|
+
})
|
|
33
|
+
], Program.prototype, "userUuid", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
HasMany(()=>Workout, {
|
|
36
|
+
foreignKey: "programId",
|
|
37
|
+
onDelete: "CASCADE"
|
|
38
|
+
})
|
|
39
|
+
], Program.prototype, "workout", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
Column({
|
|
42
|
+
type: DataType.TEXT,
|
|
43
|
+
allowNull: false
|
|
44
|
+
})
|
|
45
|
+
], Program.prototype, "startDate", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
Column({
|
|
48
|
+
type: DataType.TEXT,
|
|
49
|
+
allowNull: true
|
|
50
|
+
})
|
|
51
|
+
], Program.prototype, "programType", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
Column({
|
|
54
|
+
type: DataType.DATE,
|
|
55
|
+
allowNull: true
|
|
56
|
+
})
|
|
57
|
+
], Program.prototype, "createdAt", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
BeforeDestroy
|
|
60
|
+
], Program, "deleteRelatedWorkouts", null);
|
|
61
|
+
Program = __decorate([
|
|
62
|
+
Table
|
|
63
|
+
], Program);
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=Program.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/dbmodels/program/Program.ts"],"sourcesContent":["import { Workout } from \"./Workout\";\nimport {\n BeforeDestroy,\n Column,\n DataType,\n Default,\n HasMany,\n Model,\n Table,\n} from \"sequelize-typescript\";\n\n@Table\nexport class Program extends Model<Program> {\n @Default(DataType.UUIDV4)\n @Column({\n type: DataType.UUID,\n defaultValue: DataType.UUID,\n allowNull: false,\n primaryKey: true,\n })\n declare programId: string;\n\n @Column({ type: DataType.UUID, allowNull: false })\n declare userUuid: string;\n\n @HasMany(() => Workout, { foreignKey: \"programId\", onDelete: \"CASCADE\" })\n declare workout: Workout[];\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare startDate: string;\n\n @Column({ type: DataType.TEXT, allowNull: true })\n declare programType: string;\n\n @Column({ type: DataType.DATE, allowNull: true })\n declare createdAt: Date;\n\n @BeforeDestroy\n static async deleteRelatedWorkouts(instance: Program) {\n const workouts = await instance.$get(\"workout\", { scope: \"workout\" });\n\n for (const workout of workouts) {\n await workout.destroy();\n }\n }\n}\n"],"names":["Workout","BeforeDestroy","Column","DataType","Default","HasMany","Model","Table","Program","deleteRelatedWorkouts","instance","workouts","$get","scope","workout","destroy","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","foreignKey","onDelete","TEXT","DATE"],"mappings":";;;;;;AAAA,SAASA,OAAO,QAAQ,YAAY;AACpC,SACEC,aAAa,EACbC,MAAM,EACNC,QAAQ,EACRC,OAAO,EACPC,OAAO,EACPC,KAAK,EACLC,KAAK,QACA,uBAAuB;AAG9B,WAAaC,UAAN,sBAAsBF;IAyB3B,aACaG,sBAAsBC,QAAiB,EAAE;QACpD,MAAMC,WAAW,MAAMD,SAASE,IAAI,CAAC,WAAW;YAAEC,OAAO;QAAU;QAEnE,KAAK,MAAMC,WAAWH,SAAU;YAC9B,MAAMG,QAAQC,OAAO;QACvB;IACF;AACF,EAAC;;IAhCEX,QAAQD,SAASa,MAAM;IACvBd,OAAO;QACNe,MAAMd,SAASe,IAAI;QACnBC,cAAchB,SAASe,IAAI;QAC3BE,WAAW,KAAK;QAChBC,YAAY,IAAI;IAClB;GAPWb;;IAUVN,OAAO;QAAEe,MAAMd,SAASe,IAAI;QAAEE,WAAW,KAAK;IAAC;GAVrCZ;;IAaVH,QAAQ,IAAML,SAAS;QAAEsB,YAAY;QAAaC,UAAU;IAAU;GAb5Df;;IAgBVN,OAAO;QAAEe,MAAMd,SAASqB,IAAI;QAAEJ,WAAW,KAAK;IAAC;GAhBrCZ;;IAmBVN,OAAO;QAAEe,MAAMd,SAASqB,IAAI;QAAEJ,WAAW,IAAI;IAAC;GAnBpCZ;;IAsBVN,OAAO;QAAEe,MAAMd,SAASsB,IAAI;QAAEL,WAAW,IAAI;IAAC;GAtBpCZ;;IAyBVP;GAzBUO;AAAAA;IADZD;GACYC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { TranslatedStrengthTest } from './TranslatedStrengthTest';
|
|
3
|
+
import type { StrengthTestExercise } from "./StrengthTestExercise";
|
|
4
|
+
export declare class StrengthTest extends Model<StrengthTest> {
|
|
5
|
+
uuid: string;
|
|
6
|
+
type: string;
|
|
7
|
+
exercises: StrengthTestExercise[];
|
|
8
|
+
translatedStrengthTests: TranslatedStrengthTest[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __decorate = this && this.__decorate || function(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, HasMany, Model, Table } from "sequelize-typescript";
|
|
8
|
+
import { TranslatedStrengthTest } from "./TranslatedStrengthTest";
|
|
9
|
+
export let StrengthTest = class StrengthTest extends Model {
|
|
10
|
+
};
|
|
11
|
+
__decorate([
|
|
12
|
+
Default(DataType.UUIDV4),
|
|
13
|
+
Column({
|
|
14
|
+
type: DataType.UUID,
|
|
15
|
+
defaultValue: DataType.UUID,
|
|
16
|
+
allowNull: false,
|
|
17
|
+
primaryKey: true
|
|
18
|
+
})
|
|
19
|
+
], StrengthTest.prototype, "uuid", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
Column({
|
|
22
|
+
type: DataType.TEXT,
|
|
23
|
+
allowNull: false
|
|
24
|
+
})
|
|
25
|
+
], StrengthTest.prototype, "type", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
Column({
|
|
28
|
+
type: DataType.ARRAY(DataType.JSONB),
|
|
29
|
+
allowNull: false
|
|
30
|
+
})
|
|
31
|
+
], StrengthTest.prototype, "exercises", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
HasMany(()=>TranslatedStrengthTest)
|
|
34
|
+
], StrengthTest.prototype, "translatedStrengthTests", void 0);
|
|
35
|
+
StrengthTest = __decorate([
|
|
36
|
+
Table
|
|
37
|
+
], StrengthTest);
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=StrengthTest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/dbmodels/program/StrengthTest.ts"],"sourcesContent":["import { Column, DataType, Default, HasMany, Model, Table } from 'sequelize-typescript';\nimport { TranslatedStrengthTest } from './TranslatedStrengthTest';\nimport type {StrengthTestExercise} from \"./StrengthTestExercise\";\n\n@Table\nexport class StrengthTest extends Model<StrengthTest> {\n\t@Default(DataType.UUIDV4)\n\t@Column({\n\t\ttype: DataType.UUID,\n\t\tdefaultValue: DataType.UUID,\n\t\tallowNull: false,\n\t\tprimaryKey: true\n\t})\n\tdeclare uuid: string;\n\n\t@Column({\n\t\ttype: DataType.TEXT,\n\t\tallowNull: false\n\t})\n\tdeclare type: string;\n\n\t@Column({\n\t\ttype: DataType.ARRAY(DataType.JSONB),\n\t\tallowNull: false\n\t})\n\tdeclare exercises: StrengthTestExercise[];\n\n\t@HasMany(() => TranslatedStrengthTest)\n\tdeclare translatedStrengthTests: TranslatedStrengthTest[];\n}\n"],"names":["Column","DataType","Default","HasMany","Model","Table","TranslatedStrengthTest","StrengthTest","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","TEXT","ARRAY","JSONB"],"mappings":";;;;;;AAAA,SAASA,MAAM,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,EAAEC,KAAK,EAAEC,KAAK,QAAQ,uBAAuB;AACxF,SAASC,sBAAsB,QAAQ,2BAA2B;AAIlE,WAAaC,eAAN,2BAA2BH;AAwBlC,EAAC;;IAvBCF,QAAQD,SAASO,MAAM;IACvBR,OAAO;QACPS,MAAMR,SAASS,IAAI;QACnBC,cAAcV,SAASS,IAAI;QAC3BE,WAAW,KAAK;QAChBC,YAAY,IAAI;IACjB;GAPYN;;IAUXP,OAAO;QACPS,MAAMR,SAASa,IAAI;QACnBF,WAAW,KAAK;IACjB;GAbYL;;IAgBXP,OAAO;QACPS,MAAMR,SAASc,KAAK,CAACd,SAASe,KAAK;QACnCJ,WAAW,KAAK;IACjB;GAnBYL;;IAsBXJ,QAAQ,IAAMG;GAtBHC;AAAAA;IADZF;GACYE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Model } from "sequelize-typescript";
|
|
2
|
+
import { TranslatedStrengthTestExercise } from "./TranslatedStrengthTestExercise";
|
|
3
|
+
import type { Progress } from "../../models/ExerciseInterfaces";
|
|
4
|
+
export declare class StrengthTestExercise extends Model<StrengthTestExercise> {
|
|
5
|
+
uuid: string;
|
|
6
|
+
stUuid: string;
|
|
7
|
+
url: string;
|
|
8
|
+
title: string;
|
|
9
|
+
order: number;
|
|
10
|
+
pointer: string;
|
|
11
|
+
timerTime: string;
|
|
12
|
+
progress: Progress;
|
|
13
|
+
translatedStrengthTestExercises: TranslatedStrengthTestExercise[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
var __decorate = this && this.__decorate || function(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, HasMany, Model, Table } from "sequelize-typescript";
|
|
8
|
+
import { UserStrengthTests } from "./UserStrengthTests";
|
|
9
|
+
import { TranslatedStrengthTestExercise } from "./TranslatedStrengthTestExercise";
|
|
10
|
+
export let StrengthTestExercise = class StrengthTestExercise extends Model {
|
|
11
|
+
};
|
|
12
|
+
__decorate([
|
|
13
|
+
Default(DataType.UUIDV4),
|
|
14
|
+
Column({
|
|
15
|
+
type: DataType.UUID,
|
|
16
|
+
defaultValue: DataType.UUID,
|
|
17
|
+
allowNull: false,
|
|
18
|
+
primaryKey: true
|
|
19
|
+
})
|
|
20
|
+
], StrengthTestExercise.prototype, "uuid", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
ForeignKey(()=>UserStrengthTests),
|
|
23
|
+
Column({
|
|
24
|
+
type: DataType.UUID,
|
|
25
|
+
defaultValue: DataType.UUID,
|
|
26
|
+
allowNull: false
|
|
27
|
+
})
|
|
28
|
+
], StrengthTestExercise.prototype, "stUuid", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
Column({
|
|
31
|
+
type: DataType.TEXT,
|
|
32
|
+
allowNull: false
|
|
33
|
+
})
|
|
34
|
+
], StrengthTestExercise.prototype, "url", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
Column({
|
|
37
|
+
type: DataType.TEXT,
|
|
38
|
+
allowNull: false
|
|
39
|
+
})
|
|
40
|
+
], StrengthTestExercise.prototype, "title", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
Column({
|
|
43
|
+
type: DataType.INTEGER,
|
|
44
|
+
allowNull: false
|
|
45
|
+
})
|
|
46
|
+
], StrengthTestExercise.prototype, "order", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
Column({
|
|
49
|
+
type: DataType.TEXT,
|
|
50
|
+
allowNull: false
|
|
51
|
+
})
|
|
52
|
+
], StrengthTestExercise.prototype, "pointer", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
Column({
|
|
55
|
+
type: DataType.TEXT,
|
|
56
|
+
allowNull: false
|
|
57
|
+
})
|
|
58
|
+
], StrengthTestExercise.prototype, "timerTime", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
Column({
|
|
61
|
+
type: DataType.JSONB,
|
|
62
|
+
allowNull: true
|
|
63
|
+
})
|
|
64
|
+
], StrengthTestExercise.prototype, "progress", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
HasMany(()=>TranslatedStrengthTestExercise)
|
|
67
|
+
], StrengthTestExercise.prototype, "translatedStrengthTestExercises", void 0);
|
|
68
|
+
StrengthTestExercise = __decorate([
|
|
69
|
+
Table
|
|
70
|
+
], StrengthTestExercise);
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=StrengthTestExercise.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/dbmodels/program/StrengthTestExercise.ts"],"sourcesContent":["import { Column, DataType, Default, ForeignKey, HasMany, Model, Table } from \"sequelize-typescript\";\nimport { UserStrengthTests } from \"./UserStrengthTests\";\nimport {TranslatedStrengthTestExercise} from \"./TranslatedStrengthTestExercise\";\nimport type {Progress} from \"../../models/ExerciseInterfaces\";\n\n@Table\nexport class StrengthTestExercise extends Model<StrengthTestExercise> {\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(() => UserStrengthTests)\n @Column({\n type: DataType.UUID,\n defaultValue: DataType.UUID,\n allowNull: false,\n })\n declare stUuid: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare url: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare title: string;\n\n @Column({ type: DataType.INTEGER, allowNull: false })\n declare order: number;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare pointer: string;\n\n @Column({ type: DataType.TEXT, allowNull: false })\n declare timerTime: string;\n\n @Column({ type: DataType.JSONB, allowNull: true })\n declare progress: Progress;\n\n @HasMany(() => TranslatedStrengthTestExercise)\n declare translatedStrengthTestExercises: TranslatedStrengthTestExercise[];\n}\n"],"names":["Column","DataType","Default","ForeignKey","HasMany","Model","Table","UserStrengthTests","TranslatedStrengthTestExercise","StrengthTestExercise","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","TEXT","INTEGER","JSONB"],"mappings":";;;;;;AAAA,SAASA,MAAM,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,UAAU,EAAEC,OAAO,EAAEC,KAAK,EAAEC,KAAK,QAAQ,uBAAuB;AACpG,SAASC,iBAAiB,QAAQ,sBAAsB;AACxD,SAAQC,8BAA8B,QAAO,mCAAmC;AAIhF,WAAaC,uBAAN,mCAAmCJ;AAsC1C,EAAC;;IArCIH,QAAQD,SAASS,MAAM;IACvBV,OAAO;QACJW,MAAMV,SAASW,IAAI;QACnBC,cAAcZ,SAASW,IAAI;QAC3BE,WAAW,KAAK;QAChBC,YAAY,IAAI;IACpB;GAPSN;;IAURN,WAAW,IAAMI;IACjBP,OAAO;QACJW,MAAMV,SAASW,IAAI;QACnBC,cAAcZ,SAASW,IAAI;QAC3BE,WAAW,KAAK;IACpB;GAfSL;;IAkBRT,OAAO;QAAEW,MAAMV,SAASe,IAAI;QAAEF,WAAW,KAAK;IAAC;GAlBvCL;;IAqBRT,OAAO;QAAEW,MAAMV,SAASe,IAAI;QAAEF,WAAW,KAAK;IAAC;GArBvCL;;IAwBRT,OAAO;QAAEW,MAAMV,SAASgB,OAAO;QAAEH,WAAW,KAAK;IAAC;GAxB1CL;;IA2BRT,OAAO;QAAEW,MAAMV,SAASe,IAAI;QAAEF,WAAW,KAAK;IAAC;GA3BvCL;;IA8BRT,OAAO;QAAEW,MAAMV,SAASe,IAAI;QAAEF,WAAW,KAAK;IAAC;GA9BvCL;;IAiCRT,OAAO;QAAEW,MAAMV,SAASiB,KAAK;QAAEJ,WAAW,IAAI;IAAC;GAjCvCL;;IAoCRL,QAAQ,IAAMI;GApCNC;AAAAA;IADZH;GACYG"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Model } from "sequelize-typescript";
|
|
2
|
+
import type { ReducedExercise } from "../../models/ExerciseInterfaces";
|
|
3
|
+
export declare class Superset extends Model<Superset> {
|
|
4
|
+
uuid: string;
|
|
5
|
+
startPosition: number;
|
|
6
|
+
workoutUuid: string;
|
|
7
|
+
exercises: ReducedExercise[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __decorate = this && this.__decorate || function(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 { Workout } from "./Workout";
|
|
9
|
+
export let Superset = class Superset extends Model {
|
|
10
|
+
};
|
|
11
|
+
__decorate([
|
|
12
|
+
Default(DataType.UUIDV4),
|
|
13
|
+
Column({
|
|
14
|
+
type: DataType.UUID,
|
|
15
|
+
defaultValue: DataType.UUID,
|
|
16
|
+
allowNull: false,
|
|
17
|
+
primaryKey: true
|
|
18
|
+
})
|
|
19
|
+
], Superset.prototype, "uuid", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
Column({
|
|
22
|
+
type: DataType.INTEGER,
|
|
23
|
+
allowNull: false
|
|
24
|
+
})
|
|
25
|
+
], Superset.prototype, "startPosition", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
ForeignKey(()=>Workout),
|
|
28
|
+
Index
|
|
29
|
+
], Superset.prototype, "workoutUuid", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
Column({
|
|
32
|
+
type: DataType.ARRAY(DataType.JSONB),
|
|
33
|
+
allowNull: false
|
|
34
|
+
})
|
|
35
|
+
], Superset.prototype, "exercises", void 0);
|
|
36
|
+
Superset = __decorate([
|
|
37
|
+
Table
|
|
38
|
+
], Superset);
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=Superset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/dbmodels/program/Superset.ts"],"sourcesContent":["\nimport {Column, DataType, Default, ForeignKey, Index, Model, Table} from \"sequelize-typescript\";\nimport { Workout } from \"./Workout\";\nimport type {ReducedExercise} from \"../../models/ExerciseInterfaces\";\n\n@Table\nexport class Superset extends Model<Superset> {\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.INTEGER, allowNull: false })\n declare startPosition: number;\n\n @ForeignKey(() => Workout)\n @Index\n declare workoutUuid: string;\n\n @Column({ type: DataType.ARRAY(DataType.JSONB), allowNull: false })\n declare exercises: ReducedExercise[];\n\n}\n"],"names":["Column","DataType","Default","ForeignKey","Index","Model","Table","Workout","Superset","UUIDV4","type","UUID","defaultValue","allowNull","primaryKey","INTEGER","ARRAY","JSONB"],"mappings":";;;;;;AACA,SAAQA,MAAM,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,UAAU,EAAEC,KAAK,EAAEC,KAAK,EAAEC,KAAK,QAAO,uBAAuB;AAChG,SAASC,OAAO,QAAQ,YAAY;AAIpC,WAAaC,WAAN,uBAAuBH;AAoB9B,EAAC;;IAnBIH,QAAQD,SAASQ,MAAM;IACvBT,OAAO;QACJU,MAAMT,SAASU,IAAI;QACnBC,cAAcX,SAASU,IAAI;QAC3BE,WAAW,KAAK;QAChBC,YAAY,IAAI;IACpB;GAPSN;;IAURR,OAAO;QAAEU,MAAMT,SAASc,OAAO;QAAEF,WAAW,KAAK;IAAC;GAV1CL;;IAaRL,WAAW,IAAMI;IACjBH;GAdQI;;IAiBRR,OAAO;QAAEU,MAAMT,SAASe,KAAK,CAACf,SAASgB,KAAK;QAAGJ,WAAW,KAAK;IAAC;GAjBxDL;AAAAA;IADZF;GACYE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Model } from 'sequelize-typescript';
|
|
2
|
+
import { Challenge } from './Challenge';
|
|
3
|
+
export declare class TranslatedChallenge extends Model<TranslatedChallenge> {
|
|
4
|
+
uuid: string;
|
|
5
|
+
challengeUuid: string;
|
|
6
|
+
title: string;
|
|
7
|
+
language: string;
|
|
8
|
+
url: string;
|
|
9
|
+
pointer: string;
|
|
10
|
+
timerTime: string;
|
|
11
|
+
showStopwatch: boolean;
|
|
12
|
+
progress: object;
|
|
13
|
+
exercise: Challenge;
|
|
14
|
+
}
|