easywork-common-lib 1.0.1146 → 1.0.1148

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.
Files changed (29) hide show
  1. package/dist/common/enums/tools.enum.d.ts +3 -1
  2. package/dist/common/enums/tools.enum.js +2 -0
  3. package/dist/common/enums/tools.enum.js.map +1 -1
  4. package/dist/entities/helpers/sales/agent/index.d.ts +1 -0
  5. package/dist/entities/helpers/sales/agent/index.js +1 -0
  6. package/dist/entities/helpers/sales/agent/index.js.map +1 -1
  7. package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment.entity.d.ts +3 -0
  8. package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment.entity.js +27 -0
  9. package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment.entity.js.map +1 -1
  10. package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_other_referrals.d.ts +9 -0
  11. package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_other_referrals.js +64 -0
  12. package/dist/entities/helpers/sales/agent/recruitment/h_agent_recruitment_other_referrals.js.map +1 -0
  13. package/dist/entities/helpers/sales/agent/recruitment/training-type.entity.d.ts +9 -0
  14. package/dist/entities/helpers/sales/agent/recruitment/training-type.entity.js +65 -0
  15. package/dist/entities/helpers/sales/agent/recruitment/training-type.entity.js.map +1 -0
  16. package/dist/entities/user-group.entity.d.ts +5 -1
  17. package/dist/entities/user-group.entity.js +41 -7
  18. package/dist/entities/user-group.entity.js.map +1 -1
  19. package/dist/grpc/drive/drive.proto +290 -290
  20. package/dist/grpc/drive/leads.proto +114 -114
  21. package/dist/modules/authorization/authorization.module.d.ts +2 -2
  22. package/dist/modules/authorization/services/resource-access-filter.service.js +21 -21
  23. package/package.json +54 -54
  24. package/dist/entities/subscriptions/feature.d.ts +0 -15
  25. package/dist/entities/subscriptions/feature.js +0 -64
  26. package/dist/entities/subscriptions/feature.js.map +0 -1
  27. package/dist/entities/subscriptions/plan-feature.d.ts +0 -8
  28. package/dist/entities/subscriptions/plan-feature.js +0 -44
  29. package/dist/entities/subscriptions/plan-feature.js.map +0 -1
@@ -46,7 +46,9 @@ export declare enum UserStatus {
46
46
  offline = "offline",
47
47
  doNotDisturb = "do_not_disturb",
48
48
  onVacation = "on_vacation",
49
- outOfOffice = "out_of_office"
49
+ outOfOffice = "out_of_office",
50
+ inMeeting = "in_meeting",
51
+ fromTheMobile = "from_the_mobile"
50
52
  }
51
53
  export declare enum TimeTrackRecordType {
52
54
  AUTOMATIC = "automatic",
@@ -55,6 +55,8 @@ var UserStatus;
55
55
  UserStatus["doNotDisturb"] = "do_not_disturb";
56
56
  UserStatus["onVacation"] = "on_vacation";
57
57
  UserStatus["outOfOffice"] = "out_of_office";
58
+ UserStatus["inMeeting"] = "in_meeting";
59
+ UserStatus["fromTheMobile"] = "from_the_mobile";
58
60
  })(UserStatus || (exports.UserStatus = UserStatus = {}));
59
61
  var TimeTrackRecordType;
60
62
  (function (TimeTrackRecordType) {
@@ -1 +1 @@
1
- {"version":3,"file":"tools.enum.js","sourceRoot":"","sources":["../../../src/common/enums/tools.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;IACnB,qCAAuB,CAAA;IACvB,+CAAiC,CAAA;IACjC,yCAA2B,CAAA;AAC7B,CAAC,EANW,UAAU,0BAAV,UAAU,QAMrB;AAED,IAAY,WAaX;AAbD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,gDAAiC,CAAA;IACjC,4BAAa,CAAA;IACb,kCAAmB,CAAA;IACnB,8BAAe,CAAA;IACf,sDAAuC,CAAA;IACvC,4DAA6C,CAAA;IAC7C,4DAA6C,CAAA;IAC7C,4CAA6B,CAAA;AAC/B,CAAC,EAbW,WAAW,2BAAX,WAAW,QAatB;AAED,IAAY,YAcX;AAdD,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,6BAAa,CAAA;IACb,iCAAiB,CAAA;IACjB,6CAA6B,CAAA;IAC7B,6DAA6C,CAAA;IAC7C,6DAA6C,CAAA;IAC7C,uDAAuC,CAAA;IACvC,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,iDAAiC,CAAA;IACjC,6BAAa,CAAA;AACf,CAAC,EAdW,YAAY,4BAAZ,YAAY,QAcvB;AAED,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,kCAAe,CAAA;AACjB,CAAC,EANW,eAAe,+BAAf,eAAe,QAM1B;AAED,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;IACnB,6CAA+B,CAAA;IAC/B,wCAA0B,CAAA;IAC1B,2CAA6B,CAAA;AAC/B,CAAC,EANW,UAAU,0BAAV,UAAU,QAMrB;AAED,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,8CAAuB,CAAA;IACvB,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;AACvB,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B;AAED,IAAY,qBASX;AATD,WAAY,qBAAqB;IAC/B,8CAAqB,CAAA;IACrB,sDAA6B,CAAA;IAC7B,wDAA+B,CAAA;IAC/B,wDAA+B,CAAA;IAC/B,4CAAmB,CAAA;IACnB,kDAAyB,CAAA;IACzB,sCAAa,CAAA;IACb,wCAAe,CAAA;AACjB,CAAC,EATW,qBAAqB,qCAArB,qBAAqB,QAShC"}
1
+ {"version":3,"file":"tools.enum.js","sourceRoot":"","sources":["../../../src/common/enums/tools.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,iCAAmB,CAAA;IACn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,8CAAuB,CAAA;IACvB,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;AACvB,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B;AAED,IAAY,qBASX;AATD,WAAY,qBAAqB;IAC/B,8CAAqB,CAAA;IACrB,sDAA6B,CAAA;IAC7B,wDAA+B,CAAA;IAC/B,wDAA+B,CAAA;IAC/B,4CAAmB,CAAA;IACnB,kDAAyB,CAAA;IACzB,sCAAa,CAAA;IACb,wCAAe,CAAA;AACjB,CAAC,EATW,qBAAqB,qCAArB,qBAAqB,QAShC"}
@@ -5,4 +5,5 @@ export * from "./connection/h_agent_connection_stage.entity";
5
5
  export * from "./recruitment/h_agent_recruitment.entity";
6
6
  export * from "./recruitment/h_agent_recruitment_stage.entity";
7
7
  export * from "./recruitment/h_agent_recruitment_other_referrals.entity";
8
+ export * from "./recruitment/training-type.entity";
8
9
  export * from "./h_agent_experiences.entity";
@@ -21,5 +21,6 @@ __exportStar(require("./connection/h_agent_connection_stage.entity"), exports);
21
21
  __exportStar(require("./recruitment/h_agent_recruitment.entity"), exports);
22
22
  __exportStar(require("./recruitment/h_agent_recruitment_stage.entity"), exports);
23
23
  __exportStar(require("./recruitment/h_agent_recruitment_other_referrals.entity"), exports);
24
+ __exportStar(require("./recruitment/training-type.entity"), exports);
24
25
  __exportStar(require("./h_agent_experiences.entity"), exports);
25
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/agent/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,yDAAuC;AACvC,yEAAuD;AACvD,+EAA6D;AAC7D,2EAAyD;AACzD,iFAA+D;AAC/D,2FAAyE;AACzE,+DAA6C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/agent/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,yDAAuC;AACvC,yEAAuD;AACvD,+EAA6D;AAC7D,2EAAyD;AACzD,iFAA+D;AAC/D,2FAAyE;AACzE,qEAAmD;AACnD,+DAA6C"}
@@ -3,6 +3,7 @@ import { AgentRecruitmentStage } from "./h_agent_recruitment_stage.entity";
3
3
  import { BaseEntitySimple } from "../../../../../common";
4
4
  import { User } from "../../../../user.entity";
5
5
  import { AgentRecruitmentOtherReferrals } from "./h_agent_recruitment_other_referrals.entity";
6
+ import { TrainingType } from "./training-type.entity";
6
7
  export declare class AgentRecruitment extends BaseEntitySimple {
7
8
  agentId: string;
8
9
  agentRecruitmentStageId: string;
@@ -19,4 +20,6 @@ export declare class AgentRecruitment extends BaseEntitySimple {
19
20
  recruitmentStatus?: string;
20
21
  referrerAgent?: Agent;
21
22
  referrerInactive?: AgentRecruitmentOtherReferrals;
23
+ trainingTypeId?: string;
24
+ trainingType?: TrainingType;
22
25
  }
@@ -18,6 +18,7 @@ const h_agent_recruitment_stage_entity_1 = require("./h_agent_recruitment_stage.
18
18
  const common_1 = require("../../../../../common");
19
19
  const user_entity_1 = require("../../../../user.entity");
20
20
  const h_agent_recruitment_other_referrals_entity_1 = require("./h_agent_recruitment_other_referrals.entity");
21
+ const training_type_entity_1 = require("./training-type.entity");
21
22
  let AgentRecruitment = class AgentRecruitment extends common_1.BaseEntitySimple {
22
23
  agentId;
23
24
  agentRecruitmentStageId;
@@ -34,6 +35,8 @@ let AgentRecruitment = class AgentRecruitment extends common_1.BaseEntitySimple
34
35
  recruitmentStatus;
35
36
  referrerAgent;
36
37
  referrerInactive;
38
+ trainingTypeId;
39
+ trainingType;
37
40
  };
38
41
  exports.AgentRecruitment = AgentRecruitment;
39
42
  __decorate([
@@ -186,6 +189,30 @@ __decorate([
186
189
  }),
187
190
  __metadata("design:type", h_agent_recruitment_other_referrals_entity_1.AgentRecruitmentOtherReferrals)
188
191
  ], AgentRecruitment.prototype, "referrerInactive", void 0);
192
+ __decorate([
193
+ (0, swagger_1.ApiProperty)({
194
+ type: String,
195
+ description: "ID of the associated training type",
196
+ format: "uuid",
197
+ required: false,
198
+ }),
199
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
200
+ __metadata("design:type", String)
201
+ ], AgentRecruitment.prototype, "trainingTypeId", void 0);
202
+ __decorate([
203
+ (0, swagger_1.ApiProperty)({
204
+ type: () => training_type_entity_1.TrainingType,
205
+ description: "Training type associated with this recruitment",
206
+ required: false,
207
+ }),
208
+ (0, typeorm_1.ManyToOne)(() => training_type_entity_1.TrainingType, (trainingType) => trainingType.recruitments, {
209
+ nullable: true,
210
+ onDelete: "SET NULL",
211
+ onUpdate: "CASCADE",
212
+ }),
213
+ (0, typeorm_1.JoinColumn)(),
214
+ __metadata("design:type", training_type_entity_1.TrainingType)
215
+ ], AgentRecruitment.prototype, "trainingType", void 0);
189
216
  exports.AgentRecruitment = AgentRecruitment = __decorate([
190
217
  (0, typeorm_1.Entity)()
191
218
  ], AgentRecruitment);
@@ -1 +1 @@
1
- {"version":3,"file":"h_agent_recruitment.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/helpers/sales/agent/recruitment/h_agent_recruitment.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,yDAA4C;AAC5C,6CAA8C;AAC9C,6CAA0C;AAC1C,yFAA2E;AAC3E,kDAAyD;AACzD,yDAA+C;AAC/C,6GAA8F;AAGvF,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,yBAAgB;IAQpD,OAAO,CAAS;IAShB,uBAAuB,CAAS;IAQhC,QAAQ,CAAS;IASjB,SAAS,CAAO;IAShB,OAAO,CAAO;IASd,SAAS,CAAO;IAShB,YAAY,CAAO;IASnB,kBAAkB,CAAO;IASzB,mBAAmB,CAAO;IAS1B,UAAU,CAAO;IAOV,KAAK,CAAQ;IAWb,qBAAqB,CAAwB;IASpD,iBAAiB,CAAU;IAe3B,aAAa,CAAS;IAatB,gBAAgB,CAAkC;CACnD,CAAA;AAhJY,4CA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gB,CAgJ5B"}
1
+ {"version":3,"file":"h_agent_recruitment.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/helpers/sales/agent/recruitment/h_agent_recruitment.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,yDAA4C;AAC5C,6CAA8C;AAC9C,6CAA0C;AAC1C,yFAA2E;AAC3E,kDAAyD;AACzD,yDAA+C;AAC/C,6GAA8F;AAC9F,iEAAsD;AAG/C,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,yBAAgB;IAQpD,OAAO,CAAS;IAShB,uBAAuB,CAAS;IAQhC,QAAQ,CAAS;IASjB,SAAS,CAAO;IAShB,OAAO,CAAO;IASd,SAAS,CAAO;IAShB,YAAY,CAAO;IASnB,kBAAkB,CAAO;IASzB,mBAAmB,CAAO;IAS1B,UAAU,CAAO;IAOV,KAAK,CAAQ;IAWb,qBAAqB,CAAwB;IASpD,iBAAiB,CAAU;IAe3B,aAAa,CAAS;IAatB,gBAAgB,CAAkC;IASlD,cAAc,CAAU;IAaxB,YAAY,CAAgB;CAC7B,CAAA;AAtKY,4CAAgB;AAQ3B;IAPC,IAAA,2BAAO,GAAE;IACT,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,4BAA4B;QACzC,MAAM,EAAE,MAAM;KACf,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDACT;AAShB;IAPC,IAAA,2BAAO,GAAE;IACT,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,4CAA4C;QACzD,MAAM,EAAE,MAAM;KACf,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iEACO;AAQhC;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,8BAA8B;QAC3C,QAAQ,EAAE,KAAK;KAChB,C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GAAE;8BACE,mCAAY;sDAAC;2BArKjB,gBAAgB;IAD5B,IAAA,gBAAM,GAAE;GACI,gBAAgB,CAsK5B"}
@@ -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
@@ -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,G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"../../../../group.entity";
3
+ import { AgentRecruitment } from "./h_agent_recruitment.entity";
4
+ export declare class TrainingType extends BaseEntitySimple {
5
+ name: string;
6
+ groupId?: string;
7
+ group?: Group;
8
+ recruitments: AgentRecruitment[];
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.TrainingType = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const swagger_1 = require("@nestjs/swagger");
15
+ const common_1 = require("../../../../../common");
16
+ const group_entity_1 = require("../../../../group.entity");
17
+ const h_agent_recruitment_entity_1 = require("./h_agent_recruitment.entity");
18
+ let TrainingType = class TrainingType extends common_1.BaseEntitySimple {
19
+ name;
20
+ groupId;
21
+ group;
22
+ recruitments;
23
+ };
24
+ exports.TrainingType = TrainingType;
25
+ __decorate([
26
+ (0, swagger_1.ApiProperty)({
27
+ type: String,
28
+ description: "Name of the training type",
29
+ example: "Basic Sales Training"
30
+ }),
31
+ (0, typeorm_1.Column)({ length: 255 }),
32
+ __metadata("design:type", String)
33
+ ], TrainingType.prototype, "name", void 0);
34
+ __decorate([
35
+ (0, swagger_1.ApiProperty)({
36
+ type: String,
37
+ description: "ID of the associated group (nullable - applies to all groups if null)",
38
+ format: "uuid",
39
+ required: false,
40
+ }),
41
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
42
+ __metadata("design:type", String)
43
+ ], TrainingType.prototype, "groupId", void 0);
44
+ __decorate([
45
+ (0, swagger_1.ApiProperty)({
46
+ type: () => group_entity_1.Group,
47
+ description: "Group entity associated (nullable - applies to all groups if null)",
48
+ required: false,
49
+ }),
50
+ (0, typeorm_1.ManyToOne)(() => group_entity_1.Group, { nullable: true, onDelete: "SET NULL" }),
51
+ (0, typeorm_1.JoinColumn)(),
52
+ __metadata("design:type", group_entity_1.Group)
53
+ ], TrainingType.prototype, "group", void 0);
54
+ __decorate([
55
+ (0, swagger_1.ApiProperty)({
56
+ type: () => [h_agent_recruitment_entity_1.AgentRecruitment],
57
+ description: "Agent recruitments using this training type",
58
+ }),
59
+ (0, typeorm_1.OneToMany)(() => h_agent_recruitment_entity_1.AgentRecruitment, (recruitment) => recruitment.trainingType),
60
+ __metadata("design:type", Array)
61
+ ], TrainingType.prototype, "recruitments", void 0);
62
+ exports.TrainingType = TrainingType = __decorate([
63
+ (0, typeorm_1.Entity)()
64
+ ], TrainingType);
65
+ //# sourceMappingURL=training-type.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"training-type.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/helpers/sales/agent/recruitment/training-type.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA2E;AAC3E,6CAA8C;AAC9C,kDAAyD;AACzD,2DAAiD;AACjD,6EAAgE;AAGzD,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,yBAAgB;IAOhD,IAAI,CAAS;IASb,OAAO,CAAU;IASjB,KAAK,CAAS;IAOd,YAAY,CAAqB;CAClC,CAAA;AAjCY,oCAAY;AAOvB;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,2BAA2B;QACxC,OAAO,EAAE,sBAAsB;KAChC,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;0CACX;AASb;IAPC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,uEAAuE;QACpF,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACxB;AASjB;IAPC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,GAAG,EAAE,CAAC,oBAAK;QACjB,WAAW,EAAE,oEAAoE;QACjF,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IAChE,IAAA,oBAAU,GAAE;8BACL,oBAAK;2CAAC;AAOd;IALC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,6CAAgB,CAAC;QAC9B,WAAW,EAAE,6CAA6C;KAC3D,CAAC;IACD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,6CAAgB,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,YAAY,CAAC;;kDAC5C;uBAhCtB,YAAY;IADxB,IAAA,gBAAM,GAAE;GACI,YAAY,CAiCxB"}
@@ -1,5 +1,9 @@
1
1
  import { EntityBase } from '../common/database/base.entity';
2
+ import { User } from './user.entity';
3
+ import { Group } from './group.entity';
2
4
  import { Role } from './role.entity';
3
- export declare class UserGroupNewRelation extends EntityBase {
5
+ export declare class UserGroup extends EntityBase {
6
+ user: User;
7
+ group: Group;
4
8
  role: Role;
5
9
  }
@@ -9,23 +9,57 @@ 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.UserGroupNewRelation = void 0;
12
+ exports.UserGroup = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
13
14
  const typeorm_1 = require("typeorm");
14
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");
15
18
  const role_entity_1 = require("./role.entity");
16
- let UserGroupNewRelation = class UserGroupNewRelation extends base_entity_1.EntityBase {
19
+ let UserGroup = class UserGroup extends base_entity_1.EntityBase {
20
+ user;
21
+ group;
17
22
  role;
18
23
  };
19
- exports.UserGroupNewRelation = UserGroupNewRelation;
24
+ exports.UserGroup = UserGroup;
20
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
+ }),
21
54
  (0, typeorm_1.ManyToOne)(() => role_entity_1.Role, {
22
55
  onDelete: 'RESTRICT',
23
56
  onUpdate: 'CASCADE',
24
57
  }),
25
58
  (0, typeorm_1.JoinColumn)(),
26
59
  __metadata("design:type", role_entity_1.Role)
27
- ], UserGroupNewRelation.prototype, "role", void 0);
28
- exports.UserGroupNewRelation = UserGroupNewRelation = __decorate([
29
- (0, typeorm_1.Entity)()
30
- ], UserGroupNewRelation);
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);
31
65
  //# sourceMappingURL=user-group.entity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"user-group.entity.js","sourceRoot":"","sources":["../../src/entities/user-group.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwD;AACxD,gEAA4D;AAG5D,+CAAqC;AAI9B,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,wBAAU;IA4BlD,IAAI,CAAO;CACZ,CAAA;AA7BY,oDAAoB;AA4B/B;IALC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE;QACrB,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,IAAA,oBAAU,GAAE;8BACP,kBAAI;kDAAC;+BA5BA,oBAAoB;IAFhC,IAAA,gBAAM,GAAE;GAEI,oBAAoB,CA6BhC"}
1
+ {"version":3,"file":"user-group.entity.js","sourceRoot":"","sources":["../../src/entities/user-group.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,qCAAgE;AAChE,gEAA4D;AAC5D,+CAAqC;AACrC,iDAAuC;AACvC,+CAAqC;AAI9B,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAU;IAUvC,IAAI,CAAO;IAWX,KAAK,CAAQ;IAWb,IAAI,CAAO;CACZ,CAAA;AAjCY,8BAAS;AAUpB;IATC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI;QAChB,WAAW,EAAE,mBAAmB;KACjC,CAAC;IACD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC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