@platform-modules/civil-aviation-authority 2.3.183 → 2.3.185
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/.env +9 -17
- package/dist/data-source.js +5 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -2
- package/dist/models/ITApprovalSettings.d.ts +7 -0
- package/dist/models/ITApprovalSettings.js +40 -0
- package/dist/models/ITServicesTypesMuscatModel.d.ts +6 -0
- package/dist/models/ITServicesTypesMuscatModel.js +34 -0
- package/dist/models/ITServicesTypesSalalahModel.d.ts +6 -0
- package/dist/models/ITServicesTypesSalalahModel.js +34 -0
- package/dist/models/RequestATenderRequestModel.d.ts +37 -0
- package/dist/models/RequestATenderRequestModel.js +143 -0
- package/dist/models/RequestTenderAnalysisRequestModel.d.ts +22 -0
- package/dist/models/RequestTenderAnalysisRequestModel.js +98 -0
- package/dist/models/RespondToEnquiriesRequestModel.d.ts +1 -7
- package/dist/models/RespondToEnquiriesRequestModel.js +3 -20
- package/dist/models/Workflows.d.ts +9 -0
- package/dist/models/Workflows.js +31 -0
- package/package.json +24 -24
- package/src/data-source.ts +5 -1
- package/src/index.ts +414 -413
- package/src/models/AccommodationApprovalModel.ts +8 -8
- package/src/models/AccommodationRequestModel.ts +8 -8
- package/src/models/AirportEntryPermitModel.ts +276 -276
- package/src/models/AnnualIncrementRequestEmployeeModel.ts +65 -65
- package/src/models/AnnualIncrementRequestModel.ts +25 -25
- package/src/models/AnnualTrainingPlanRequestModel.ts +153 -153
- package/src/models/AppealAgainstAdministrativeDecisionRequestModel.ts +23 -23
- package/src/models/CAAServices.ts +33 -33
- package/src/models/CAASubServices.ts +33 -33
- package/src/models/CAIRatingMasterModel.ts +39 -39
- package/src/models/CSRMBusinessImpactRatingMasterModel.ts +25 -25
- package/src/models/CSRMLikelihoodMasterModel.ts +25 -25
- package/src/models/CashAllowanceLeaveRequestModel.ts +11 -11
- package/src/models/DepartmentsModel.ts +25 -25
- package/src/models/DocumentDriveModel.ts +28 -28
- package/src/models/DocumentFolderModel.ts +45 -45
- package/src/models/HousingContractCancelChatModel.ts +56 -56
- package/src/models/HousingContractRenewalChatModel.ts +59 -59
- package/src/models/HrServiceRequestModel.ts +193 -193
- package/src/models/ITRequestAttachmentModel.ts +73 -73
- package/src/models/ITRequestChatModel.ts +74 -74
- package/src/models/ItApprovalsModel.ts +84 -84
- package/src/models/ItWorkflowModel.ts +55 -55
- package/src/models/MissionTravelPassportExpiryNotificationConfigModel.ts +36 -36
- package/src/models/PerformanceCyclePeriodModel.ts +26 -26
- package/src/models/PerformanceGoalMasterModel.ts +27 -27
- package/src/models/PerformanceManagementRequestGoalModel.ts +46 -46
- package/src/models/PerformanceManagementRequestModel.ts +14 -14
- package/src/models/PromotionRequestModel.ts +11 -11
- package/src/models/RequestATenderRequestModel.ts +102 -0
- package/src/models/RequestTenderAnalysisRequestModel.ts +65 -0
- package/src/models/ResidentialUnitRentalChatModel.ts +56 -56
- package/src/models/ResidentialUnitRentalRequestModel.ts +218 -218
- package/src/models/RespondToEnquiriesRequestModel.ts +31 -48
- package/src/models/ServicesNotificationConfigModel.ts +55 -55
- package/src/models/StudyLeaveRequestModel.ts +144 -144
- package/src/models/TrainingRequestModel.ts +164 -164
- package/src/models/TrainingRoomBookingRequestModel.ts +142 -142
- package/src/models/TrainingRoomNotificationConfigModel.ts +30 -30
- package/src/models/UserSkillModel.ts +56 -56
- package/dist/models/DocumentMetadataModel.d.ts +0 -45
- package/dist/models/DocumentMetadataModel.js +0 -171
- package/dist/models/DocumentationDepartmentsModel.d.ts +0 -13
- package/dist/models/DocumentationDepartmentsModel.js +0 -53
- package/dist/models/FolderModel.d.ts +0 -16
- package/dist/models/FolderModel.js +0 -85
- package/dist/models/PermissionModel.d.ts +0 -18
- package/dist/models/PermissionModel.js +0 -68
- package/dist/models/UUIDBaseModel.d.ts +0 -14
- package/dist/models/UUIDBaseModel.js +0 -66
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
/**
|
|
3
|
-
* Documentation Service specific department configuration
|
|
4
|
-
* Links departments with authorized persons for document management
|
|
5
|
-
*/
|
|
6
|
-
export declare class DocumentationDepartments extends BaseModel {
|
|
7
|
-
department_id: number;
|
|
8
|
-
authorized_person_id: string;
|
|
9
|
-
authorized_person_name?: string;
|
|
10
|
-
authorized_person_email?: string;
|
|
11
|
-
is_active: boolean;
|
|
12
|
-
constructor(department_id: number, authorized_person_id: string, authorized_person_name: string, authorized_person_email: string, is_active?: boolean);
|
|
13
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
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.DocumentationDepartments = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
/**
|
|
16
|
-
* Documentation Service specific department configuration
|
|
17
|
-
* Links departments with authorized persons for document management
|
|
18
|
-
*/
|
|
19
|
-
let DocumentationDepartments = class DocumentationDepartments extends BaseModel_1.BaseModel {
|
|
20
|
-
constructor(department_id, authorized_person_id, authorized_person_name, authorized_person_email, is_active = true) {
|
|
21
|
-
super();
|
|
22
|
-
this.department_id = department_id;
|
|
23
|
-
this.authorized_person_id = authorized_person_id;
|
|
24
|
-
this.authorized_person_name = authorized_person_name;
|
|
25
|
-
this.authorized_person_email = authorized_person_email;
|
|
26
|
-
this.is_active = is_active;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
exports.DocumentationDepartments = DocumentationDepartments;
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
32
|
-
__metadata("design:type", Number)
|
|
33
|
-
], DocumentationDepartments.prototype, "department_id", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
36
|
-
__metadata("design:type", String)
|
|
37
|
-
], DocumentationDepartments.prototype, "authorized_person_id", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], DocumentationDepartments.prototype, "authorized_person_name", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], DocumentationDepartments.prototype, "authorized_person_email", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
48
|
-
__metadata("design:type", Boolean)
|
|
49
|
-
], DocumentationDepartments.prototype, "is_active", void 0);
|
|
50
|
-
exports.DocumentationDepartments = DocumentationDepartments = __decorate([
|
|
51
|
-
(0, typeorm_1.Entity)({ name: 'documentation_departments' }),
|
|
52
|
-
__metadata("design:paramtypes", [Number, String, String, String, Boolean])
|
|
53
|
-
], DocumentationDepartments);
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Departments } from './DepartmentsModel';
|
|
2
|
-
import { UUIDBaseModel } from './UUIDBaseModel';
|
|
3
|
-
export declare class Folder extends UUIDBaseModel {
|
|
4
|
-
name: string;
|
|
5
|
-
path: string;
|
|
6
|
-
parent_path?: string;
|
|
7
|
-
department: Departments;
|
|
8
|
-
department_id: number;
|
|
9
|
-
description?: string;
|
|
10
|
-
access_level: 'general' | 'restricted';
|
|
11
|
-
allowed_roles: string[];
|
|
12
|
-
allowed_users: string[];
|
|
13
|
-
created_by_name?: string;
|
|
14
|
-
is_active: boolean;
|
|
15
|
-
constructor(name: string, path: string, department_id: number, created_by: string, access_level?: 'general' | 'restricted', parent_path?: string, description?: string, created_by_name?: string, allowed_roles?: string[], allowed_users?: string[], is_active?: boolean);
|
|
16
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
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.Folder = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const DepartmentsModel_1 = require("./DepartmentsModel");
|
|
15
|
-
const UUIDBaseModel_1 = require("./UUIDBaseModel");
|
|
16
|
-
// Note: DocumentMetadata import removed to avoid circular dependency
|
|
17
|
-
// Use lazy loading or query builder when needed
|
|
18
|
-
let Folder = class Folder extends UUIDBaseModel_1.UUIDBaseModel {
|
|
19
|
-
constructor(name, path, department_id, created_by, access_level = 'general', parent_path, description, created_by_name, allowed_roles, allowed_users, is_active = true) {
|
|
20
|
-
super();
|
|
21
|
-
this.name = name;
|
|
22
|
-
this.path = path;
|
|
23
|
-
this.department_id = department_id;
|
|
24
|
-
this.created_by = created_by;
|
|
25
|
-
this.access_level = access_level;
|
|
26
|
-
this.parent_path = parent_path;
|
|
27
|
-
this.description = description;
|
|
28
|
-
this.created_by_name = created_by_name;
|
|
29
|
-
this.allowed_roles = allowed_roles || [];
|
|
30
|
-
this.allowed_users = allowed_users || [];
|
|
31
|
-
this.is_active = is_active;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
exports.Folder = Folder;
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
37
|
-
__metadata("design:type", String)
|
|
38
|
-
], Folder.prototype, "name", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 1000 }),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], Folder.prototype, "path", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 1000, nullable: true }),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], Folder.prototype, "parent_path", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, typeorm_1.ManyToOne)('Departments', { eager: true }),
|
|
49
|
-
(0, typeorm_1.JoinColumn)({ name: 'department_id' }),
|
|
50
|
-
__metadata("design:type", DepartmentsModel_1.Departments)
|
|
51
|
-
], Folder.prototype, "department", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
54
|
-
__metadata("design:type", Number)
|
|
55
|
-
], Folder.prototype, "department_id", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
58
|
-
__metadata("design:type", String)
|
|
59
|
-
], Folder.prototype, "description", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, typeorm_1.Column)({ type: 'enum', enum: ['general', 'restricted'], default: 'general' }),
|
|
62
|
-
(0, typeorm_1.Index)(),
|
|
63
|
-
__metadata("design:type", String)
|
|
64
|
-
], Folder.prototype, "access_level", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, typeorm_1.Column)({ type: 'text', array: true, default: [] }),
|
|
67
|
-
__metadata("design:type", Array)
|
|
68
|
-
], Folder.prototype, "allowed_roles", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, typeorm_1.Column)({ type: 'text', array: true, default: [] }),
|
|
71
|
-
__metadata("design:type", Array)
|
|
72
|
-
], Folder.prototype, "allowed_users", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
75
|
-
__metadata("design:type", String)
|
|
76
|
-
], Folder.prototype, "created_by_name", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
79
|
-
(0, typeorm_1.Index)(),
|
|
80
|
-
__metadata("design:type", Boolean)
|
|
81
|
-
], Folder.prototype, "is_active", void 0);
|
|
82
|
-
exports.Folder = Folder = __decorate([
|
|
83
|
-
(0, typeorm_1.Entity)({ name: 'folders' }),
|
|
84
|
-
__metadata("design:paramtypes", [String, String, Number, String, String, String, String, String, Array, Array, Boolean])
|
|
85
|
-
], Folder);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Role } from './role';
|
|
2
|
-
import { UUIDBaseModel } from './UUIDBaseModel';
|
|
3
|
-
export declare enum PermissionType {
|
|
4
|
-
VIEW = "view",
|
|
5
|
-
UPLOAD = "upload",
|
|
6
|
-
UPDATE = "update",
|
|
7
|
-
DELETE = "delete",
|
|
8
|
-
PUBLISH = "publish"
|
|
9
|
-
}
|
|
10
|
-
export declare class Permission extends UUIDBaseModel {
|
|
11
|
-
name: string;
|
|
12
|
-
code: string;
|
|
13
|
-
type: PermissionType;
|
|
14
|
-
description?: string;
|
|
15
|
-
is_active: boolean;
|
|
16
|
-
roles: Role[];
|
|
17
|
-
constructor(name: string, code: string, type: PermissionType, created_by: string, description?: string, is_active?: boolean);
|
|
18
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
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.Permission = exports.PermissionType = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const role_1 = require("./role");
|
|
15
|
-
const UUIDBaseModel_1 = require("./UUIDBaseModel");
|
|
16
|
-
var PermissionType;
|
|
17
|
-
(function (PermissionType) {
|
|
18
|
-
PermissionType["VIEW"] = "view";
|
|
19
|
-
PermissionType["UPLOAD"] = "upload";
|
|
20
|
-
PermissionType["UPDATE"] = "update";
|
|
21
|
-
PermissionType["DELETE"] = "delete";
|
|
22
|
-
PermissionType["PUBLISH"] = "publish";
|
|
23
|
-
})(PermissionType || (exports.PermissionType = PermissionType = {}));
|
|
24
|
-
let Permission = class Permission extends UUIDBaseModel_1.UUIDBaseModel {
|
|
25
|
-
constructor(name, code, type, created_by, description, is_active = true) {
|
|
26
|
-
super();
|
|
27
|
-
this.name = name;
|
|
28
|
-
this.code = code;
|
|
29
|
-
this.type = type;
|
|
30
|
-
this.created_by = created_by;
|
|
31
|
-
this.description = description;
|
|
32
|
-
this.is_active = is_active;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
exports.Permission = Permission;
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 100, unique: true }),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], Permission.prototype, "name", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 50, unique: true }),
|
|
42
|
-
__metadata("design:type", String)
|
|
43
|
-
], Permission.prototype, "code", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({ type: 'enum', enum: PermissionType }),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], Permission.prototype, "type", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
50
|
-
__metadata("design:type", String)
|
|
51
|
-
], Permission.prototype, "description", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
54
|
-
__metadata("design:type", Boolean)
|
|
55
|
-
], Permission.prototype, "is_active", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, typeorm_1.ManyToMany)(() => role_1.Role),
|
|
58
|
-
(0, typeorm_1.JoinTable)({
|
|
59
|
-
name: 'role_permissions',
|
|
60
|
-
joinColumn: { name: 'permission_id', referencedColumnName: 'id' },
|
|
61
|
-
inverseJoinColumn: { name: 'role_id', referencedColumnName: 'id' },
|
|
62
|
-
}),
|
|
63
|
-
__metadata("design:type", Array)
|
|
64
|
-
], Permission.prototype, "roles", void 0);
|
|
65
|
-
exports.Permission = Permission = __decorate([
|
|
66
|
-
(0, typeorm_1.Entity)({ name: 'permissions' }),
|
|
67
|
-
__metadata("design:paramtypes", [String, String, String, String, String, Boolean])
|
|
68
|
-
], Permission);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare abstract class UUIDModel0 {
|
|
2
|
-
jsonIgnore: string[];
|
|
3
|
-
created_by?: string;
|
|
4
|
-
created_at?: Date;
|
|
5
|
-
updated_by?: string;
|
|
6
|
-
updated_at?: Date;
|
|
7
|
-
insertCreated(): void;
|
|
8
|
-
is_deleted?: boolean;
|
|
9
|
-
constructor();
|
|
10
|
-
}
|
|
11
|
-
export declare abstract class UUIDBaseModel extends UUIDModel0 {
|
|
12
|
-
id: string;
|
|
13
|
-
constructor();
|
|
14
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.UUIDBaseModel = exports.UUIDModel0 = void 0;
|
|
16
|
-
const moment_timezone_1 = __importDefault(require("moment-timezone"));
|
|
17
|
-
const typeorm_1 = require("typeorm");
|
|
18
|
-
class UUIDModel0 {
|
|
19
|
-
insertCreated() {
|
|
20
|
-
const currentTime = (0, moment_timezone_1.default)().utc().tz('Asia/Kolkata').toDate();
|
|
21
|
-
this.created_at = currentTime;
|
|
22
|
-
this.updated_at = currentTime;
|
|
23
|
-
}
|
|
24
|
-
constructor() {
|
|
25
|
-
this.jsonIgnore = ['logicalDelete', 'is_deleted', 'jsonIgnore'];
|
|
26
|
-
this.is_deleted = false;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.UUIDModel0 = UUIDModel0;
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
32
|
-
__metadata("design:type", String)
|
|
33
|
-
], UUIDModel0.prototype, "created_by", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, typeorm_1.CreateDateColumn)({ type: "timestamptz", default: () => "CURRENT_TIMESTAMP" }),
|
|
36
|
-
__metadata("design:type", Date)
|
|
37
|
-
], UUIDModel0.prototype, "created_at", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], UUIDModel0.prototype, "updated_by", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.UpdateDateColumn)({ type: "timestamptz", default: () => "CURRENT_TIMESTAMP" }),
|
|
44
|
-
__metadata("design:type", Date)
|
|
45
|
-
], UUIDModel0.prototype, "updated_at", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, typeorm_1.BeforeInsert)(),
|
|
48
|
-
__metadata("design:type", Function),
|
|
49
|
-
__metadata("design:paramtypes", []),
|
|
50
|
-
__metadata("design:returntype", void 0)
|
|
51
|
-
], UUIDModel0.prototype, "insertCreated", null);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, typeorm_1.Column)({ nullable: true, default: false }),
|
|
54
|
-
__metadata("design:type", Boolean)
|
|
55
|
-
], UUIDModel0.prototype, "is_deleted", void 0);
|
|
56
|
-
class UUIDBaseModel extends UUIDModel0 {
|
|
57
|
-
constructor() {
|
|
58
|
-
super();
|
|
59
|
-
this.id = ''; // This will be set by the database when the entity is saved
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
exports.UUIDBaseModel = UUIDBaseModel;
|
|
63
|
-
__decorate([
|
|
64
|
-
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
65
|
-
__metadata("design:type", String)
|
|
66
|
-
], UUIDBaseModel.prototype, "id", void 0);
|