easywork-common-lib 1.0.648 → 1.0.650
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/entities/capacitation/course-assigned.entity.d.ts +4 -0
- package/dist/entities/{helpers/sales/agent/h_agent_recruiment_stage.entity.js → capacitation/course-assigned.entity.js} +11 -23
- package/dist/entities/capacitation/course-assigned.entity.js.map +1 -0
- package/dist/entities/capacitation/course-folder-page.entity.d.ts +3 -1
- package/dist/entities/capacitation/course-folder-page.entity.js +6 -0
- package/dist/entities/capacitation/course-folder-page.entity.js.map +1 -1
- package/dist/entities/capacitation/course-progress.entity.d.ts +14 -0
- package/dist/entities/capacitation/course-progress.entity.js +53 -0
- package/dist/entities/capacitation/course-progress.entity.js.map +1 -0
- package/dist/entities/capacitation/course.entity.d.ts +6 -1
- package/dist/entities/capacitation/course.entity.js +24 -9
- package/dist/entities/capacitation/course.entity.js.map +1 -1
- package/dist/entities/capacitation/folder-page.entity.d.ts +11 -0
- package/dist/entities/capacitation/folder-page.entity.js +57 -0
- package/dist/entities/capacitation/folder-page.entity.js.map +1 -0
- package/dist/entities/capacitation/index.d.ts +1 -0
- package/dist/entities/capacitation/index.js +3 -1
- package/dist/entities/capacitation/index.js.map +1 -1
- package/dist/entities/group.entity.d.ts +4 -2
- package/dist/entities/group.entity.js +8 -2
- package/dist/entities/group.entity.js.map +1 -1
- package/dist/entities/user.entity.d.ts +13 -10
- package/dist/entities/user.entity.js +67 -46
- package/dist/entities/user.entity.js.map +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/entities/helpers/sales/agent/h_agent_recruiment_stage.entity.d.ts +0 -5
- package/dist/entities/helpers/sales/agent/h_agent_recruiment_stage.entity.js.map +0 -1
- package/dist/entities/helpers/sales/poliza/poliza_file.entity.d.ts +0 -11
- package/dist/entities/helpers/sales/poliza/poliza_file.entity.js +0 -68
- package/dist/entities/helpers/sales/poliza/poliza_file.entity.js.map +0 -1
|
@@ -9,32 +9,20 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
13
|
-
const base_entity_1 = require("../../../../common/database/base.entity");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
12
|
+
exports.CourseAssigned = void 0;
|
|
15
13
|
const typeorm_1 = require("typeorm");
|
|
16
14
|
const swagger_1 = require("@nestjs/swagger");
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
const base_entity_1 = require("../../common/database/base.entity");
|
|
16
|
+
let CourseAssigned = class CourseAssigned extends base_entity_1.EntityBase {
|
|
17
|
+
progress;
|
|
20
18
|
};
|
|
21
|
-
exports.
|
|
19
|
+
exports.CourseAssigned = CourseAssigned;
|
|
22
20
|
__decorate([
|
|
23
|
-
(0, swagger_1.ApiProperty)({
|
|
24
|
-
|
|
25
|
-
description: "Name of the Agent Recruiment stage",
|
|
26
|
-
minLength: 1,
|
|
27
|
-
}),
|
|
28
|
-
(0, class_validator_1.MinLength)(1),
|
|
29
|
-
(0, typeorm_1.Column)({ unique: true }),
|
|
30
|
-
__metadata("design:type", String)
|
|
31
|
-
], AgentRecruimentStage.prototype, "name", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, swagger_1.ApiProperty)({ type: Number, description: "Index of the lead stage" }),
|
|
34
|
-
(0, typeorm_1.Column)(),
|
|
21
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Capacitation module progress' }),
|
|
22
|
+
(0, typeorm_1.Column)({ type: 'float', default: 0 }),
|
|
35
23
|
__metadata("design:type", Number)
|
|
36
|
-
],
|
|
37
|
-
exports.
|
|
24
|
+
], CourseAssigned.prototype, "progress", void 0);
|
|
25
|
+
exports.CourseAssigned = CourseAssigned = __decorate([
|
|
38
26
|
(0, typeorm_1.Entity)()
|
|
39
|
-
],
|
|
40
|
-
//# sourceMappingURL=
|
|
27
|
+
], CourseAssigned);
|
|
28
|
+
//# sourceMappingURL=course-assigned.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"course-assigned.entity.js","sourceRoot":"","sources":["../../../src/entities/capacitation/course-assigned.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyC;AACzC,6CAA8C;AAE9C,mEAA+D;AAKxD,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,wBAAU;IAG5C,QAAQ,CAAS;CAOlB,CAAA;AAVY,wCAAc;AAGzB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;IAC1E,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;gDACrB;yBAHN,cAAc;IAD1B,IAAA,gBAAM,GAAE;GACI,cAAc,CAU1B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { LMSFileUploaded } from 'common';
|
|
1
2
|
import { EntityBase } from '../../common/database/base.entity';
|
|
2
3
|
import { CourseFolder } from './course-folder.entity';
|
|
3
|
-
import {
|
|
4
|
+
import { CourseProgress } from './course-progress.entity';
|
|
4
5
|
export declare class CourseFolderPage extends EntityBase {
|
|
5
6
|
name: string;
|
|
6
7
|
description?: string;
|
|
@@ -9,4 +10,5 @@ export declare class CourseFolderPage extends EntityBase {
|
|
|
9
10
|
order: number;
|
|
10
11
|
files?: LMSFileUploaded[];
|
|
11
12
|
folder: CourseFolder;
|
|
13
|
+
courseProgress: CourseProgress[];
|
|
12
14
|
}
|
|
@@ -14,6 +14,7 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const swagger_1 = require("@nestjs/swagger");
|
|
15
15
|
const base_entity_1 = require("../../common/database/base.entity");
|
|
16
16
|
const course_folder_entity_1 = require("./course-folder.entity");
|
|
17
|
+
const course_progress_entity_1 = require("./course-progress.entity");
|
|
17
18
|
let CourseFolderPage = class CourseFolderPage extends base_entity_1.EntityBase {
|
|
18
19
|
name;
|
|
19
20
|
description;
|
|
@@ -22,6 +23,7 @@ let CourseFolderPage = class CourseFolderPage extends base_entity_1.EntityBase {
|
|
|
22
23
|
order;
|
|
23
24
|
files;
|
|
24
25
|
folder;
|
|
26
|
+
courseProgress;
|
|
25
27
|
};
|
|
26
28
|
exports.CourseFolderPage = CourseFolderPage;
|
|
27
29
|
__decorate([
|
|
@@ -61,6 +63,10 @@ __decorate([
|
|
|
61
63
|
(0, typeorm_1.ManyToOne)(() => course_folder_entity_1.CourseFolder, folder => folder.pages, { onDelete: 'CASCADE' }),
|
|
62
64
|
__metadata("design:type", course_folder_entity_1.CourseFolder)
|
|
63
65
|
], CourseFolderPage.prototype, "folder", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.OneToMany)(() => course_progress_entity_1.CourseProgress, courseProgress => courseProgress.lastCompletedPage),
|
|
68
|
+
__metadata("design:type", Array)
|
|
69
|
+
], CourseFolderPage.prototype, "courseProgress", void 0);
|
|
64
70
|
exports.CourseFolderPage = CourseFolderPage = __decorate([
|
|
65
71
|
(0, typeorm_1.Entity)()
|
|
66
72
|
], CourseFolderPage);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"course-folder-page.entity.js","sourceRoot":"","sources":["../../../src/entities/capacitation/course-folder-page.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"course-folder-page.entity.js","sourceRoot":"","sources":["../../../src/entities/capacitation/course-folder-page.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+D;AAC/D,6CAA8C;AAI9C,mEAA+D;AAC/D,iEAAsD;AACtD,qEAA0D;AAGnD,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,wBAAU;IAG9C,IAAI,CAA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BAAS,EAAC,GAAG,EAAE,CAAC,mCAAY,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BACvE,mCAAY;gDAAC;AAGrB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAc,EAAE,cAAc,CAAC,EAAE,CAAC,cAAc,CAAC,iBAAiB,CAAC;;wDACnD;2BAhCtB,gBAAgB;IAD5B,IAAA,gBAAM,GAAE;GACI,gBAAgB,CAiC5B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Course } from './course.entity';
|
|
2
|
+
import { CourseFolderPage } from './course-folder-page.entity';
|
|
3
|
+
import { User } from '../user.entity';
|
|
4
|
+
export declare class CourseProgress {
|
|
5
|
+
id: number;
|
|
6
|
+
user: User;
|
|
7
|
+
course: Course;
|
|
8
|
+
lastCompletedPage: CourseFolderPage | null;
|
|
9
|
+
progress: number;
|
|
10
|
+
completedPages: {
|
|
11
|
+
pageId: number;
|
|
12
|
+
completedAt: Date;
|
|
13
|
+
}[] | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CourseProgress = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const course_entity_1 = require("./course.entity");
|
|
15
|
+
const course_folder_page_entity_1 = require("./course-folder-page.entity");
|
|
16
|
+
const user_entity_1 = require("../user.entity");
|
|
17
|
+
let CourseProgress = class CourseProgress {
|
|
18
|
+
id;
|
|
19
|
+
user;
|
|
20
|
+
course;
|
|
21
|
+
lastCompletedPage;
|
|
22
|
+
progress;
|
|
23
|
+
completedPages;
|
|
24
|
+
};
|
|
25
|
+
exports.CourseProgress = CourseProgress;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], CourseProgress.prototype, "id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, user => user.courseProgress),
|
|
32
|
+
__metadata("design:type", user_entity_1.User)
|
|
33
|
+
], CourseProgress.prototype, "user", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.ManyToOne)(() => course_entity_1.Course, course => course.courseProgress),
|
|
36
|
+
__metadata("design:type", course_entity_1.Course)
|
|
37
|
+
], CourseProgress.prototype, "course", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.ManyToOne)(() => course_folder_page_entity_1.CourseFolderPage, page => page.courseProgress, { nullable: true }),
|
|
40
|
+
__metadata("design:type", course_folder_page_entity_1.CourseFolderPage)
|
|
41
|
+
], CourseProgress.prototype, "lastCompletedPage", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ default: 0 }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], CourseProgress.prototype, "progress", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
48
|
+
__metadata("design:type", Array)
|
|
49
|
+
], CourseProgress.prototype, "completedPages", void 0);
|
|
50
|
+
exports.CourseProgress = CourseProgress = __decorate([
|
|
51
|
+
(0, typeorm_1.Entity)()
|
|
52
|
+
], CourseProgress);
|
|
53
|
+
//# sourceMappingURL=course-progress.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"course-progress.entity.js","sourceRoot":"","sources":["../../../src/entities/capacitation/course-progress.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4E;AAC5E,mDAAyC;AACzC,2EAA+D;AAC/D,gDAAsC;AAG/B,IAAM,cAAc,GAApB,MAAM,cAAc;IAEzB,EAAE,CAAS;IAGX,IAAI,CAAO;IAGX,MAAM,CAAS;IAGf,iBAAiB,CAA0B;IAG3C,QAAQ,CAAS;IAGjB,cAAc,CAAiD;CAChE,CAAA;AAlBY,wCAAc;AAEzB;IADC,IAAA,gCAAsB,GAAE;;0CACd;AAGX;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC;8BAC7C,kBAAI;4CAAC;AAGX;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,sBAAM,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC;8BACjD,sBAAM;8CAAC;AAGf;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,4CAAgB,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAChE,4CAAgB;yDAAQ;AAG3C;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;gDACN;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACqB;yBAjBpD,cAAc;IAD1B,IAAA,gBAAM,GAAE;GACI,cAAc,CAkB1B"}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { EntityBase } from '../../common/database/base.entity';
|
|
2
2
|
import { CourseFolder } from './course-folder.entity';
|
|
3
|
+
import { CourseProgress } from './course-progress.entity';
|
|
4
|
+
import { User } from '../user.entity';
|
|
5
|
+
import { Group } from '../group.entity';
|
|
3
6
|
export declare class Course extends EntityBase {
|
|
4
7
|
name: string;
|
|
5
8
|
description?: string;
|
|
6
9
|
order: number;
|
|
7
10
|
openToAll: boolean;
|
|
8
11
|
private: boolean;
|
|
9
|
-
openAfterNDays: boolean;
|
|
10
12
|
coverPhotoSrc?: string;
|
|
11
13
|
isPublished: boolean;
|
|
12
14
|
folders: CourseFolder[];
|
|
15
|
+
createdBy: User;
|
|
16
|
+
groups: Group[];
|
|
17
|
+
courseProgress: CourseProgress[];
|
|
13
18
|
}
|
|
@@ -14,16 +14,21 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const swagger_1 = require("@nestjs/swagger");
|
|
15
15
|
const base_entity_1 = require("../../common/database/base.entity");
|
|
16
16
|
const course_folder_entity_1 = require("./course-folder.entity");
|
|
17
|
+
const course_progress_entity_1 = require("./course-progress.entity");
|
|
18
|
+
const user_entity_1 = require("../user.entity");
|
|
19
|
+
const group_entity_1 = require("../group.entity");
|
|
17
20
|
let Course = class Course extends base_entity_1.EntityBase {
|
|
18
21
|
name;
|
|
19
22
|
description;
|
|
20
23
|
order;
|
|
21
24
|
openToAll;
|
|
22
25
|
private;
|
|
23
|
-
openAfterNDays;
|
|
24
26
|
coverPhotoSrc;
|
|
25
27
|
isPublished;
|
|
26
28
|
folders;
|
|
29
|
+
createdBy;
|
|
30
|
+
groups;
|
|
31
|
+
courseProgress;
|
|
27
32
|
};
|
|
28
33
|
exports.Course = Course;
|
|
29
34
|
__decorate([
|
|
@@ -69,14 +74,6 @@ __decorate([
|
|
|
69
74
|
(0, typeorm_1.Column)({ default: false }),
|
|
70
75
|
__metadata("design:type", Boolean)
|
|
71
76
|
], Course.prototype, "private", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
(0, swagger_1.ApiProperty)({
|
|
74
|
-
type: Boolean,
|
|
75
|
-
required: false,
|
|
76
|
-
}),
|
|
77
|
-
(0, typeorm_1.Column)({ default: false }),
|
|
78
|
-
__metadata("design:type", Boolean)
|
|
79
|
-
], Course.prototype, "openAfterNDays", void 0);
|
|
80
77
|
__decorate([
|
|
81
78
|
(0, swagger_1.ApiProperty)({ type: String, description: 'Cover photo URL', nullable: true }),
|
|
82
79
|
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
@@ -95,6 +92,24 @@ __decorate([
|
|
|
95
92
|
(0, typeorm_1.OneToMany)(() => course_folder_entity_1.CourseFolder, folder => folder.course),
|
|
96
93
|
__metadata("design:type", Array)
|
|
97
94
|
], Course.prototype, "folders", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, swagger_1.ApiProperty)({
|
|
97
|
+
type: () => user_entity_1.User,
|
|
98
|
+
description: 'User who creates the course',
|
|
99
|
+
required: false,
|
|
100
|
+
}),
|
|
101
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, user => user.createdCourses),
|
|
102
|
+
__metadata("design:type", user_entity_1.User)
|
|
103
|
+
], Course.prototype, "createdBy", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, typeorm_1.ManyToMany)(() => group_entity_1.Group, group => group.courses),
|
|
106
|
+
(0, typeorm_1.JoinTable)(),
|
|
107
|
+
__metadata("design:type", Array)
|
|
108
|
+
], Course.prototype, "groups", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, typeorm_1.OneToMany)(() => course_progress_entity_1.CourseProgress, courseProgress => courseProgress.course),
|
|
111
|
+
__metadata("design:type", Array)
|
|
112
|
+
], Course.prototype, "courseProgress", void 0);
|
|
98
113
|
exports.Course = Course = __decorate([
|
|
99
114
|
(0, typeorm_1.Entity)()
|
|
100
115
|
], Course);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"course.entity.js","sourceRoot":"","sources":["../../../src/entities/capacitation/course.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"course.entity.js","sourceRoot":"","sources":["../../../src/entities/capacitation/course.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAsF;AACtF,6CAA8C;AAE9C,mEAA+D;AAC/D,iEAAsD;AACtD,qEAA0D;AAC1D,gDAAsC;AACtC,kDAAwC;AAGjC,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,wBAAU;IAOpC,IAAI,CAAS;IAQb,WAAW,CAAU;IAQrB,KAAK,CAAS;IAOd,SAAS,CAAU;IAOnB,OAAO,CAAU;IAIjB,aAAa,CAAU;IAOvB,WAAW,CAAU;IAIrB,OAAO,CAAiB;IAQxB,SAAS,CAAO;IAIhB,MAAM,CAAU;IAGhB,cAAc,CAAmB;CAClC,CAAA;AApEY,wBAAM;AAOjB;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,aAAa;QAC1B,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;oCAC5B;AAQb;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,oBAAoB;QACjC,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACpB;AAQrB;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,cAAc;QAC3B,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,KAAK,E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AG,EAAE,CAAC,oBAAK,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;IAC/C,IAAA,mBAAS,GAAE;;sCACI;AAGhB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAc,EAAE,cAAc,CAAC,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC;;8CACxC;iBAnEtB,MAAM;IADlB,IAAA,gBAAM,GAAE;GACI,MAAM,CAoElB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EntityBase } from '../../common/database/base.entity';
|
|
2
|
+
import { CourseFolder } from './course-folder.entity';
|
|
3
|
+
import { LMSFileUploaded } from 'common';
|
|
4
|
+
export declare class FolderPage extends EntityBase {
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
isCompleted: boolean;
|
|
8
|
+
isPublished: boolean;
|
|
9
|
+
files?: LMSFileUploaded[];
|
|
10
|
+
folder: CourseFolder;
|
|
11
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
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;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FolderPage = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const base_entity_1 = require("../../common/database/base.entity");
|
|
16
|
+
const course_folder_entity_1 = require("./course-folder.entity");
|
|
17
|
+
let FolderPage = class FolderPage extends base_entity_1.EntityBase {
|
|
18
|
+
name;
|
|
19
|
+
description;
|
|
20
|
+
isCompleted;
|
|
21
|
+
isPublished;
|
|
22
|
+
files;
|
|
23
|
+
folder;
|
|
24
|
+
};
|
|
25
|
+
exports.FolderPage = FolderPage;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Folder page name' }),
|
|
28
|
+
(0, typeorm_1.Column)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], FolderPage.prototype, "name", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Folder page description', nullable: true }),
|
|
33
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], FolderPage.prototype, "description", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
38
|
+
__metadata("design:type", Boolean)
|
|
39
|
+
], FolderPage.prototype, "isCompleted", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
42
|
+
__metadata("design:type", Boolean)
|
|
43
|
+
], FolderPage.prototype, "isPublished", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, swagger_1.ApiProperty)({ isArray: true, type: String, description: 'Files uploaded to the content' }),
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true, default: [] }),
|
|
47
|
+
__metadata("design:type", Array)
|
|
48
|
+
], FolderPage.prototype, "files", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, swagger_1.ApiProperty)({ type: () => course_folder_entity_1.CourseFolder, description: 'Folder owner of the page', required: false }),
|
|
51
|
+
(0, typeorm_1.ManyToOne)(() => course_folder_entity_1.CourseFolder, folder => folder.pages, { onDelete: 'CASCADE' }),
|
|
52
|
+
__metadata("design:type", course_folder_entity_1.CourseFolder)
|
|
53
|
+
], FolderPage.prototype, "folder", void 0);
|
|
54
|
+
exports.FolderPage = FolderPage = __decorate([
|
|
55
|
+
(0, typeorm_1.Entity)()
|
|
56
|
+
], FolderPage);
|
|
57
|
+
//# sourceMappingURL=folder-page.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"folder-page.entity.js","sourceRoot":"","sources":["../../../src/entities/capacitation/folder-page.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAoD;AACpD,6CAA8C;AAE9C,mEAA+D;AAC/D,iEAAsD;AAI/C,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,wBAAU;IAGxC,IAAI,CAAS;IAIb,WAAW,CAAU;IAGrB,WAAW,CAAU;IAGrB,WAAW,CAAU;IAIrB,KAAK,CAAqB;IAI1B,MAAM,CAAe;CACtB,CAAA;AAtBY,gCAAU;AAGrB;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAC9D,IAAA,gBAAM,GAAE;;wCACI;AAIb;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,yBAAyB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACrF,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACN;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;+CACN;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;+CACN;AAIrB;IAFC,IAAA,qBAAW,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,+BAA+B,EAAE,CAAC;IAC1F,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;yCAC7B;AAI1B;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,mCAAY,EAAE,WAAW,EAAE,0BAA0B,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACnG,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,mCAAY,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;8BACvE,mCAAY;0CAAC;qBArBV,UAAU;IADtB,IAAA,gBAAM,GAAE;GACI,UAAU,CAsBtB"}
|
|
@@ -2,3 +2,4 @@ export { Capacitation } from './capacitation.entity';
|
|
|
2
2
|
export { Course } from './course.entity';
|
|
3
3
|
export { CourseFolder } from './course-folder.entity';
|
|
4
4
|
export { CourseFolderPage } from './course-folder-page.entity';
|
|
5
|
+
export { CourseProgress } from './course-progress.entity';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CourseFolderPage = exports.CourseFolder = exports.Course = exports.Capacitation = void 0;
|
|
3
|
+
exports.CourseProgress = exports.CourseFolderPage = exports.CourseFolder = exports.Course = exports.Capacitation = void 0;
|
|
4
4
|
var capacitation_entity_1 = require("./capacitation.entity");
|
|
5
5
|
Object.defineProperty(exports, "Capacitation", { enumerable: true, get: function () { return capacitation_entity_1.Capacitation; } });
|
|
6
6
|
var course_entity_1 = require("./course.entity");
|
|
@@ -9,4 +9,6 @@ var course_folder_entity_1 = require("./course-folder.entity");
|
|
|
9
9
|
Object.defineProperty(exports, "CourseFolder", { enumerable: true, get: function () { return course_folder_entity_1.CourseFolder; } });
|
|
10
10
|
var course_folder_page_entity_1 = require("./course-folder-page.entity");
|
|
11
11
|
Object.defineProperty(exports, "CourseFolderPage", { enumerable: true, get: function () { return course_folder_page_entity_1.CourseFolderPage; } });
|
|
12
|
+
var course_progress_entity_1 = require("./course-progress.entity");
|
|
13
|
+
Object.defineProperty(exports, "CourseProgress", { enumerable: true, get: function () { return course_progress_entity_1.CourseProgress; } });
|
|
12
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/capacitation/index.ts"],"names":[],"mappings":";;;AAAA,6DAAqD;AAA5C,mHAAA,YAAY,OAAA;AACrB,iDAAyC;AAAhC,uGAAA,MAAM,OAAA;AACf,+DAAsD;AAA7C,oHAAA,YAAY,OAAA;AACrB,yEAA+D;AAAtD,6HAAA,gBAAgB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/capacitation/index.ts"],"names":[],"mappings":";;;AAAA,6DAAqD;AAA5C,mHAAA,YAAY,OAAA;AACrB,iDAAyC;AAAhC,uGAAA,MAAM,OAAA;AACf,+DAAsD;AAA7C,oHAAA,YAAY,OAAA;AACrB,yEAA+D;AAAtD,6HAAA,gBAAgB,OAAA;AACzB,mEAA0D;AAAjD,wHAAA,cAAc,OAAA"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { EntityBase } from
|
|
2
|
-
import { User } from
|
|
1
|
+
import { EntityBase } from '../common/database/base.entity';
|
|
2
|
+
import { User } from './user.entity';
|
|
3
|
+
import { Course } from './capacitation';
|
|
3
4
|
export declare class Group extends EntityBase {
|
|
4
5
|
name: string;
|
|
5
6
|
level: number;
|
|
6
7
|
users: User[];
|
|
8
|
+
courses: Course[];
|
|
7
9
|
}
|
|
@@ -10,14 +10,16 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Group = void 0;
|
|
13
|
-
const base_entity_1 = require("../common/database/base.entity");
|
|
14
13
|
const class_validator_1 = require("class-validator");
|
|
15
14
|
const typeorm_1 = require("typeorm");
|
|
15
|
+
const base_entity_1 = require("../common/database/base.entity");
|
|
16
16
|
const user_entity_1 = require("./user.entity");
|
|
17
|
+
const capacitation_1 = require("./capacitation");
|
|
17
18
|
let Group = class Group extends base_entity_1.EntityBase {
|
|
18
19
|
name;
|
|
19
20
|
level;
|
|
20
21
|
users;
|
|
22
|
+
courses;
|
|
21
23
|
};
|
|
22
24
|
exports.Group = Group;
|
|
23
25
|
__decorate([
|
|
@@ -30,9 +32,13 @@ __decorate([
|
|
|
30
32
|
__metadata("design:type", Number)
|
|
31
33
|
], Group.prototype, "level", void 0);
|
|
32
34
|
__decorate([
|
|
33
|
-
(0, typeorm_1.ManyToMany)(() => user_entity_1.User,
|
|
35
|
+
(0, typeorm_1.ManyToMany)(() => user_entity_1.User, user => user.groups),
|
|
34
36
|
__metadata("design:type", Array)
|
|
35
37
|
], Group.prototype, "users", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.ManyToMany)(() => capacitation_1.Course, course => course.groups),
|
|
40
|
+
__metadata("design:type", Array)
|
|
41
|
+
], Group.prototype, "courses", void 0);
|
|
36
42
|
exports.Group = Group = __decorate([
|
|
37
43
|
(0, typeorm_1.Entity)()
|
|
38
44
|
], Group);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group.entity.js","sourceRoot":"","sources":["../../src/entities/group.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"group.entity.js","sourceRoot":"","sources":["../../src/entities/group.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA4C;AAC5C,qCAAqD;AACrD,gEAA4D;AAC5D,+CAAqC;AACrC,iDAAwC;AAGjC,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,wBAAU;IAGnC,IAAI,CAAS;IAGb,KAAK,CAAS;IAGd,KAAK,CAAS;IAGd,OAAO,CAAW;CACnB,CAAA;AAbY,sBAAK;AAGhB;IAFC,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;mCACZ;AAGb;IADC,IAAA,gBAAM,GAAE;;oCACK;AAGd;IADC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC;;oCAC9B;AAGd;IADC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,qBAAM,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;;sCAChC;gBAZP,KAAK;IADjB,IAAA,gBAAM,GAAE;GACI,KAAK,CAajB"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { EntityBase } from
|
|
2
|
-
import { Profile } from
|
|
3
|
-
import { Role } from
|
|
4
|
-
import { Tag } from
|
|
5
|
-
import { UserEmailRelation } from
|
|
6
|
-
import { PushToken } from
|
|
7
|
-
import { Group } from
|
|
8
|
-
import { MenuPermissions } from
|
|
9
|
-
import { Agent, Contact } from
|
|
10
|
-
import { UserStatus } from
|
|
1
|
+
import { EntityBase } from '../common/database/base.entity';
|
|
2
|
+
import { Profile } from './profile.entity';
|
|
3
|
+
import { Role } from './role.entity';
|
|
4
|
+
import { Tag } from './tag.entity';
|
|
5
|
+
import { UserEmailRelation } from './thirdparty/user-email-relation.entity';
|
|
6
|
+
import { PushToken } from './notifications/push-token.entity';
|
|
7
|
+
import { Group } from './group.entity';
|
|
8
|
+
import { MenuPermissions } from './menu-permissions.entity';
|
|
9
|
+
import { Agent, Contact } from './sales';
|
|
10
|
+
import { UserStatus } from '../common/enums/tools.enum';
|
|
11
|
+
import { Course, CourseProgress } from './capacitation';
|
|
11
12
|
export declare class User extends EntityBase {
|
|
12
13
|
username: string;
|
|
13
14
|
email: string;
|
|
@@ -32,4 +33,6 @@ export declare class User extends EntityBase {
|
|
|
32
33
|
contact?: Contact;
|
|
33
34
|
get name(): string;
|
|
34
35
|
agentProfile?: Agent;
|
|
36
|
+
createdCourses?: Course[];
|
|
37
|
+
courseProgress?: CourseProgress[];
|
|
35
38
|
}
|