@evara-group/guard 3.0.20 → 3.0.21
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/database/config/typeorm.config.js +4 -0
- package/dist/database/config/typeorm.config.js.map +1 -1
- package/dist/database/migrations/1768192000001-CreateJobTable.d.ts +6 -0
- package/dist/database/migrations/1768192000001-CreateJobTable.js +53 -0
- package/dist/database/migrations/1768192000001-CreateJobTable.js.map +1 -0
- package/dist/database/migrations/1769003100000-CreateUserJobsTable.d.ts +6 -0
- package/dist/database/migrations/1769003100000-CreateUserJobsTable.js +49 -0
- package/dist/database/migrations/1769003100000-CreateUserJobsTable.js.map +1 -0
- package/dist/database/migrations/1769003200001-AlterJobAddOrgLevels.d.ts +6 -0
- package/dist/database/migrations/1769003200001-AlterJobAddOrgLevels.js +35 -0
- package/dist/database/migrations/1769003200001-AlterJobAddOrgLevels.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/dist/modules/app.module.js +5 -0
- package/dist/modules/app.module.js.map +1 -1
- package/dist/modules/auth/auth.service.d.ts +6 -6
- package/dist/modules/auth/auth.service.js.map +1 -1
- package/dist/modules/duty/dtos/create-duty.dto.d.ts +5 -0
- package/dist/modules/duty/dtos/create-duty.dto.js +14 -0
- package/dist/modules/duty/dtos/create-duty.dto.js.map +1 -0
- package/dist/modules/duty/dtos/duty-query.dto.d.ts +3 -0
- package/dist/modules/duty/dtos/duty-query.dto.js +8 -0
- package/dist/modules/duty/dtos/duty-query.dto.js.map +1 -0
- package/dist/modules/duty/dtos/duty.dto.d.ts +9 -0
- package/dist/modules/duty/dtos/duty.dto.js +55 -0
- package/dist/modules/duty/dtos/duty.dto.js.map +1 -0
- package/dist/modules/duty/dtos/update-duty.dto.d.ts +5 -0
- package/dist/modules/duty/dtos/update-duty.dto.js +9 -0
- package/dist/modules/duty/dtos/update-duty.dto.js.map +1 -0
- package/dist/modules/duty/duty.controller.d.ts +16 -0
- package/dist/modules/duty/duty.controller.js +186 -0
- package/dist/modules/duty/duty.controller.js.map +1 -0
- package/dist/modules/duty/duty.entity.d.ts +9 -0
- package/dist/modules/duty/duty.entity.js +49 -0
- package/dist/modules/duty/duty.entity.js.map +1 -0
- package/dist/modules/duty/duty.mapper.d.ts +7 -0
- package/dist/modules/duty/duty.mapper.js +45 -0
- package/dist/modules/duty/duty.mapper.js.map +1 -0
- package/dist/modules/duty/duty.module.d.ts +2 -0
- package/dist/modules/duty/duty.module.js +33 -0
- package/dist/modules/duty/duty.module.js.map +1 -0
- package/dist/modules/duty/duty.service.d.ts +13 -0
- package/dist/modules/duty/duty.service.js +60 -0
- package/dist/modules/duty/duty.service.js.map +1 -0
- package/dist/modules/job/dtos/create-job.dto.d.ts +5 -0
- package/dist/modules/job/dtos/create-job.dto.js +14 -0
- package/dist/modules/job/dtos/create-job.dto.js.map +1 -0
- package/dist/modules/job/dtos/job-query.dto.d.ts +6 -0
- package/dist/modules/job/dtos/job-query.dto.js +8 -0
- package/dist/modules/job/dtos/job-query.dto.js.map +1 -0
- package/dist/modules/job/dtos/job.dto.d.ts +11 -0
- package/dist/modules/job/dtos/job.dto.js +67 -0
- package/dist/modules/job/dtos/job.dto.js.map +1 -0
- package/dist/modules/job/dtos/update-job.dto.d.ts +5 -0
- package/dist/modules/job/dtos/update-job.dto.js +9 -0
- package/dist/modules/job/dtos/update-job.dto.js.map +1 -0
- package/dist/modules/job/job.controller.d.ts +16 -0
- package/dist/modules/job/job.controller.js +212 -0
- package/dist/modules/job/job.controller.js.map +1 -0
- package/dist/modules/job/job.entity.d.ts +13 -0
- package/dist/modules/job/job.entity.js +64 -0
- package/dist/modules/job/job.entity.js.map +1 -0
- package/dist/modules/job/job.mapper.d.ts +9 -0
- package/dist/modules/job/job.mapper.js +72 -0
- package/dist/modules/job/job.mapper.js.map +1 -0
- package/dist/modules/job/job.module.d.ts +2 -0
- package/dist/modules/job/job.module.js +33 -0
- package/dist/modules/job/job.module.js.map +1 -0
- package/dist/modules/job/job.service.d.ts +13 -0
- package/dist/modules/job/job.service.js +60 -0
- package/dist/modules/job/job.service.js.map +1 -0
- package/dist/modules/job-duty/job-duty.entity.d.ts +7 -0
- package/dist/modules/job-duty/job-duty.entity.js +33 -0
- package/dist/modules/job-duty/job-duty.entity.js.map +1 -0
- package/dist/modules/module/module.module.js +3 -3
- package/dist/modules/module/module.module.js.map +1 -1
- package/dist/modules/permission/permission.module.js +2 -2
- package/dist/modules/permission/permission.module.js.map +1 -1
- package/dist/modules/role/role.module.js +2 -2
- package/dist/modules/role/role.module.js.map +1 -1
- package/dist/modules/user/dtos/create-user.dto.d.ts +3 -2
- package/dist/modules/user/dtos/create-user.dto.js +1 -0
- package/dist/modules/user/dtos/create-user.dto.js.map +1 -1
- package/dist/modules/user/dtos/update-user.dto.d.ts +4 -2
- package/dist/modules/user/dtos/update-user.dto.js +28 -1
- package/dist/modules/user/dtos/update-user.dto.js.map +1 -1
- package/dist/modules/user/dtos/user.dto.d.ts +5 -0
- package/dist/modules/user/dtos/user.dto.js +34 -3
- package/dist/modules/user/dtos/user.dto.js.map +1 -1
- package/dist/modules/user/user.controller.d.ts +4 -2
- package/dist/modules/user/user.controller.js +37 -13
- package/dist/modules/user/user.controller.js.map +1 -1
- package/dist/modules/user/user.entity.d.ts +5 -0
- package/dist/modules/user/user.entity.js +24 -2
- package/dist/modules/user/user.entity.js.map +1 -1
- package/dist/modules/user/user.mapper.d.ts +2 -2
- package/dist/modules/user/user.mapper.js +30 -8
- package/dist/modules/user/user.mapper.js.map +1 -1
- package/dist/modules/user/user.module.js +7 -3
- package/dist/modules/user/user.module.js.map +1 -1
- package/dist/modules/user/user.service.d.ts +7 -9
- package/dist/modules/user/user.service.js +6 -1
- package/dist/modules/user/user.service.js.map +1 -1
- package/dist/modules/user-job/user-job.entity.d.ts +7 -0
- package/dist/modules/user-job/user-job.entity.js +33 -0
- package/dist/modules/user-job/user-job.entity.js.map +1 -0
- package/dist/security/strategies/jwt.strategy.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,212 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var JobController_1;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.JobController = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
19
|
+
const job_service_1 = require("./job.service");
|
|
20
|
+
const pagination_entity_1 = require("../../core/utils/pagination.entity");
|
|
21
|
+
const header_util_1 = require("../../core/utils/header-util");
|
|
22
|
+
const jwt_auth_guard_1 = require("../../security/guards/jwt-auth.guard");
|
|
23
|
+
const permission_guard_1 = require("../../security/guards/permission.guard");
|
|
24
|
+
const job_dto_1 = require("./dtos/job.dto");
|
|
25
|
+
const create_job_dto_1 = require("./dtos/create-job.dto");
|
|
26
|
+
const update_job_dto_1 = require("./dtos/update-job.dto");
|
|
27
|
+
const job_mapper_1 = require("./job.mapper");
|
|
28
|
+
const job_query_dto_1 = require("./dtos/job-query.dto");
|
|
29
|
+
const permissions_decorator_1 = require("../../security/decorators/permissions.decorator");
|
|
30
|
+
const user_permission_1 = require("../../core/enums/user-permission");
|
|
31
|
+
let JobController = JobController_1 = class JobController {
|
|
32
|
+
constructor(jobService) {
|
|
33
|
+
this.jobService = jobService;
|
|
34
|
+
this.logger = new common_1.Logger(JobController_1.name);
|
|
35
|
+
}
|
|
36
|
+
async getAll(req, query) {
|
|
37
|
+
const pageRequest = new pagination_entity_1.PageRequest(+(query.page ?? 1), +(query.pageSize ?? 10), query.sortField ? `${query.sortField},${query.sortOrder || "ASC"}` : "");
|
|
38
|
+
const whereConditions = {};
|
|
39
|
+
if (query.level1Id) {
|
|
40
|
+
whereConditions.levelOneId = query.level1Id;
|
|
41
|
+
}
|
|
42
|
+
if (query.level2Id) {
|
|
43
|
+
whereConditions.levelTwoId = query.level2Id;
|
|
44
|
+
}
|
|
45
|
+
if (query.level3Id) {
|
|
46
|
+
whereConditions.levelThreeId = query.level3Id;
|
|
47
|
+
}
|
|
48
|
+
const [results, count] = await this.jobService.findAndCount({
|
|
49
|
+
skip: pageRequest.page * pageRequest.size,
|
|
50
|
+
take: pageRequest.size,
|
|
51
|
+
order: pageRequest.sort.asOrder(),
|
|
52
|
+
where: whereConditions,
|
|
53
|
+
});
|
|
54
|
+
const dtos = (0, job_mapper_1.mapJobToJobDtoSelective)(results, [
|
|
55
|
+
"id",
|
|
56
|
+
"nameAr",
|
|
57
|
+
"nameEn",
|
|
58
|
+
"descriptionAr",
|
|
59
|
+
"descriptionEn",
|
|
60
|
+
"code",
|
|
61
|
+
"levelOneId",
|
|
62
|
+
"levelTwoId",
|
|
63
|
+
"levelThreeId",
|
|
64
|
+
"createdAt",
|
|
65
|
+
"updatedAt",
|
|
66
|
+
"createdBy",
|
|
67
|
+
"updatedBy",
|
|
68
|
+
]);
|
|
69
|
+
header_util_1.HeaderUtil.addPaginationHeaders(req.res, count, pageRequest.page, count > (pageRequest.page + 1) * pageRequest.size);
|
|
70
|
+
return dtos;
|
|
71
|
+
}
|
|
72
|
+
async getById(id) {
|
|
73
|
+
const entity = await this.jobService.findById(id);
|
|
74
|
+
if (!entity) {
|
|
75
|
+
throw new common_1.NotFoundException(`Job with id ${id} not found`);
|
|
76
|
+
}
|
|
77
|
+
return (0, job_mapper_1.mapJobToJobDtoSelective)(entity, [
|
|
78
|
+
"id",
|
|
79
|
+
"nameAr",
|
|
80
|
+
"nameEn",
|
|
81
|
+
"descriptionAr",
|
|
82
|
+
"descriptionEn",
|
|
83
|
+
"levelOneId",
|
|
84
|
+
"levelTwoId",
|
|
85
|
+
"levelThreeId",
|
|
86
|
+
"code",
|
|
87
|
+
"createdAt",
|
|
88
|
+
"updatedAt",
|
|
89
|
+
"createdBy",
|
|
90
|
+
"updatedBy",
|
|
91
|
+
]);
|
|
92
|
+
}
|
|
93
|
+
async create(req, dto) {
|
|
94
|
+
try {
|
|
95
|
+
const entity = (0, job_mapper_1.mapCreateJobDtoToEntity)(dto);
|
|
96
|
+
const saved = await this.jobService.save(entity, req.user?.email);
|
|
97
|
+
return (0, job_mapper_1.mapJobToJobDtoSelective)(saved, [
|
|
98
|
+
"id",
|
|
99
|
+
"nameAr",
|
|
100
|
+
"nameEn",
|
|
101
|
+
"descriptionAr",
|
|
102
|
+
"descriptionEn",
|
|
103
|
+
"code",
|
|
104
|
+
"levelOneId",
|
|
105
|
+
"levelTwoId",
|
|
106
|
+
"levelThreeId",
|
|
107
|
+
"createdAt",
|
|
108
|
+
"createdBy",
|
|
109
|
+
"updatedAt",
|
|
110
|
+
"updatedBy",
|
|
111
|
+
]);
|
|
112
|
+
}
|
|
113
|
+
catch (e) {
|
|
114
|
+
this.logger.error(e);
|
|
115
|
+
throw new common_1.BadRequestException("Invalid job data");
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
async update(req, id, dto) {
|
|
119
|
+
const existing = await this.jobService.findById(id);
|
|
120
|
+
if (!existing) {
|
|
121
|
+
throw new common_1.NotFoundException(`Job with id ${id} not found`);
|
|
122
|
+
}
|
|
123
|
+
const entity = (0, job_mapper_1.mapUpdateJobDtoToEntity)({ ...dto, id });
|
|
124
|
+
const saved = await this.jobService.update(entity, req.user?.email);
|
|
125
|
+
return (0, job_mapper_1.mapJobToJobDtoSelective)(saved, [
|
|
126
|
+
"id",
|
|
127
|
+
"nameAr",
|
|
128
|
+
"nameEn",
|
|
129
|
+
"descriptionAr",
|
|
130
|
+
"descriptionEn",
|
|
131
|
+
"levelOneId",
|
|
132
|
+
"levelTwoId",
|
|
133
|
+
"levelThreeId",
|
|
134
|
+
"code",
|
|
135
|
+
"createdAt",
|
|
136
|
+
"createdBy",
|
|
137
|
+
"updatedAt",
|
|
138
|
+
"updatedBy",
|
|
139
|
+
]);
|
|
140
|
+
}
|
|
141
|
+
async delete(id) {
|
|
142
|
+
const existing = await this.jobService.findById(id);
|
|
143
|
+
if (!existing) {
|
|
144
|
+
throw new common_1.NotFoundException(`Job with id ${id} not found`);
|
|
145
|
+
}
|
|
146
|
+
await this.jobService.delete(existing);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
exports.JobController = JobController;
|
|
150
|
+
__decorate([
|
|
151
|
+
(0, common_1.Get)("/"),
|
|
152
|
+
(0, permissions_decorator_1.Permissions)(user_permission_1.UserPermissionEnum.ORGANIZATION_SETTINGS_USER_LIST),
|
|
153
|
+
(0, swagger_1.ApiOperation)({ summary: "Get paginated list of jobs" }),
|
|
154
|
+
(0, swagger_1.ApiResponse)({
|
|
155
|
+
status: 200,
|
|
156
|
+
description: "List all jobs",
|
|
157
|
+
type: job_dto_1.JobDTO,
|
|
158
|
+
isArray: true,
|
|
159
|
+
}),
|
|
160
|
+
__param(0, (0, common_1.Req)()),
|
|
161
|
+
__param(1, (0, common_1.Query)()),
|
|
162
|
+
__metadata("design:type", Function),
|
|
163
|
+
__metadata("design:paramtypes", [Object, job_query_dto_1.JobQueryDTO]),
|
|
164
|
+
__metadata("design:returntype", Promise)
|
|
165
|
+
], JobController.prototype, "getAll", null);
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, common_1.Get)(":id"),
|
|
168
|
+
(0, permissions_decorator_1.Permissions)(user_permission_1.UserPermissionEnum.ORGANIZATION_SETTINGS_USER_READ),
|
|
169
|
+
(0, swagger_1.ApiOperation)({ summary: "Get job by ID" }),
|
|
170
|
+
__param(0, (0, common_1.Param)("id", common_1.ParseIntPipe)),
|
|
171
|
+
__metadata("design:type", Function),
|
|
172
|
+
__metadata("design:paramtypes", [Number]),
|
|
173
|
+
__metadata("design:returntype", Promise)
|
|
174
|
+
], JobController.prototype, "getById", null);
|
|
175
|
+
__decorate([
|
|
176
|
+
(0, common_1.Post)("/"),
|
|
177
|
+
(0, permissions_decorator_1.Permissions)(user_permission_1.UserPermissionEnum.ORGANIZATION_SETTINGS_USER_CREATE),
|
|
178
|
+
(0, swagger_1.ApiOperation)({ summary: "Create a new job" }),
|
|
179
|
+
__param(0, (0, common_1.Req)()),
|
|
180
|
+
__param(1, (0, common_1.Body)()),
|
|
181
|
+
__metadata("design:type", Function),
|
|
182
|
+
__metadata("design:paramtypes", [Object, create_job_dto_1.CreateJobDTO]),
|
|
183
|
+
__metadata("design:returntype", Promise)
|
|
184
|
+
], JobController.prototype, "create", null);
|
|
185
|
+
__decorate([
|
|
186
|
+
(0, common_1.Put)(":id"),
|
|
187
|
+
(0, permissions_decorator_1.Permissions)(user_permission_1.UserPermissionEnum.ORGANIZATION_SETTINGS_USER_UPDATE),
|
|
188
|
+
(0, swagger_1.ApiOperation)({ summary: "Update a job" }),
|
|
189
|
+
__param(0, (0, common_1.Req)()),
|
|
190
|
+
__param(1, (0, common_1.Param)("id", common_1.ParseIntPipe)),
|
|
191
|
+
__param(2, (0, common_1.Body)()),
|
|
192
|
+
__metadata("design:type", Function),
|
|
193
|
+
__metadata("design:paramtypes", [Object, Number, update_job_dto_1.UpdateJobDTO]),
|
|
194
|
+
__metadata("design:returntype", Promise)
|
|
195
|
+
], JobController.prototype, "update", null);
|
|
196
|
+
__decorate([
|
|
197
|
+
(0, common_1.Delete)(":id"),
|
|
198
|
+
(0, permissions_decorator_1.Permissions)(user_permission_1.UserPermissionEnum.ORGANIZATION_SETTINGS_USER_DELETE),
|
|
199
|
+
(0, swagger_1.ApiOperation)({ summary: "Delete a job" }),
|
|
200
|
+
__param(0, (0, common_1.Param)("id", common_1.ParseIntPipe)),
|
|
201
|
+
__metadata("design:type", Function),
|
|
202
|
+
__metadata("design:paramtypes", [Number]),
|
|
203
|
+
__metadata("design:returntype", Promise)
|
|
204
|
+
], JobController.prototype, "delete", null);
|
|
205
|
+
exports.JobController = JobController = JobController_1 = __decorate([
|
|
206
|
+
(0, common_1.Controller)("api/v1/jobs"),
|
|
207
|
+
(0, swagger_1.ApiBearerAuth)(),
|
|
208
|
+
(0, common_1.UseGuards)(jwt_auth_guard_1.AuthGuard, permission_guard_1.PermissionsGuard),
|
|
209
|
+
(0, swagger_1.ApiTags)("jobs"),
|
|
210
|
+
__metadata("design:paramtypes", [job_service_1.JobService])
|
|
211
|
+
], JobController);
|
|
212
|
+
//# sourceMappingURL=job.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job.controller.js","sourceRoot":"","sources":["../../../src/modules/job/job.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAewB;AACxB,6CAKyB;AACzB,+CAA2C;AAC3C,0EAAiE;AACjE,8DAA0D;AAE1D,yEAAiE;AACjE,6EAA0E;AAC1E,4CAAwC;AACxC,0DAAqD;AACrD,0DAAqD;AACrD,6CAIsB;AACtB,wDAAmD;AACnD,2FAA8E;AAC9E,sEAAsE;AAQ/D,IAAM,aAAa,qBAAnB,MAAM,aAAa;IAGxB,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;QAFlC,WAAM,GAAG,IAAI,eAAM,CAAC,eAAa,CAAC,IAAI,CAAC,CAAC;IAE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EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;IAC5B,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,qBAAY,CAAC,CAAA;;;;2CAMtC;wBAtKU,aAAa;IAJzB,IAAA,mBAAU,EAAC,aAAa,CAAC;IACzB,IAAA,uBAAa,GAAE;IACf,IAAA,kBAAS,EAAC,0BAAS,EAAE,mCAAgB,CAAC;IACtC,IAAA,iBAAO,EAAC,MAAM,CAAC;qCAI2B,wBAAU;GAHxC,aAAa,CAuKzB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseEntity } from "../../core/utils/base.entity";
|
|
2
|
+
import { User } from "../user/user.entity";
|
|
3
|
+
export declare class Job extends BaseEntity {
|
|
4
|
+
nameAr: string;
|
|
5
|
+
nameEn: string;
|
|
6
|
+
descriptionAr?: string;
|
|
7
|
+
descriptionEn?: string;
|
|
8
|
+
code?: string;
|
|
9
|
+
users?: User[];
|
|
10
|
+
levelOneId?: number;
|
|
11
|
+
levelTwoId?: number;
|
|
12
|
+
levelThreeId?: number;
|
|
13
|
+
}
|
|
@@ -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.Job = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const base_entity_1 = require("../../core/utils/base.entity");
|
|
15
|
+
const user_entity_1 = require("../user/user.entity");
|
|
16
|
+
let Job = class Job extends base_entity_1.BaseEntity {
|
|
17
|
+
};
|
|
18
|
+
exports.Job = Job;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.Column)({ name: "name_Ar", type: "varchar", length: 100, nullable: false }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], Job.prototype, "nameAr", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ name: "name_En", type: "varchar", length: 100, nullable: false }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], Job.prototype, "nameEn", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ name: "description_Ar", type: "text", nullable: true }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], Job.prototype, "descriptionAr", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ name: "description_En", type: "text", nullable: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], Job.prototype, "descriptionEn", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({
|
|
37
|
+
name: "code",
|
|
38
|
+
type: "varchar",
|
|
39
|
+
length: 50,
|
|
40
|
+
nullable: true,
|
|
41
|
+
unique: true,
|
|
42
|
+
}),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], Job.prototype, "code", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.ManyToMany)(() => user_entity_1.User, (user) => user.jobs),
|
|
47
|
+
__metadata("design:type", Array)
|
|
48
|
+
], Job.prototype, "users", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ name: "level_one_id", type: "int", nullable: true }),
|
|
51
|
+
__metadata("design:type", Number)
|
|
52
|
+
], Job.prototype, "levelOneId", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ name: "level_two_id", type: "int", nullable: true }),
|
|
55
|
+
__metadata("design:type", Number)
|
|
56
|
+
], Job.prototype, "levelTwoId", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ name: "level_three_id", type: "int", nullable: true }),
|
|
59
|
+
__metadata("design:type", Number)
|
|
60
|
+
], Job.prototype, "levelThreeId", void 0);
|
|
61
|
+
exports.Job = Job = __decorate([
|
|
62
|
+
(0, typeorm_1.Entity)("jobs")
|
|
63
|
+
], Job);
|
|
64
|
+
//# sourceMappingURL=job.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job.entity.js","sourceRoot":"","sources":["../../../src/modules/job/job.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,8DAA0D;AAC1D,qDAA2C;AAGpC,IAAM,GAAG,GAAT,MAAM,GAAI,SAAQ,wBAAU;CAiClC,CAAA;AAjCY,kBAAG;AAEd;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;mCAC3D;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;mCAC3D;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CAC1C;AAGvB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CAC1C;AASvB;IAPC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,IAAI;KACb,CAAC;;iCACY;AAGd;IADC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;;kCAC7B;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCAC1C;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCAC1C;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC1C;cAhCX,GAAG;IADf,IAAA,gBAAM,EAAC,MAAM,CAAC;GACF,GAAG,CAiCf"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseDTO } from "../../core/utils/base.dto";
|
|
2
|
+
import { Job } from "./job.entity";
|
|
3
|
+
import { JobDTO } from "./dtos/job.dto";
|
|
4
|
+
import { CreateJobDTO } from "./dtos/create-job.dto";
|
|
5
|
+
import { UpdateJobDTO } from "./dtos/update-job.dto";
|
|
6
|
+
export declare function mapJobToJobDtoSelective(job: Job, keys?: (keyof JobDTO | keyof BaseDTO)[]): Partial<JobDTO>;
|
|
7
|
+
export declare function mapJobToJobDtoSelective(jobs: Job[], keys?: (keyof JobDTO | keyof BaseDTO)[]): Partial<JobDTO>[];
|
|
8
|
+
export declare const mapCreateJobDtoToEntity: (dto: CreateJobDTO) => Job;
|
|
9
|
+
export declare const mapUpdateJobDtoToEntity: (dto: UpdateJobDTO) => Job;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mapUpdateJobDtoToEntity = exports.mapCreateJobDtoToEntity = void 0;
|
|
4
|
+
exports.mapJobToJobDtoSelective = mapJobToJobDtoSelective;
|
|
5
|
+
const job_entity_1 = require("./job.entity");
|
|
6
|
+
const allowedJobDtoKeys = [
|
|
7
|
+
"id",
|
|
8
|
+
"nameAr",
|
|
9
|
+
"nameEn",
|
|
10
|
+
"descriptionAr",
|
|
11
|
+
"descriptionEn",
|
|
12
|
+
"code",
|
|
13
|
+
"levelOneId",
|
|
14
|
+
"levelTwoId",
|
|
15
|
+
"levelThreeId",
|
|
16
|
+
"createdAt",
|
|
17
|
+
"updatedAt",
|
|
18
|
+
"createdBy",
|
|
19
|
+
"updatedBy",
|
|
20
|
+
];
|
|
21
|
+
function mapJobToJobDtoSelective(jobOrJobs, keys) {
|
|
22
|
+
const mapSingle = (job) => {
|
|
23
|
+
const dto = {};
|
|
24
|
+
const keysToMap = (keys || allowedJobDtoKeys).filter((key) => allowedJobDtoKeys.includes(key));
|
|
25
|
+
keysToMap.forEach((key) => {
|
|
26
|
+
if (key in job && job[key] !== undefined) {
|
|
27
|
+
dto[key] = job[key];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
return dto;
|
|
31
|
+
};
|
|
32
|
+
return Array.isArray(jobOrJobs)
|
|
33
|
+
? jobOrJobs.map(mapSingle)
|
|
34
|
+
: mapSingle(jobOrJobs);
|
|
35
|
+
}
|
|
36
|
+
const mapCreateJobDtoToEntity = (dto) => {
|
|
37
|
+
const entity = new job_entity_1.Job();
|
|
38
|
+
entity.nameAr = dto.nameAr;
|
|
39
|
+
entity.nameEn = dto.nameEn;
|
|
40
|
+
entity.descriptionAr = dto.descriptionAr;
|
|
41
|
+
entity.descriptionEn = dto.descriptionEn;
|
|
42
|
+
entity.code = dto.code;
|
|
43
|
+
entity.levelOneId = dto.levelOneId;
|
|
44
|
+
entity.levelTwoId = dto.levelTwoId;
|
|
45
|
+
entity.levelThreeId = dto.levelThreeId;
|
|
46
|
+
return entity;
|
|
47
|
+
};
|
|
48
|
+
exports.mapCreateJobDtoToEntity = mapCreateJobDtoToEntity;
|
|
49
|
+
const mapUpdateJobDtoToEntity = (dto) => {
|
|
50
|
+
const entity = new job_entity_1.Job();
|
|
51
|
+
if (dto.id !== undefined)
|
|
52
|
+
entity.id = dto.id;
|
|
53
|
+
if (dto.nameAr !== undefined)
|
|
54
|
+
entity.nameAr = dto.nameAr;
|
|
55
|
+
if (dto.nameEn !== undefined)
|
|
56
|
+
entity.nameEn = dto.nameEn;
|
|
57
|
+
if (dto.descriptionAr !== undefined)
|
|
58
|
+
entity.descriptionAr = dto.descriptionAr;
|
|
59
|
+
if (dto.descriptionEn !== undefined)
|
|
60
|
+
entity.descriptionEn = dto.descriptionEn;
|
|
61
|
+
if (dto.code !== undefined)
|
|
62
|
+
entity.code = dto.code;
|
|
63
|
+
if (dto.levelOneId !== undefined)
|
|
64
|
+
entity.levelOneId = dto.levelOneId;
|
|
65
|
+
if (dto.levelTwoId !== undefined)
|
|
66
|
+
entity.levelTwoId = dto.levelTwoId;
|
|
67
|
+
if (dto.levelThreeId !== undefined)
|
|
68
|
+
entity.levelThreeId = dto.levelThreeId;
|
|
69
|
+
return entity;
|
|
70
|
+
};
|
|
71
|
+
exports.mapUpdateJobDtoToEntity = mapUpdateJobDtoToEntity;
|
|
72
|
+
//# sourceMappingURL=job.mapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job.mapper.js","sourceRoot":"","sources":["../../../src/modules/job/job.mapper.ts"],"names":[],"mappings":";;;AA8BA,0DAoBC;AAjDD,6CAAmC;AAKnC,MAAM,iBAAiB,GAAgD;IACrE,IAAI;IACJ,QAAQ;IACR,QAAQ;IACR,eA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ChB,CAAC,CAAC;AAbW,QAAA,uBAAuB,2BAalC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.JobModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
|
+
const core_1 = require("@nestjs/core");
|
|
13
|
+
const common_2 = require("../../common");
|
|
14
|
+
const permission_guard_1 = require("../../security/guards/permission.guard");
|
|
15
|
+
const user_module_1 = require("../user/user.module");
|
|
16
|
+
const job_entity_1 = require("./job.entity");
|
|
17
|
+
const job_service_1 = require("./job.service");
|
|
18
|
+
const job_controller_1 = require("./job.controller");
|
|
19
|
+
let JobModule = class JobModule {
|
|
20
|
+
};
|
|
21
|
+
exports.JobModule = JobModule;
|
|
22
|
+
exports.JobModule = JobModule = __decorate([
|
|
23
|
+
(0, common_1.Module)({
|
|
24
|
+
imports: [
|
|
25
|
+
typeorm_1.TypeOrmModule.forFeature([job_entity_1.Job], common_2.AUTH_DATABASE_CONNECTION),
|
|
26
|
+
(0, common_1.forwardRef)(() => user_module_1.UserModule),
|
|
27
|
+
],
|
|
28
|
+
controllers: [job_controller_1.JobController],
|
|
29
|
+
providers: [job_service_1.JobService, core_1.Reflector, permission_guard_1.PermissionsGuard],
|
|
30
|
+
exports: [job_service_1.JobService, typeorm_1.TypeOrmModule],
|
|
31
|
+
})
|
|
32
|
+
], JobModule);
|
|
33
|
+
//# sourceMappingURL=job.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job.module.js","sourceRoot":"","sources":["../../../src/modules/job/job.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,6CAAgD;AAChD,uCAAyC;AACzC,yCAAwD;AACxD,6EAA0E;AAC1E,qDAAiD;AACjD,6CAAmC;AACnC,+CAA2C;AAC3C,qDAAiD;AAW1C,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IATrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC,CAAC,gBAAG,CAAC,EAAE,iCAAwB,CAAC;YACzD,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;SAC7B;QACD,WAAW,EAAE,CAAC,8BAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,wBAAU,EAAE,gBAAS,EAAE,mCAAgB,CAAC;QACpD,OAAO,EAAE,CAAC,wBAAU,EAAE,uBAAa,CAAC;KACrC,CAAC;GACW,SAAS,CAAG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Repository, FindOneOptions, FindManyOptions } from "typeorm";
|
|
2
|
+
import { Job } from "./job.entity";
|
|
3
|
+
export declare class JobService {
|
|
4
|
+
private readonly jobRepository;
|
|
5
|
+
constructor(jobRepository: Repository<Job>);
|
|
6
|
+
findById(id: number): Promise<Job | null>;
|
|
7
|
+
findByFields(options: FindOneOptions<Job>): Promise<Job | null>;
|
|
8
|
+
find(options: FindManyOptions<Job>): Promise<Job[]>;
|
|
9
|
+
findAndCount(options: FindManyOptions<Job>): Promise<[Job[], number]>;
|
|
10
|
+
save(entity: Job, creator?: string): Promise<Job>;
|
|
11
|
+
update(entity: Job, updater?: string): Promise<Job>;
|
|
12
|
+
delete(entity: Job): Promise<Job>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.JobService = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
18
|
+
const typeorm_2 = require("typeorm");
|
|
19
|
+
const job_entity_1 = require("./job.entity");
|
|
20
|
+
const common_2 = require("../../common");
|
|
21
|
+
let JobService = class JobService {
|
|
22
|
+
constructor(jobRepository) {
|
|
23
|
+
this.jobRepository = jobRepository;
|
|
24
|
+
}
|
|
25
|
+
async findById(id) {
|
|
26
|
+
return this.jobRepository.findOne({ where: { id } });
|
|
27
|
+
}
|
|
28
|
+
async findByFields(options) {
|
|
29
|
+
return this.jobRepository.findOne(options);
|
|
30
|
+
}
|
|
31
|
+
async find(options) {
|
|
32
|
+
return this.jobRepository.find(options);
|
|
33
|
+
}
|
|
34
|
+
async findAndCount(options) {
|
|
35
|
+
return this.jobRepository.findAndCount(options);
|
|
36
|
+
}
|
|
37
|
+
async save(entity, creator) {
|
|
38
|
+
if (creator) {
|
|
39
|
+
entity.createdBy = creator;
|
|
40
|
+
entity.updatedBy = creator;
|
|
41
|
+
}
|
|
42
|
+
return this.jobRepository.save(entity);
|
|
43
|
+
}
|
|
44
|
+
async update(entity, updater) {
|
|
45
|
+
if (updater) {
|
|
46
|
+
entity.updatedBy = updater;
|
|
47
|
+
}
|
|
48
|
+
return this.jobRepository.save(entity);
|
|
49
|
+
}
|
|
50
|
+
async delete(entity) {
|
|
51
|
+
return this.jobRepository.remove(entity);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
exports.JobService = JobService;
|
|
55
|
+
exports.JobService = JobService = __decorate([
|
|
56
|
+
(0, common_1.Injectable)(),
|
|
57
|
+
__param(0, (0, typeorm_1.InjectRepository)(job_entity_1.Job, common_2.AUTH_DATABASE_CONNECTION)),
|
|
58
|
+
__metadata("design:paramtypes", [typeorm_2.Repository])
|
|
59
|
+
], JobService);
|
|
60
|
+
//# sourceMappingURL=job.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job.service.js","sourceRoot":"","sources":["../../../src/modules/job/job.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,qCAAsE;AACtE,6CAAmC;AACnC,yCAAwD;AAGjD,IAAM,UAAU,GAAhB,MAAM,UAAU;IACrB,YAEmB,aAA8B;QAA9B,kBAAa,GAAb,aAAa,CAAiB;IAC9C,CAAC;IAEJ,KAAK,CAAC,QAAQ,CAAC,EAAU;QACvB,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,OAA4B;QAC7C,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAA6B;QACtC,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,OAA6B;QAC9C,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,MAAW,EAAE,OAAgB;QACtC,IAAI,OAAO,EAAE,CAAC;YACZ,MAAM,CAAC,SAAS,GAAG,OAAO,CAAC;YAC3B,MAAM,CAAC,SAAS,GAAG,OAAO,CAAC;QAC7B,CAAC;QACD,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,MAAW,EAAE,OAAgB;QACxC,IAAI,OAAO,EAAE,CAAC;YACZ,MAAM,CAAC,SAAS,GAAG,OAAO,CAAC;QAC7B,CAAC;QACD,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,MAAW;QACtB,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;CACF,CAAA;AAxCY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,gBAAG,EAAE,iCAAwB,CAAC,CAAA;qCAChB,oBAAU;GAHjC,UAAU,CAwCtB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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.JobDuty = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const base_entity_1 = require("../../core/utils/base.entity");
|
|
15
|
+
const job_entity_1 = require("../job/job.entity");
|
|
16
|
+
const duty_entity_1 = require("../duty/duty.entity");
|
|
17
|
+
let JobDuty = class JobDuty extends base_entity_1.BaseEntity {
|
|
18
|
+
};
|
|
19
|
+
exports.JobDuty = JobDuty;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.ManyToOne)(() => job_entity_1.Job, { onDelete: "CASCADE" }),
|
|
22
|
+
(0, typeorm_1.JoinColumn)({ name: "job_id" }),
|
|
23
|
+
__metadata("design:type", job_entity_1.Job)
|
|
24
|
+
], JobDuty.prototype, "job", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.ManyToOne)(() => duty_entity_1.Duty, { onDelete: "CASCADE" }),
|
|
27
|
+
(0, typeorm_1.JoinColumn)({ name: "duty_id" }),
|
|
28
|
+
__metadata("design:type", duty_entity_1.Duty)
|
|
29
|
+
], JobDuty.prototype, "duty", void 0);
|
|
30
|
+
exports.JobDuty = JobDuty = __decorate([
|
|
31
|
+
(0, typeorm_1.Entity)("job_duties")
|
|
32
|
+
], JobDuty);
|
|
33
|
+
//# sourceMappingURL=job-duty.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job-duty.entity.js","sourceRoot":"","sources":["../../../src/modules/job-duty/job-duty.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwD;AACxD,8DAA0D;AAC1D,kDAAwC;AACxC,qDAA2C;AAGpC,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,wBAAU;CAQtC,CAAA;AARY,0BAAO;AAGlB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gBAAG,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC7C,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;8BACzB,gBAAG;oCAAC;AAIV;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC9C,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8BACzB,kBAAI;qCAAC;kBAPD,OAAO;IADnB,IAAA,gBAAM,EAAC,YAAY,CAAC;GACR,OAAO,CAQnB"}
|
|
@@ -8,8 +8,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.ModuleModule = void 0;
|
|
10
10
|
const common_1 = require("@nestjs/common");
|
|
11
|
-
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
11
|
const core_1 = require("@nestjs/core");
|
|
12
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
13
13
|
const module_service_1 = require("./module.service");
|
|
14
14
|
const module_controller_1 = require("./module.controller");
|
|
15
15
|
const module_entity_1 = require("./module.entity");
|
|
@@ -26,8 +26,8 @@ exports.ModuleModule = ModuleModule = __decorate([
|
|
|
26
26
|
user_module_1.UserModule,
|
|
27
27
|
],
|
|
28
28
|
controllers: [module_controller_1.ModuleController],
|
|
29
|
-
providers: [module_service_1.ModuleService,
|
|
30
|
-
exports: [module_service_1.ModuleService, typeorm_1.TypeOrmModule
|
|
29
|
+
providers: [module_service_1.ModuleService, core_1.Reflector, permission_guard_1.PermissionsGuard],
|
|
30
|
+
exports: [module_service_1.ModuleService, typeorm_1.TypeOrmModule],
|
|
31
31
|
})
|
|
32
32
|
], ModuleModule);
|
|
33
33
|
//# sourceMappingURL=module.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.module.js","sourceRoot":"","sources":["../../../src/modules/module/module.module.ts"],"names":[],"mappings":";;;;;;;;;AACA,2CAAwC;AACxC,6CAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"module.module.js","sourceRoot":"","sources":["../../../src/modules/module/module.module.ts"],"names":[],"mappings":";;;;;;;;;AACA,2CAAwC;AACxC,uCAAyC;AACzC,6CAAgD;AAChD,qDAAiD;AACjD,2DAAuD;AACvD,mDAA+C;AAC/C,yCAAwD;AACxD,6EAA0E;AAC1E,qDAAiD;AAW1C,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IATxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC,CAAC,4BAAY,CAAC,EAAE,iCAAwB,CAAC;YAClE,wBAAU;SACX;QACD,WAAW,EAAE,CAAC,oCAAgB,CAAC;QAC/B,SAAS,EAAE,CAAC,8BAAa,EAAE,gBAAS,EAAE,mCAAgB,CAAC;QACvD,OAAO,EAAE,CAAC,8BAAa,EAAE,uBAAa,CAAC;KACxC,CAAC;GACW,YAAY,CAAG"}
|
|
@@ -8,8 +8,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.PermissionModule = void 0;
|
|
10
10
|
const common_1 = require("@nestjs/common");
|
|
11
|
-
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
11
|
const core_1 = require("@nestjs/core");
|
|
12
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
13
13
|
const permission_controller_1 = require("./permission.controller");
|
|
14
14
|
const permission_service_1 = require("./permission.service");
|
|
15
15
|
const permission_entity_1 = require("./permission.entity");
|
|
@@ -26,7 +26,7 @@ exports.PermissionModule = PermissionModule = __decorate([
|
|
|
26
26
|
user_module_1.UserModule,
|
|
27
27
|
],
|
|
28
28
|
controllers: [permission_controller_1.PermissionController],
|
|
29
|
-
providers: [permission_service_1.PermissionService,
|
|
29
|
+
providers: [permission_service_1.PermissionService, core_1.Reflector, permission_guard_1.PermissionsGuard],
|
|
30
30
|
exports: [permission_service_1.PermissionService, typeorm_1.TypeOrmModule],
|
|
31
31
|
})
|
|
32
32
|
], PermissionModule);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission.module.js","sourceRoot":"","sources":["../../../src/modules/permission/permission.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"permission.module.js","sourceRoot":"","sources":["../../../src/modules/permission/permission.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,uCAAyC;AACzC,6CAAgD;AAChD,mEAA+D;AAC/D,6DAAyD;AACzD,2DAAiD;AACjD,yCAAwD;AACxD,6EAA0E;AAC1E,qDAAiD;AAW1C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAT5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,UAAU,CAAC,CAAC,8BAAU,CAAC,EAAE,iCAAwB,CAAC;YAChE,wBAAU;SACX;QACD,WAAW,EAAE,CAAC,4CAAoB,CAAC;QACnC,SAAS,EAAE,CAAC,sCAAiB,EAAE,gBAAS,EAAE,mCAAgB,CAAC;QAC3D,OAAO,EAAE,CAAC,sCAAiB,EAAE,uBAAa,CAAC;KAC5C,CAAC;GACW,gBAAgB,CAAG"}
|
|
@@ -8,8 +8,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.RoleModule = void 0;
|
|
10
10
|
const common_1 = require("@nestjs/common");
|
|
11
|
-
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
11
|
const core_1 = require("@nestjs/core");
|
|
12
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
13
13
|
const role_controller_1 = require("./role.controller");
|
|
14
14
|
const role_service_1 = require("./role.service");
|
|
15
15
|
const role_entity_1 = require("./role.entity");
|
|
@@ -29,7 +29,7 @@ exports.RoleModule = RoleModule = __decorate([
|
|
|
29
29
|
user_module_1.UserModule,
|
|
30
30
|
],
|
|
31
31
|
controllers: [role_controller_1.RoleController],
|
|
32
|
-
providers: [role_service_1.RoleService,
|
|
32
|
+
providers: [role_service_1.RoleService, core_1.Reflector, permission_guard_1.PermissionsGuard],
|
|
33
33
|
exports: [role_service_1.RoleService, typeorm_1.TypeOrmModule],
|
|
34
34
|
})
|
|
35
35
|
], RoleModule);
|