90dc-core 1.0.13 → 1.1.1
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/build/index.d.ts +1 -0
- package/build/index.js +19 -34
- package/build/lib/db/models/Exercise.d.ts +1 -1
- package/build/lib/db/models/Exercise.js +18 -21
- package/build/lib/db/models/ExerciseBlueprint.js +20 -23
- package/build/lib/db/models/ExerciseModels.d.ts +1 -1
- package/build/lib/db/models/ExerciseModels.js +18 -21
- package/build/lib/db/models/ExerciseProgress.js +13 -16
- package/build/lib/db/models/ForgotPasswordTokens.js +9 -12
- package/build/lib/db/models/PersistedUser.js +29 -32
- package/build/lib/db/models/Program.d.ts +1 -1
- package/build/lib/db/models/Program.js +12 -15
- package/build/lib/db/models/ProgramBlueprint.js +15 -18
- package/build/lib/db/models/RefreshToken.js +5 -8
- package/build/lib/db/models/Superset.d.ts +1 -2
- package/build/lib/db/models/Superset.js +12 -15
- package/build/lib/db/models/SupersetExercise.d.ts +1 -2
- package/build/lib/db/models/SupersetExercise.js +14 -17
- package/build/lib/db/models/UserInfo.js +13 -16
- package/build/lib/db/models/UserProgressPhoto.js +12 -15
- package/build/lib/db/models/Workout.d.ts +1 -1
- package/build/lib/db/models/Workout.js +19 -22
- package/build/lib/db/models/WorkoutExercise.d.ts +1 -1
- package/build/lib/db/models/WorkoutExercise.js +12 -15
- package/build/lib/models/ExerciseInterfaces.js +1 -2
- package/build/lib/models/ProgramInterfaces.js +1 -2
- package/build/lib/models/UserInterfaces.js +1 -2
- package/build/lib/models/WorkoutInterfaces.js +1 -2
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./lib/models/ProgramInterfaces";
|
|
2
2
|
export * from "./lib/models/ExerciseInterfaces";
|
|
3
3
|
export * from "./lib/models/WorkoutInterfaces";
|
|
4
|
+
export * from "./lib/models/UserInterfaces";
|
|
4
5
|
export * from "./lib/db/models/Exercise";
|
|
5
6
|
export * from "./lib/db/models/ExerciseModels";
|
|
6
7
|
export * from "./lib/db/models/ExerciseBlueprint";
|
package/build/index.js
CHANGED
|
@@ -1,36 +1,21 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
1
|
//Interfaces
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
2
|
+
export * from "./lib/models/ProgramInterfaces";
|
|
3
|
+
export * from "./lib/models/ExerciseInterfaces";
|
|
4
|
+
export * from "./lib/models/WorkoutInterfaces";
|
|
5
|
+
export * from "./lib/models/UserInterfaces";
|
|
21
6
|
//DB
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
7
|
+
export * from "./lib/db/models/Exercise";
|
|
8
|
+
export * from "./lib/db/models/ExerciseModels";
|
|
9
|
+
export * from "./lib/db/models/ExerciseBlueprint";
|
|
10
|
+
export * from "./lib/db/models/ExerciseProgress";
|
|
11
|
+
export * from "./lib/db/models/ForgotPasswordTokens";
|
|
12
|
+
export * from "./lib/db/models/PersistedUser";
|
|
13
|
+
export * from "./lib/db/models/Program";
|
|
14
|
+
export * from "./lib/db/models/ProgramBlueprint";
|
|
15
|
+
export * from "./lib/db/models/RefreshToken";
|
|
16
|
+
export * from "./lib/db/models/Superset";
|
|
17
|
+
export * from "./lib/db/models/SupersetExercise";
|
|
18
|
+
export * from "./lib/db/models/UserInfo";
|
|
19
|
+
export * from "./lib/db/models/UserProgressPhoto";
|
|
20
|
+
export * from "./lib/db/models/Workout";
|
|
21
|
+
export * from "./lib/db/models/WorkoutExercise";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Model } from "sequelize-typescript";
|
|
2
|
-
import { ExerciseModel } from "../../models/ExerciseInterfaces";
|
|
2
|
+
import type { ExerciseModel } from "../../models/ExerciseInterfaces";
|
|
3
3
|
export declare class Exercise extends Model<Exercise> implements ExerciseModel {
|
|
4
4
|
uuid: string;
|
|
5
5
|
name: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,65 +7,63 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
-
let Exercise = class Exercise extends sequelize_typescript_1.Model {
|
|
10
|
+
import { Column, DataType, Default, Model, Table } from "sequelize-typescript";
|
|
11
|
+
let Exercise = class Exercise extends Model {
|
|
15
12
|
};
|
|
16
13
|
__decorate([
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
Default(DataType.UUIDV4),
|
|
15
|
+
Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true }),
|
|
19
16
|
__metadata("design:type", String)
|
|
20
17
|
], Exercise.prototype, "uuid", void 0);
|
|
21
18
|
__decorate([
|
|
22
|
-
|
|
19
|
+
Column({ type: DataType.STRING, allowNull: false }),
|
|
23
20
|
__metadata("design:type", String)
|
|
24
21
|
], Exercise.prototype, "name", void 0);
|
|
25
22
|
__decorate([
|
|
26
|
-
|
|
23
|
+
Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false }),
|
|
27
24
|
__metadata("design:type", Array)
|
|
28
25
|
], Exercise.prototype, "level", void 0);
|
|
29
26
|
__decorate([
|
|
30
|
-
|
|
27
|
+
Column({ type: DataType.BOOLEAN, allowNull: false }),
|
|
31
28
|
__metadata("design:type", Boolean)
|
|
32
29
|
], Exercise.prototype, "hasPriority", void 0);
|
|
33
30
|
__decorate([
|
|
34
|
-
|
|
31
|
+
Column({ type: DataType.BOOLEAN, allowNull: false }),
|
|
35
32
|
__metadata("design:type", Boolean)
|
|
36
33
|
], Exercise.prototype, "isCompound", void 0);
|
|
37
34
|
__decorate([
|
|
38
|
-
|
|
35
|
+
Column({ type: DataType.BOOLEAN, allowNull: false }),
|
|
39
36
|
__metadata("design:type", Boolean)
|
|
40
37
|
], Exercise.prototype, "hasVariations", void 0);
|
|
41
38
|
__decorate([
|
|
42
|
-
|
|
39
|
+
Column({ type: DataType.BOOLEAN, allowNull: false }),
|
|
43
40
|
__metadata("design:type", Boolean)
|
|
44
41
|
], Exercise.prototype, "needsEquipment", void 0);
|
|
45
42
|
__decorate([
|
|
46
|
-
|
|
43
|
+
Column({ type: DataType.JSONB, allowNull: false }),
|
|
47
44
|
__metadata("design:type", Object)
|
|
48
45
|
], Exercise.prototype, "variations", void 0);
|
|
49
46
|
__decorate([
|
|
50
|
-
|
|
47
|
+
Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false }),
|
|
51
48
|
__metadata("design:type", Array)
|
|
52
49
|
], Exercise.prototype, "muscles", void 0);
|
|
53
50
|
__decorate([
|
|
54
|
-
|
|
51
|
+
Column({ type: DataType.STRING, allowNull: false }),
|
|
55
52
|
__metadata("design:type", String)
|
|
56
53
|
], Exercise.prototype, "reps", void 0);
|
|
57
54
|
__decorate([
|
|
58
|
-
|
|
55
|
+
Column({ type: DataType.STRING, allowNull: false }),
|
|
59
56
|
__metadata("design:type", String)
|
|
60
57
|
], Exercise.prototype, "sets", void 0);
|
|
61
58
|
__decorate([
|
|
62
|
-
|
|
59
|
+
Column({ type: DataType.INTEGER, allowNull: false }),
|
|
63
60
|
__metadata("design:type", Number)
|
|
64
61
|
], Exercise.prototype, "order", void 0);
|
|
65
62
|
__decorate([
|
|
66
|
-
|
|
63
|
+
Column({ type: DataType.BOOLEAN, allowNull: false }),
|
|
67
64
|
__metadata("design:type", Boolean)
|
|
68
65
|
], Exercise.prototype, "homeWorkout", void 0);
|
|
69
66
|
Exercise = __decorate([
|
|
70
|
-
|
|
67
|
+
Table
|
|
71
68
|
], Exercise);
|
|
72
|
-
|
|
69
|
+
export { Exercise };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,63 +7,61 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const ProgramBlueprint_1 = require("./ProgramBlueprint");
|
|
15
|
-
let ExerciseBlueprint = class ExerciseBlueprint extends sequelize_typescript_1.Model {
|
|
10
|
+
import { BelongsTo, Column, DataType, Default, Model, Table, } from "sequelize-typescript";
|
|
11
|
+
import { ProgramBlueprint } from "./ProgramBlueprint";
|
|
12
|
+
let ExerciseBlueprint = class ExerciseBlueprint extends Model {
|
|
16
13
|
};
|
|
17
14
|
__decorate([
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
type:
|
|
21
|
-
defaultValue:
|
|
15
|
+
Default(DataType.UUIDV4),
|
|
16
|
+
Column({
|
|
17
|
+
type: DataType.UUID,
|
|
18
|
+
defaultValue: DataType.UUID,
|
|
22
19
|
allowNull: false,
|
|
23
20
|
primaryKey: true,
|
|
24
21
|
}),
|
|
25
22
|
__metadata("design:type", String)
|
|
26
23
|
], ExerciseBlueprint.prototype, "uuid", void 0);
|
|
27
24
|
__decorate([
|
|
28
|
-
|
|
25
|
+
Column({ type: DataType.BOOLEAN, allowNull: false }),
|
|
29
26
|
__metadata("design:type", Boolean)
|
|
30
27
|
], ExerciseBlueprint.prototype, "hasPriority", void 0);
|
|
31
28
|
__decorate([
|
|
32
|
-
|
|
29
|
+
Column({ type: DataType.BOOLEAN, allowNull: false }),
|
|
33
30
|
__metadata("design:type", Boolean)
|
|
34
31
|
], ExerciseBlueprint.prototype, "isCompound", void 0);
|
|
35
32
|
__decorate([
|
|
36
|
-
|
|
33
|
+
Column({ type: DataType.BOOLEAN, allowNull: false }),
|
|
37
34
|
__metadata("design:type", Boolean)
|
|
38
35
|
], ExerciseBlueprint.prototype, "needsEquipment", void 0);
|
|
39
36
|
__decorate([
|
|
40
|
-
|
|
37
|
+
Column({ type: DataType.BOOLEAN, allowNull: false }),
|
|
41
38
|
__metadata("design:type", Boolean)
|
|
42
39
|
], ExerciseBlueprint.prototype, "isSuperset", void 0);
|
|
43
40
|
__decorate([
|
|
44
|
-
|
|
41
|
+
Column({ type: DataType.BOOLEAN, allowNull: false }),
|
|
45
42
|
__metadata("design:type", Boolean)
|
|
46
43
|
], ExerciseBlueprint.prototype, "isFixed", void 0);
|
|
47
44
|
__decorate([
|
|
48
|
-
|
|
45
|
+
Column({ type: DataType.STRING, allowNull: false }),
|
|
49
46
|
__metadata("design:type", String)
|
|
50
47
|
], ExerciseBlueprint.prototype, "muscle", void 0);
|
|
51
48
|
__decorate([
|
|
52
|
-
|
|
49
|
+
Column({ type: DataType.INTEGER, allowNull: false }),
|
|
53
50
|
__metadata("design:type", Number)
|
|
54
51
|
], ExerciseBlueprint.prototype, "rir", void 0);
|
|
55
52
|
__decorate([
|
|
56
|
-
|
|
53
|
+
Column({ type: DataType.STRING, allowNull: false }),
|
|
57
54
|
__metadata("design:type", String)
|
|
58
55
|
], ExerciseBlueprint.prototype, "reps", void 0);
|
|
59
56
|
__decorate([
|
|
60
|
-
|
|
57
|
+
Column({ type: DataType.STRING, allowNull: false }),
|
|
61
58
|
__metadata("design:type", String)
|
|
62
59
|
], ExerciseBlueprint.prototype, "sets", void 0);
|
|
63
60
|
__decorate([
|
|
64
|
-
|
|
65
|
-
__metadata("design:type",
|
|
61
|
+
BelongsTo(() => ProgramBlueprint, { foreignKey: "programId" }),
|
|
62
|
+
__metadata("design:type", ProgramBlueprint)
|
|
66
63
|
], ExerciseBlueprint.prototype, "program", void 0);
|
|
67
64
|
ExerciseBlueprint = __decorate([
|
|
68
|
-
|
|
65
|
+
Table
|
|
69
66
|
], ExerciseBlueprint);
|
|
70
|
-
|
|
67
|
+
export { ExerciseBlueprint };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Model } from "sequelize-typescript";
|
|
2
|
-
import { ExerciseModel } from "../../models/ExerciseInterfaces";
|
|
2
|
+
import type { ExerciseModel } from "../../models/ExerciseInterfaces";
|
|
3
3
|
export declare class ExercisesModels extends Model implements ExerciseModel {
|
|
4
4
|
uuid: string;
|
|
5
5
|
name: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,62 +7,60 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
-
let ExercisesModels = class ExercisesModels extends sequelize_typescript_1.Model {
|
|
10
|
+
import { Column, DataType, Default, Model, Table } from "sequelize-typescript";
|
|
11
|
+
let ExercisesModels = class ExercisesModels extends Model {
|
|
15
12
|
};
|
|
16
13
|
__decorate([
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
type:
|
|
20
|
-
defaultValue:
|
|
14
|
+
Default(DataType.UUIDV4),
|
|
15
|
+
Column({
|
|
16
|
+
type: DataType.UUID,
|
|
17
|
+
defaultValue: DataType.UUID,
|
|
21
18
|
allowNull: false,
|
|
22
19
|
primaryKey: true,
|
|
23
20
|
}),
|
|
24
21
|
__metadata("design:type", String)
|
|
25
22
|
], ExercisesModels.prototype, "uuid", void 0);
|
|
26
23
|
__decorate([
|
|
27
|
-
|
|
24
|
+
Column({ type: DataType.STRING, allowNull: false }),
|
|
28
25
|
__metadata("design:type", String)
|
|
29
26
|
], ExercisesModels.prototype, "name", void 0);
|
|
30
27
|
__decorate([
|
|
31
|
-
|
|
28
|
+
Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false }),
|
|
32
29
|
__metadata("design:type", Array)
|
|
33
30
|
], ExercisesModels.prototype, "level", void 0);
|
|
34
31
|
__decorate([
|
|
35
|
-
|
|
32
|
+
Column({ type: DataType.BOOLEAN, allowNull: false }),
|
|
36
33
|
__metadata("design:type", Boolean)
|
|
37
34
|
], ExercisesModels.prototype, "hasPriority", void 0);
|
|
38
35
|
__decorate([
|
|
39
|
-
|
|
36
|
+
Column({ type: DataType.BOOLEAN, allowNull: false }),
|
|
40
37
|
__metadata("design:type", Boolean)
|
|
41
38
|
], ExercisesModels.prototype, "isCompound", void 0);
|
|
42
39
|
__decorate([
|
|
43
|
-
|
|
40
|
+
Column({ type: DataType.BOOLEAN, allowNull: false }),
|
|
44
41
|
__metadata("design:type", Boolean)
|
|
45
42
|
], ExercisesModels.prototype, "hasVariations", void 0);
|
|
46
43
|
__decorate([
|
|
47
|
-
|
|
44
|
+
Column({ type: DataType.BOOLEAN, allowNull: false }),
|
|
48
45
|
__metadata("design:type", Boolean)
|
|
49
46
|
], ExercisesModels.prototype, "needsEquipment", void 0);
|
|
50
47
|
__decorate([
|
|
51
|
-
|
|
48
|
+
Column({ type: DataType.JSONB, allowNull: false }),
|
|
52
49
|
__metadata("design:type", Object)
|
|
53
50
|
], ExercisesModels.prototype, "variations", void 0);
|
|
54
51
|
__decorate([
|
|
55
|
-
|
|
52
|
+
Column({ type: DataType.JSONB, allowNull: false }),
|
|
56
53
|
__metadata("design:type", Object)
|
|
57
54
|
], ExercisesModels.prototype, "variationIfNoVariations", void 0);
|
|
58
55
|
__decorate([
|
|
59
|
-
|
|
56
|
+
Column({ type: DataType.ARRAY(DataType.STRING), allowNull: false }),
|
|
60
57
|
__metadata("design:type", Array)
|
|
61
58
|
], ExercisesModels.prototype, "muscles", void 0);
|
|
62
59
|
__decorate([
|
|
63
|
-
|
|
60
|
+
Column({ type: DataType.BOOLEAN, allowNull: false }),
|
|
64
61
|
__metadata("design:type", Boolean)
|
|
65
62
|
], ExercisesModels.prototype, "homeWorkout", void 0);
|
|
66
63
|
ExercisesModels = __decorate([
|
|
67
|
-
|
|
64
|
+
Table
|
|
68
65
|
], ExercisesModels);
|
|
69
|
-
|
|
66
|
+
export { ExercisesModels };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,39 +7,37 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const PersistedUser_1 = require("./PersistedUser");
|
|
15
|
-
let ExerciseProgress = class ExerciseProgress extends sequelize_typescript_1.Model {
|
|
10
|
+
import { Column, DataType, Default, ForeignKey, Model, Table } from "sequelize-typescript";
|
|
11
|
+
import { PersistedUser } from "./PersistedUser";
|
|
12
|
+
let ExerciseProgress = class ExerciseProgress extends Model {
|
|
16
13
|
};
|
|
17
14
|
__decorate([
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
Default(DataType.UUIDV4),
|
|
16
|
+
Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true }),
|
|
20
17
|
__metadata("design:type", String)
|
|
21
18
|
], ExerciseProgress.prototype, "uuid", void 0);
|
|
22
19
|
__decorate([
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
ForeignKey(() => PersistedUser),
|
|
21
|
+
Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false }),
|
|
25
22
|
__metadata("design:type", String)
|
|
26
23
|
], ExerciseProgress.prototype, "userUuid", void 0);
|
|
27
24
|
__decorate([
|
|
28
|
-
|
|
25
|
+
Column({ type: DataType.TEXT, allowNull: false }),
|
|
29
26
|
__metadata("design:type", String)
|
|
30
27
|
], ExerciseProgress.prototype, "exerciseUuid", void 0);
|
|
31
28
|
__decorate([
|
|
32
|
-
|
|
29
|
+
Column({ type: DataType.TEXT, allowNull: false }),
|
|
33
30
|
__metadata("design:type", String)
|
|
34
31
|
], ExerciseProgress.prototype, "reps", void 0);
|
|
35
32
|
__decorate([
|
|
36
|
-
|
|
33
|
+
Column({ type: DataType.TEXT, allowNull: false }),
|
|
37
34
|
__metadata("design:type", String)
|
|
38
35
|
], ExerciseProgress.prototype, "weight", void 0);
|
|
39
36
|
__decorate([
|
|
40
|
-
|
|
37
|
+
Column({ type: DataType.DATE, allowNull: false }),
|
|
41
38
|
__metadata("design:type", Date)
|
|
42
39
|
], ExerciseProgress.prototype, "date", void 0);
|
|
43
40
|
ExerciseProgress = __decorate([
|
|
44
|
-
|
|
41
|
+
Table
|
|
45
42
|
], ExerciseProgress);
|
|
46
|
-
|
|
43
|
+
export { ExerciseProgress };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,29 +7,27 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
-
let ForgotPasswordTokens = class ForgotPasswordTokens extends sequelize_typescript_1.Model {
|
|
10
|
+
import { Column, DataType, Default, Model, Table } from "sequelize-typescript";
|
|
11
|
+
let ForgotPasswordTokens = class ForgotPasswordTokens extends Model {
|
|
15
12
|
};
|
|
16
13
|
__decorate([
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
Default(DataType.UUIDV4),
|
|
15
|
+
Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true }),
|
|
19
16
|
__metadata("design:type", String)
|
|
20
17
|
], ForgotPasswordTokens.prototype, "uuid", void 0);
|
|
21
18
|
__decorate([
|
|
22
|
-
|
|
19
|
+
Column({ type: DataType.UUID, allowNull: false }),
|
|
23
20
|
__metadata("design:type", String)
|
|
24
21
|
], ForgotPasswordTokens.prototype, "userUuid", void 0);
|
|
25
22
|
__decorate([
|
|
26
|
-
|
|
23
|
+
Column({ type: DataType.TEXT, allowNull: false }),
|
|
27
24
|
__metadata("design:type", String)
|
|
28
25
|
], ForgotPasswordTokens.prototype, "token", void 0);
|
|
29
26
|
__decorate([
|
|
30
|
-
|
|
27
|
+
Column({ type: DataType.DATE, allowNull: false }),
|
|
31
28
|
__metadata("design:type", Date)
|
|
32
29
|
], ForgotPasswordTokens.prototype, "date", void 0);
|
|
33
30
|
ForgotPasswordTokens = __decorate([
|
|
34
|
-
|
|
31
|
+
Table
|
|
35
32
|
], ForgotPasswordTokens);
|
|
36
|
-
|
|
33
|
+
export { ForgotPasswordTokens };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,92 +7,90 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const UserProgressPhoto_1 = require("./UserProgressPhoto");
|
|
17
|
-
let PersistedUser = class PersistedUser extends sequelize_typescript_1.Model {
|
|
10
|
+
import { Column, DataType, Default, HasMany, HasOne, Model, Table } from "sequelize-typescript";
|
|
11
|
+
import { Program } from "./Program";
|
|
12
|
+
import { UserInfo } from "./UserInfo";
|
|
13
|
+
import { UserProgressPhoto } from "./UserProgressPhoto";
|
|
14
|
+
let PersistedUser = class PersistedUser extends Model {
|
|
18
15
|
};
|
|
19
16
|
__decorate([
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
Default(DataType.UUIDV4),
|
|
18
|
+
Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true }),
|
|
22
19
|
__metadata("design:type", String)
|
|
23
20
|
], PersistedUser.prototype, "userUuid", void 0);
|
|
24
21
|
__decorate([
|
|
25
|
-
|
|
22
|
+
Column({ type: DataType.TEXT, allowNull: false, unique: true }),
|
|
26
23
|
__metadata("design:type", String)
|
|
27
24
|
], PersistedUser.prototype, "email", void 0);
|
|
28
25
|
__decorate([
|
|
29
|
-
|
|
26
|
+
Column({ type: DataType.TEXT, allowNull: false }),
|
|
30
27
|
__metadata("design:type", String)
|
|
31
28
|
], PersistedUser.prototype, "password", void 0);
|
|
32
29
|
__decorate([
|
|
33
|
-
|
|
30
|
+
Column({ type: DataType.TEXT, allowNull: true }),
|
|
34
31
|
__metadata("design:type", String)
|
|
35
32
|
], PersistedUser.prototype, "firstName", void 0);
|
|
36
33
|
__decorate([
|
|
37
|
-
|
|
34
|
+
Column({ type: DataType.TEXT, allowNull: true }),
|
|
38
35
|
__metadata("design:type", String)
|
|
39
36
|
], PersistedUser.prototype, "lastName", void 0);
|
|
40
37
|
__decorate([
|
|
41
|
-
|
|
38
|
+
Column({ type: DataType.TEXT, allowNull: true }),
|
|
42
39
|
__metadata("design:type", String)
|
|
43
40
|
], PersistedUser.prototype, "avatar", void 0);
|
|
44
41
|
__decorate([
|
|
45
|
-
|
|
42
|
+
Column({ type: DataType.TEXT, allowNull: true }),
|
|
46
43
|
__metadata("design:type", String)
|
|
47
44
|
], PersistedUser.prototype, "sex", void 0);
|
|
48
45
|
__decorate([
|
|
49
|
-
|
|
46
|
+
Column({ type: DataType.TEXT, allowNull: true }),
|
|
50
47
|
__metadata("design:type", String)
|
|
51
48
|
], PersistedUser.prototype, "goal", void 0);
|
|
52
49
|
__decorate([
|
|
53
|
-
|
|
50
|
+
Column({ type: DataType.TEXT, allowNull: true }),
|
|
54
51
|
__metadata("design:type", String)
|
|
55
52
|
], PersistedUser.prototype, "weightGoal", void 0);
|
|
56
53
|
__decorate([
|
|
57
|
-
|
|
54
|
+
Column({ type: DataType.TEXT, allowNull: true }),
|
|
58
55
|
__metadata("design:type", String)
|
|
59
56
|
], PersistedUser.prototype, "level", void 0);
|
|
60
57
|
__decorate([
|
|
61
|
-
|
|
58
|
+
Column({ type: DataType.TEXT, allowNull: true }),
|
|
62
59
|
__metadata("design:type", String)
|
|
63
60
|
], PersistedUser.prototype, "type", void 0);
|
|
64
61
|
__decorate([
|
|
65
|
-
|
|
62
|
+
Column({ type: DataType.TEXT, allowNull: true }),
|
|
66
63
|
__metadata("design:type", Number)
|
|
67
64
|
], PersistedUser.prototype, "days", void 0);
|
|
68
65
|
__decorate([
|
|
69
|
-
|
|
66
|
+
Column({ type: DataType.TEXT, allowNull: true }),
|
|
70
67
|
__metadata("design:type", String)
|
|
71
68
|
], PersistedUser.prototype, "dateOfBirth", void 0);
|
|
72
69
|
__decorate([
|
|
73
|
-
|
|
70
|
+
Column({ type: DataType.TEXT, allowNull: true }),
|
|
74
71
|
__metadata("design:type", String)
|
|
75
72
|
], PersistedUser.prototype, "metricSystem", void 0);
|
|
76
73
|
__decorate([
|
|
77
|
-
|
|
74
|
+
Column({ type: DataType.TEXT, allowNull: true }),
|
|
78
75
|
__metadata("design:type", String)
|
|
79
76
|
], PersistedUser.prototype, "height", void 0);
|
|
80
77
|
__decorate([
|
|
81
|
-
|
|
78
|
+
Column({ type: DataType.TEXT, allowNull: true }),
|
|
82
79
|
__metadata("design:type", String)
|
|
83
80
|
], PersistedUser.prototype, "weight", void 0);
|
|
84
81
|
__decorate([
|
|
85
|
-
|
|
86
|
-
__metadata("design:type",
|
|
82
|
+
HasOne(() => Program, { foreignKey: "userUuid" }),
|
|
83
|
+
__metadata("design:type", Program)
|
|
87
84
|
], PersistedUser.prototype, "program", void 0);
|
|
88
85
|
__decorate([
|
|
89
|
-
|
|
90
|
-
__metadata("design:type",
|
|
86
|
+
HasOne(() => UserInfo, { foreignKey: "userUuid" }),
|
|
87
|
+
__metadata("design:type", UserInfo)
|
|
91
88
|
], PersistedUser.prototype, "userInfo", void 0);
|
|
92
89
|
__decorate([
|
|
93
|
-
|
|
90
|
+
HasMany(() => UserProgressPhoto, { foreignKey: "userUuid" }),
|
|
94
91
|
__metadata("design:type", Array)
|
|
95
92
|
], PersistedUser.prototype, "progressPhotos", void 0);
|
|
96
93
|
PersistedUser = __decorate([
|
|
97
|
-
|
|
94
|
+
Table
|
|
98
95
|
], PersistedUser);
|
|
99
|
-
|
|
96
|
+
export { PersistedUser };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Workout } from "./Workout";
|
|
2
2
|
import { Model } from "sequelize-typescript";
|
|
3
3
|
import { PersistedUser } from "./PersistedUser";
|
|
4
|
-
import { ProgramModel } from "../../models/ProgramInterfaces";
|
|
4
|
+
import type { ProgramModel } from "../../models/ProgramInterfaces";
|
|
5
5
|
export declare class Program extends Model implements ProgramModel {
|
|
6
6
|
programId: string;
|
|
7
7
|
userUuid: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,31 +7,29 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const PersistedUser_1 = require("./PersistedUser");
|
|
16
|
-
let Program = class Program extends sequelize_typescript_1.Model {
|
|
10
|
+
import { Workout } from "./Workout";
|
|
11
|
+
import { BelongsTo, Column, DataType, Default, HasMany, Model, Table } from "sequelize-typescript";
|
|
12
|
+
import { PersistedUser } from "./PersistedUser";
|
|
13
|
+
let Program = class Program extends Model {
|
|
17
14
|
};
|
|
18
15
|
__decorate([
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
Default(DataType.UUIDV4),
|
|
17
|
+
Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true }),
|
|
21
18
|
__metadata("design:type", String)
|
|
22
19
|
], Program.prototype, "programId", void 0);
|
|
23
20
|
__decorate([
|
|
24
|
-
|
|
21
|
+
Column({ type: DataType.UUID, allowNull: false }),
|
|
25
22
|
__metadata("design:type", String)
|
|
26
23
|
], Program.prototype, "userUuid", void 0);
|
|
27
24
|
__decorate([
|
|
28
|
-
|
|
29
|
-
__metadata("design:type",
|
|
25
|
+
BelongsTo(() => PersistedUser, { foreignKey: "userUuid" }),
|
|
26
|
+
__metadata("design:type", PersistedUser)
|
|
30
27
|
], Program.prototype, "user", void 0);
|
|
31
28
|
__decorate([
|
|
32
|
-
|
|
29
|
+
HasMany(() => Workout, { foreignKey: "programId" }),
|
|
33
30
|
__metadata("design:type", Array)
|
|
34
31
|
], Program.prototype, "workout", void 0);
|
|
35
32
|
Program = __decorate([
|
|
36
|
-
|
|
33
|
+
Table
|
|
37
34
|
], Program);
|
|
38
|
-
|
|
35
|
+
export { Program };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,47 +7,45 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const ExerciseBlueprint_1 = require("./ExerciseBlueprint");
|
|
15
|
-
let ProgramBlueprint = class ProgramBlueprint extends sequelize_typescript_1.Model {
|
|
10
|
+
import { Column, DataType, Default, HasMany, Model, Table, } from "sequelize-typescript";
|
|
11
|
+
import { ExerciseBlueprint } from "./ExerciseBlueprint";
|
|
12
|
+
let ProgramBlueprint = class ProgramBlueprint extends Model {
|
|
16
13
|
};
|
|
17
14
|
__decorate([
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
type:
|
|
21
|
-
defaultValue:
|
|
15
|
+
Default(DataType.UUIDV4),
|
|
16
|
+
Column({
|
|
17
|
+
type: DataType.UUID,
|
|
18
|
+
defaultValue: DataType.UUID,
|
|
22
19
|
allowNull: false,
|
|
23
20
|
primaryKey: true,
|
|
24
21
|
}),
|
|
25
22
|
__metadata("design:type", String)
|
|
26
23
|
], ProgramBlueprint.prototype, "programId", void 0);
|
|
27
24
|
__decorate([
|
|
28
|
-
|
|
25
|
+
Column({ type: DataType.TEXT, allowNull: false, unique: true }),
|
|
29
26
|
__metadata("design:type", String)
|
|
30
27
|
], ProgramBlueprint.prototype, "title", void 0);
|
|
31
28
|
__decorate([
|
|
32
|
-
|
|
29
|
+
Column({ type: DataType.TEXT, allowNull: false }),
|
|
33
30
|
__metadata("design:type", String)
|
|
34
31
|
], ProgramBlueprint.prototype, "level", void 0);
|
|
35
32
|
__decorate([
|
|
36
|
-
|
|
33
|
+
Column({ type: DataType.INTEGER, allowNull: false }),
|
|
37
34
|
__metadata("design:type", Number)
|
|
38
35
|
], ProgramBlueprint.prototype, "numberOfDays", void 0);
|
|
39
36
|
__decorate([
|
|
40
|
-
|
|
37
|
+
Column({ type: DataType.INTEGER, allowNull: false }),
|
|
41
38
|
__metadata("design:type", Number)
|
|
42
39
|
], ProgramBlueprint.prototype, "exercisesPerWorkout", void 0);
|
|
43
40
|
__decorate([
|
|
44
|
-
|
|
41
|
+
Column({ type: DataType.ARRAY(DataType.JSONB), allowNull: false }),
|
|
45
42
|
__metadata("design:type", Array)
|
|
46
43
|
], ProgramBlueprint.prototype, "workoutNames", void 0);
|
|
47
44
|
__decorate([
|
|
48
|
-
|
|
45
|
+
HasMany(() => ExerciseBlueprint, { foreignKey: "programId" }),
|
|
49
46
|
__metadata("design:type", Array)
|
|
50
47
|
], ProgramBlueprint.prototype, "exercises", void 0);
|
|
51
48
|
ProgramBlueprint = __decorate([
|
|
52
|
-
|
|
49
|
+
Table
|
|
53
50
|
], ProgramBlueprint);
|
|
54
|
-
|
|
51
|
+
export { ProgramBlueprint };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,16 +7,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
14
|
-
let RefreshToken = class RefreshToken extends sequelize_typescript_1.Model {
|
|
10
|
+
import { Column, DataType, Model, Table } from "sequelize-typescript";
|
|
11
|
+
let RefreshToken = class RefreshToken extends Model {
|
|
15
12
|
};
|
|
16
13
|
__decorate([
|
|
17
|
-
|
|
14
|
+
Column({ type: DataType.TEXT, allowNull: false }),
|
|
18
15
|
__metadata("design:type", String)
|
|
19
16
|
], RefreshToken.prototype, "refreshToken", void 0);
|
|
20
17
|
RefreshToken = __decorate([
|
|
21
|
-
|
|
18
|
+
Table
|
|
22
19
|
], RefreshToken);
|
|
23
|
-
|
|
20
|
+
export { RefreshToken };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Exercise } from "./Exercise";
|
|
2
2
|
import { Model } from "sequelize-typescript";
|
|
3
3
|
import { Workout } from "./Workout";
|
|
4
|
-
|
|
5
|
-
export declare class Superset extends Model implements SupersetModel {
|
|
4
|
+
export declare class Superset extends Model {
|
|
6
5
|
uuid: string;
|
|
7
6
|
workout: Workout;
|
|
8
7
|
exercise: Exercise[];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,28 +7,26 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const Workout_1 = require("./Workout");
|
|
17
|
-
let Superset = class Superset extends sequelize_typescript_1.Model {
|
|
10
|
+
import { Exercise } from "./Exercise";
|
|
11
|
+
import { SupersetExercise } from "./SupersetExercise";
|
|
12
|
+
import { BelongsTo, BelongsToMany, Column, DataType, Default, Model, Table } from "sequelize-typescript";
|
|
13
|
+
import { Workout } from "./Workout";
|
|
14
|
+
let Superset = class Superset extends Model {
|
|
18
15
|
};
|
|
19
16
|
__decorate([
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
Default(DataType.UUIDV4),
|
|
18
|
+
Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true }),
|
|
22
19
|
__metadata("design:type", String)
|
|
23
20
|
], Superset.prototype, "uuid", void 0);
|
|
24
21
|
__decorate([
|
|
25
|
-
|
|
26
|
-
__metadata("design:type",
|
|
22
|
+
BelongsTo(() => Workout, { foreignKey: "uuid" }),
|
|
23
|
+
__metadata("design:type", Workout)
|
|
27
24
|
], Superset.prototype, "workout", void 0);
|
|
28
25
|
__decorate([
|
|
29
|
-
|
|
26
|
+
BelongsToMany(() => Exercise, () => SupersetExercise),
|
|
30
27
|
__metadata("design:type", Array)
|
|
31
28
|
], Superset.prototype, "exercise", void 0);
|
|
32
29
|
Superset = __decorate([
|
|
33
|
-
|
|
30
|
+
Table
|
|
34
31
|
], Superset);
|
|
35
|
-
|
|
32
|
+
export { Superset };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Model } from "sequelize-typescript";
|
|
2
|
-
|
|
3
|
-
export declare class SupersetExercise extends Model<SupersetExercise> implements SupersetExerciseModel {
|
|
2
|
+
export declare class SupersetExercise extends Model {
|
|
4
3
|
SupersetUuid: string;
|
|
5
4
|
ExerciseUuid: string;
|
|
6
5
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,40 +7,38 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
16
|
-
let SupersetExercise = class SupersetExercise extends sequelize_typescript_1.Model {
|
|
10
|
+
import { Exercise } from "./Exercise";
|
|
11
|
+
import { Superset } from "./Superset";
|
|
12
|
+
import { Column, DataType, ForeignKey, Model, Table } from "sequelize-typescript";
|
|
13
|
+
let SupersetExercise = class SupersetExercise extends Model {
|
|
17
14
|
};
|
|
18
15
|
__decorate([
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
type:
|
|
16
|
+
ForeignKey(() => Superset),
|
|
17
|
+
Column({
|
|
18
|
+
type: DataType.UUID,
|
|
22
19
|
allowNull: false,
|
|
23
20
|
primaryKey: true,
|
|
24
21
|
references: {
|
|
25
|
-
model:
|
|
22
|
+
model: Superset,
|
|
26
23
|
key: 'uuid'
|
|
27
24
|
}
|
|
28
25
|
}),
|
|
29
26
|
__metadata("design:type", String)
|
|
30
27
|
], SupersetExercise.prototype, "SupersetUuid", void 0);
|
|
31
28
|
__decorate([
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
type:
|
|
29
|
+
ForeignKey(() => Exercise),
|
|
30
|
+
Column({
|
|
31
|
+
type: DataType.UUID,
|
|
35
32
|
allowNull: false,
|
|
36
33
|
primaryKey: true,
|
|
37
34
|
references: {
|
|
38
|
-
model:
|
|
35
|
+
model: Exercise,
|
|
39
36
|
key: 'uuid',
|
|
40
37
|
}
|
|
41
38
|
}),
|
|
42
39
|
__metadata("design:type", String)
|
|
43
40
|
], SupersetExercise.prototype, "ExerciseUuid", void 0);
|
|
44
41
|
SupersetExercise = __decorate([
|
|
45
|
-
|
|
42
|
+
Table
|
|
46
43
|
], SupersetExercise);
|
|
47
|
-
|
|
44
|
+
export { SupersetExercise };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,38 +7,36 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
15
|
-
let UserInfo = class UserInfo extends sequelize_typescript_1.Model {
|
|
10
|
+
import { PersistedUser } from "./PersistedUser";
|
|
11
|
+
import { BelongsTo, Column, DataType, Default, Model, Table } from "sequelize-typescript";
|
|
12
|
+
let UserInfo = class UserInfo extends Model {
|
|
16
13
|
};
|
|
17
14
|
__decorate([
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
Default(DataType.UUIDV4),
|
|
16
|
+
Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true }),
|
|
20
17
|
__metadata("design:type", String)
|
|
21
18
|
], UserInfo.prototype, "userUuid", void 0);
|
|
22
19
|
__decorate([
|
|
23
|
-
|
|
20
|
+
Column({ type: DataType.TEXT, allowNull: false }),
|
|
24
21
|
__metadata("design:type", String)
|
|
25
22
|
], UserInfo.prototype, "height", void 0);
|
|
26
23
|
__decorate([
|
|
27
|
-
|
|
24
|
+
Column({ type: DataType.TEXT, allowNull: false }),
|
|
28
25
|
__metadata("design:type", String)
|
|
29
26
|
], UserInfo.prototype, "weight", void 0);
|
|
30
27
|
__decorate([
|
|
31
|
-
|
|
28
|
+
Column({ type: DataType.TEXT, allowNull: true }),
|
|
32
29
|
__metadata("design:type", String)
|
|
33
30
|
], UserInfo.prototype, "beforePhoto", void 0);
|
|
34
31
|
__decorate([
|
|
35
|
-
|
|
32
|
+
Column({ type: DataType.TEXT, allowNull: true }),
|
|
36
33
|
__metadata("design:type", String)
|
|
37
34
|
], UserInfo.prototype, "afterPhoto", void 0);
|
|
38
35
|
__decorate([
|
|
39
|
-
|
|
40
|
-
__metadata("design:type",
|
|
36
|
+
BelongsTo(() => PersistedUser, { foreignKey: "userUuid" }),
|
|
37
|
+
__metadata("design:type", PersistedUser)
|
|
41
38
|
], UserInfo.prototype, "user", void 0);
|
|
42
39
|
UserInfo = __decorate([
|
|
43
|
-
|
|
40
|
+
Table
|
|
44
41
|
], UserInfo);
|
|
45
|
-
|
|
42
|
+
export { UserInfo };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,34 +7,32 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
15
|
-
let UserProgressPhoto = class UserProgressPhoto extends sequelize_typescript_1.Model {
|
|
10
|
+
import { PersistedUser } from "./PersistedUser";
|
|
11
|
+
import { BelongsTo, Column, DataType, ForeignKey, Model, Table } from "sequelize-typescript";
|
|
12
|
+
let UserProgressPhoto = class UserProgressPhoto extends Model {
|
|
16
13
|
};
|
|
17
14
|
__decorate([
|
|
18
|
-
|
|
15
|
+
Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false, primaryKey: true }),
|
|
19
16
|
__metadata("design:type", String)
|
|
20
17
|
], UserProgressPhoto.prototype, "uuid", void 0);
|
|
21
18
|
__decorate([
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
ForeignKey(() => PersistedUser),
|
|
20
|
+
Column({ type: DataType.UUID, defaultValue: DataType.UUID, allowNull: false }),
|
|
24
21
|
__metadata("design:type", String)
|
|
25
22
|
], UserProgressPhoto.prototype, "userUuid", void 0);
|
|
26
23
|
__decorate([
|
|
27
|
-
|
|
24
|
+
Column({ type: DataType.TEXT, allowNull: true }),
|
|
28
25
|
__metadata("design:type", String)
|
|
29
26
|
], UserProgressPhoto.prototype, "progressPhoto", void 0);
|
|
30
27
|
__decorate([
|
|
31
|
-
|
|
28
|
+
Column({ type: DataType.DATE, allowNull: false }),
|
|
32
29
|
__metadata("design:type", Date)
|
|
33
30
|
], UserProgressPhoto.prototype, "date", void 0);
|
|
34
31
|
__decorate([
|
|
35
|
-
|
|
36
|
-
__metadata("design:type",
|
|
32
|
+
BelongsTo(() => PersistedUser, { foreignKey: "userUuid" }),
|
|
33
|
+
__metadata("design:type", PersistedUser)
|
|
37
34
|
], UserProgressPhoto.prototype, "user", void 0);
|
|
38
35
|
UserProgressPhoto = __decorate([
|
|
39
|
-
|
|
36
|
+
Table
|
|
40
37
|
], UserProgressPhoto);
|
|
41
|
-
|
|
38
|
+
export { UserProgressPhoto };
|
|
@@ -2,7 +2,7 @@ import { Exercise } from "./Exercise";
|
|
|
2
2
|
import { Program } from "./Program";
|
|
3
3
|
import { Superset } from "./Superset";
|
|
4
4
|
import { Model } from "sequelize-typescript";
|
|
5
|
-
import { WorkoutModel } from "../../models/WorkoutInterfaces";
|
|
5
|
+
import type { WorkoutModel } from "../../models/WorkoutInterfaces";
|
|
6
6
|
export declare class Workout extends Model implements WorkoutModel {
|
|
7
7
|
uuid: string;
|
|
8
8
|
isFinished: boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,46 +7,44 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
18
|
-
let Workout = class Workout extends sequelize_typescript_1.Model {
|
|
10
|
+
import { Exercise } from "./Exercise";
|
|
11
|
+
import { Program } from "./Program";
|
|
12
|
+
import { WorkoutExercise } from "./WorkoutExercise";
|
|
13
|
+
import { Superset } from "./Superset";
|
|
14
|
+
import { BelongsTo, BelongsToMany, Column, DataType, Default, HasMany, Model, Table, } from "sequelize-typescript";
|
|
15
|
+
let Workout = class Workout extends Model {
|
|
19
16
|
};
|
|
20
17
|
__decorate([
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
type:
|
|
24
|
-
defaultValue:
|
|
18
|
+
Default(DataType.UUIDV4),
|
|
19
|
+
Column({
|
|
20
|
+
type: DataType.UUID,
|
|
21
|
+
defaultValue: DataType.UUID,
|
|
25
22
|
allowNull: false,
|
|
26
23
|
primaryKey: true,
|
|
27
24
|
}),
|
|
28
25
|
__metadata("design:type", String)
|
|
29
26
|
], Workout.prototype, "uuid", void 0);
|
|
30
27
|
__decorate([
|
|
31
|
-
|
|
28
|
+
Column({ type: DataType.BOOLEAN, allowNull: false }),
|
|
32
29
|
__metadata("design:type", Boolean)
|
|
33
30
|
], Workout.prototype, "isFinished", void 0);
|
|
34
31
|
__decorate([
|
|
35
|
-
|
|
32
|
+
Column({ type: DataType.JSONB, allowNull: false }),
|
|
36
33
|
__metadata("design:type", Object)
|
|
37
34
|
], Workout.prototype, "info", void 0);
|
|
38
35
|
__decorate([
|
|
39
|
-
|
|
40
|
-
__metadata("design:type",
|
|
36
|
+
BelongsToMany(() => Exercise, () => WorkoutExercise),
|
|
37
|
+
__metadata("design:type", Exercise)
|
|
41
38
|
], Workout.prototype, "exercise", void 0);
|
|
42
39
|
__decorate([
|
|
43
|
-
|
|
44
|
-
__metadata("design:type",
|
|
40
|
+
BelongsTo(() => Program, { foreignKey: "programId" }),
|
|
41
|
+
__metadata("design:type", Program)
|
|
45
42
|
], Workout.prototype, "program", void 0);
|
|
46
43
|
__decorate([
|
|
47
|
-
|
|
44
|
+
HasMany(() => Superset, { foreignKey: "uuid" }),
|
|
48
45
|
__metadata("design:type", Array)
|
|
49
46
|
], Workout.prototype, "superset", void 0);
|
|
50
47
|
Workout = __decorate([
|
|
51
|
-
|
|
48
|
+
Table
|
|
52
49
|
], Workout);
|
|
53
|
-
|
|
50
|
+
export { Workout };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Model } from "sequelize-typescript";
|
|
2
|
-
import { WorkoutExerciseModel } from "../../models/WorkoutInterfaces";
|
|
2
|
+
import type { WorkoutExerciseModel } from "../../models/WorkoutInterfaces";
|
|
3
3
|
export declare class WorkoutExercise extends Model<WorkoutExercise> implements WorkoutExerciseModel {
|
|
4
4
|
WorkoutUuid: string;
|
|
5
5
|
ExerciseUuid: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,17 +7,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const sequelize_typescript_1 = require("sequelize-typescript");
|
|
16
|
-
let WorkoutExercise = class WorkoutExercise extends sequelize_typescript_1.Model {
|
|
10
|
+
import { Workout } from "./Workout";
|
|
11
|
+
import { Exercise } from "./Exercise";
|
|
12
|
+
import { Column, DataType, ForeignKey, Model, Table } from "sequelize-typescript";
|
|
13
|
+
let WorkoutExercise = class WorkoutExercise extends Model {
|
|
17
14
|
};
|
|
18
15
|
__decorate([
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
type:
|
|
16
|
+
ForeignKey(() => Workout),
|
|
17
|
+
Column({
|
|
18
|
+
type: DataType.UUID,
|
|
22
19
|
allowNull: false,
|
|
23
20
|
primaryKey: true,
|
|
24
21
|
references: {
|
|
@@ -29,9 +26,9 @@ __decorate([
|
|
|
29
26
|
__metadata("design:type", String)
|
|
30
27
|
], WorkoutExercise.prototype, "WorkoutUuid", void 0);
|
|
31
28
|
__decorate([
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
type:
|
|
29
|
+
ForeignKey(() => Exercise),
|
|
30
|
+
Column({
|
|
31
|
+
type: DataType.UUID,
|
|
35
32
|
allowNull: false,
|
|
36
33
|
primaryKey: true,
|
|
37
34
|
references: {
|
|
@@ -42,6 +39,6 @@ __decorate([
|
|
|
42
39
|
__metadata("design:type", String)
|
|
43
40
|
], WorkoutExercise.prototype, "ExerciseUuid", void 0);
|
|
44
41
|
WorkoutExercise = __decorate([
|
|
45
|
-
|
|
42
|
+
Table
|
|
46
43
|
], WorkoutExercise);
|
|
47
|
-
|
|
44
|
+
export { WorkoutExercise };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|