easywork-common-lib 1.0.1161 → 1.0.1163
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/capacitation.entity.d.ts +5 -0
- package/dist/entities/capacitation/capacitation.entity.js +15 -1
- package/dist/entities/capacitation/capacitation.entity.js.map +1 -1
- package/dist/entities/capacitation/index.d.ts +8 -8
- package/dist/entities/capacitation/index.js +2 -1
- package/dist/entities/capacitation/index.js.map +1 -1
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_other_referrals.d.ts +9 -0
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_other_referrals.js +64 -0
- package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_other_referrals.js.map +1 -0
- package/dist/entities/user-group.entity.d.ts +9 -0
- package/dist/entities/user-group.entity.js +65 -0
- package/dist/entities/user-group.entity.js.map +1 -0
- package/dist/grpc/drive/drive.proto +310 -310
- package/dist/grpc/drive/leads.proto +114 -114
- package/dist/modules/authorization/services/resource-access-filter.service.js +21 -21
- package/package.json +54 -53
|
@@ -4,6 +4,10 @@ import { AgentSource } from "../helpers/sales/agent/h_agent_source.entity";
|
|
|
4
4
|
import { Agent } from "../sales/agent.entity";
|
|
5
5
|
import { AgentTrainingStage } from "../helpers/sales/agent/capacitation/h_agent_capacitation_stage.entity";
|
|
6
6
|
import { TrainingType } from "../helpers/sales/agent/recruitment/training-type.entity";
|
|
7
|
+
export declare enum CapacitationStatus {
|
|
8
|
+
completed = "completed",
|
|
9
|
+
notCompleted = "not-completed"
|
|
10
|
+
}
|
|
7
11
|
export declare class Capacitation extends EntityBase {
|
|
8
12
|
agentId: string;
|
|
9
13
|
agentTrainingStageId: string;
|
|
@@ -14,6 +18,7 @@ export declare class Capacitation extends EntityBase {
|
|
|
14
18
|
endDate: Date;
|
|
15
19
|
cnsfDate: Date;
|
|
16
20
|
isProcessClosed: boolean;
|
|
21
|
+
status: CapacitationStatus;
|
|
17
22
|
assignedBy: User;
|
|
18
23
|
source: AgentSource;
|
|
19
24
|
agent: Agent;
|
|
@@ -9,7 +9,7 @@ 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.Capacitation = void 0;
|
|
12
|
+
exports.Capacitation = exports.CapacitationStatus = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const swagger_1 = require("@nestjs/swagger");
|
|
15
15
|
const base_entity_1 = require("../../common/database/base.entity");
|
|
@@ -19,6 +19,11 @@ const h_agent_source_entity_1 = require("../helpers/sales/agent/h_agent_source.e
|
|
|
19
19
|
const agent_entity_1 = require("../sales/agent.entity");
|
|
20
20
|
const h_agent_capacitation_stage_entity_1 = require("../helpers/sales/agent/capacitation/h_agent_capacitation_stage.entity");
|
|
21
21
|
const training_type_entity_1 = require("../helpers/sales/agent/recruitment/training-type.entity");
|
|
22
|
+
var CapacitationStatus;
|
|
23
|
+
(function (CapacitationStatus) {
|
|
24
|
+
CapacitationStatus["completed"] = "completed";
|
|
25
|
+
CapacitationStatus["notCompleted"] = "not-completed";
|
|
26
|
+
})(CapacitationStatus || (exports.CapacitationStatus = CapacitationStatus = {}));
|
|
22
27
|
let Capacitation = class Capacitation extends base_entity_1.EntityBase {
|
|
23
28
|
agentId;
|
|
24
29
|
agentTrainingStageId;
|
|
@@ -29,6 +34,7 @@ let Capacitation = class Capacitation extends base_entity_1.EntityBase {
|
|
|
29
34
|
endDate;
|
|
30
35
|
cnsfDate;
|
|
31
36
|
isProcessClosed;
|
|
37
|
+
status;
|
|
32
38
|
assignedBy;
|
|
33
39
|
source;
|
|
34
40
|
agent;
|
|
@@ -118,6 +124,14 @@ __decorate([
|
|
|
118
124
|
(0, typeorm_1.Column)({ default: false }),
|
|
119
125
|
__metadata("design:type", Boolean)
|
|
120
126
|
], Capacitation.prototype, "isProcessClosed", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
(0, typeorm_1.Column)({
|
|
129
|
+
type: "enum",
|
|
130
|
+
enum: CapacitationStatus,
|
|
131
|
+
default: CapacitationStatus.notCompleted,
|
|
132
|
+
}),
|
|
133
|
+
__metadata("design:type", String)
|
|
134
|
+
], Capacitation.prototype, "status", void 0);
|
|
121
135
|
__decorate([
|
|
122
136
|
(0, swagger_1.ApiProperty)({
|
|
123
137
|
type: () => user_entity_1.User,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capacitation.entity.js","sourceRoot":"","sources":["../../../src/entities/capacitation/capacitation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,6CAA8C;AAC9C,mEAA+D;AAC/D,gDAAsC;AACtC,yDAA4C;AAC5C,wFAA2E;AAC3E,wDAA8C;AAC9C,6HAA2G;AAC3G,kGAAuF;
|
|
1
|
+
{"version":3,"file":"capacitation.entity.js","sourceRoot":"","sources":["../../../src/entities/capacitation/capacitation.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,6CAA8C;AAC9C,mEAA+D;AAC/D,gDAAsC;AACtC,yDAA4C;AAC5C,wFAA2E;AAC3E,wDAA8C;AAC9C,6HAA2G;AAC3G,kGAAuF;AAEvF,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,6CAAuB,CAAA;IACvB,oDAA8B,CAAA;AAChC,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAEM,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,wBAAU;IAQ1C,OAAO,CAAS;IAQhB,oBAAoB,CAAS;IAQ7B,YAAY,CAAS;IAQrB,mBAAmB,CAAO;IAQ1B,gBAAgB,CAAO;IASvB,SAAS,CAAO;IAShB,OAAO,CAAO;IASd,QAAQ,CAAO;IASf,eAAe,CAAU;IAOzB,MAAM,C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
|
4
|
-
export { CourseFolderPage } from
|
|
5
|
-
export { CourseAssigned } from
|
|
6
|
-
export { CourseOrder } from
|
|
7
|
-
export { CourseEvaluation, EvaluationQuestion } from
|
|
8
|
-
export { CourseEvaluationAttempt, CourseEvaluationAttemptStatus } from
|
|
1
|
+
export { Capacitation, CapacitationStatus } from "./capacitation.entity";
|
|
2
|
+
export { Course } from "./course.entity";
|
|
3
|
+
export { CourseFolder } from "./course-folder.entity";
|
|
4
|
+
export { CourseFolderPage } from "./course-folder-page.entity";
|
|
5
|
+
export { CourseAssigned } from "./course-assigned.entity";
|
|
6
|
+
export { CourseOrder } from "./course-order.entity";
|
|
7
|
+
export { CourseEvaluation, EvaluationQuestion, } from "./course-evaluation.entity";
|
|
8
|
+
export { CourseEvaluationAttempt, CourseEvaluationAttemptStatus, } from "./course-evaluation-attempt.entity";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CourseEvaluationAttemptStatus = exports.CourseEvaluationAttempt = exports.CourseEvaluation = exports.CourseOrder = exports.CourseAssigned = exports.CourseFolderPage = exports.CourseFolder = exports.Course = exports.Capacitation = void 0;
|
|
3
|
+
exports.CourseEvaluationAttemptStatus = exports.CourseEvaluationAttempt = exports.CourseEvaluation = exports.CourseOrder = exports.CourseAssigned = exports.CourseFolderPage = exports.CourseFolder = exports.Course = exports.CapacitationStatus = 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
|
+
Object.defineProperty(exports, "CapacitationStatus", { enumerable: true, get: function () { return capacitation_entity_1.CapacitationStatus; } });
|
|
6
7
|
var course_entity_1 = require("./course.entity");
|
|
7
8
|
Object.defineProperty(exports, "Course", { enumerable: true, get: function () { return course_entity_1.Course; } });
|
|
8
9
|
var course_folder_entity_1 = require("./course-folder.entity");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/capacitation/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/capacitation/index.ts"],"names":[],"mappings":";;;AAAA,6DAAyE;AAAhE,mHAAA,YAAY,OAAA;AAAE,yHAAA,kBAAkB,OAAA;AACzC,iDAAyC;AAAhC,uGAAA,MAAM,OAAA;AACf,+DAAsD;AAA7C,oHAAA,YAAY,OAAA;AACrB,yEAA+D;AAAtD,6HAAA,gBAAgB,OAAA;AACzB,mEAA0D;AAAjD,wHAAA,cAAc,OAAA;AACvB,6DAAoD;AAA3C,kHAAA,WAAW,OAAA;AACpB,uEAGoC;AAFlC,4HAAA,gBAAgB,OAAA;AAGlB,uFAG4C;AAF1C,2IAAA,uBAAuB,OAAA;AACvB,iJAAA,6BAA6B,OAAA"}
|
package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_other_referrals.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseEntitySimple } from "../../../../../common/database/base.entity";
|
|
2
|
+
import { Group } from "../../../../group.entity";
|
|
3
|
+
export declare class AgentRecruitmentOtherReferrals extends BaseEntitySimple {
|
|
4
|
+
name: string;
|
|
5
|
+
address: string;
|
|
6
|
+
group: Group;
|
|
7
|
+
otherPhones: Record<string, string>[];
|
|
8
|
+
otherEmails: Record<string, string>[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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.AgentRecruitmentOtherReferrals = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const base_entity_1 = require("../../../../../common/database/base.entity");
|
|
16
|
+
const group_entity_1 = require("../../../../group.entity");
|
|
17
|
+
let AgentRecruitmentOtherReferrals = class AgentRecruitmentOtherReferrals extends base_entity_1.BaseEntitySimple {
|
|
18
|
+
name;
|
|
19
|
+
address;
|
|
20
|
+
group;
|
|
21
|
+
otherPhones;
|
|
22
|
+
otherEmails;
|
|
23
|
+
};
|
|
24
|
+
exports.AgentRecruitmentOtherReferrals = AgentRecruitmentOtherReferrals;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ unique: true }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], AgentRecruitmentOtherReferrals.prototype, "name", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, swagger_1.ApiProperty)({
|
|
31
|
+
type: String,
|
|
32
|
+
description: "Address of the referred agent",
|
|
33
|
+
required: false,
|
|
34
|
+
}),
|
|
35
|
+
(0, typeorm_1.Column)({ length: 255, nullable: true }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], AgentRecruitmentOtherReferrals.prototype, "address", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)({
|
|
40
|
+
type: () => group_entity_1.Group,
|
|
41
|
+
description: "Group of the referred agent",
|
|
42
|
+
}),
|
|
43
|
+
(0, typeorm_1.ManyToOne)(() => group_entity_1.Group, { nullable: true, onDelete: "SET NULL" }),
|
|
44
|
+
(0, typeorm_1.JoinColumn)({ name: "groupId" }),
|
|
45
|
+
__metadata("design:type", group_entity_1.Group)
|
|
46
|
+
], AgentRecruitmentOtherReferrals.prototype, "group", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, swagger_1.ApiProperty)({
|
|
49
|
+
description: "Other phones of the referred agent",
|
|
50
|
+
}),
|
|
51
|
+
(0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
|
|
52
|
+
__metadata("design:type", Array)
|
|
53
|
+
], AgentRecruitmentOtherReferrals.prototype, "otherPhones", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, swagger_1.ApiProperty)({
|
|
56
|
+
description: "Other emails of the referred agent",
|
|
57
|
+
}),
|
|
58
|
+
(0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
|
|
59
|
+
__metadata("design:type", Array)
|
|
60
|
+
], AgentRecruitmentOtherReferrals.prototype, "otherEmails", void 0);
|
|
61
|
+
exports.AgentRecruitmentOtherReferrals = AgentRecruitmentOtherReferrals = __decorate([
|
|
62
|
+
(0, typeorm_1.Entity)("agent_recruitment_other_referrals")
|
|
63
|
+
], AgentRecruitmentOtherReferrals);
|
|
64
|
+
//# sourceMappingURL=h_agent_recruitment_other_referrals.js.map
|
package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_other_referrals.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"h_agent_recruitment_other_referrals.js","sourceRoot":"","sources":["../../../../../../src/entities/helpers/sales/agent/recruitment/h_agent_recruitment_other_referrals.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qCAAgE;AAChE,4EAA8E;AAC9E,2DAAiD;AAG1C,IAAM,8BAA8B,GAApC,MAAM,8BAA+B,SAAQ,8BAAgB;IAElE,IAAI,CAAS;IASb,OAAO,CAAS;IAQhB,KAAK,CAAQ;IAOb,WAAW,CAA2B;IAOtC,WAAW,CAA2B;CACvC,CAAA;AAlCY,wEAA8B;AAEzC;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;4DACZ;AASb;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,+BAA+B;QAC5C,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+DACxB;AAQhB;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,GAAG,EAAE,CAAC,oBAAK;QACjB,WAAW,EAAE,6BAA6B;KAC3C,CAAC;IACD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IAChE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8BACzB,oBAAK;6DAAC;AAOb;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,oCAAoC;KAClD,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mEACJ;AAOtC;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,oCAAoC;KAClD,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mEACJ;yCAjC3B,8BAA8B;IAD1C,IAAA,gBAAM,EAAC,mCAAmC,CAAC;GAC/B,8BAA8B,CAkC1C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EntityBase } from '../common/database/base.entity';
|
|
2
|
+
import { User } from './user.entity';
|
|
3
|
+
import { Group } from './group.entity';
|
|
4
|
+
import { Role } from './role.entity';
|
|
5
|
+
export declare class UserGroup extends EntityBase {
|
|
6
|
+
user: User;
|
|
7
|
+
group: Group;
|
|
8
|
+
role: Role;
|
|
9
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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.UserGroup = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const base_entity_1 = require("../common/database/base.entity");
|
|
16
|
+
const user_entity_1 = require("./user.entity");
|
|
17
|
+
const group_entity_1 = require("./group.entity");
|
|
18
|
+
const role_entity_1 = require("./role.entity");
|
|
19
|
+
let UserGroup = class UserGroup extends base_entity_1.EntityBase {
|
|
20
|
+
user;
|
|
21
|
+
group;
|
|
22
|
+
role;
|
|
23
|
+
};
|
|
24
|
+
exports.UserGroup = UserGroup;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, swagger_1.ApiProperty)({
|
|
27
|
+
type: () => user_entity_1.User,
|
|
28
|
+
description: 'User in the group',
|
|
29
|
+
}),
|
|
30
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, user => user.userGroups, {
|
|
31
|
+
onDelete: 'CASCADE',
|
|
32
|
+
onUpdate: 'CASCADE',
|
|
33
|
+
}),
|
|
34
|
+
(0, typeorm_1.JoinColumn)(),
|
|
35
|
+
__metadata("design:type", user_entity_1.User)
|
|
36
|
+
], UserGroup.prototype, "user", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, swagger_1.ApiProperty)({
|
|
39
|
+
type: () => group_entity_1.Group,
|
|
40
|
+
description: 'Group where the user belongs',
|
|
41
|
+
}),
|
|
42
|
+
(0, typeorm_1.ManyToOne)(() => group_entity_1.Group, group => group.userGroups, {
|
|
43
|
+
onDelete: 'CASCADE',
|
|
44
|
+
onUpdate: 'CASCADE',
|
|
45
|
+
}),
|
|
46
|
+
(0, typeorm_1.JoinColumn)(),
|
|
47
|
+
__metadata("design:type", group_entity_1.Group)
|
|
48
|
+
], UserGroup.prototype, "group", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, swagger_1.ApiProperty)({
|
|
51
|
+
type: () => role_entity_1.Role,
|
|
52
|
+
description: 'Role assigned to the user in this specific group',
|
|
53
|
+
}),
|
|
54
|
+
(0, typeorm_1.ManyToOne)(() => role_entity_1.Role, {
|
|
55
|
+
onDelete: 'RESTRICT',
|
|
56
|
+
onUpdate: 'CASCADE',
|
|
57
|
+
}),
|
|
58
|
+
(0, typeorm_1.JoinColumn)(),
|
|
59
|
+
__metadata("design:type", role_entity_1.Role)
|
|
60
|
+
], UserGroup.prototype, "role", void 0);
|
|
61
|
+
exports.UserGroup = UserGroup = __decorate([
|
|
62
|
+
(0, typeorm_1.Entity)(),
|
|
63
|
+
(0, typeorm_1.Unique)(['user', 'group'])
|
|
64
|
+
], UserGroup);
|
|
65
|
+
//# sourceMappingURL=user-group.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-group.entity.js","sourceRoot":"","sources":["../../src/entities/user-group.entity.ts"],"names":[],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